Skip to content

Minimal GCC build and JLink flashing system for Nordic nRF51822 projects.

License

Notifications You must be signed in to change notification settings

hughobrien/nRF51822-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nRF51822-cli

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.

Heritage

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.

Usage

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

Tests

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.

Requirements

In each case, there are multiple versions of these available. The code should be easily modifiable to support them.

About

Minimal GCC build and JLink flashing system for Nordic nRF51822 projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published