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

  • 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, Thanks for your reply. I have now followed the blog post except the thumb_crt0.s part. I followed the post and added the flash_placement.xml file for SDK 12. I added the file using 'Import Section Placement' under Project. I started with the 'ble_app_hrs example' and I am able to build and run the code, but LED1 is not flashing and the 'peripheral' is not visible in the HRM page of the nRF Toolbox App, i.e not advertising. If I press Build and Debug it jumps to the start of Main() as expected, so it seems ok. I then tried the 'ble_app_beacon' example following the same procedure. In this case I do see a 'beacon' on the nRF Connect App, so that seems to work. What can I be missing since the ble_app_hrs example is not advertising when everything builds and runs fine..? Thanks in advance. Best regards, Jan

  • Hi Jan. What happens if you program the code as a hex file using nrfgostudio? Does the ble_app_hrs example work then? Does LED1 flash (board is advertising)?

    I believe Joakim has gotten the ble_app_hrs example working on SDK 12.2. I will talk to him & ask if his board advertises or not.

    Kind Regards,

    Bjørn

  • Hi Bjørn. I am not sure how I can Build and Run the example from nRF Go Studio. I have only used that for programming hex files (softdevice and application) and erasing the chip etc. It would be very helpful if you could ask Joakim how he got the ble_app_hrs up and running on SDK 12.2. Let me know when you know more. Thanks. Best regards, Jan

  • Hi Jan L. I did get the ble_app_hrs example to work. I can see two possible reasons that your device is not advertising.

    1. You forgot to add the Softdevice to be flashed with the example.

    2. You need to change the flash and sram settings. Try changing them to;

      FLASH_START=0x1F000
      SRAM_START=0x20002C38

    Let me know how if any of this helps.

Related