Uploading SPIFFS image to ESP32

a month ago, April 14, 2024
Reading time: 2 mins

PlatformIO

Normal upload FS Image

Flash will be erased from 0x00210000 to 0x003effff…

says it uploaded to
0x00210000

OTA

Configuring flash size...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x001effff...
Compressed 18848 bytes to 13019...
Writing at 0x00001000... (100 %)
Wrote 18848 bytes (13019 compressed) at 0x00001000 in 0.6 seconds (effective 251.3 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 134...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (134 compressed) at 0x00008000 in 0.1 seconds (effective 289.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 492.9 kbit/s)...
Hash of data verified.
Compressed 1966080 bytes to 140398...
Writing at 0x00010000... (11 %)
...
Writing at 0x001ddd0a... (100 %)
Wrote 1966080 bytes (140398 compressed) at 0x00010000 in 10.8 seconds (effective 1451.1 kbit/s)...
Hash of data verified.

mkspiffs -i broken.bin

era_cnt_max: 316
last_errno:  0
blocks:      480
free_blocks: 4
page_alloc:  4704
page_delet:  2436
used:        1180704 of 1799921
total: 1799921
used: 1180704

mkspiffs -i ok.bin

era_cnt_max: 702
last_errno: 0
blocks: 480
free_blocks: 3
page_alloc: 5459
page_delet: 1682
used: 1370209 of 1799921
total: 1799921
used: 1370209

esptool.py --chip esp32 --port /dev/tty.usbserial-210 --baud 460800 read_flash 0x210000 0x1E0000 readspiffs.bin

A fatal error occurred: Invalid head of packet (0x16): Possible serial noise or corruption.

Previous
Avoid trailing slashes in Gatsby site URLs
Next
Fix ReactJs SPA client routes for Github Pages
© 2024 Anil Maharjan