embassy icon indicating copy to clipboard operation
embassy copied to clipboard

kill #[interrupt] compat AND use VTOR

Open xoviat opened this issue 4 years ago • 3 comments

See:

  • https://www.keil.com/pack/doc/CMSIS/Core/html/using_VTOR_pg.html
  • https://github.com/rust-embedded/cortex-m-rt/issues/55

xoviat avatar Mar 25 '21 21:03 xoviat

I imagine that this would need a new struct that provides interrupts with a pub fn register_interrupt_table().

xoviat avatar Mar 28 '21 15:03 xoviat

alignment:

// C representation, alignment raised to 8
#[repr(C, align(8))]
struct AlignedStruct {
    first: i16,
    second: i8,
    third: i32
}

xoviat avatar Mar 28 '21 16:03 xoviat

// uint32_t vectorTable_RAM[VECTORTABLE_SIZE] __attribute__(( aligned (VECTORTABLE_ALIGNMENT) ));
#[repr(C, align(VECTORTABLE_ALIGNMENT))]
static mut vectorTable_RAM: [u8];

xoviat avatar Mar 28 '21 16:03 xoviat