CrossWorks CrossStudio examples

Since I wrote about CrossWorks a few weeks ago, several people have mailed me and asked me if I have any sample projects. I didn't, so I just created some.

I've created projects which build blinky_example and ble_app_hrs for each of the three boards NRF6310, PCA10001 and PCA10000.

The projects follow the same directory structure that Nordic's examples do and are designed to unpack into the SDK directory (if this concerns you please make a copy of it first). So for instance the current nrf6310 blinky_example directory looks something like this

Board/nrf6310/blinky_example
   /arm/
   /gcc/
   /iar/
   /main.c

one directory for each build type, I've added a crossworks subdirectory to each with the CrossWorks project file in it, it also builds into that directory, pollutes nothing else and can be deleted at will when you are done.

Board/nrf6310/blinky_example
   /arm/
   /crossworks/
   /gcc/
   /iar/
   /main.c

NOTE I built these files for a specific version of the SDK, nrf51_sdk_v6_0_0_43681 and for the BLE examples you need to install an s110 v7 softdevice.

The link is here, there's a README which gives instructions about downloading, running and even configuring the projects to install a softdevice.

The examples should build and run out of the box.

One point, the SDK doesn't actually contain either blinky_example nor ble_app_hrs for the PCA10000 so that project shows how you can target source from elsewhere (it takes all its code from the pca10001 for one and from nrf6310 for the other) and configure Crossworks with a few defines to make the code compile and run. Obviously the PCA10000 doesn't have any buttons so you can't use that feature on the BLE HRS example, and the LEDs are active low, so they look a little odd, but it works fine with no code changes.