Tools for OS X Development

I've been working on setting my Mac up for development with the Nordic nRF51x22. Working on a Mac rules out using the Keil µVision IDE (unless I wanted to use Windows virtualization). Fortunately, there are other options.

Nordic Semiconductor provides some support for more than one toolchain. They provide Keil µVision projects and packs, GCC makefiles and linker scripts, and a startup assembly file for IAR. Since Eclipse CDT can use GCC for its toolchain, there's been a lot of community effort to use Eclipse as an IDE for developing for the nRF51422 and nRF52822 chips. There are several plugins for Eclipse and other tools that make this easier:

Eclipse CDT (C/C++ Development Tooling)

To do any sort of C or C++ development in Eclipse, you'll need to install this either as a plugin in an existing Eclipse installation or you can download a standalone Eclipse CDT install.

GNU ARM Eclipse Plug-ins

This suite of plugins allows you to make managed builds (you don't have to import or maintain makefiles) for ARM development, use a SEGGER J-Link or OpenOCD debugger from within Eclipse, and use Keil software packs.

GNU Tools for ARM Embedded Processors

You'll be cross compiling your source for an ARM processor, not the host processor (Intel). This is the toolchain that the GNU Arm Eclipse Plugin site recommends using. The GNU ARM Eclipse Plug-ins site has instructions for integrating the toolchain with the Eclipse plugins.

SEGGER J-Link Debugger Software

The nRF51-DK has an onboard SEGGER debugger. SEGGER provides a driver and some command-line tools for OS X. The GNU ARM Eclipse Plug-ins integrate with this software.

nrf51osx

This plugin provides a new project template specific to the Nordic nRF51822 chip. Unfortunately, it hasn't been updated for revision C of the silicon or the nRF51-DK (PCB100028). It also uses paths not present in Nordic's latest 7.1.0 SDK. All these can be fixed once you create your project, however.

rknrfgo

There is no nRFGo Studio for OS X. However, this tool by Roland King provides most of the functionality. It also provides an OS X version of nrfjprog. This version has similar, but slightly different, command-line options than the Windows version of nrfjprog.

nrf-ble-sniffer-osx

There are Windows tools for the Nordic sniffer dongle. This is an equivalent OS X tool.

CrossWorks for ARM

This is a commercial IDE for OS X that supports ARM processors and the SEGGER (among others) debugger.

  • FormerMember
    FormerMember

    Thank you, I find your article very useful, I will reffer to it when I will use this info at my job

  • We using OS/X as development plattform too. Note, that you can use the JLinkExe tool provided by segger to flash devices. We use cmake and provide commands like make device_name.flash, that build the software and flash it to the device by creating a small script and execute that script by JLinkExe.

  • Mike,

    1. Actually, for the nRF51x22, use the Executable->Hello World ARM Cortex-M C/C++ Project->Cross ARM GCC project template.
    2. Coupling in the SDK is the part I'm least sure about. I added the SDK as a source path and then excluded the files (components) I wasn't interested in. It's a little time consuming, and I'm not sure if it's the best way--I'm going to make a separate blog article on that.
    3. I've always used 7.x just because it's the latest--but I'm sure someone from Nordic could help you with this question.
    4. That's because I forgot (doh!) to include the toolchain in my list of tools. Install the GNU ARM toolchain according to the instructions from the GNU ARM Eclipse Plugins.
  • nrfjprog does work with the v7.x softdevice, and has since since last year's August release. However since around that time you have been required to tell it which softdevice you're using using the -S or --softdeviceversion switch as well as the file path to the hex file. The changes in the way the softdevice was packed (no CLENR0) mean it's no-longer possible to deduce the load addresses from the image.

    nrfjprog -h

    gives you current command-line arguments and

    nrfjprog -V

    as well as listing the version, gives you the softdevices versions supported for use with the -S switch.

  • I am not sure I would describe Roland King's version of nrfjprog as being similar, as the command line arguments are radically different. Much better IMHO, but it is going to take more than simple tweak to use the two command line tools.

    Unfortunately there is a bug in RK's version of nrfjprog that prevents it from working with the v7 S110 softdevice, nor does he provide the source to his tool. So your only recourse is to fall back to the RKNRFGO GUI tool instead.