Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 3 months ago.
URGENT: can't compile after updating ble_api library
Just updated the ble_api library and now program doesn't compile, with a whole bunch of errors
Warning: Argument of type "const uint32_t *" is incompatible with parameter of type "void *" in "nRF51822/TARGET_MCU_NRF51822/sdk/source/libraries/fstorage/fstorage.c", Line: 469, Col: 27 Error: Identifier "MBED_WEAK" is undefined in "BLE_API/source/BLE.cpp", Line: 98, Col: 2 Error: Expected a ";" in "BLE_API/source/BLE.cpp", Line: 98, Col: 27 Warning: Parsing restarts here after previous syntax error in "BLE_API/source/BLE.cpp", Line: 108, Col: 57 Error: Identifier "InstanceConstructor_t" is undefined in "BLE_API/source/BLE.cpp", Line: 109, Col: 15 Error: Variable "BLEInstanceBase" is not a type name in "BLE_API/source/BLE.cpp", Line: 146, Col: 13
Do I need to make some changes in my project to support updated library?
my platform is the nRF51DK with BOOTLOADER option I also updated the nRF51822 library
2 Answers
8 years, 3 months ago.
There are issues with latest nRF51822 / BLE / mbed combination. This is tracked in this bug. Workaround: use the 'Revisions' panel to revert back to an earlier version of the library.
I've reverted nRF51822 and BLE to previous and mbed to rev 122, and now compiler is not recognizing input types AnalogIn and InterruptIn.
posted by 15 Sep 2016Have had to go back to 121 to get it compiling. Hope nothing else is broken that I don't know about. I've got a production release due and now I can't be confident that any issues are my code or libraries. This is really frustrating and makes me re-consider open source path for production code. Really appreciate all the effort from the mbed team, and know you're doing your best, but maybe it's a problem with the system.
posted by 15 Sep 2016Hi Andrew, yeah, the modular approach that we have in mbed 2.0 where nRF51822, BLE and mbed are separate modules is something that can lead to issues like these. For mbed OS 5 we choose a different route where we package everything up in one release (e.g. mbed OS 5.1.2) against which we can run integration tests for every target (on real devices). Going the monolithic route there will hopefully not leave us with issues like this in the future.
Other than that, when developing code for production systems I'd stick to one set of library versions during development, and not upgrade unless there are severe issues that are fixed upstream. There's plenty of assumptions made when writing the code which upstream libraries might change. You'd have to re-do current consumption tests, sleep modes, etc.
posted by 16 Sep 2016
just updated mbed also, but getting the ole' "can't find device.h" error again
posted by Andrew Fox 15 Sep 2016