Wednesday, June 28th 2017, 5:33am UTC+2

You are not logged in.

  • Login
  • Register

jmag999

Beginner

Date of registration: Aug 13th 2014

Posts: 11

1

Wednesday, May 24th 2017, 9:30pm

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?

jmag999

Beginner

Date of registration: Aug 13th 2014

Posts: 11

2

Thursday, May 25th 2017, 8:02pm

Got this figured out, needed the "." in front of the section name in the variable declaration. This was not required when using Atollic/GCC.