Flash User Firmware via Debugger

I’m having troubles flashing my two Argons via USB. OTA is currently not an option as I am lacking an AP.
I tried with my MacBook Pro with MacOS as well as my Thinkpad with Fedora, both don’t recognize the plugged Argon. It does not even show up anywhere in the kernel log (dmesg).

Nevertheless I also have a particle debugger and a working version of openocd. Connecting and interacting with the Argon works via Debugger. As far as I understand I can flash whatever I need with it. I tried to find the address offset for the user firmware in the docs, but could only find it for the Electron.

How do I flash user firmware/application via openocd?

Thank’s for any help or pointers.

The Argon user firmware image address is 0xD4000. You can flash to that address using openocd to program the user firmware over SWD/JTAG.

https://docs.particle.io/datasheets/wi-fi/argon-datasheet/

Thank you very much! That was exactly what I was looking for.

For anybody else looking to do the same, the following script flashes the user firmware with openocd on Argon devices.

#!/bin/bash

echo "Usage: $0 <user-firmware>"

$HOME/.particle/toolchains/openocd/0.11.2-adhoc6ea4372.0/bin/openocd -f interface/cmsis-dap.cfg -f target/nrf52-particle.cfg
    -c "adapter_khz 1000" \
    -c "transport select swd" \
    -c "init" \
    -c "program $1 0xd4000 verify reset" \
    -c "exit"
1 Like