Closed shirish47 closed 6 years ago
discussion going on here. https://www.esp32.com/viewtopic.php?f=2&t=4787&p=20858#p20858 I can you provide an example or spiffs.bin image and code to test with ESP32 ?
Garbage file contents usually indicates mismatch between SPIFFS configuration in mkspiffs and SPIFFS configuration in your app. In case of IDF, download mkspiffs release from releases page, which has 'esp-idf' in the archive name. Then in IDF, make sure you set SPIFFS-related sdkconfig settings to default values (specifically CONFIG_SPIFFS_META_LENGTH=4, CONFIG_SPIFFS_OBJ_NAME_LEN=32). If the values are in sync between mkspiffs and your project, you should be able to read the files.
I wanted to use SPIFFS for storing AWS certs but I had trouble with it so I started finding what was wrong. so I made a spiffs.bin image with mkspiffs and flashed with esptool.py and when I try to read files it shows nothing or lot of question marks. here I have posted my first attempt to figure out where I was facing the trouble..
but then I tried given spiffs example(example works fine even if I open file and write some thing and read back it works) but if I try to read a file flashed by esptool I get nothing or ?????.
like this example I modified to read file from spiffs which is written by esptool.
Output: