Other than using Arduino IDE, how are people developing with the BLE NanoV2?


#1

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!

Eddie


#2

I’ve started to use Eclipse , gcc and Nordic SDK to program Nano2.
I am also using Nordik nRF52 Developer Kit to debug Nano2 via P20 header.
I would ot recommend it to a not experienced C++ developer.
Nordisk SDK is C based and therefore quite cumbersome to use with C++,
One needs to write wrappers and understand another SDK.
Initially is not to easy to use, eclipse setup etc.It will pay off later, if/when you must use it.
Arduino should work for most use cases, if you don’t need timers, more hw control etc.
One can still use mbed directly within Arduino.


#3

I’ve using the Nano 2 with VisualGDB, it works well with the DAPLink. I’m building apps using the Nordic SDK
I’ve also used it with Atollic TrueStudio, but you’ll need to use a version before 9.x as it’s now STM32-only.

I think VisualGDB is well worth what it costs


#4

I’ve developed applications with the Nano 2 on MBED however when bootloading it I have to pull it out of the PC once uploading is complete, otherwise after 1-2 seconds the Jlink window re-opens and the board is reset to the previous app.
I like Mbed over Arduino, I think mbed’s a better bridging/beginner platform if you want to use Segger or Keil.


#5

Thanks for the responses, I’ve actually moved back to using the Arduino for the current bit of work I’m doing but will keep these suggestions in mind when I start to delve back into lower level stuff again.

I did get to a point where one viable way of development was using mbed’s CLI tool: https://github.com/ARMmbed/mbed-cli, mostly by following another fellow community member’s (I can’t seem to find the post anymore) repo: https://github.com/akosthekiss/mscribear) - I was able to build these example BLE apps on the command line fine: https://github.com/ashok-rao/oob-mbed-os-example-ble.