Download the espruino_2v21_banglejs2.hex hex from this post, into the directory you extracted OpenOCD to
Open Windows command prompt/powershell in the OpenOCD directory
Type .\bin\openocd.exe -d2 -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init;nrf52_recover;exit" - this will erase the Bangle's flash and remove the write protect bit
Type .\bin\openocd.exe -d2 -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init;reset init;halt;program espruino_2v21_banglejs2.hex verify;reset;exit" to write the new firmware. It'll take a few minutes and does't say a great deal - just leave it and try not to knock any of the cabling while it's flashing or you may have to restart
And that's it, you're done!
I haven't tried it but I think @fanoush mentioned that the really cheap STLink USB programmers might be more of a faff to get working - but it looks like the 'CMSIS-DAP' dongles are almost as cheap and work out the box
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm going to try and write this up properly at some point later, but I just reflashed a Bangle.js 2 using a cheap dongle.
tar.gz
file to a directory on your windows PCespruino_2v21_banglejs2.hex
hex from this post, into the directory you extracted OpenOCD to.\bin\openocd.exe -d2 -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init;nrf52_recover;exit"
- this will erase the Bangle's flash and remove the write protect bit.\bin\openocd.exe -d2 -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c "init;reset init;halt;program espruino_2v21_banglejs2.hex verify;reset;exit"
to write the new firmware. It'll take a few minutes and does't say a great deal - just leave it and try not to knock any of the cabling while it's flashing or you may have to restartAnd that's it, you're done!
I haven't tried it but I think @fanoush mentioned that the really cheap STLink USB programmers might be more of a faff to get working - but it looks like the 'CMSIS-DAP' dongles are almost as cheap and work out the box
2 Attachments