diff options
Diffstat (limited to 'board')
| -rw-r--r-- | board/Cargo.toml | 1 | ||||
| -rw-r--r-- | board/build.rs | 1 | ||||
| -rw-r--r-- | board/src/teensy4.rs | 8 |
3 files changed, 10 insertions, 0 deletions
diff --git a/board/Cargo.toml b/board/Cargo.toml index f9ef9aa..2bbc956 100644 --- a/board/Cargo.toml +++ b/board/Cargo.toml @@ -61,3 +61,4 @@ imxrt1170evk-cm7 = [ # Don't try running these on hardware; they might not work. __dcd = ["teensy4"] __dcd_missize = ["teensy4"] +__bootrom_reservation = ["teensy4"] diff --git a/board/build.rs b/board/build.rs index d86d287..af17a95 100644 --- a/board/build.rs +++ b/board/build.rs @@ -40,6 +40,7 @@ fn main() { .data(imxrt_rt::Memory::Dtcm) .bss(imxrt_rt::Memory::Dtcm) .uninit(imxrt_rt::Memory::Dtcm) + .stack(imxrt_rt::Memory::Ocram) .stack_size_env_override("THIS_WONT_BE_CONSIDERED") .stack_size_env_override("BOARD_STACK") .heap_size_env_override("BOARD_HEAP") diff --git a/board/src/teensy4.rs b/board/src/teensy4.rs index cf1f734..426fbfa 100644 --- a/board/src/teensy4.rs +++ b/board/src/teensy4.rs @@ -50,3 +50,11 @@ pub static DEVICE_CONFIGURATION_DATA: [u8; 8] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0 #[unsafe(no_mangle)] #[used] pub static DEVICE_CONFIGURATION_DATA: [u8; 7] = [0xD2, 0x00, 0x08, 0x41, 0xC0, 0x00, 0x04]; + +/// Make sure this reservation appears at the start of OCRAM. +#[cfg(feature = "__bootrom_reservation")] +#[unsafe(link_section = ".bootrom_reservation")] +#[unsafe(no_mangle)] +#[used] +pub static BOOTROM_RESERVATION: core::mem::MaybeUninit<[u8; 48 * 1024]> = + core::mem::MaybeUninit::new([0; 48 * 1024]); |
