This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF51 DK on OSX

I am brand new to nRF51 DK and I am struggling to figure out where to start. My goal is to periodically sample analog inputs and write them to SD card.

Can someone point me towards:

  • What is the best development choice for OSX? (mBed or GCC)
  • Is there any good step by step guides for getting started with development on OSX?
  • Is there any good tutorial that demonstrates how to get started with NRF51?
  • For the new boards which support mBed, like the DK, mBed isn't a bad choice, especially if you're either used to it already or like the paradigm of a cross platform interface which has a thin layer above the native platform so you can reuse lots of code.

    Note that regrettably the current mBED driver doesn't work well at all in OSX Yosemite (10.10.x) and requires a nasty, and not totally stable, workaround to mount the drive so you can program the device. mBED is taking a really long time to fix it which is rather unfortunate. This makes me question mBED's real commitment to 'cross platform'. Having bricked one of my boards trying to make it work, I stick with JLink and stopped messing around with mBED.

    You can certainly use GCC. The latest SDKs come with some makefiles to get you going. There are various ways you can use Eclipse, either by using the Makefile type project (ie Eclipse just does the make and install for you and allows you to debug) or by setting up native Eclipse projects.

    I use Crossworks, which isn't free but wasn't that expensive for a non-commercial license. I've personally found that the most productive way to write code in a good IDE with very good debugging support. The cost was worth it to me in terms of time fighting with Eclipse and trying to debug things via gdb server (fortuitously I've also been able to use Crossworks for other boards I've collected along the way so in my case that really did work out well).

  • Thank you for the input.

    If I use Crossworks do I need a device like the JLink or can I debug straight through the micro-usb port on the nRF51?

  • The micro-usb power on the nRF51 acts as a JLink (or mBED), In fact as delivered it's configured as a Segger JLink OB, so that's the default. You can even use it as a JLink to debug other boards too. So no, you need nothing, just connect and go.

Related