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

'UNPLACED SECTIONS' issue - Segger Embedded Studio

Hello,

I am trying to run a simple ble_app_hrs example from the SDK v12, but I am getting the same error as in this post devzone.nordicsemi.com/.../

Building ‘ble_app_hrs_pca10040_s132’ from solution ‘ble_app_hrs_pca10040_s132’ in configuration ‘nrf52832_xxaa’

Generating linker script ‘ble_app_hrs_pca10040_s132.ld’ Linking ble_app_hrs_pca10040_s132.elf Output/nrf52832_xxaa/Exe/ble_app_hrs_pca10040_s132.elf section .fs_data' will not fit in regionUNPLACED_SECTIONS' region UNPLACED_SECTIONS' overflowed by 16 bytes Output/ble_app_hrs_pca10040_s132 nrf52832_xxaa/Obj/fstorage.o: In functioncheck_config': undefined reference to __start_fs_data' undefined reference to__stop_fs_data' Output/ble_app_hrs_pca10040_s132 nrf52832_xxaa/Obj/fstorage.o: In function fs_init': undefined reference to__stop_fs_data' undefined reference to `__start_fs_data' Build failed

I can see that the question has been answered, but I am still not quite sure what the solution is.

  1. How is the flash_placement.xml file added to the project and what is the correct content of this file?

  2. The post also mentions that I need to 'import' and modify the standard thumb_crt.s file. It is already added under 'internal files', but If I try to modify the thumb_crt.s file then I get a warning, that this file can't be modified.?

If anyone could sum up exactly how to cope with this 'UNPLACED SECTIONS' issue it will be very much appreciated.

Thanks in advance.

Cheers, Jan

Parents
  • Hi Jan L!

    Did you follow this blog-post when testing Segger Embedded Studio?

    1. The flash_placement.xml file you can just generate using a text editor. Simply create a new file and rename it to flash_placement.xml. This file should be in your project folder. For example, if you are using the beacon example for the nRF52 DK it should be in this folder:
      SDK_InstallFolder/examples/ble_peripheral/ble_app_beacon/pca_10040/s132/arm_no_packs.

    The correct content of this file is explained in the blog-post, as well as the devzone-case you referred to in your question.

    1. You should be able to modify the thumb_crt.s file, but you most probably will need administrator rights.

    If you haven't done so already, I highly suggest that you take a look at the blog-post I have mentioned above. Let me know if you have any more questions.

    thumb_crt0.s
    flash_placement.xml

    Best regards, Joakim.

  • Hi Joakim, I have tried to download the pre-compiled hex file and that works fine. Then I tried to replace the original thumb_crt0.s with the one found in the blogpost (though it seems to be for SDK 14 and I am using SDK 12). When I replace it I receive the following build errors:

    Linking ble_app_hrs_pca10040_s132.elf Output/ble_app_hrs_pca10040_s132 nrf52832_xxaa/Obj/thumb_crt0.o: In function memory_set: undefined reference to _start_nrf_sections undefined reference to _start_nrf_sections_run undefined reference to _end_nrf_sections_run

    I did add the following lines to the new thumb_crt0.s as stated in the blogpost:

    ldr r0, =fs_data_load_start ldr r1, =fs_data_start ldr r2, =fs_data_end bl memory_copy

    So downloading and replacing it doesn't work. My FLASH and SRAM settings are: FLASH_START=0x1F000
    FLASH_SIZE=0x65000 SRAM_START=0x20002C38 SRAM_SIZE=0x8000

    BR. Jan

Reply
  • Hi Joakim, I have tried to download the pre-compiled hex file and that works fine. Then I tried to replace the original thumb_crt0.s with the one found in the blogpost (though it seems to be for SDK 14 and I am using SDK 12). When I replace it I receive the following build errors:

    Linking ble_app_hrs_pca10040_s132.elf Output/ble_app_hrs_pca10040_s132 nrf52832_xxaa/Obj/thumb_crt0.o: In function memory_set: undefined reference to _start_nrf_sections undefined reference to _start_nrf_sections_run undefined reference to _end_nrf_sections_run

    I did add the following lines to the new thumb_crt0.s as stated in the blogpost:

    ldr r0, =fs_data_load_start ldr r1, =fs_data_start ldr r2, =fs_data_end bl memory_copy

    So downloading and replacing it doesn't work. My FLASH and SRAM settings are: FLASH_START=0x1F000
    FLASH_SIZE=0x65000 SRAM_START=0x20002C38 SRAM_SIZE=0x8000

    BR. Jan

Children
No Data
Related