Skip to content

Commit 7f05560

Browse files
Adds additional Armv8-R AArch64 example programs, along with a single-core critical section implementation. The examples expand upon the existing Hello, World example and demonstrate the use of the Arm Generic Interrupt Controller and logging using defmt via the PL011 UART.
1 parent 5e4403c commit 7f05560

21 files changed

Lines changed: 866 additions & 10 deletions

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ exclude = [
2121

2222
[dependencies]
2323
tock-registers = { version = "0.10.0", default-features = false } # Use it as interface-only library.
24+
critical-section = { version = "1.2.0", features = ["restore-state-u8"], optional = true }
25+
26+
[features]
27+
critical-section-single-core = ["critical-section"]

examples/armv8-r/.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ runner = "FVP_BaseR_AEMv8R -f fvp_cfg.txt"
66

77
[unstable]
88
build-std = ["core", "compiler_builtins"]
9+
10+
[env]
11+
DEFMT_LOG = "info"

examples/armv8-r/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
!/Cargo.lock
2+
/uart0.out

examples/armv8-r/Cargo.lock

Lines changed: 272 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/armv8-r/Cargo.toml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,17 @@ name = "armv8-r"
55
publish = false
66

77
[dependencies]
8-
aarch64-rt = { version = "=0.4.0", default-features = false }
9-
aarch64-cpu.path = "../.."
8+
aarch64-rt = { version = "=0.4.0", default-features = false, features = [
9+
"exceptions",
10+
] }
11+
# Use a git hash until a release is put out
12+
arm-fvp-base-pac = { git = "https://github.com/ArmFirmwareCrates/arm-fvp-base-pac/", rev = "9547f29c26cece16434d536b05ca50007e24c0aa", features = [
13+
"base-r",
14+
] }
15+
arm-gic = "0.7.2"
16+
aarch64-cpu = { path = "../..", features = ["critical-section-single-core"] }
17+
critical-section = "1.2.0"
18+
defmt = "1.0.1"
1019
semihosting = { version = "0.1.24", default-features = false, features = [
1120
"panic-handler",
1221
"stdio",

0 commit comments

Comments
 (0)