Skip to content

Commit 824e974

Browse files
committed
fix(examples): enforce 256-byte alignment on exception vector table for Cortex-M0+
Cortex-M0+ Technical Reference Manual: > If implemented, the VTOR enables bits[31:8] of the vector table > address to be specified. Fixes `smp_rp_pico` misbehaving depending on seemingly unknown factors.
1 parent 0a2dcd1 commit 824e974

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/smp_rp_pico/src/core1.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ unsafe extern "C" fn core1_entry() -> ! {
8686
unsafe { <SystemTraits as port::EntryPoint>::start() }
8787
}
8888

89-
#[repr(C, align(128))]
89+
// Cortex-M0+ Technical Reference Manual: “If implemented, the VTOR enables
90+
// bits[31:8] of the vector table address to be specified.”
91+
#[repr(C, align(256))]
9092
struct VectorTable<T>(T);
9193

9294
static CORE1_VECTOR_TABLE: VectorTable<[unsafe extern "C" fn(); 48]> = {

0 commit comments

Comments
 (0)