This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

section '.init' will not fit in region 'UNPLACED_SECTIONS' and region 'UNPLACED_SECTIONS' overflowed by 76048 bytes

I am trying to transition my Nordic SDK v12 project from Keil to Segger Embedded studio. I followed the tutorial steps such as placing ses_nrf_51_startup.s file in Internal Files of the SES project.I downloaded the Section Placement XML from Nordic. I then switched the project linker to GNU and imported the XML into the Section Placement of the project. The XML file is below. But when I try building the code I get many errors. The first errors I get is: section '.init' will not fit in region 'UNPLACED_SECTIONS' and region 'UNPLACED_SECTIONS' overflowed by 76048 bytes. I searched online and some Devzone posts also say to import the thumb_crt0.s file from the SES folder into the SES project. I tried that and added the thumb_crt0.s file to the project's Internal Files section, but this did not fix the issue either.

How should I fix the issue? I also attached my code with the Keil and Segger project files in a zip file for reference below.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
!DOCTYPE Linker_Placement_File>
<Root name="Flash Section Placement">
<MemorySegment name="$(FLASH_NAME:FLASH)">
<ProgramSection alignment="0x100" load="Yes" name=".vectors" start="$(FLASH_START:)" />
<ProgramSection alignment="4" load="Yes" name=".init" />
<ProgramSection alignment="4" load="Yes" name=".init_rodata" />
<ProgramSection alignment="4" load="Yes" name=".text" />
<ProgramSection alignment="4" load="Yes" name=".dtors" />
<ProgramSection alignment="4" load="Yes" name=".ctors" />
<ProgramSection alignment="4" load="Yes" name=".rodata" />
<ProgramSection alignment="4" load="Yes" name=".ARM.exidx" address_symbol="__exidx_start" end_symbol="__exidx_end" />
<ProgramSection alignment="4" load="Yes" runin=".fast_run" name=".fast" />
<ProgramSection alignment="4" load="Yes" runin=".data_run" name=".data" />
<ProgramSection alignment="4" load="Yes" runin=".tdata_run" name=".tdata" />
<ProgramSection alignment="4" keep="Yes" load="Yes" runin=".fs_data_run" name=".fs_data" />
</MemorySegment>
<MemorySegment name="$(RAM_NAME:RAM);SRAM">
<ProgramSection alignment="0x100" load="No" name=".vectors_ram" start="$(RAM_START:$(SRAM_START:))" />
<ProgramSection alignment="4" load="No" name=".fast_run" />
<ProgramSection alignment="4" load="No" name=".data_run" />
<ProgramSection alignment="4" load="No" name=".tdata_run" />
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

keil_segger.zip