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

"Undefined Symbol" error message when using BLE_ADVERTISING_DEF macro

Hello everybody

I'm trying to initialise an advertising module for my project.

When using the macro for creating an advertising instante I get the following:

BLE_ADVERTISING_DEF(my_adv);

After compiling I get:

.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_advertising_on_ble_evt (referred from main.o).
.\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ble_advertising_on_sys_evt (referred from main.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.

What is missing?

Thanks for helping

Parents
  • I had the same problem today. BLE_ADVERTISING_ENABLED was properly defined to 1 in sdk_config.h, the cause of the problem was not including nrf_sdh_ble.h in my source file.
    The confusion here is that 
    BLE_ADVERTISING_DEF is defined in the ble_advertising.h header file and one would think that including this one is enough for BLE_ADVERTISING_DEF to work. However that is not the case, you also need to include nrf_sdh_ble.h in your source file (ble_advertising.h does not include it, despite using NRF_SDH_BLE_OBSERVER macro defined there).

Reply
  • I had the same problem today. BLE_ADVERTISING_ENABLED was properly defined to 1 in sdk_config.h, the cause of the problem was not including nrf_sdh_ble.h in my source file.
    The confusion here is that 
    BLE_ADVERTISING_DEF is defined in the ble_advertising.h header file and one would think that including this one is enough for BLE_ADVERTISING_DEF to work. However that is not the case, you also need to include nrf_sdh_ble.h in your source file (ble_advertising.h does not include it, despite using NRF_SDH_BLE_OBSERVER macro defined there).

Children
No Data
Related