python3 -m venv ./.venv
source .venv/bin/activate
# Or, if you're a direnv user, leave and come back
cd
cd -
pip install west
west update
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.
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.
CONFIG_BOOTLOADER_MCUBOOT=y
is set in app/prj.conf
newtmgr conn add serial type=serial connstring="dev=/dev/ttyUSB0,baud=1000000"
newtmgr -c serial image upload ./build/zephyr/app_update.bin
This repo includes .vscode/tasks.json
to make develpoment easier. The included tasks are:
newtmgr
pyserial-miniterm
, which should already be installed in your venv/dev/ttyUSB0
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.