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

Many warnings when compiling with nRF51822 and mbed librarys

Since September I get multiple warning messages on projects that use both the nRF51822 library and the mbed library. This is even true for example projects for the 51DK board. I had heard that there was some incompatibilities between the 2 library that surfaced when the mbed compiler was updated in Aug. or Sept.

Am I doing something wrong? Or are we still waiting for an update to the library?

  • Hi Sgetz,

    I would suggest you direct this question to mbed team on mbed forum.

  • Posted on mbed site. No answer from them. Seems to be an incompatibility between nRF51822 and mbed libraries. one or the other needs to change. In the mean time, Nordic development products show lots of warnings.

  • I can see I got warning: Warning: Incompatible redefinition of macro "NRF51" in "BLE_API/common/blecommon.h", Line: 20, Col: 10

    It not very critical from my point of view. Have you got other warning as well ?

  • If I get the URIBeacon project example I get:

    Warning: Function "mbed::Ticker::attach_us(T *, M, timestamp_t) [with T=nRF5xGap, M=void (nRF5xGap::*)()]" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/drivers/Ticker.h', '121'); return false;">/extras/mbed_e1686b8d5b90/drivers/Ticker.h:121</a>) was declared "deprecated" in "nRF51822/TARGET_NRF5/source/nRF5xGap.h", Line: 224, Col: 35
    Warning: Function "mbed::Ticker::attach_us(T *, M, timestamp_t) [with T=nRF5xGap, M=void (nRF5xGap::*)()]" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/drivers/Ticker.h', '121'); return false;">/extras/mbed_e1686b8d5b90/drivers/Ticker.h:121</a>) was declared "deprecated" in "nRF51822/TARGET_NRF5/source/nRF5xGap.h", Line: 224, Col: 35
    Warning: Function "mbed::Ticker::attach_us(T *, M, timestamp_t) [with T=nRF5xGap, M=void (nRF5xGap::*)()]" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/drivers/Ticker.h', '121'); return false;">/extras/mbed_e1686b8d5b90/drivers/Ticker.h:121</a>) was declared "deprecated" in "nRF51822/TARGET_NRF5/source/nRF5xGap.h", Line: 224, Col: 35
    Warning: Incompatible redefinition of macro "ASSERT" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h', '91'); return false;">/extras/mbed_e1686b8d5b90/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h:91</a>) in "nRF51822/TARGET_NRF5/source/common/assertion.h", Line: 128, Col: 10
    Warning: Function "mbed::Ticker::attach_us(T *, M, timestamp_t) [with T=nRF5xGap, M=void (nRF5xGap::*)()]" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/drivers/Ticker.h', '121'); return false;">/extras/mbed_e1686b8d5b90/drivers/Ticker.h:121</a>) was declared "deprecated" in "nRF51822/TARGET_NRF5/source/nRF5xGap.h", Line: 224, Col: 35
    Warning: Incompatible redefinition of macro "ASSERT" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h', '91'); return false;">/extras/mbed_e1686b8d5b90/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h:91</a>) in "nRF51822/TARGET_NRF5/source/common/assertion.h", Line: 128, Col: 10
    Warning: Function "mbed::Ticker::attach_us(T *, M, timestamp_t) [with T=nRF5xGap, M=void (nRF5xGap::*)()]" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/drivers/Ticker.h', '121'); return false;">/extras/mbed_e1686b8d5b90/drivers/Ticker.h:121</a>) was declared "deprecated" in "nRF51822/TARGET_NRF5/source/nRF5xGap.h", Line: 224, Col: 35
    Warning: Function "mbed::Ticker::attach_us(T *, M, timestamp_t) [with T=nRF5xGap, M=void (nRF5xGap::*)()]" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/drivers/Ticker.h', '121'); return false;">/extras/mbed_e1686b8d5b90/drivers/Ticker.h:121</a>) was declared "deprecated" in "nRF51822/TARGET_NRF5/source/nRF5xGap.h", Line: 224, Col: 35
    Warning: Incompatible redefinition of macro "ASSERT" (declared at <a href="#" onmousedown="mbed_doc_goto('/BLE_URIBeaconxxx//extras/mbed_e1686b8d5b90/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h', '91'); return false;">/extras/mbed_e1686b8d5b90/TARGET_NRF51_DK/TARGET_NORDIC/TARGET_NRF5/sdk/libraries/util/nrf_assert.h:91</a>) in "nRF51822/TARGET_NRF5/source/common/assertion.h", Line: 128, Col: 10
    Success: Success! in "<a href="#" onClick="mbed_navigate_to('/BLE_URIBeaconxxx', function() { theitf.controls.get('sidebar_tabs').activate(1); }); return false;">Build Details</a>"
    

    It does seems to function. If I were new to your products and evaluating them, I would assume something was wrong. It does not inspire confidence. Who is in charge of the nRF51822 library? Nordic or mbed?

  • The Ticker was an implementation by mbed, seems that they deprecated it.

Related