You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • 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.

    • Got a DAPLINK (CMSIS-DAP) dongle from amazon. I got mine from Amazon UK but this one on seems the same and costs $8 (with USB-C cable) :­ownloader-Emulator-Interface/dp/B0BGQZHL­75/ref=sr_1_5
    • Found an old USB socket and wired up to the dongle as in the picture:
      • GND -> GND
      • DATA+ -> SCK
      • DATA- -> SWD
      • 5V - don't connect
    • Then plugged the Bangle.js charge cable into this
    • Install OpenOCD from­eleases/tag/v0.12.0 - you just need to extract the tar.gz file to a directory on your windows PC
    • 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

    2 Attachments


Avatar for Gordon @Gordon started