Friday, November 22, 2019

Nordic SDK16, nrRF52840 Dongle and gcc on a Mac

I just got some nRF52840 dongles that I ordered (for about €9 each).

This is a log of my first step of building and programming the 'Blinky' app to it on a Mac, using gcc rather than the Segger Embedded Studio.

I downloaded Nordic's latest nRF5 SDK (version 16) from here.

Downloaded the latest gcc toolchain from ARM from ARM.

Uncompressed the archive.

Copied resulting directory to /usr/local:

cp -a gcc-arm-none-eabi-9-2019-q4-major /usr/local
In the SDK (SDK16) directory, under components/toolchain/gcc: Backed up Makefile.posix, edited it to read:
GNU_INSTALL_ROOT ?= /usr/local/gcc-arm-none-eabi-9-2019-q4-major/bin/GNU_VERSION ?= 9.2.1GNU_PREFIX ?= arm-none-eabi
Go to the SDK, directory examples/peripheral/blinky/pca10059/mbr/armgcc

The makefile is already adapted to the board, so we don't need to follow the instructions here regarding setting flash start etc.

Run make. It worked! To upload the files to the board:
  • Start the nRF for Desktop app, 
  • Start the programming mode within it, 
  • select the device in the drop down, 
  • drag the .hex file from the _build directory that make generated to the nRF Connect app
  • Click 'write'
I think it works! 

The on board LED changes color red / green / white blue-green / blue / black. 

Next step: get a Bluetooth Mesh example app running.



No comments: