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

'.init' will not fit in region 'UNPLACED_SECTIONS' - nRF51422 DK, SDK v12.3.0

Hello,

I am using nRF51422 DK running on SDK v12.3.0. I am migrating the project examples/ble_central/ble_app_uart project from Keil uVision to Segger Embedded Studio using this guide.

Upon build, I did not have any compile errors but did receive Linker errors as shown on the image below.

Building ‘ble_app_uart_c_pca10028_s130’ from solution ‘ble_app_uart_c_pca10028_s130’ in configuration ‘nrf51422_xxac’
  Linking ble_app_uart_c_pca10028_s130.elf
    "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.30/gcc/arm-none-eabi/bin/ld" -X --omagic -ereset_handler --defsym=__vfprintf=__vfprintf_int_nwp --defsym=__vfscanf=__vfscanf_int --fatal-warnings -EL --gc-sections "-TC:/BLE Projects/nRF51/nRF5_SDK_12.3.0_d7731ad/examples/ble_central/ble_app_uart_c/pca10028/s130/arm5_no_packs/Output/ble_app_uart_c_pca10028_s130 nrf51422_xxac/Obj/ble_app_uart_c_pca10028_s130.ld" -Map Output/nrf51422_xxac/Exe/ble_app_uart_c_pca10028_s130.map -u_vectors -o Output/nrf51422_xxac/Exe/ble_app_uart_c_pca10028_s130.elf --emit-relocs --start-group "@C:/BLE Projects/nRF51/nRF5_SDK_12.3.0_d7731ad/examples/ble_central/ble_app_uart_c/pca10028/s130/arm5_no_packs/Output/ble_app_uart_c_pca10028_s130 nrf51422_xxac/Obj/ble_app_uart_c_pca10028_s130.ind" --end-group
    Output/nrf51422_xxac/Exe/ble_app_uart_c_pca10028_s130.elf section `.init' will not fit in region `UNPLACED_SECTIONS'
    region `UNPLACED_SECTIONS' overflowed by 30348 bytes
    Output/ble_app_uart_c_pca10028_s130 nrf51422_xxac/Obj/SEGGER_THUMB_Startup.o: in function `exit':
    (.init+0x48): undefined reference to `__stack_end__'
    (.init+0x4c): undefined reference to `__SEGGER_init_table__'
    (.init+0x50): undefined reference to `__heap_start__'
    (.init+0x54): undefined reference to `__heap_end__'
    (.init+0x58): undefined reference to `__ctors_start__'
    (.init+0x5c): undefined reference to `__ctors_end__'
    Output/ble_app_uart_c_pca10028_s130 nrf51422_xxac/Obj/3324.ses_nrf51_startup.o: in function `_vectors':
    (.vectors+0x0): undefined reference to `__stack_end__'
    Output/ble_app_uart_c_pca10028_s130 nrf51422_xxac/Obj/3324.ses_nrf51_startup.o: in function `SystemInit':
    (.init+0x64): undefined reference to `__SRAM_segment_end__'
    Output/ble_app_uart_c_pca10028_s130 nrf51422_xxac/Obj/softdevice_handler.o: in function `softdevice_enable':
    softdevice_handler.c:(.text.softdevice_enable+0x28): undefined reference to `__data_start__'
Build failed

Here's the contents of my flash_placement.xml
<!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="fs_data" />
    <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" />
    <ProgramSection alignment="4" load="No" keep="Yes" name=".fs_data_run" address_symbol="__start_fs_data" end_symbol="__stop_fs_data" />
    <ProgramSection alignment="4" load="No" name=".bss" />
    <ProgramSection alignment="4" load="No" name=".tbss" />
    <ProgramSection alignment="4" load="No" name=".non_init" />
    <ProgramSection alignment="4" size="__HEAPSIZE__" load="No" name=".heap" />
    <ProgramSection alignment="8" size="__STACKSIZE__" load="No" place_from_segment_end="Yes" name=".stack" />
    <ProgramSection alignment="8" size="__STACKSIZE_PROCESS__" load="No" name=".stack_process" />
  </MemorySegment>
Please see ble_app_uart_c.zip attached project file.
Thank you and hope you can help me with this.
Regards,
Jade
Parents Reply Children
No Data
Related