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

Transferring pca10056 project to nRF52811 hardware build error Output/Release/Exe/xxx_pca10056_s140.elf section `.init' will not fit in region `UNPLACED_SECTIONS'

Hi all,

I'm trying to transfer my custom project pca10056 (which is to broadcast a beacon) to nRF52811 hardware and I'm facing some issues in the last stage of build.

FYI:

1. My pca10056 project can be built and ran sucessfully on nRF52840DK and the beacon can be discovered by using phone with nRF Connect.

2. I'm using SDK nRF5_SDK_16.0.0_98a08e2 with Softdevice  s140_nrf52_7.0.1

2. I'm aware of developing for nRF52811 documetation and some of discussion on this forum on the configurations including: RAM and Flash size

 https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fnrf52811_user_guide.html

https://devzone.nordicsemi.com/f/nordic-q-a/48516/transferring-the-project-to-nrf52811-hardware---fpu-error/192748#192748

https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory

Here is the build issues I got:

      

Really appreciate help from all of you. Thank you

Parents Reply Children
  • Hi Thorsrud, thanks so much for your reply. I follow the steps mentioned in that link and managed to build successfully my project. 

    However, when I download my project to nRF52811, I got another issue. I doubt that my RAM and Flash setting are  incorrect.

    Here is my Linker setting:

    Can anyone help me with these settings? Cos I don't really understand the instruction from user guide:

    In the linker script settings, adjust the linker script to match the maximum RAM and flash size of nRF52811.

    • ROM END: 0x2FFFF
    • RAM END: 0x20005FFF
  • These settings are incorrect. The poins is that the FLASH_PH_SIZE and RAM_PH_SIZE needs to be set to the actual sizes, which for the nRF52811 is 192 kB (0x30000) and 24 kB (0x6000) respectively. And in the same way, the sum of FLASH_START and FLASH_SIZE should be 0x30000 (192 kB) and RAM_START and RAM_SIZE should be 0x6000 (24 kB). The start addresses here depends on the SoftDevice size for flash and the RAM used by the SoftDevice for RAM (see Adjustment of RAM and Flash memory for details).

  • Hi Thorsrud, I'm using Softdevice  s140_nrf52_7.0.1. According to the Adjustment of RAM and Flash memory documentation, RAM_START should be 0x20001678, FLASH_START should be 0x27000.

    Then I can choose any value of FLASH_SIZE and RAM_SIZE that are satisfied with the conditions you have mentioned above. Please double confirm my understanding, is it correct?

  • Yes, that is correct. But note that the RAM usage of the SoftDevice depends on the configuration. So you should typically  set a relatively high start address and low size before you validate the actual RAM usage as shown in the tutorial I linked to.

  • Hi, I try to get the FLASH_SIZE and RAM_SIZE according to the tutorial: 

    Edit the values RAM_START and FLASH_START, note that FLASH_SIZE should not be larger than (FLASH_PH_SIZE -  FLASH_START), and that (RAM_SIZE + RAM_START) should not be larger than (RAM_PH_START + RAM_PH_SIZE).

    And Here is my config:

    However I got another error that I suspected it came from FLASH setting:

    I then adjust the FLASH_START and FLASH_SIZE:

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x30000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x6000

    FLASH_START=0x25000

    FLASH_SIZE=0xb000

    RAM_START=0x20001678

    RAM_SIZE=0x4988

    The project can be built successfully but the moment when I download it to the chip, another error pop up:

    Can u help me on this? So sorry but this is my first time working with Nordic and Segger

Related