I am working with the STM32F407 microcontroller and building using Eclipse/GNU and my project is using a standard linker script (can be found in, for example, the Discovery Demonstration Board "Blink LED"-example). I would like to create a gap at a specific address in flash memory:
The above does not work well, it simply puts the stuff that should reside in FLASH at address 0x08008000, so the first sector is wasted. The below is not a solution either because I want the tools to have the freedom to pick FLASH_BEGINNING or FLASH_END, I don't want to have to make that decision in the linker script:
I basically want the code to be packed so no memory is wasted and I shouldn't have to make changes to the linker script if the code size increases. Can someone please help me?