esp-idf icon indicating copy to clipboard operation
esp-idf copied to clipboard

SPIFFS mount fails when flash encryption is enabled (IDFGH-3496)

Open Buffalchill opened this issue 8 years ago • 7 comments

I tried the SPIFFS example while flash encryption was enabled. the .bin file was encrypted with a pre-generated-key from espsecure.py and uploaded with the esptool.py

The result was: mount fail. Isn't it possible to use Spiffs if flash encryption is enabled ?

spiffserror_example

Buffalchill avatar May 25 '18 11:05 Buffalchill

SPIFFS is not supported when flash encryption is enabled. You can use FATFS instead

me-no-dev avatar May 25 '18 13:05 me-no-dev

but the FATFS is only for external SD card not for the onboard storage right ?

Buffalchill avatar May 25 '18 15:05 Buffalchill

FATFS is supported on the flash as well. https://github.com/espressif/esp-idf/tree/master/examples/storage/wear_levelling it's the wear leveling lib that makes it possible to be used when flash is encrypted.

me-no-dev avatar May 25 '18 16:05 me-no-dev

Thank you ! Is this also available in the Arduino-Esp32 ? (I didn't find a sketch or a example, yet)

Buffalchill avatar May 25 '18 18:05 Buffalchill

I tried the FATFS wear leveling example from the esp-idf but it doesn't seem to work with flash encryption. I also tried the arduino-esp32 EEPROM example which doesn't work too. It seems like there is no way to store data, without loosing it when esp32 shuts down 🌊

fatfs

Buffalchill avatar May 25 '18 21:05 Buffalchill

Spiffs and Preferences work with encryption enanbled. Just didn't have the right partition table on my board

Buffalchill avatar Jun 18 '18 08:06 Buffalchill

Spiffs and Preferences work with encryption enanbled. Just didn't have the right partition table on my board

I do not see how SPIFFS can work with encryption (but I am trying to) if I see:

Screenshot from 2020-06-15 11-19-25 https://github.com/espressif/esp-idf/blob/master/components/spiffs/esp_spiffs.c#L166

@Buffalchill Could you elaborate this, please?

bastianhjaeger avatar Jun 15 '20 09:06 bastianhjaeger