Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Code Block
# Install west, and make sure ~/.local/bin is on your PATH environment variable:
pip3 install --user -U west
echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc
source ~/.bashrc

# Get the Zephyr source code:
west init ~/zephyrproject
cd ~/zephyrproject
west update

# Export a Zephyr CMake package. This allows CMake to automatically load boilerplate code    # required for building Zephyr applications.
west zephyr-export

# Zephyr's scripts/requirements.txt file declares additional Python dependencies. Install them    # with pip3.
pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt

Install a Toolchain:

Code Block
# Download the latest SDK installer:

# Run the installer, installing the SDK in /opt/zephyr-sdk-0.11.3:
chmod +x
Sudo ./ -- -d /opt/zephyr-sdk-0.11.3

Build blinky demo and load it up using GDB via OpenOCD:

Code Block
# Run from the root of the zephyr repository eg: ~/zephyrproject/zephyr
west build -p auto -b 96b_nitrogen samples/basic/blinky

# Connect Nitrogen board to host computer via micro usb cable
# Wait for the MBED folder to mount automatically
# Run OpenOCD from its source folder
./src/openocd -s tcl/ -f interface/cmsis-dap.cfg -c "transport select swd" -f target/nrf52.cfg

# Start gdb and load blinky demo onto Nitrogen board's flash memory
/opt/zephyr-sdk-0.11.3/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb ~/zephyrproject/zephyr/build/zephyr/zephyr.elf -ex 'target remote :3333' -ex 'monitor halt' -ex 'monitor reset' -ex load