-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into process-binary
- Loading branch information
Showing
59 changed files
with
1,831 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Configuration Boards | ||
==================== | ||
|
||
This folder contains Tock kernel configurations for boards designed for very | ||
specific purposes. These are not expected to be general purpose boards (the root | ||
boards/ directory stores those), but instead these boards are configured to | ||
expose specific functionality, likely for testing. | ||
|
||
Many functions in Tock are configurable, and each board is free to select the | ||
preferred configuration based on hardware features or intended use cases. This | ||
often means, however, that there are many kernel configurations that _no_ boards | ||
use, making it difficult to test those configurations. | ||
|
||
For example, checking process credentials can use different credential policies. | ||
A configuration board can be configured with a specific credential checker, even | ||
if no root-level board wants to use that configuration. | ||
|
||
Directory Structure and Naming | ||
------------------------------ | ||
|
||
Boards in this `boards/configurations` directory should be organized by the root | ||
board type. The name must be `<board>-test-[configuration]`. For example: | ||
|
||
``` | ||
boards/configurations/ | ||
nrf52840dk/ | ||
nrf52840k-test-[configuration1] | ||
nrf52840k-test-[configuration2] | ||
imix/ | ||
imix-test-[configuration1] | ||
imix-test-[configuration2] | ||
``` | ||
|
||
Each specific board configuration for each root board should have a descriptive | ||
name. For example, if a configuration of the nrf52840dk is designed for running | ||
kernel tests, the board might be called `nrf52840dk/nrf52840dk-test-kernel`. |
20 changes: 20 additions & 0 deletions
20
boards/configurations/nrf52840dk/nrf52840dk-test-appid-sha256/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Licensed under the Apache License, Version 2.0 or the MIT License. | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
# Copyright Tock Contributors 2024. | ||
|
||
[package] | ||
name = "nrf52840dk-test-appid-sha256" | ||
version.workspace = true | ||
authors.workspace = true | ||
build = "../../../build.rs" | ||
edition.workspace = true | ||
|
||
[dependencies] | ||
components = { path = "../../../components" } | ||
cortexm4 = { path = "../../../../arch/cortex-m4" } | ||
kernel = { path = "../../../../kernel" } | ||
nrf52840 = { path = "../../../../chips/nrf52840" } | ||
nrf52_components = { path = "../../../nordic/nrf52_components" } | ||
|
||
capsules-core = { path = "../../../../capsules/core" } | ||
capsules-extra = { path = "../../../../capsules/extra" } |
9 changes: 9 additions & 0 deletions
9
boards/configurations/nrf52840dk/nrf52840dk-test-appid-sha256/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Licensed under the Apache License, Version 2.0 or the MIT License. | ||
# SPDX-License-Identifier: Apache-2.0 OR MIT | ||
# Copyright Tock Contributors 2024. | ||
|
||
TARGET=thumbv7em-none-eabi | ||
PLATFORM=nrf52840dk-test-appid-sha256 | ||
|
||
include ../../../Makefile.common | ||
include ../nrf52840dk.mk |
4 changes: 4 additions & 0 deletions
4
boards/configurations/nrf52840dk/nrf52840dk-test-appid-sha256/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
nRF52840-DK SHA256 AppID Test Board | ||
=================================== | ||
|
||
This is a minimal kernel for testing with SHA256 credential checking. |
6 changes: 6 additions & 0 deletions
6
boards/configurations/nrf52840dk/nrf52840dk-test-appid-sha256/layout.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* Licensed under the Apache License, Version 2.0 or the MIT License. */ | ||
/* SPDX-License-Identifier: Apache-2.0 OR MIT */ | ||
/* Copyright Tock Contributors 2023. */ | ||
|
||
INCLUDE ../../../nordic/nrf52840_chip_layout.ld | ||
INCLUDE ../../../kernel_layout.ld |
17 changes: 17 additions & 0 deletions
17
boards/configurations/nrf52840dk/nrf52840dk-test-appid-sha256/src/io.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Licensed under the Apache License, Version 2.0 or the MIT License. | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
// Copyright Tock Contributors 2024. | ||
|
||
use core::panic::PanicInfo; | ||
use nrf52840::gpio::Pin; | ||
|
||
#[cfg(not(test))] | ||
#[no_mangle] | ||
#[panic_handler] | ||
/// Panic handler | ||
pub unsafe fn panic_fmt(_pi: &PanicInfo) -> ! { | ||
// The nRF52840DK LEDs (see back of board) | ||
let led_kernel_pin = &nrf52840::gpio::GPIOPin::new(Pin::P0_13); | ||
let led = &mut kernel::hil::led::LedLow::new(led_kernel_pin); | ||
kernel::debug::panic_blink_forever(&mut [led]) | ||
} |
Oops, something went wrong.