-
sudo openocd -f interface/stlink.cfg -f tcl/target/nrf52.cfg -c "init" -c "program espruino/firmware.hex" verify reset exit"
or something like
sudo openocd -f interface/stlink.cfg -f target/nrf52.cfg -c "init" -c "program espruino/firmware.hex verify reset exit"
or you can simply start openocd
sudo openocd -f interface/stlink.cfg -f target/nrf52.cfg
and then from another console run
telnet localhost 4444
and you can enter commands interactively
program espruino/firmware.hex verify reset exit
You can also run
nrf51 mass_erase
to clear flash completely before programming but it is not needed when flashing full firmware hex (which includes softdevice, bootloader and uicr).If the device is protected / has SWD locked then stlink can't unlock it but maybe F18 is not locked.
Also beware that there are cheaper F18 that has no GPS and some stuff is wired in different way, there was a thread here about it. So maybe test GPS with original firmware first to verify you have the one which is same as Bangle 1
Hello @HughB actually it is the opposite, is the BangleJS that is based on the DTNO.I NO.1 F18 the main mcu is NRF52832QFAA thats why it is possible to flash it with Espruino. @Gordon I found something that maybe could work for flashing but i'm not sure:
I do not know if I'm supposed to do something before flashing