Back to resources
Chip programming
Firmware
HIL

How the BenchPod Flashes Microcontrollers: SWD, JTAG, UART, USB and UPDI

One pod, many ways into a chip: SWD and JTAG through an on-pod CMSIS-DAP probe, ROM serial bootloaders, USB bootloaders through the pod's USB host port, and pin programmers like UPDI. The architecture, and every chip we have flashed on real hardware, with a link to each article.

Edward Viaene · November 24, 2026 · 6 min read

A hardware test starts with the firmware under test on the board. On a desk that means a debug probe, a USB cable, or a vendor programmer, and a different tool for every chip family. On a BenchPod it is one call: bp.flash() for a chip on the pod's pins, bp.usb_flash() for a board on its USB port.

The target picks the way into the chip: its debug port, its ROM bootloader, its USB bootloader, or its own programming pins. The same calls work from pytest, the CLI, an AI agent over MCP, and the web app, over the LAN, USB, or the cloud.

This page is the index of our chip flashing articles. Each one covers one chip and one method in depth: the protocol, how the pod runs it, the wiring, what we measured on real hardware, and the details worth knowing.

Every chip we have flashed on real hardware

Chip (board)MethodArticle
STM32F446 (NUCLEO-F446RE)SWD, on-pod CMSIS-DAPFlashing the STM32F446 over SWD
STM32F446 (NUCLEO-F446RE)JTAG, on-pod CMSIS-DAPFlashing the STM32F446 over JTAG
ESP32 (ESP32-WROOM-32, USB dev kit)UART ROM bootloader, on the pins or over USBFlashing an ESP32 through its ROM bootloader
RP2040 (Raspberry Pi Pico)USB: UF2 and PICOBOOTFlashing a Raspberry Pi Pico over USB
ATmega328P (Arduino Uno R3)USB: optiboot (STK500)Flashing an Arduino Uno over USB
STM32H753 (NUCLEO-H753ZI)USB: ROM DFU (DfuSe)Flashing the STM32H753 over USB DFU
i.MX RT1062 (Teensy 4.1)USB: HalfKayFlashing a Teensy 4.1 over USB
Pico, Teensy 4.1, ATtiny1607 Curiosity NanoUSB: drive, UF2 and HalfKay loadersFlashing microcontroller boards over USB
ATtiny1607 (Curiosity Nano)UPDI pin programmerProgramming the ATtiny1607 over UPDI
AVR128DA48 (Curiosity Nano)UPDI pin programmer (NVM version 2)Programming the AVR128DA48 over UPDI
MSP430FR2433 (MSP-EXP430FR2433 LaunchPad)Spy-Bi-Wire pin programmerProgramming the MSP430FR2433 over Spy-Bi-Wire
ATtiny104 (Xplained Nano)TPI pin programmerProgramming the ATtiny104 over TPI
PIC16F18446 (Curiosity Nano)ICSP pin programmer, low-voltage entryProgramming the PIC16F18446 over ICSP
PIC18F57Q43 (Curiosity Nano)ICSP pin programmer, low-voltage entry (PIC18 Q)Programming the PIC18F57Q43 over ICSP

We only add a chip here after it has been flashed and verified on a real board on our bench. The pod supports more than this list: the targets docs cover every method and family, and mark what is tested.

The architecture

The host sends the image; on the pod, the MCU runs the flash protocols, the FPGA drives the logic analyzer pins, and the USB host port reaches boards with a USB bootloader
The host sends the image; on the pod, the MCU runs the flash protocols, the FPGA drives the logic analyzer pins, and the USB host port reaches boards with a USB bootloader

Three parts do the work:

  • The host (the pytest SDK, the CLI, the MCP server or the web app) reads the image (.elf, .hex, .bin, .uf2), works out the target, and sends the image to the pod. For SWD and JTAG it also runs OpenOCD, on your machine for a LAN or USB connection, or on embeddedci.com for a cloud connection, so there is nothing to install for that case.
  • The pod's MCU runs the protocol next to the target. Most methods stage the image in the pod's memory first and then write and verify it in the background while the host polls progress. That keeps network latency out of the protocol's timing: a job takes the same time over the cloud as on the LAN.
  • The FPGA turns any of the 14 logic analyzer pins into what the protocol needs: an SWD or JTAG engine, a soft UART (half duplex for one-wire protocols), or plain open-drain I/O for boot straps, all at the target's 1.8 or 3.3 V. Boards with a USB bootloader plug into the pod's USB host port instead.

The pod checks what it is talking to before it erases anything: a debug port's ID, a ROM loader's chip ID, a USB device's IDs, or a pin programmer's signature.

Every method runs the same job, whatever the protocol underneath:

The life of one flash job: the host reads the image and stages it on the pod; the pod checks the chip's ID, erases, writes and verifies every block, then lets the chip run. A wrong chip stops the job before anything is erased.
The life of one flash job: the host reads the image and stages it on the pod; the pod checks the chip's ID, erases, writes and verifies every block, then lets the chip run. A wrong chip stops the job before anything is erased.

The methods

Which method fits depends on what the chip offers. Some chips have more than one way in; this is a simple order to pick one in:

Which way into the chip: a debug port goes through the on-pod CMSIS-DAP probe, a ROM serial bootloader through the pod's ROM loader, a USB bootloader through the USB host port, and anything else through a pin programmer
Which way into the chip: a debug port goes through the on-pod CMSIS-DAP probe, a ROM serial bootloader through the pod's ROM loader, a USB bootloader through the USB host port, and anything else through a pin programmer

SWD and JTAG. The pod is its own CMSIS-DAP probe. OpenOCD on the host sends whole DAP transfers to the pod, which runs them against the target on two pins (SWD) or four (JTAG). This covers Arm Cortex-M parts and, with JTAG, boundary scan and non-Arm targets. Connect under reset with the target's reset line on the pod's reset pin makes it reliable even when the running firmware turns the debug pins off. The cloud path is described in Building an On-Pod CMSIS-DAP Probe.

ROM serial bootloaders. Some chips have a bootloader in mask ROM that speaks a serial protocol. For the ESP32 family the pod speaks Espressif's ROM loader protocol itself: it drives the boot strap and reset, syncs, raises the baud rate, writes the flash and checks an MD5 on the chip. No esptool on the host.

USB bootloaders. Many boards flash over their own USB port: a UF2 drive, a DFU device, a USB-serial bridge to a bootloader. The pod's USB port works as a USB host, so it plugs into the board the way a computer would and runs the bootloader's protocol: UF2 and PICOBOOT for the Raspberry Pi Pico, ST's DfuSe for STM32 ROM loaders, STK500 for Arduino's optiboot, HalfKay for the Teensy, the ESP32 ROM loader through a dev kit's bridge.

Pin programmers. Chips with neither SWD nor a bootloader have their own programming pins. The pod runs those protocols on its logic analyzer pins: AVR UPDI, AVR TPI, PIC ICSP and MSP430 Spy-Bi-Wire today, with Silicon Labs C2 and XMEGA PDI next. Each gets its article after it passes on a real chip.

Using it

One call per kind of connection; the target and the pins change:

from embeddedci.benchpod import BenchPod

with BenchPod("192.168.1.50", la_voltage=3.3) as bp:
    bp.flash(target="target/stm32f4x.cfg", file="app.elf")              # SWD or JTAG
    bp.flash(target="esp32", file="build/flasher_args.json")            # ESP32 ROM loader
    bp.flash(target="avr-updi", device="attiny1607", file="app.hex")    # UPDI
    bp.flash(target="pic", device="PIC16F18446", file="app.hex")       # PIC ICSP
    bp.usb_flash("blink.uf2")                                            # a board on the USB port

Pins come from the pod's wiring profile, so a test names the board's signals once and never repeats them. The CLI has the same in benchpod flash and benchpod usb-flash, and an AI agent has it as the flash tool of the MCP server. Each article shows the exact calls, including the raw JSON command underneath. The pytest framework docs and the API reference have the full reference.