1

On OSX with Rowley Associates CrossWorks what are the steps needed to compile and run a simple BLE UART sample code for Nordic nRF51 DK to an iPhone.

I found iOS and Android code here and am comfortable with that part: https://www.nordicsemi.com/Products/nRFready-Demo-APPS

But I am not sure how to get the toolchain setup and running on the nRF51 board. I've seen some directions for SDK 6.x but can't find anything for SDK 7.x.

Yepher
  • 1,465
  • 12
  • 25
  • I've had success building the examples and programming the nRF51 DH using ARM GCC and following these instructions: https://devzone.nordicsemi.com/blogs/22/getting-started-with-nrf51-development-on-mac-os-x/ Do you need to use CrossWorks? – MikeV Mar 09 '15 at 20:44

1 Answers1

3

This is how I got it to work:

  1. Setup "nRF51 SDK"

  2. unzip "nRF51_SDK_8.0.0_5fc2c3a_packs/nRF_SoftDevice_S110/NordicSemiconductor.nRF_SoftDevice_S110.8.0.0.pack"

  3. Load "$nRF51_SDK_8.0.0_5fc2c3a/components/softdevice/s110/hex/s110_softdevice.hex" on nRF51 with RKNRFGO.app

  4. In CrossWorks File->Import Project and select "$nRF51_SDK_8.0.0_5fc2c3a/examples/ble_peripheral/ble_app_uart"

5.in "Select Template" select "nRF51_EXE - ..."template list

  1. Remove "retarget.c" from project (it is easiest if you build now so you get the error)

  2. Select Project Item-> "Project 'nrf51422_xxac_s110'" in project explorer

  3. In "Properties Window" scroll down to "Linker Options" and set "Section Placement Macros" to:

    FLASH_START=0x18000

    RAM_START=0x20002000

Also make sure Properties Window->Target Loader Options->Can Erase All is set to "No"

  1. Select Build->nrf51422_xxac_s110...

9.5 Select Target -> Connect -> SEGGER J-LINK

  1. Select Debug->Go

Now apps can connect to the nRF51 DK board

Get the mobile app source code here.

See this post for more details.

Yepher
  • 1,465
  • 12
  • 25
  • Step-by-step debugging worked for me on OS X, Crossworks, nRF51-DK, only after importing what's inside "../nRF51_SDK_8.0.0/examples/ble_peripheral/ble_app_uart/pca10028/arm4" for SDK 8.0.0. If you have a recent mac, I have to recommend virtualbox/win7/keil combo as it's "unfortunately" a lot faster to setup for beginners. Eventually I'll move on to CW to avoid paying Keil a fortune, also I find virtual windows only uglier than it's native state. When you'd think windows can't get any worse, they created windows on vm. Yet it works out of the box. – Kerem May 07 '15 at 04:10