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

Nrf51 dk not working after download program using segger.

Hi


I am facing problem with segger. Project get compiled and able to program hardware but hardware is not working until debug process is start.
After put hardware in debug mode hardware start working even after stop debug, working didn't get affect. This problem I am facing for almost projects(ble app uart, ble hrs and twi, spi) except blinky project.
This all projects are working fine with keil.
I am using sdk 11, hardware nrf51 dk and segger 4.2
I refered following document as suggested by nordic for importing project from keil to segger ide.

infocenter.nordicsemi.com/.../getting_started_ses.pdf

Apart from this document I did some more changes to remove some errors details are as below:
1) replace SEGGER_THUMB_Startup.s file with thumb_crt0.s
    
2)change flash and ram values in segger settings
    In project edit option, in common mode > Build > Memory Segments
    FLASH RX 0x0001B000 0x000025000;SRAM RWX 0x20002080 0x00005F80    
    
this are for solution of following errors.
Output/ble_app_uart_s130_pca10028 nrf51422_xxac_s130/Obj/SEGGER_THUMB_Startup.o: In function `exit':
undefined reference to `__SEGGER_init_table__'

3) remove file retarget.c from project explorer to remove following error
storage size of '__stdout' isn't known
storage size of '__stdin' isn't known

Is this all settings are correct or need any more settings to solve this problem? please need guidance as soon as possible.


Parents
  • Hi,

    I haven't encountered this particular problem when importing SDK 11 projects to SES, but I did find that the Getting started guide didn't include every step needed to import an example successfully. Please try the example I uploaded here and compare it against your project. 

  • Hi vidar,

    Thank you  for reply.

    I have try your example, have some doubts in it.

    is this example is without xml file?

    is this example is working fine with nrf51dk? because it is giving me error while building so I am not able to get hex file to test it on nrf51 dk.

    As you mentioned above, getting started document don't have enough settings, so can you please help me with the additional settings you did in segger.

  • Hi,

    errors listed below along with action taken by me to solve that errors.

     err1:

    core_cm0.h: No such file or directory

    added path :  ../../../../../../components/device
                            ../../../../../../components/toolchain/CMSIS/Include

      err2:  

    Linking ble_app_proximity_s130_pca10028.elf
        Output/nrf51422_xxac_s130/Exe/ble_app_proximity_s130_pca10028.elf section `.text.SystemInit' will not fit in region   `UNPLACED_SECTIONS'
        region `UNPLACED_SECTIONS' overflowed by 78524 bytes
        cannot find entry symbol reset_handler; not setting start address
        Output/ble_app_proximity_s130_pca10028 nrf51422_xxac_s130/Obj/ses_startup_nrf51.o: In function `_vectors':
        (.vectors+0x0): undefined reference to `__stack_end__'
        Output/ble_app_proximity_s130_pca10028 nrf51422_xxac_s130/Obj/thumb_crt0.o: In function `memory_set':
        (.init+0xd8): undefined reference to `__stack_end__'
        (.init+0xdc): undefined reference to `__stack_start__'
        (.init+0xe0): undefined reference to `__stack_process_end__'
        (.init+0xe4): undefined reference to `__stack_process_start__'
        (.init+0xe8): undefined reference to `__data_load_start__'
        (.init+0xec): undefined reference to `__data_start__'
        (.init+0xf0): undefined reference to `__data_end__'
        (.init+0xf4): undefined reference to `__text_load_start__'
        (.init+0xf8): undefined reference to `__text_start__'
        (.init+0xfc): undefined reference to `__text_end__'
        (.init+0x100): undefined reference to `__fast_load_start__'
        (.init+0x104): undefined reference to `__fast_start__'
        (.init+0x108): undefined reference to `__fast_end__'
        (.init+0x10c): undefined reference to `__ctors_load_start__'
        (.init+0x110): undefined reference to `__ctors_start__'
        (.init+0x114): undefined reference to `__ctors_end__'
        (.init+0x118): undefined reference to `__dtors_load_start__'
        (.init+0x11c): undefined reference to `__dtors_start__'
        (.init+0x120): undefined reference to `__dtors_end__'
        (.init+0x124): undefined reference to `__rodata_load_start__'
        (.init+0x128): undefined reference to `__rodata_start__'
        (.init+0x12c): undefined reference to `__rodata_end__'
        (.init+0x130): undefined reference to `__tdata_load_start__'
        (.init+0x134): undefined reference to `__tdata_start__'
        (.init+0x138): undefined reference to `__tdata_end__'
        (.init+0x13c): undefined reference to `__bss_start__'
        (.init+0x140): undefined reference to `__bss_end__'
        (.init+0x144): undefined reference to `__tbss_start__'
        (.init+0x148): undefined reference to `__tbss_end__'
        (.init+0x14c): undefined reference to `__heap_start__'
        (.init+0x150): undefined reference to `__heap_end__'
        Output/ble_app_proximity_s130_pca10028 nrf51422_xxac_s130/Obj/softdevice_handler.o: In function `sd_check_ram_start':
        softdevice_handler.c:(.text.sd_check_ram_start+0x1c): undefined reference to `__data_start__'
        Output/ble_app_proximity_s130_pca10028 nrf51422_xxac_s130/Obj/softdevice_handler.o: In function `softdevice_enable':
        softdevice_handler.c:(.text.softdevice_enable+0x28): undefined reference to `__data_start__'
        Output/ble_app_proximity_s130_pca10028 nrf51422_xxac_s130/Obj/fstorage.o: In function `check_config':
        fstorage.c:(.text.check_config+0x28): undefined reference to `__start_fs_data'
        fstorage.c:(.text.check_config+0x2c): undefined reference to `__stop_fs_data'
        Output/ble_app_proximity_s130_pca10028 nrf51422_xxac_s130/Obj/fstorage.o: In function `fs_init':
        fstorage.c:(.text.fs_init+0xd4): undefined reference to `__stop_fs_data'
        fstorage.c:(.text.fs_init+0xd8): undefined reference to `__start_fs_data'


  • I had to add the CMSIS include path when I tried it on another PC. I didn't have to do it on my PC because I have installed the CMSIS package in SES. However, I was not able to reproduce the linker errors. What version of SES are you using? I have tested with v.3.40 and v4.12

  • I am using segger version v4.12 and CMSIS pack is installed.

  • ok, the ../../../../../../components/device path was already included in the project, and it shouldn't have been necessary to add the  CMSIS if you had installed the package.  Here is what I did to test it on a different other PC:

    1. Downloaded a new copy of SDK 11

    2. Download and extract the zip file I uploaded. Renamed the folder to  ble_app_proximity and replaced it with the existing folder in SDK 11. 

    3. Built and programmed the app to a nRF51 DK (project located in \examples\ble_peripheral\ble_app_proximity\pca10028\s130\ses)

  • Hi Vidar,

    I got solution, problem is in retarget.c file of sdk 11, I replace that file with retarget.c file from your given zip folder.

    Now hardware is working without debug mode. Thank you.

    Now new problem has arrived, I am not able to program hardware with OTA feature.

    After programming dk using dfu, it stop working. It is working with hex file of keil.

    have you tried hrs_dfu example or any example with dfu?

Reply
  • Hi Vidar,

    I got solution, problem is in retarget.c file of sdk 11, I replace that file with retarget.c file from your given zip folder.

    Now hardware is working without debug mode. Thank you.

    Now new problem has arrived, I am not able to program hardware with OTA feature.

    After programming dk using dfu, it stop working. It is working with hex file of keil.

    have you tried hrs_dfu example or any example with dfu?

Children
Related