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.
12 months ago.
nrf52 blinky on mbed - Error compilling original sample...
I would like to give a try to nrf52 on mbed. So I went to:
and clicked Import to compiler
I check the update... check box and the project was imported. The target board is selected on the top right corner ("Nordic nRF52-DK")
When I click Compile | Build only Lots of warnings as displayed but one error is also displayed:
Error: Non-constant-expression cannot be narrowed from type 'int' to 'std::uint8_t' (aka 'unsigned char') in initializer list [-Wc++11-narrowing] in "extras/mbed-os.lib/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NORDIC_SOFTDEVICE/TARGET_NRF52/source/nRF5xGap.cpp", Line: 749, Col: 9
Why is this error appearing with the original source code? How to solve it?
By the way, is mbed using the softdevice from nordic or an alternative one?
12 months ago.
I have reproduced the error.
Please update mbed-os form 5.12.1(imported rev.) to 5.13.0(as of today).
You can compile it without an error message but still lots of warnings.
I don't test the program because I'm using the board at another place right now.
Mbed's revision control is always running, and I have never seen a stable bug-free one for the past nine years.
Be careful even the official sample program.
The lack of a stable program is likely to be the cause of the moving to Arduino from Mbed.
Yes, Mbed nRF5x serises use Noridic Softdevice as you expect.
You can confirm it by following readme file (see SoftDevice explanation, near the end of line).