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

nRF51 BLE examples on mbed.org will not compile

I'm trying to get going on an nRF51 project using the compiler on mbed.org, but if I create a new project using the nRF51 DK and use any of the example BLE apps as templates I get multiple compiler errors:

Error: Identifier "nrf_app_irq_priority_t" is undefined in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.h", Line: 60, Col: 39
Error: Identifier "nrf_radio_notification_distance_t" is undefined in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.h", Line: 61, Col: 39
Error: Identifier "nrf_app_irq_priority_t" is undefined in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.c", Line: 51, Col: 39
Error: Identifier "nrf_radio_notification_distance_t" is undefined in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.c", Line: 52, Col: 39
Warning: Function "sd_nvic_ClearPendingIRQ" declared implicitly in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.c", Line: 60, Col: 17
Warning: Function "sd_nvic_SetPriority" declared implicitly in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.c", Line: 66, Col: 17
Warning: Function "sd_nvic_EnableIRQ" declared implicitly in "nRF51822/nrf51-sdk/source/nordic_sdk/components/ble/ble_radio_notification/ble_radio_notification.c", Line: 72, Col: 17
Info: Unable to download. Fix the reported errors...

I've tried messing with older versions of the DK and libs and I get the same errors no matter what I do. Is there a way to fix this, or is there a howto somewhere to get set up developing for this chip using a different IDE?

Parents
  • With "update program and libraries" unchecked the code will compile, but when I flash it to the board it doesn't work. My laptop can see the advertisements, but cannot connect:

    $ sudo hcitool lescan LE Scan ... DC:69:75:B4:AF:E2 BLE UART DC:69:75:B4:AF:E2 (unknown) ^C$ sudo gatttool -b DC:69:75:B4:AF:E2 -I [DC:69:75:B4:AF:E2][LE]> connect Attempting to connect to DC:69:75:B4:AF:E2 Error: connect error: Connection refused (111) [DC:69:75:B4:AF:E2][LE]> connect Attempting to connect to DC:69:75:B4:AF:E2 Error: connect error: Connection refused (111)

    I've tried erasing the chip completely and reflashing components/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex from the SDK but it doesn't help. I also see the same behaviour from the example binaries, as well as from a binary I generated with gcc - how do I find out if the SoftDevice is installed and configured correctly?

Reply
  • With "update program and libraries" unchecked the code will compile, but when I flash it to the board it doesn't work. My laptop can see the advertisements, but cannot connect:

    $ sudo hcitool lescan LE Scan ... DC:69:75:B4:AF:E2 BLE UART DC:69:75:B4:AF:E2 (unknown) ^C$ sudo gatttool -b DC:69:75:B4:AF:E2 -I [DC:69:75:B4:AF:E2][LE]> connect Attempting to connect to DC:69:75:B4:AF:E2 Error: connect error: Connection refused (111) [DC:69:75:B4:AF:E2][LE]> connect Attempting to connect to DC:69:75:B4:AF:E2 Error: connect error: Connection refused (111)

    I've tried erasing the chip completely and reflashing components/softdevice/s130/hex/s130_nrf51_2.0.0_softdevice.hex from the SDK but it doesn't help. I also see the same behaviour from the example binaries, as well as from a binary I generated with gcc - how do I find out if the SoftDevice is installed and configured correctly?

Children
No Data
Related