You are reading a single comment by @Chriz and its replies. Click here to read the full conversation.
  • Hello,

    Finally my bangle js 2 (firmware 2v21) arrived and I am ready to build and try my own firmware changes on the real device!

    Apps are working and for the firmware I want to start with the github actions. I already run a github action build and it produced a 320 KB banglejs2.zip file.

    What's the best way to upload the zip and flash this zip? I have DaFlasher running and could use either klick "Start Bootloader" or "Do Dfu Update". Or I could use the "App loader" and the "Firmware update" app. Or some other tool.

    I will make changes to targets/nrf5x_dfu/main.c (is this called the nrf bootloader?) and other c files like jswrap_bangle.c. Does the banglejs2.zip created by the github action contain the artefacts from those files and which flashing methods will flash it to the watch?

    Edit: Looks like I can use the "Firmware Update" App in the app loader to upload the zip inside(!) the banglejs2.zip. It will contain jswrap_bangle.c but not nrf5x_dfu/main.c.

    I just setup a bulld environment which will create the bootloader from nrf5x_dfu/main.c. Is it okay that there are some build warnings that functions can't be inlined? Can I use this hex file with the "Firmware update" app of the "App loader" or do I need to convert it or better use some other app?

    Looks like I am just a small step away from bricking my watch. The next question will be how to setup the swd environment :-)

  • Can I use this hex file with the "Firmware update" app of the "App loader" or do I need to convert it or better use some other app?

    Look into https://github.com/espruino/BangleApps/tree/master/apps/fwupdate
    It can update bootloader but not sure if you can provide custom file. The hex is probably the bootloader hex in your bin folder which is used for merging into big hex file with everything.
    use hexinfo.py that gets installed as part of nrfutil to examine hex files to see what they contain

    Is it okay that there are some build warnings that functions can't be inlined?

    Yes.

    Looks like I am just a small step away from bricking my watch. The next question will be how to setup the swd environment :-)

    Sooner or later you'll probably brick it so maybe learn that now and you can omit the dfu and fwupdate, SWD is faster. Was discussed here few times. If you don't have SWD dongle then Raspberry Pico with picoprobe firmware is perhaps easiest to get and use and you can also use the Pico for other stuff. Otherwise there are tons of CMSIS-DAP/Daplink dongles on aliexpress for less than price of Pico, one random example https://www.aliexpress.com/item/1005005882951417.html You can then use Bangle charging cable with something like this https://ibb.co/album/hc0hnC

About

Avatar for Chriz @Chriz started