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 am quite sure that the flash_placement content is as stated in the blogpost for SDK 12 since I copied it from there. Anyway I will double check. So to be sure that I am doing it correctly.

    1. Use the thumb_crt0.s from the blogpost under SDK 14 and add fs_data as mentioned in the blogpost.

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

    1. Change the content of the flash_placement.xml file as stated in the blogpost under SDK 12.

    2. Add the FLASH AND RAM settings to the following:

    FLASH_START=0x1F000

    SRAM_START=0x20002C38

    1. Do I also need to add FLASH_SIZE and SRAM_SIZE?

    2. Change/add other settings mentioned in the blogpost

    Anything else missing?

    Best regards, Jan

Reply
  • Hi Joakim, I am quite sure that the flash_placement content is as stated in the blogpost for SDK 12 since I copied it from there. Anyway I will double check. So to be sure that I am doing it correctly.

    1. Use the thumb_crt0.s from the blogpost under SDK 14 and add fs_data as mentioned in the blogpost.

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

    1. Change the content of the flash_placement.xml file as stated in the blogpost under SDK 12.

    2. Add the FLASH AND RAM settings to the following:

    FLASH_START=0x1F000

    SRAM_START=0x20002C38

    1. Do I also need to add FLASH_SIZE and SRAM_SIZE?

    2. Change/add other settings mentioned in the blogpost

    Anything else missing?

    Best regards, Jan

Children
No Data
Related