umts / embedded-departure-board

A Zephyr based departure board that frequently GETs & displays bus stop departure times over LTE-M
Apache License 2.0
2 stars 0 forks source link
departure-board lte-m public-transportation real-time zephyr zephyr-rtos

embedded-departure-board

Development

Requirements

Setup

  1. Clone and enter the repo
  2. Create a Python virtual environment
    python3 -m venv ./.venv
  3. Activate your Python virtual environment
    source .venv/bin/activate
    # Or, if you're a direnv user, leave and come back
    cd
    cd -
  4. Install West
    pip install west
  5. Run
    west update
  6. 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

Recomended

Docker

Zephyr supplies various Docker images for development.

Our Github Actions build workflow uses the Base Image (ci-base).

Build

west build ./app -b circuitdojo_feather_nrf9160_ns

Programming

Flashing

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.

Requirements

Run

west flash -r nrfjprog --erase --softreset

Uploading via the bootloader

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.

Requirements

Setup

  1. Create a "serial" profile in newtmgr:
    newtmgr conn add serial type=serial connstring="dev=/dev/ttyUSB0,baud=1000000"
  2. Put the device into bootloader mode.

Run

newtmgr -c serial image upload ./build/zephyr/app_update.bin

VSCode

This repo includes .vscode/tasks.json to make develpoment easier. The included tasks are:

Creating a Release

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.