I am using an STM32F439VGTx, which hasflash starting at 0x08000000, length 0x00100000and CCM RAM starting at 0x10000000, length 0x00010000and normal RAM starting at 0x20000000, length 0x00030000I want some of my code and constant data to be in flash,and some code to be executed out of RAM. How can Itell the compiler to compile some functions or modulesto execute in RAM, but place the compiled code in flashso I can copy it to RAM for execution? For example,I might have a function called RamFunc(), which I would likeplaced in RAM at some address, (say 0x20000800 or maybe 0x100000800),but I need the image of it in flash at a known address, say 0x08001000,and a known length so I can copy it to RAM for execution.I have tried many variations of settings in a .sct file, and also triedvarious versions using a Debug_RAM.ini file, as in the CMSIS-RTOS Blinky (MCBSTM32E)example. Nothing has worked for me.Any help would be greatly appreciated.
You don't need to execute out of SRAM to burn flash, you just need to execute from a different block. That's my (limited) understanding anyway.
You can locate memory in Flash if you still want to. For instance:
const APPINFOBLK_T AppInfoBlock __attribute__ ((at(FLASH_AIB))) = // Compiler v5
: