I’ve had good success getting setting up simple BLE apps on the Arduino by following along with the examples on the GitHub repository: https://github.com/redbear/nRF5x/tree/master/nRF52832/arduino/arduino-1.8.0/hardware/RBL/RBL_nRF52832/libraries/BLE_Examples/examples. However, now I’d let to delve a bit lower level with something like mbed so that I can perhaps play around with the different power modes, e.g. like some of these examples: https://github.com/NordicPlayground/nrf51-powerdown-examples.
I’ve spent an hour or so now testing out the mbed online IDE by following along the instructions getting set up here: https://github.com/redbear/nRF5x/blob/master/nRF52832/docs/Mbed_IDE_User_Guide.md except using the RedBear BLENANO2 board instead of Nordic nRF52-DK. After importing the
mbed-os library by Baudouin LANDAIS (is this the one I’m supposed to use?) and then updating it, one example compiles succcessfully - the
mbed-os-example-ble-LED one, and I am able to drag the .hex file onto the board through the DAPLink and see it working correctly. I’ve tried another one
mbed-os-example-b.e-HeartRate, and it’s giving me an error:
Error: Cannot open source input file “mbedtls/aes.h”: No such file or directory in “extras/mbed-os-example-ble-HeartRate/mbed-os.lib/features/lorawan/lorastack/mac/LoRaMacCrypto.cpp”, Line: 31, Col: 26
So I tried importing a library called mbedtls (that I found using the Import Wizard, but not even sure if that’s the correct one to use) but ended up with more errors (many like
Error: Symbol __asm___8_main_cpp_led1___Z10atomic_wr8Phh multiply defined (by /build/mbed-os-example-ble-HeartRate/source/main.RBLAB_BLENANO2.o and /build/./main.RBLAB_BLENANO2.o).). Before spending longer trying to debug this, I was wondering what other alternative methods people are using and would recommend to develop on this board, bearing in mind that I’m not an experienced C/C++ developer? I’ve also heard of Keil uVision being mentioned (and is it possible to develop with mbed without using their online IDE?). I’d like to know what the most straightforward way of incorporating those powerdown examples, and any links to tutorials or other resources would be greatly appreciated!