nrf51 debugging

USB Port Connection
USB Port Connection (Photo credit: Wikipedia)


I was playing with nrf51 dongle some more and I stumbled on some troubles, so debugging would be handy. After some playing around I found out you need to add following to Makefile:


After that you just use whatever you need for debugging in the code (e.g. printf).

The result can be read on serial terminal over the USB port (e.g. minicom). You need to set the speed to 38400).


nrf51 dongle and BLE

English: Cirago Bluetooth dongle, bottom view,...
English: Cirago Bluetooth dongle, bottom view, with USB series A plug (Photo credit: Wikipedia)

Last week I bragged about managing to compile simple blinky code for nrf51 dongle on Mac OS X.

The problem was that I couldn’t make BLE work. After banging my head against the wall and trying to tackle the problem I slowly got the info I need to add softdevice to the code and flash it before the program code.

At the end I tried to compile the softdevice and program code on Windows and it worked, so the problem was with the way JLinkExe is working on Mac OSX. After some googling I found out there is also a rknrfgo app for Mac OSX.

I’ve installed it and it worked like a charm. Just had to add link of softdevice and code to the app and finish everything by clicking the button Both.