- Python 3
- Zephyr SDK
- Clone and enter the repo
- Create a Python virtual environment
python3 -m venv ./.venv
- Activate your Python virtual environment
source .venv/bin/activate # Or, if you're a direnv user, leave and come back cd cd -
- Install West
pip install west
- Run
west update
- Install Python dependencies
pip install -r zephyr/scripts/requirements.txt pip install -r nrf/scripts/requirements.txt pip install -r bootloader/mcuboot/scripts/requirements.txt
-
Read the Zephyr Getting Started Guide to install the required development tools (system packages, Zephyr SDK, and udev rules).
-
To save on space, you may want to intall a minimal bundle Zephyr SDK release and the arm-zephyr-eabi toolchain. The full release includes all avaiable toolchains.
-
Read the Introduction to the nRF9160 Feather to better understand the dev board we are using.
-
If you plan making changes to the LTE modem configuration you should understand the various modes: Maximizing battery lifetime in cellular IoT: An analysis of eDRX, PSM, and AS-RAI
Zephyr supplies various Docker images for development.
Our Github Actions build workflow uses the Base Image (ci-base).
west build ./app -b circuitdojo_feather_nrf9160_ns
Flashing the device with an external programmer is quicker than using a bootloader. More importantly, it's the easiest way (and currently the only tested way) to secure the bootloader, update the modem firmware, and use the cortex-debugger.
- External programming device, the nRF5340 Dk is what we currently use.
- 6-pin Tag Connect cable
- J-Link software.
- nRF Command Line Tools.
west flash -r nrfjprog --erase --softreset
Currently we are not using a bootloader, but it will be required for OTA firmware updates. It's also the only way to flash the device without an external programming device.
- Newtmgr
- Ensure
CONFIG_BOOTLOADER_MCUBOOT=y
is set inapp/prj.conf
- Create a "serial" profile in newtmgr:
newtmgr conn add serial type=serial connstring="dev=/dev/ttyUSB0,baud=1000000"
- Put the device into bootloader mode.
newtmgr -c serial image upload ./build/zephyr/app_update.bin
This repo includes .vscode/tasks.json
to make develpoment easier. The included tasks are:
- Build
- Load image via bootloader
- Expects a connection profile named "serial" in
newtmgr
- Expects a connection profile named "serial" in
- Serial Monitor
- Uses
pyserial-miniterm
, which should already be installed in your venv - Assumes the device is connected at
/dev/ttyUSB0
- Uses
- West Flash
- West Flash and Monitor
- Build AT Client
- Builds the At Client sample provided by nrf.
- Useful for debugging via AT commands. Use the "LTE Link Monitor" app from nRF Connect for Desktop to send AT commands
Update the VERSION file. On a successful push to the main branch the release workflow will; create a new release, generate release notes, and upload the freshly built hex/bin files to the release.