Uploading to SPIFFS: "invalid head of packet" error
Posted: Thu Nov 03, 2022 11:07 pm
I can upload and monitor working code in PlatformIO and Arduino IDE (on Windows 11) but can't upload a small data file to a SPIFFS partition on an Unexpected Maker ProS3 (ESP32-S3).
PlatformIO 2.5.5 output from verbose "Upload Filesystem Image":
Using Arduino IDE 1.8.19 (with a simple ino) and https://github.com/lorol/arduino-esp32fs-plugin:
In USBDeview, the device shows connected and enabled with COM8 drive letter and Microsoft USB Serial Device driver.
I've tried multiple short USB cables and get the same result on both a Windows 11 Pro 22H2 and Windows 10 Pro 21H2 computer.
Thanks in advance for your help.
PlatformIO 2.5.5 output from verbose "Upload Filesystem Image":
Code: Select all
C:\Users\***\.platformio\penv\Scripts\platformio.exe run --target uploadfs --environment esp32s3 -v
Processing esp32s3 (framework: arduino; platform: espressif32; board: um_pros3; lib_extra_dirs: lib; build_flags: -DARDUINO_USB_MODE=1; monitor_port: COM8; upload_port: COM8; upload_speed: 115200; monitor_speed: 14400; board_build.partitions: large_spiffs_16MB.csv)
-----------------------------------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/um_pros3.html
PLATFORM: Espressif 32 (5.2.0) > Unexpected Maker PROS3
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
- tool-esptoolpy @ 1.40201.0 (4.2.1)
- tool-mkfatfs @ 2.0.1
- tool-mklittlefs @ 1.203.210628 (2.3)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch3
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 48 compatible libraries
Scanning dependencies...
Dependency Graph
|-- Wire @ 2.0.0 (License: Unknown, Path: C:\Users\***\.platformio\packages\framework-arduinoespressif32\libraries\Wire)
|-- XT_DAC_Audio @ 4.2.1 (License: Unknown, Path: ***\lib\XT_DAC_Audio)
|-- ESP32 BLE Arduino @ 2.0.0 (License: Unknown, Path: C:\Users\***\.platformio\packages\framework-arduinoespressif32\libraries\BLE)
|-- WiFi @ 2.0.0 (License: Unknown, Path: C:\Users\***\.platformio\packages\framework-arduinoespressif32\libraries\WiFi)
|-- SPIFFS @ 2.0.0 (License: Unknown, Path: C:\Users\***\.platformio\packages\framework-arduinoespressif32\libraries\SPIFFS)
| |-- FS @ 2.0.0 (License: Unknown, Path: C:\Users\***\.platformio\packages\framework-arduinoespressif32\libraries\FS)
|-- FastLED @ 3.5.0 (License: MIT, Path: ***\lib\FastLED-3.5.0)
| |-- SPI @ 2.0.0 (License: Unknown, Path: C:\Users\***\.platformio\packages\framework-arduinoespressif32\libraries\SPI)
Building in release mode
"mkspiffs_espressif32_arduino" -c data -s 7274496 -p 256 -b 4096 build\esp32s3\spiffs.bin
/this.txt
BeforeUpload(["uploadfs"], ["build\esp32s3\spiffs.bin"])
Using manually specified: COM8
Forcing reset using 1200bps open/close on port COM8
Waiting for the new upload port...
"C:\Users\***\.platformio\penv\Scripts\python.exe" "C:\Users\***\.platformio\packages\tool-esptoolpy\esptool.py" --chip esp32s3 --port "COM8" --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 16MB 9502720 build\esp32s3\spiffs.bin
esptool.py v4.2.1
Serial port COM8
Connecting...
Chip is ESP32-S3
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:42:0c:20
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00910000 to 0x00ffffff...
Compressed 7274496 bytes to 13119...
Writing at 0x00910000... (100 %)
A fatal error occurred: Invalid head of packet (0x6F): Possible serial noise or corruption.
*** [uploadfs] Error 2
Using Arduino IDE 1.8.19 (with a simple ino) and https://github.com/lorol/arduino-esp32fs-plugin:
Code: Select all
Chip : esp32s3
Using partition scheme from Arduino IDE.
Start: 0x910000
Size : 0x6f0000
mkspiffs : C:\Users\***\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3\mkspiffs.exe
esptool : C:\Users\***\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.2.1\esptool.exe
[SPIFFS] data : C:\Users\***\Documents\Arduino\sketch_nov2a\data
[SPIFFS] offset : 0
[SPIFFS] start : 9502720
[SPIFFS] size : 7104
[SPIFFS] page : 256
[SPIFFS] block : 4096
->/test.txt
[SPIFFS] upload : C:\Users\***\AppData\Local\Temp\arduino_build_460733/sketch_nov2a.spiffs.bin
[SPIFFS] address: 9502720
[SPIFFS] port : COM8
[SPIFFS] speed : 115200
[SPIFFS] mode : dio
[SPIFFS] freq : 80m
->esptool.py v4.2.1
->Serial port COM8
->Connecting...
->Chip is ESP32-S3
->Features: WiFi, BLE
->Crystal is 40MHz
->MAC: f4:12:fa:42:0c:20
->Uploading stub...
->Running stub...
->Stub running...
->Configuring flash size...
->Auto-detected Flash size: 16MB
->Flash will be erased from 0x00910000 to 0x00ffffff...
->Compressed 7274496 bytes to 13119...
->Writing at 0x00910000... (100 %)
->
->A fatal error occurred: Invalid head of packet (0x6F): Possible serial noise or corruption.
SPIFFS Upload failed!
I've tried multiple short USB cables and get the same result on both a Windows 11 Pro 22H2 and Windows 10 Pro 21H2 computer.
Thanks in advance for your help.