M5Stack-ESP12-Shield icon indicating copy to clipboard operation
M5Stack-ESP12-Shield copied to clipboard

Help with SPIFFS uploader ignoring boards settings

Open tobozo opened this issue 4 years ago • 0 comments

The current ESP8266 Sketch Data Upload tool fails as it ignores the "reset method" and "flash mode" board settings,

esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_
Chip is ESP8266EX
Features: WiFi
WARNING: Detected crystal freq 20.33MHz is quite different to normalized freq 26MHz. Unsupported crystal in use?
Crystal is 26MHz
MAC: 00:08:ff:00:00:00
Uploading stub...
Running stub...
Traceback (most recent call last):
  File "~/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/upload.py", line 65, in <module>
    esptool.main(cmdline)
  File "~/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py", line 2909, in main
    esp = esp.run_stub()
  File "~/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py", line 637, in run_stub
    p = self.read()
  File "~/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py", line 292, in read
    return next(self._slip_reader)
  File "~/.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool/esptool.py", line 2057, in slip_reader
    raise FatalError('Invalid head of packet (0x%s)' % hexify(b))
esptool.FatalError: Invalid head of packet (0x46)
SPIFFS Upload failed!

image

Possible workarounds:

  • Manual upload ~/.arduino15/packages/esp8266/tools/python3/3.7.2-post1/python3 /.arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/upload.py --chip esp8266 --port /dev/ttyUSB0 --baud 115200 --before no_reset --after soft_reset write_flash 0x100000 /tmp/arduino_build_15608/Unpack_targz_file.spiffs.bin

  • OTA SPIFFS upload (from esp32 to esp8266, or from Arduino IDE)

tobozo avatar Nov 25 '20 14:11 tobozo