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

SDK14: Undefined symbol sdh_req_observers$$Base

I am currently porting my project from SDK13.0 to 14.0 so I can use s332 v5.0.0.

I receive warnings when compiling

.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_req_observers$$Base (referred from nrf_sdh.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_req_observers$$Limit (referred from nrf_sdh.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_stack_observers$$Base (referred from nrf_sdh.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_stack_observers$$Limit (referred from nrf_sdh.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_state_observers$$Base (referred from nrf_sdh.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_state_observers$$Limit (referred from nrf_sdh.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_ant_observers$$Base (referred from nrf_sdh_ant.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_ant_observers$$Limit (referred from nrf_sdh_ant.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_ble_observers$$Base (referred from nrf_sdh_ble.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_ble_observers$$Limit (referred from nrf_sdh_ble.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_soc_observers$$Base (referred from nrf_sdh_soc.o). Unused section has been removed.
.\_build\nrf52_firmware.axf: Warning: L6330W: Undefined symbol sdh_soc_observers$$Limit (referred from nrf_sdh_soc.o). Unused section has been removed.

What is causing the undefined symbol errors?

Is it related to the fact that my ble_evt_dispatch function is never called, even though i use

NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_evt_dispatch, NULL);
Parents
  • Hi goldwake,

    I have been having the same issue as you I think. Ultimately some of the linker warnings can be ignored (for any observer sets that are not being used by your code), but, if the sections and section references aren't being linked correctly, then ignoring them will be ignoring a real problem.

    For me, I was getting the same linker warnings you were, e.g.

    Undefined symbol sdh_ble_observers$$Base
    Undefined symbol sdh_ble_observers$$Limit
    

    if you remove the --diag_suppress 6330 and compile one of the SDK examples, e.g. examples\ble_peripheral\ble_app_hrs\pca10040\s132\arm5_no_packs

    you can see that the linker warnigns are different:

    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_req_observers1$$Base (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_req_observers1$$Limit (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_stack_observers1$$Base (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_stack_observers1$$Limit (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_state_observers1$$Base (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_state_observers1$$Limit (referred from nrf_sdh.o). Unused section has been removed.
    

    you can see that the section names always have a 1 suffix, and the observers that are actually used are not generating warnings.

    For me, the issue was having --gnu specified in the "Misc Controls" textbox in C/C++ tab. Removing that seems to have corrected the underlying issue for me, and now only unused observer sets generate the linker warnings.

    Hope that might help someone!

Reply
  • Hi goldwake,

    I have been having the same issue as you I think. Ultimately some of the linker warnings can be ignored (for any observer sets that are not being used by your code), but, if the sections and section references aren't being linked correctly, then ignoring them will be ignoring a real problem.

    For me, I was getting the same linker warnings you were, e.g.

    Undefined symbol sdh_ble_observers$$Base
    Undefined symbol sdh_ble_observers$$Limit
    

    if you remove the --diag_suppress 6330 and compile one of the SDK examples, e.g. examples\ble_peripheral\ble_app_hrs\pca10040\s132\arm5_no_packs

    you can see that the linker warnigns are different:

    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_req_observers1$$Base (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_req_observers1$$Limit (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_stack_observers1$$Base (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_stack_observers1$$Limit (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_state_observers1$$Base (referred from nrf_sdh.o). Unused section has been removed.
    .\_build\nrf52832_xxaa.axf: Warning: L6330W: Undefined symbol sdh_state_observers1$$Limit (referred from nrf_sdh.o). Unused section has been removed.
    

    you can see that the section names always have a 1 suffix, and the observers that are actually used are not generating warnings.

    For me, the issue was having --gnu specified in the "Misc Controls" textbox in C/C++ tab. Removing that seems to have corrected the underlying issue for me, and now only unused observer sets generate the linker warnings.

    Hope that might help someone!

Children
Related