diff options
| author | Ian McIntyre <me@mciantyre.dev> | 2025-09-09 08:29:25 -0400 |
|---|---|---|
| committer | Ian McIntyre <me@mciantyre.dev> | 2025-09-09 08:55:06 -0400 |
| commit | ce97696bcd4515b5b2556163aa50c1b4723e7c0f (patch) | |
| tree | 9572f07b999c9f1f27ff42390b9bc312e0b7e070 /board/src/shared/imxrt10xx.rs | |
| parent | e014e4ec81a947ae8235a51dc2349af58bb5752d (diff) | |
Reserve address 0 by shifting ITCM start address
The runtime previously allowed function placement at address 0 in ITCM.
However, if you ever formed a pointer to the function placed there, it
would look like a null pointer. And you would never be able to call that
function if you relied on null pointer optimization. Also, most MCU
reference manuals (RM) recommend against this placement.
This commit reduces the total capacity of ITCM by 32 bytes, the smallest
possible size of a MPU region. Note that this is greater than the RM's
recommendation of a four byte reservation. It affects all supported
MCUs, except the 1180. If you're so inclined, your MPU could disallow
loads, stores, and execution from this reservation.
Revised unit tests should cover this change. Additionally, you can
manually verify that the ITCM region lengths are reduced by 32 bytes by
opening the linker scripts generated by the ELF test suite.
Diffstat (limited to 'board/src/shared/imxrt10xx.rs')
0 files changed, 0 insertions, 0 deletions
