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

Segger Embedded Studio not linking nRF51 SDK examples

Hello, 

I tried to build the SDK ble_app_beacon example for nRF51 using SES. SES version I used is V4.12 (for Windows 64 bit) and SDK version is 12.3.0.

I closely followed the instructions reported in this tutorial. Since SES and SDK versions are different than reported in the tutorial and since I'm targeting nRF51-DK board (as opposed to the nRF52 board used in the tutorial), I applied the following minor (?) changes:

  • I imported the file C:\Nordic\nRF5_SDK_12.3.0_d7731ad\examples\ble_peripheral\ble_app_beacon\pca10028\s130\arm5_no_packs\ble_app_beacon_pca10028_s130.uvprojx
  • I included the files system_nfr51.c and 3324.ses_nrf51_startup.s into the "Internal Files" folder of Project Explorer. Initially I replaced the existing file SEGGER_THUMB_Startup.s  with the file thumb_crt0.s (modified as described in the tutorial). Since however I was getting many linking errors (indicating that most of the symbols used in thumb_crt0.s were undefined), I ended up removing  thumb_crt0.s and keeping SEGGER_THUMB_Startup.s (as indicated in the below screenshot).
  • In order to get rid of a compile error "cannot open source input file core_cm0.h", I also included the following directory within the Preprocessor user's includes: ../../../../../../components/toolchain/cmsis/include.
  • I managed to load the flash_placement.xml file, corrected also to include the following additional line: <ProgramSection alignment="4" load="Yes" name=".fs_data" />

My Project Explorer looks like this:

After building, I obtain the following errors: undefined symbols __SRAM_segment_end__ and __data_start__

Can you please help me to figure out how to solve the problem?

Thank you very much!

  • I believe the solution could be wrong section placement macros in SES. The settings for ROM & RAM in Keil for the ble_app_beacon ble_peripheral example in sdk 12.3 are the following:

    Could you try setting the section placement macros in SES to the following values (Right click on Project -> Edit Options -> change to Common Configuration -> Linker tab -> double click on Section Placement macros):

    FLASH_START=0x1B000

    FLASH_SIZE=0x25000

    RAM_START=0x20001870

    RAM_SIZE=0x6790

  • Have no idea how you got to this but it works for me as well. SDK 12.3.0 - 51422 board using Maurizio's settings.

    Edit Dec/18/2019: actually I managed to build and load the blinky example to a 51422 board. I am also able to load the ble heart rate example but the board won't advertise.

    Has anyone ever be able to load a code with Softdevice using SES to a nRF51 board? I have tried every single macros I found and it still does not work.

Related