Provides a minimal GCC based build system for nRF51822 projects. Avoids make in favour of simple shell scripts. Includes JLink flash and erase scripts.
Handles:
- Compilation
- SoftDevices
- Flash Programming
Includes blink-test file.
There are several similar projects available such as this, that, and the other. Each has their own merits. This guide was also helpful.
This project aims to be simple and well documented, for example, the very concise JLink shorthand commands are expanded and written more naturally.
Version 6 of the S110 SoftDevice currently recommended, and for simplicity is hardcoded into this project; this can easily be modified.
Since we know the included 'main.c' blinker compiles successfully, we can test with
./compile; ./erase; ./flash; ./clean
compile:
- Calls GCC directly on all .c files, including the necessary NRF SDK templates.
- Avoids 'make' complexity by forcing tabula rasa builds.
- Links with the correct offsets for the S110 softdevice.
flash:
- The application is checked to see if it was linked against a SoftDevice.
- Both are then flashed to the chip.
erase:
- Erases both region0 and region1 areas, if defined.
- Erases the User Information Configuration Registers.
clean:
- Remove object files
Using the Nordic NRFGo Studio both the SoftDevice and the application binaries were read from the flashed chip and successfully verified against the original hexfiles.
- nRF51 SDK
- An S110 SoftDevice, v6 preferred
- SEGGER JLink
- nRF51822 Evaluation Kit board PCA1001
- GNU Tools for ARM
In each case, there are multiple versions of these available. The code should be easily modifiable to support them.