Software NEXT firmware
Zephyr RTOS
Zephyr is the alternative firmware path for HealthyPi 5. It is what drives the on-board display, and it’s the right base for a production port that needs an RTOS, a devicetree, and Zephyr’s driver ecosystem.
For everything else — including learning the board, running the production firmware, and writing your own signal processing — use the Arduino path, which is the default.
When to choose Zephyr
- You have the display add-on. The Arduino NEXT firmware doesn’t drive the LCD in this release. See Display Add-On Module.
- You want to fetch SD recordings over BLE from the OpenView 2 mobile app.
- You’re building a product on an RTOS and want Zephyr’s scheduler, devicetree, power management, and driver model.
The workflow at a glance
- Install Zephyr and the Zephyr SDK.
- Fetch the HealthyPi 5 firmware workspace.
- Build the variant that matches your display panel.
- Flash by UF2 drag-and-drop, or via a Raspberry Pi Debug Probe.
1. Install Zephyr and the SDK
Follow the official Zephyr Getting Started guide — there’s no HealthyPi-specific deviation:
- Update your OS and install Zephyr’s host dependencies.
- Set up the Zephyr environment and Python dependencies.
- Install the Zephyr SDK — the toolchain bundle for each supported architecture.
2. Fetch the workspace
west init -m https://github.com/Protocentral/protocentral_healthypi5_zephyr --mr main hpi5-workspace
cd hpi5-workspace
west update
west update clones Zephyr itself and every module in the manifest. Expect a few gigabytes and 5–10 minutes the first time. Confirm it worked:
ls app
You should see main.c and a CMakeLists.txt.
3. Build
Pick the build that matches your display panel. Each script wraps a single west build.
./scripts/make_ili9488.sh # ILI9488 — white display panel
./scripts/make_st7796.sh # ST7796 — black display panel
./scripts/clean.sh # clean build
Equivalent manual commands:
# ILI9488
west build -b healthypi5 app
-DEXTRA_CONF_FILE='overlay-display-ili9488.conf;overlay-logger-sd.conf'
-DEXTRA_DTC_OVERLAY_FILE='healthypi5_rp2040_display_ili9488.overlay'
# ST7796
west build -b healthypi5 app
-DEXTRA_CONF_FILE='overlay-display-st7796.conf;overlay-logger-sd.conf'
-DEXTRA_DTC_OVERLAY_FILE='healthypi5_rp2040_display_st7796.overlay'
For a headless board, ./scripts/make_nolvgl.sh builds without the LVGL UI and ./scripts/make_minimal.sh builds a minimal image.
The artefact lands at build/zephyr/zephyr.uf2.
Earlier releases split the firmware into Basic, BLE, Display, and Logger builds. They’ve been merged. The only build-time choice left is which display driver to compile in.
4. Flash
Option A — drag and drop
Put the board into UF2 mode (hold the RP2040 boot button while powering on — full sequence on the Welcome page). Drop build/zephyr/zephyr.uf2 onto the RPI-RP2 drive.
Option B — Raspberry Pi Debug Probe (OpenOCD)
The proper development setup: flashes are atomic, serial logs appear in the same terminal, and you can attach a debugger.
Install OpenOCD. On macOS, brew install openocd. On Windows, download from gnutoolchains.com, copy the bin and share folders into C:Program FilesOpenOCD, and add C:Program FilesOpenOCDbin to your PATH.
Wire it up:
- UART jumper — Debug Probe UART port → the RP2040 UART connector on HealthyPi 5, just below the SpO₂ port.
- SWD jumper — Debug Probe Debug port → the RP2040 Debug connector, below the RP2040 port.
- Connect the Debug Probe to your host via USB-B.
Flash:
west flash
This builds if needed, programs the firmware, resets the device, and starts streaming UART logs.
Next
- Verify the flash by streaming to OpenView 2.
- Configure the panel: Display Configuration.
- Zephyr reference docs (Kconfig, devicetree, drivers): docs.zephyrproject.org.
