• Also it is much harder if arduino DFU bootloader is at different location - this then needs also change in UICR and is almost impossible to do OTA. If you wish you can upload full hex of your code that you would flash with st-link to blank device - from that it is possible to extract softdevice and bootloader and check the location of bootloader. If is is the same as in espruino then making the upgrade zip package is just using nrfutil with parts from the hex file.

    EDIT: if you have nrfutil installed in linux it also installs commands like hex2bin.py hex2dump.py hexdiff.py hexinfo.py hexmerge.py so it is actually enough to post output of hexinfo like this

    $ hexinfo.py bin/espruino_2v19.690_amiibolink.hex
    - file: 'bin/espruino_2v19.690_amiibolink.hex'
      entry: 0x1000F401
      data:
      - { first: 0x00000000, last: 0x00000963, length: 0x00000964 }
      - { first: 0x00001000, last: 0x0001EBEF, length: 0x0001DBF0 }
      - { first: 0x0001F000, last: 0x00057A5F, length: 0x00038A60 }
      - { first: 0x00078000, last: 0x0007CE43, length: 0x00004E44 }
      - { first: 0x0007E000, last: 0x0007E323, length: 0x00000324 }
      - { first: 0x0007F000, last: 0x0007F323, length: 0x00000324 }
      - { first: 0x10001014, last: 0x1000101B, length: 0x00000008 }
    

    from that it is clear. Also the hexmerge.py can extract parts like this hexmerge.py -o bootloader.hex bin/espruino_2v19.690_amiibolink.hex:0x00078000:0x0007CE43 so that you can make bootloader hex usable for nrfutil pkg generate

About

Avatar for fanoush @fanoush started