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¶
A launched
zephyr-26-04Workshop with a synced workspace, as created in Get started with Workshop.A board from the supported boards list, connected to the host over USB.
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
( |
|
USB serial bootloader |
Serial node, such as |
Nordic nRF52840 DK ( |
|
On-board J-Link probe |
USB probe |
BBC micro:bit v2 ( |
|
On-board CMSIS-DAP probe |
USB probe |
STM32 Nucleo-144 H753ZI ( |
|
On-board ST-Link probe |
USB probe |
NXP FRDM-RW612 ( |
|
On-board MCU-Link probe (J-Link firmware) |
USB probe |
Renesas EK-RA8M1 ( |
|
On-board J-Link probe |
USB probe |
ESP32-S3-DevKitC
( |
|
USB serial bootloader |
Serial node, such as |
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