Linker Issue with 2nd Memory Region

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Linker Issue with 2nd Memory Region

    I am trying to use the second ram region in an STM32L476.

    I have this in the placement file:

    <MemorySegment name="$(RAM2_NAME:RAM2)" >
    <ProgramSection alignment="4" load="No" name=".OS_HEAP" />
    <ProgramSection alignment="4" load="No" name=".bss2" />
    </MemorySegment>

    And this in the memory map file:
    <MemorySegment name="RAM2" start="0x10000000" size="0x07FFF" access="Read/Write" />


    And this in my code:
    static __attribute__((section("OS_HEAP"))) uint8_t ucHeap[ 32768 ];


    But I get this error:
    Project/Exe/Project.elf section `OS_HEAP' will not fit in region `UNPLACED_SECTIONS'


    Any idea what could be wrong?