ESP32 SPIFFS File name and size corrupted after code upload

tmadushan
Posts: 5
Joined: Tue Feb 26, 2019 12:33 pm

ESP32 SPIFFS File name and size corrupted after code upload

Postby tmadushan » Thu Jul 04, 2019 5:40 am

Hi all,
Chip: ESP32-PICO-D4 (revision 1)
Arduino IDE : 1.8.9
esptool.py v2.6-beta1
OS : Windows 10
PCB: Custom made ESP32 module

I have a set of hex values (2348 elements) which is stored in
  1. uint8_t ecodebin[] = { 0x00, 0x00, ....}
.
I am appending each element to a file "/system/ecode" using SPIFFS. I do read after completing the writing task, and the data is read fine; not corrupted.

But, when I try to write another set of data (different file) to SPIFFS, the file I wrote earlier had corrupted. Apparently, it shows multiple files with the file name and size changed. Refer this please.
  1. rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
  2. configsip: 188777542, SPIWP:0xee
  3. clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
  4. mode:DIO, clock div:1
  5. load:0x3fff0018,len:4
  6. load:0x3fff001c,len:928
  7. ho 0 tail 12 room 4
  8. load:0x40078000,len:9280
  9. load:0x40080400,len:5848
  10. entry 0x40080698
  11. Starting..
  12. Array size:45516
  13. Listing directory: /
  14.   FILE: /system/eckde  SIZE: 3
  15.   FILE: /system/eckde  SIZE: 3
  16.   FILE: /system/eckde  SIZE: 3
  17.   FILE: /system/eckde  SIZE: 3
  18.   FILE: /system/ecode  SIZE: 2299
Ideally, there should only be one file as
  1. FILE: /system/ecode  SIZE: 2348
.

I tried different OSs, computers, Arduino versions etc. But the result is the same. FYA this actually worked perfectly fine before.

What could be the cause of this? This is a showstopper for me.

TIA,
4S6TMP
Thanks and regards,
Tharanga

Who is online

Users browsing this forum: No registered users and 33 guests