Ble Nano 2 + MBED + PlatformIO wont run


#1

Hey there,

I’m pretty much a Newbie and still struggling with setting up a MBED project for my redbearlab ble nano 2 on Platform IO with Visual Studio code. As my project was built on Mbed Os 5, i cant use the Arduino framework.
My steps till now:
New Pio project ( board: nrf52-dk, framework: mbed)

here’s my platformio.ini:

platform = nordicnrf52
board = nrf52_dk
framework = mbed
debug_tool = custom
debug_server = pyocd-gdbserver
upload_protocol = cmsis-dap

my project builds without problems, i can even upload it. But after that, its not running and theres no way to debug (serial monitor, Pio Debugger, pyocd-gdbserver + arm-none-eabi-gdb)
Is there a softdevice missing maybe?

it would be great if someone could help me on that.

Cheers,


#2

Why do you use this target instead of redbear_blenano2? (https://platformio.org/boards)


#3

theres currently no support for mbed on blenano 2. At least when i tried to configure a project using blenano 2 as target, the wizzard allowed me just to select arduino framework.


#4

You’re right, PIO doesn’t support this yet although it is a valid target (https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L2523). And the chip on the nrf52_dk and the BLE Nano2 are the same (NRF52832)…

Does the board work with the Arduino framework?

Unfortunetly I don’t have the hardware to reproduce. Is there any error when trying to debug / halt the target while it’s running with the debugger?


#5

Pio claims building and uploading succeeded, but there arent any messages visible on the serial monitor.
The serial monitor worked as i tested with some mbed code compiled with Atom (arm-gcc).