I have a mbed app with a webserver, running on a F407VE with 128 kB RAM + 64 kB CCM RAM, this works fine and I have some free RAM. Now I have moved the same app to another custom hardware with also F407VG and same RAM settings, but now my app crashes after trying to allocate some dynamic memory with ‘out of memory’ exception.
I have compared the linker scripts, but the settings are almost the same between F407 VE and VG MCU. The VE has only the addion for MBED_APP_START, but this makes no difference.
It looks like the CCM RAM is not used on the F407VG, but I cannot find where it is used. In the linker script, there is no section for CCM. The size is declared, but is used nowhere.
In the BUILD dir, there is a generated .profile-ld where I can see two RAM sections:
{
"flags": [
"-DMBED_BOOT_STACK_SIZE=1024",
"-DMBED_RAM1_SIZE=0x10000",
"-DMBED_RAM1_START=0x10000000",
"-DMBED_RAM_SIZE=0x20000",
"-DMBED_RAM_START=0x20000000",
"-DMBED_ROM_SIZE=0x100000",
"-DMBED_ROM_START=0x8000000",
"-DXIP_ENABLE=0",
It looks like this is some secret knowledge from CMSIS packs, but where is this additional RAM used?
does it deal with the bootloader stuff?
And interestingly, the .profile-ld for the F407VE looks like this:
{
"flags": [
"-DMBED_BOOT_STACK_SIZE=1024",
"-DXIP_ENABLE=0",
and there, I have more RAM available.
Very strange, who can explain me this magic?
@theotherjimmy is no longer working at mbed-os?