can't fread files created using mkspiffs
Posted: Fri Dec 21, 2018 9:15 am
Hi, I was reading zero byte for files created using mkspiffs (https://github.com/igrr/mkspiffs.git)
How I make the file system image
How I flash it
How are the partitions
The size of flash is 4MB. Besides the problem above, I was able to list the file system. And ftell() correctly tells the file's size, which is great than zero. Also, I was able to create new file on the file system using fopen(), and reading the newly created file was no problem. Thanks if someone can point me out what was going wrong.
How I make the file system image
Code: Select all
mkspiffs -d 5 -c res/ -b 4096 -p 256 -s 0xF0000 spiffs.bin
Code: Select all
python esptool.py --chip esp32 --baud 912600 write_flash -z 0x210000 spiffs.bin
Code: Select all
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 2M,
storage, data, spiffs, , 0xF0000,