Loading...
 
Skip to main content

System Workbench for STM32


STM32L4 linker script for 128 KB RAM

I tried to allocate my OS heap in SRAM2 that way:

Source C code:
static uint8_t attribute ((section ("RAM_2"))) ucHeapconfigTOTAL_HEAP_SIZE;

Linker script: definiing the section:
RAM_2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K

But doing this is NOT working: gcc allocate a section RAM_2 in classic RAM section and ucHeap won't reside in RAM_2 section defined in linker script.

Can you provide the right way to do this ?

thanks and regards,
Sylvain