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

nrf52 blinky on mbed - Error compilling original sample...

Hi

I would like to give a try to nrf52 on mbed. So I went to:

https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-blinky/

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?

Thanks

Alex

Related