espressif / esptool-js

Javascript implementation of flasher tool for Espressif chips, running in web browser using WebSerial.
https://espressif.github.io/esptool-js/
Apache License 2.0
276 stars 108 forks source link

fixed ESP32-C3: "app image at 0x10000 has invalid magic byte" if the … #50

Closed LeoYan closed 1 year ago

LeoYan commented 1 year ago

Fixed issue #48

if fileArray[i].data.length % 4 == 0, there will be extra 4 bytes, so overlap with the following image image = fileArray[i].data + '\xff\xff\xff\xff'.substring(0, 4 - fileArray[i].data.length % 4); btw:

  1. the address of C3 bootloader is 0x0