Flash hardware from Workshop

In this tutorial, you’ll flash a Zephyr application to a physical board from a Zephyr 26.04 LTS Workshop.

Flashing is an inherently unsafe process because it must interface with the host machine and the real world. To gain the benefits of Workshop and to be able to flash hardware, first identify the host device that the board’s flash runner uses. Then grant Workshop access to that host device and install the runner tool in the Workshop container. This configuration preserves the security hygiene that Workshop provides, allows flashing without udev rules or sudo, and creates a reproducible and sandboxed working environment.

Prerequisites

Identify the board device class

The flash runner decides which host device the board needs, but the device class varies between boards. To find the runner for your board, open the page for your board in the supported boards list and go to its Programming and Debugging section. If the page has no such section, search the page for mentions of flash, flashing, or debug. Find the names of the default runner and the tool that the runner calls, then read the matching row in this table.

Board name

Default flash runner

Board device class

Host device

ESP32-C3-DevKitM (esp32c3_devkitm/esp32c3)

esp32

USB serial bootloader

Serial node, such as /dev/ttyUSB0

Nordic nRF52840 DK (nrf52840dk/nrf52840)

nrfjprog

On-board J-Link probe

USB probe

BBC micro:bit v2 (bbc_microbit_v2/nrf52833)

pyocd

On-board CMSIS-DAP probe

USB probe

STM32 Nucleo-144 H753ZI (nucleo_h753zi/stm32h753xx)

stm32cubeprogrammer

On-board ST-Link probe

USB probe

NXP FRDM-RW612 (frdm_rw612/rw612)

jlink

On-board MCU-Link probe (J-Link firmware)

USB probe

Renesas EK-RA8M1 (ek_ra8m1/r7fa8m1ahecbd)

jlink

On-board J-Link probe

USB probe

ESP32-S3-DevKitC (esp32s3_devkitc/esp32s3/procpu)

esp32

USB serial bootloader

Serial node, such as /dev/ttyUSB0

For example, the page for the ESP32-C3-DevKitM (esp32c3_devkitm) uses the esp32 runner, which flashes over the USB serial bootloader with esptool.py. The board therefore needs a serial host device, such as /dev/ttyUSB0.

Find the device identifiers

Run these commands on the host.

Workshop uses device identifiers to grant access to the flashing interface of the board. The board device class determines which device that interface uses. When you connect the board, the Linux host exposes the interface as a device. A USB serial bootloader appears as a serial device node. An o