Skip to content

Instantly share code, notes, and snippets.

@wzab
Forked from bertrandmartel/nRF51_linux_intall.md
Created January 9, 2019 10:58
Show Gist options
  • Save wzab/486360e199fb5c1fc8d13d849db53177 to your computer and use it in GitHub Desktop.
Save wzab/486360e199fb5c1fc8d13d849db53177 to your computer and use it in GitHub Desktop.
nRF51 Development Kit complete setup for Linux

nRF51 Development Kit complete setup for Linux

Installation Steps

Toolchain

SDK

GNU_INSTALL_ROOT := <path_to_toolchain>
GNU_VERSION := 5.2.1
GNU_PREFIX := arm-none-eabi

Replace your toolchain path + your GNU version

Uploader

get the nrf uploader : https://www.nordicsemi.com/eng/nordic/Products/nRF51-DK/nRF5x-Tools-Linux/51392

Segger

Build

cd ~/nrf51-sdk/examples/peripheral/blinky/pca10028/blank/armgcc
make

Upload

//erase firmware
nrfjprog --family  nRF51 -e

//upload firmware
nrfjprog --family  nRF51 --program _build/nrf51422_xxac.hex

//start firmware
nrfjprog --family  nRF51 -r

Debug your code

add JLink folder to your path :

export PATH=$PATH:/opt/SEGGER/JLink

start debug :

JLinkExe  -device  nRF51422_xxAC -speed 4000 -if SWD
> connect

In another terminal :

JLinkRTTClient

You should now see Hello World from SEGGER! if your blink example is running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment