Arm chips over SWD
STM32, nRF, RP2040 and RP2350, SAM, LPC and other Arm Cortex-M chips: the pod flashes them through its own SWD debug probe, with OpenOCD.
How flashing works
- The pod has a built-in SWD debug probe. Wire the target's SWDIO, SWCLK and GND to the pod's pins, and its reset line if it has one. The pin-out shows where they go.
- OpenOCD does the flashing. On the network or USB it runs on your computer and talks to the pod's probe. For a pod on embeddedci.com, embeddedci.com runs it. The target is a normal OpenOCD config, so changing chips is a one-line change:
benchpod flash --target target/stm32f4x.cfg --file firmware.elf
- SWD at 1.8 or 3.3 V. The pod does not speak JTAG, and it does not flash over USB. For a 5 V target use a level shifter.
- Firmware that turns SWD off (sleep modes, pins reused as GPIO) needs the reset line wired so the pod can connect under reset. See Flash can't reach the target.
Chips
Tested means we flash it on our own bench. Should work means it uses the same SWD path and OpenOCD supports it, but we have not run it ourselves yet.
| Chip family | Status | How | Notes |
|---|---|---|---|
| STM32F4 (NUCLEO-F446RE) | Tested | SWD, target/stm32f4x.cfg | Our bench target, flashed in our hardware tests over the network and the cloud. |
| Other STM32 (F0, F1, F3, F7, G0, G4, H7, L0, L4, U5, WB, ...) | Should work | SWD, target/stm32<family>x.cfg | Same flash path as the STM32F4. |
| Nordic nRF51, nRF52 | Should work | SWD, target/nrf51.cfg, target/nrf52.cfg | A board with readback protection on needs a mass erase first. |
| Raspberry Pi RP2040, RP2350 | Should work | SWD (multidrop), target/rp2040.cfg, target/rp2350.cfg | Use the SWD pins, not the USB bootloader. Needs a recent OpenOCD. |
| Microchip SAM D/E (SAMD21, SAMD51, ...) | Should work | SWD, target/at91samdXX.cfg, target/atsame5x.cfg | Boards with a UF2 bootloader also have SWD pads; flash those. |
| NXP LPC, Kinetis, i.MX RT | Should work | SWD, the matching target/*.cfg | Only when the board brings SWD out to pins or pads (see Teensy below). |
| Silicon Labs EFM32 / EFR32, Renesas RA (Arduino UNO R4) | Should work | SWD, the matching target/*.cfg | Any Arm Cortex-M with an SWD port and an OpenOCD target config. |
Notes per family
- STM32: pick the OpenOCD config of the family (
target/stm32f4x.cfg,target/stm32h7x.cfg, ...). A chip with readout protection on refuses to flash until it is regressed, which erases it. - Nordic nRF51 and nRF52: a board shipped with readback protection (APPROTECT) on needs a mass erase before the first flash.
- Raspberry Pi RP2040 and RP2350: they use SWD multidrop, which needs a recent OpenOCD. Wire the SWD pins, not the USB bootloader.
- Microchip SAM D and SAM E: boards with a UF2 bootloader also have SWD pads; flash those. Flashing over SWD replaces the bootloader unless you keep its region.
- NXP LPC, Kinetis and i.MX RT: only when the board brings SWD out to pins or pads. A Teensy, for example, does not (see not supported).