Repository navigation
Conversation
|
Does this still work if I have a RAM based image and I've aliased the FLASH region to the RAM region? |
|
Probably not (I will test it)? But is that something that Perhaps cortex-m-rt should have a |
|
I know aarch32 supports it, so maybe I just imagined it working on cortex-m too. I'll try it at the impl day tomorrow. I think it's a reasonable use case - for rapid debugging, or with security cores that have ROM bootloaders and non-executable storage - and telling people to use different linker scripts seems messy. And, forking the linker script ties you to a specific cortex-m-rt release because much of it is internal API. |
#578 changed how
__sheapand_stack_endwere initialised, which broke both rp2040 and rp235x linker scripts in rp-hal, and the rp235x linker script in embassy-rp.embassy-rs/embassy#7262
Unlike the user in #578 the rpX scripts used
INSERT AFTER .uninitfor a section that is placed inFLASH, which updates.and means link.x now places__sheapand_stack_endinFLASH.Regardless of whether it was the correct choice to use
INSERT AFTER .uninitfor the HALs, I would prefer to have received a linker error when a symbol that should have been in RAM turned up in FLASH instead.Since we shouldn't assert that they're in RAM in case users place them in custom memory regions, I figured we could at least assert that they aren't in
FLASH.While writing those asserts I figured it would also make sense to do the same for symbols used for static RAM placement. Happy to walk back that change if anyone can think of a good reason to want DATA or BSS in FLASH.