Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,20 @@ jobs:
cargo build

# Build the workspace for the target architecture but using nightly to compile libcore
# Technically it doens't need 'setup' but it makes the graph look nicer
# Technically it doesn't need 'setup' but it makes the graph look nicer
build-tier3:
runs-on: ubuntu-24.04
needs: setup
strategy:
matrix:
target:
- armebv7r-none-eabi
- armebv7r-none-eabihf
- armv7r-none-eabi
- armv7a-none-eabi
- armv7a-none-eabihf
- armv7r-none-eabi
- armv7r-none-eabihf
- armv8r-none-eabihf
- armebv7r-none-eabi
- armebv7r-none-eabihf
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Hello, this is an data abort exception example
data abort occurred
DFSR (Fault Status Register): DFSR { ext=false wnr=false Domain=0b0000 Status=0b00001 }
DFSR Status: Ok(AlignmentFault)
caught unaligned_from_a32
caught fault on COUNTER
Doing it again
data abort occurred
DFSR (Fault Status Register): DFSR { ext=false wnr=false Domain=0b0000 Status=0b00001 }
DFSR Status: Ok(AlignmentFault)
caught unaligned_from_a32
caught fault on COUNTER
Skipping instruction
Recovered from fault OK!
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Hello, this is an data abort exception example
data abort occurred
DFSR (Fault Status Register): DFSR { ext=false wnr=false Domain=0b0000 Status=0b00001 }
DFSR Status: Ok(AlignmentFault)
caught unaligned_from_t32
caught fault on COUNTER
Doing it again
data abort occurred
DFSR (Fault Status Register): DFSR { ext=false wnr=false Domain=0b0000 Status=0b00001 }
DFSR Status: Ok(AlignmentFault)
caught unaligned_from_t32
caught fault on COUNTER
Skipping instruction
Recovered from fault OK!
11 changes: 11 additions & 0 deletions examples/versatileab/reference/hello-armv7a-none-eabihf.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Hello, this is semihosting! x = 1.000, y = 2.000
PANIC: PanicInfo {
message: I am an example panic,
location: Location {
file: "src/bin/hello.rs",
line: 19,
column: 5,
},
can_unwind: true,
force_no_backtrace: false,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Hello, this is a prefetch abort exception example
prefetch abort occurred
IFSR (Fault Status Register): IFSR { ext=false Domain=0b0000 Status=0b00010 }
IFSR Status: Ok(DebugEvent)
IFAR (Faulting Address Register): Ifar(0)
caught bkpt_from_a32
Doing it again
prefetch abort occurred
IFSR (Fault Status Register): IFSR { ext=false Domain=0b0000 Status=0b00010 }
IFSR Status: Ok(DebugEvent)
IFAR (Faulting Address Register): Ifar(0)
caught bkpt_from_a32
Skipping instruction
Recovered from fault OK!
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Hello, this is a prefetch abort exception example
prefetch abort occurred
IFSR (Fault Status Register): IFSR { ext=false Domain=0b0000 Status=0b00010 }
IFSR Status: Ok(DebugEvent)
IFAR (Faulting Address Register): Ifar(0)
caught bkpt_from_t32
Doing it again
prefetch abort occurred
IFSR (Fault Status Register): IFSR { ext=false Domain=0b0000 Status=0b00010 }
IFSR Status: Ok(DebugEvent)
IFAR (Faulting Address Register): Ifar(0)
caught bkpt_from_t32
Skipping instruction
Recovered from fault OK!
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MIDR { implementer=0x41 variant=0x0 arch=0xf part_no=0xc08 rev=0x0 }
CPSR { N=0 Z=1 C=1 V=0 Q=0 J=0 E=0 A=1 I=1 F=1 T=0 MODE=Ok(Sys) }
Mpidr(0)
SCTLR { IE=0 TE=0 NMFI=0 EE=0 U=1 FI=0 DZ=1 BR=0 RR=0 V=0 I=0 Z=0 SW=0 C=0 A=0 M=0 } before setting C, I and Z
SCTLR { IE=0 TE=0 NMFI=0 EE=0 U=1 FI=0 DZ=1 BR=0 RR=0 V=0 I=1 Z=1 SW=0 C=1 A=0 M=0 } after
14 changes: 14 additions & 0 deletions examples/versatileab/reference/svc-armv7a-none-eabihf.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
x = 1, y = 2, z = 3.000
In svc_handler, with arg=0xabcdef
In svc_handler, with arg=0x456789
x = 1, y = 2, z = 3.000
PANIC: PanicInfo {
message: I am an example panic,
location: Location {
file: "src/bin/svc.rs",
line: 22,
column: 5,
},
can_unwind: true,
force_no_backtrace: false,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Hello, this is a undef exception example
undefined abort occurred
caught udf_from_a32
Doing it again
undefined abort occurred
caught udf_from_a32
Skipping instruction
Recovered from fault OK!
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Hello, this is a undef exception example
undefined abort occurred
caught udf_from_t32
Doing it again
undefined abort occurred
caught udf_from_t32
Skipping instruction
Recovered from fault OK!
8 changes: 8 additions & 0 deletions tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ for bin_path in $(ls examples/versatileab/src/bin/*.rs); do
my_diff ./examples/versatileab/reference/$binary-armv7a-none-eabi.out ./target/$binary-armv7a-none-eabi.out || fail $binary "armv7a-none-eabi"
done

# armv7a-none-eabihf tests
for bin_path in $(ls examples/versatileab/src/bin/*.rs); do
filename=${bin_path##*/}
binary=${filename%.rs}
RUSTC_BOOTSTRAP=1 cargo run ${versatile_ab_cargo} --target=armv7a-none-eabihf --bin $binary | tee ./target/$binary-armv7a-none-eabihf.out
my_diff ./examples/versatileab/reference/$binary-armv7a-none-eabihf.out ./target/$binary-armv7a-none-eabihf.out || fail $binary "armv7a-none-eabihf"
done

# These tests only run on QEMU 9 or higher.
# Ubuntu 24.04 supplies QEMU 8, which doesn't support the machine we have configured for this target
if qemu-system-arm --version | grep "version 9"; then
Expand Down