Friday, October 20th 2017, 8:47am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

jmag999

Beginner

Date of registration: Aug 13th 2014

Posts: 16

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: 16

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.