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

Linker error - BLE advertising

I am trying to test a simple non-connectable BLE adverstising. I am using the following resources.

1. SDK - 16.0

2. SD - S132

3. Board - NRF52 Development kit. 

4. Segger embedded studio. 

I am getting the following linker error. 

Linking ble_adv.elf
Output/ble_adv Debug/Obj/SEGGER_THUMB_Startup.o: in function `exit':
undefined reference to `__SEGGER_init_table__'
Output/ble_adv Debug/Obj/ses_startup_nrf_common.o: in function `afterInitialize':
undefined reference to `__RAM_segment_end__'
Output/ble_adv Debug/Obj/main.o: in function `advertising_init':
undefined reference to `ble_advertising_init'
Build failed

Please help me solve it. Thanks in advance

Parents
  • Hi,

    The last error is caused either by the ble_advertising.c source file not being included in the project, or the module not being enabled in the sdk_config.h file:

    //==========================================================
    // <q> BLE_ADVERTISING_ENABLED  - ble_advertising - Advertising module
     
    
    #ifndef BLE_ADVERTISING_ENABLED
    #define BLE_ADVERTISING_ENABLED 1
    #endif

    The other two errors seem to be related to the project config. Could you zip up your project and upload it here? That would make it easier for us to debug the issue.

    Best regards,
    Jørgen

  • You are making it very hard for yourself when you do not use the example projects from the SDK as a starting point.

    We are not using SEGGER_THUMB_Startup.S, but thumb_crt0.s. Replacing this file seems to solve the first error.

    The second error is caused by your flash_placement.xml file not containing the memory sections that are used by our startup-file. Replacing the file with one from a SDK 16.0.0 example seems to solve this issue.

    When doing this, more errors occur. You should remove the Memory Map File config, and add this under Memory Segments in the project settings: "FLASH RX 0x0 0x80000;RAM RWX 0x20000000 0x10000".

    Finally, you need to include all the missing source files and enable these in the sdk_config.h file. This seems to be so many that I did not take the time to do it.

Reply
  • You are making it very hard for yourself when you do not use the example projects from the SDK as a starting point.

    We are not using SEGGER_THUMB_Startup.S, but thumb_crt0.s. Replacing this file seems to solve the first error.

    The second error is caused by your flash_placement.xml file not containing the memory sections that are used by our startup-file. Replacing the file with one from a SDK 16.0.0 example seems to solve this issue.

    When doing this, more errors occur. You should remove the Memory Map File config, and add this under Memory Segments in the project settings: "FLASH RX 0x0 0x80000;RAM RWX 0x20000000 0x10000".

    Finally, you need to include all the missing source files and enable these in the sdk_config.h file. This seems to be so many that I did not take the time to do it.

Children
Related