aboutsummaryrefslogtreecommitdiff
path: root/tests/inspect_elf.rs
diff options
context:
space:
mode:
authorIan McIntyre <me@mciantyre.dev>2025-11-26 10:17:14 -0500
committerIan McIntyre <me@mciantyre.dev>2025-11-26 10:49:04 -0500
commit8b0d5278b0de5254a242f8a356f061949a896161 (patch)
treeaa07245f46ef48f1a33ce1bf797f1301436f2a02 /tests/inspect_elf.rs
parentc4ee315a20e41c234d2d0f7ca3ed7e37a09b9d32 (diff)
Allow smaller vector tables in tests
The vector tables exported by imxrt-ral are smaller than the default cortex-m-rt vector table. The tests fail once we enable the rt / device features. With this change, we expect the MCU-dependent vector table sizes.
Diffstat (limited to 'tests/inspect_elf.rs')
-rw-r--r--tests/inspect_elf.rs14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/inspect_elf.rs b/tests/inspect_elf.rs
index 7f25b2a..50bc09a 100644
--- a/tests/inspect_elf.rs
+++ b/tests/inspect_elf.rs
@@ -206,6 +206,10 @@ const fn aligned(value: u64, alignment: u64) -> u64 {
(value + (alignment - 1)) & !(alignment - 1)
}
+const IMXRT1010_INTERRUPTS: u64 = 80;
+const IMXRT1060_INTERRUPTS: u64 = 158;
+const IMXRT1170_INTERRUPTS: u64 = 218;
+
#[test]
#[ignore = "building an example can take time"]
fn imxrt1010evk() {
@@ -251,7 +255,7 @@ fn imxrt1010evk() {
assert_eq!(
Section {
address: stack.address + stack.size,
- size: 16 * 4 + 240 * 4
+ size: 16 * 4 + IMXRT1010_INTERRUPTS * 4
},
vector_table,
"vector table not at expected VMA behind the stack"
@@ -355,7 +359,7 @@ fn imxrt1010evk_ram() {
assert_eq!(
Section {
address: stack.address + stack.size,
- size: 16 * 4 + 240 * 4
+ size: 16 * 4 + IMXRT1010_INTERRUPTS * 4
},
vector_table,
"vector table not at expected VMA behind the stack"
@@ -475,7 +479,7 @@ fn baseline_teensy4(binary: &ImxrtBinary, dcd_at_runtime: u32, stack_size: u64,
assert_eq!(
Section {
address: stack.address + stack.size,
- size: 16 * 4 + 240 * 4
+ size: 16 * 4 + IMXRT1060_INTERRUPTS * 4
},
vector_table,
"vector table not at expected VMA behind the stack"
@@ -693,7 +697,7 @@ fn imxrt1170evk_cm7() {
assert_eq!(
Section {
address: stack.address + stack.size,
- size: 16 * 4 + 240 * 4
+ size: 16 * 4 + IMXRT1170_INTERRUPTS * 4
},
vector_table,
"vector table not at expected VMA behind the stack"
@@ -813,7 +817,7 @@ fn imxrt1170evk_cm7_nonboot() {
assert_eq!(
Section {
address: stack.address + stack.size,
- size: 16 * 4 + 240 * 4
+ size: 16 * 4 + IMXRT1170_INTERRUPTS * 4
},
vector_table,
"vector table not at expected VMA behind the stack"