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!

Parents
  • I made some progress: now it builds and loads into the board. As the program executes, however, it gets stuck as the SoftDevice is called. The error message is: "Stopped by vector catch".

    In addition/differently than explained in my first post, the settings with which I obtained this result are the following:

    - Project-->Options-->LInker -->Linker set to GNU.

    - In the project folder "Internal files" I deleted the file SEGGER_THUMB_Startup.s and replaced it with thumb_crt0.s (available in the "source" folder of the Segger installation directory and modified as indicated in the Nordic tutorial).

    - Project-->Options-->Build-->Memory Map Macros set to: FLASH_START=0x1B000;SRAM_START=0x20002000   (NOTE: Pay attention to the S of SRAM)

    - Project-->Options-->Build-->Memory Segments set to: FLASH RX 0x0001B000 0x00040000; SRAM RWX 0x20002000 0x00004000  (NOTE: Pay attention to the S of SRAM)

    NOTE: 0x1B000 is the APP_CODE_BASE address for the soft device S130 2.0.1 used by the SDK 12.3.0.

    With the above settings, the ble_app_beacon example compiles and loads but, as indicated above, the program execution gets stuck as soon as the SoftDevice is called. No clue why.

    ---------

    Since Nordic obviously does not support nRF51 with SES, Nordic should clearly indicate it and avoid that their customers waste hours of works figuring out obscure configuration issues.

  • 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.

Reply
  • 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.

Children
No Data
Related