Skip to content

Flashing firmware via SWD programmer

You need to flash firmware directly when you want to upgrade a device that doesn’t have OTA capability yet, or when you want to give a device the OTA-capable bootloader so all future updates can be done wirelessly.

For devices that already have the OTA bootloader, wireless update via the Android app is easier — see How to update firmware via OTA.


Any SWD-capable debug probe works. Here are the most practical options, roughly in order of “most likely to already own one”:

ST-Link v2 clone (~$3–5 on AliExpress, eBay, or local electronics shops) The most common option. Search “ST-Link v2 clone” — the small black USB stick form factor is what you want. Works with openocd on all platforms.

⚠️ ST-Link v3 (the newer official ST product) does not support nRF52 — it’s STM32-only. If you have one of these, use one of the options below instead.

Raspberry Pi Pico with picoprobe firmware (~$4, widely available) If you have a Pico already, this is the fastest path. Flash the picoprobe firmware — drag the .uf2 onto the Pico in BOOTSEL mode, done. It appears as a standard CMSIS-DAP probe.

CMSIS-DAP / DAPLink clone (~$5–10) A generic ARM debug probe. Slightly more correct than the ST-Link clone and has no deprecation issues with newer openocd. Search “CMSIS-DAP DAPLink probe”. Also works as a USB-serial adapter.

If you already have a J-Link, J-Link EDU, nRF52 DK, or other SWD probe — those all work too. Replace the interface config flag in the commands below with the appropriate one for your probe (interface/jlink.cfg, etc).

You’ll connect SWDIO, SWCLK, GND, and 3V3 from the programmer to the pogo pin pads on uMyo.


Terminal window
sudo apt install openocd # Ubuntu / Debian
sudo dnf install openocd # Fedora
sudo pacman -S openocd # Arch

Do this if the device doesn’t have the OTA-capable bootloader yet. After this, all future updates can be done wirelessly via the Android app.

Replace the hex paths with wherever you’ve saved the files. Download them from the GitHub releases page.

Terminal window
# Step 1 — bootloader
sudo openocd \
-f interface/stlink.cfg \
-f target/nrf52.cfg \
-c init -c "reset halt" \
-c "flash write_image erase /path/to/uboot_ble.hex" \
-c "reset" -c exit
sleep 2
# Step 2 — firmware
sudo openocd \
-f interface/stlink.cfg \
-f target/nrf52.cfg \
-c init -c "reset halt" \
-c "flash write_image erase /path/to/uMyo.hex" \
-c "reset" -c exit

If you just want to update the firmware and already have an OTA-capable bootloader, or simply don’t need OTA:

Terminal window
sudo openocd \
-f interface/stlink.cfg \
-f target/nrf52.cfg \
-c init -c "reset halt" \
-c "flash write_image erase /path/to/uMyo.hex" \
-c "reset" -c exit

You should see something like this at the end of each openocd run:

Info : nRF52832-QFAA(build code: E0) 512kB Flash, 64kB RAM
...
Info : Padding image section ...
Info : Flash write took X.Xs
** Programming Finished **
** Verify OK **

If you see Error: libusb_open() failed — the programmer isn’t being found. On Linux, you may need a udev rule or to run with sudo. On Windows, you may need to install the ST-Link driver (for ST-Link clones) or the WinUSB driver via Zadig (for CMSIS-DAP / Pico picoprobe).

If you see Error: Could not find MEM-AP to control the core — the pogo pins aren’t making a solid connection. Press more firmly and retry.


Join our Discord — post what you see in the terminal and we’ll help debug it.