Entirely out of curiosity (no real use case) I am trying to declare and use a custom section in a embedded-stm32f429disco runtime (specifically a debug version of it) and am struggling a bit to have that custom section collected by the linker.
So, I have declared my new section (called .my_section_data) after the .data section in the existing linker script (specifically a copy of it inside ld_user/common-ROM.ld) as so:
Then taking some inspiration from the late Simon’s work, I declared the following:
with Linker_Package_1 being:
When I run this on the board though it looks like my new section isn’t getting picked-up:
where the new symbols have been exported ok and point to RAM but given the above linker script, I’d expect MSE to be bumped by 4 bytes after including MySection_Data in Linker_Package_1?
Am I largely missing something here? Is my new section getting garbage-collected? (i.e. do I need to KEEP it for some reason?)
Any thoughts?
Thanks!



