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

nRF51 SDK v8.0 on OS X (nRF51822, pca20006)

I have gone through most of the guides/links that I saw here to no end.

My development environment is OS X 10.9, gcc-arm 4.9, nRF51822 beacon.

Before going for the IDE setup, I just want to build one of the samples and upload the hex using nRF Master Control Panel.

I feel like after setting correct paths for the build scripts I will start getting some results but so far I see messages like:

"make: Nothing to be done for `Makefile'."

Should I use an earlier version of gcc/sdk?

----------EDIT:----------

Thank to Stian and Vidar's comments, I've made a little progress.

For the blinky (blank) example, I've compared Makefiles to see that the only difference is with the pca flags;

CFLAGS += -DBOARD_PCA10028 (vs -DBOARD_PCA10031)
ASMFLAGS += -DBOARD_PCA10028 (vs -DBOARD_PCA10031)

So I replaced them with PCA20006, as that's the board I am using (nRF51822 Beacon board) according to the doc here.

Then I ran the command "make" inside folder I've created;

..nrf51_sdk/examples/peripheral/blinky/pca20006/blank/armgcc/

where I copied the blinky_gcc_nrf51.ld and Makefile from other pca folders, with the pca20006 modification I've made.

I've got the following error:

../../../main.c:28:40: error: 'LEDS_LIST' undeclared here (not in a function) const uint8_t leds_list[LEDS_NUMBER] = LEDS_LIST;

That's because pca20006.h header file under ..nrf51_sdk/examples/bsp/ does not have the LEDS_LIST definition unlike the other 2 headers(pca10031 and pca10028). So I've added the following define inside pca20006.h to compile blinky example;

#define LEDS_LIST { LED_RGB_RED, LED_RGB_GREEN, LED_RGB_BLUE }

And finally I've got the hex.

result

I'm still not sure what the .bin is for, but I tried uploading .hex file onto nrf51822 beacon kit using nRF MCP Android application, but that failed with the following log:

dfu_log

It seem's like nrf51822 beacon kit does not support DFU v.2 from the log:

[DFU] DFU target does not support DFU v.2

which I don't know what it is really. Attaching the full MCP log here.

Looking at some other posts like here and here it seems like if I want to use nRF51 SDK v8.0.0, I should use the compatible softdevice(v8) and the blootloader(?) for the board I am using. By default, the beacon kit has S110 v6.0.0 and SDK v5.2.0 bootloader as well as the ble_app_beacon_bcs firmware.

The nRF Beacon kit contains three components:

S110 softdevice v6.0.0 Bootloader from nRF51 SDK v5.2.0 Beacon application for the beacon kit So the Beacon kit will only accept applications based on nRF51 SDK v5.2.0

That's fine, for the next step I will try compiling an example from nRF51 SDK v5.2.0 but then it does not have the Makefile to use with gcc and I'm not sure about if I can create one myself.

Am I going on the right track? I believe the softdevice I need is here as S110-SD-v8 but no idea how to flash it or where to get the bootloader for it. There is a bootloader folder under ..nrf51_sdk/examples/dfu/bootloader/ but that seems to be for pca10028.

Now I've ordered the new nRF51-DK along with the dongle. But eventually I need my code to work on the beacon kit or any beacon really. Should I just give up and proceed on Windows/Keil/IAR combo? I don't have that kind of money for Keil setup since I'm not building a new device but only trying to make the beacon kit work with a simple advertising application.

----------EDIT 2:----------

Eventually I managed to compile examples using gcc arm for mac toolchain and modifying makefiles such as the common Makefile.posix and running "make" from command line. I am not going to use Windows/Keil/Eclipse etc when I have better options such as Crossworks. I'll give a try to Crossworks as IDE once my DK arrives with the onboard J-LINK. Thanks to everyone for their informative comments and guidance. Nordic documentation is also great if you spare some time for it, compared to what I've seen before.

Related