Encrypted flash but plain text SPIFFS

Flourhorn
Posts: 2
Joined: Wed Sep 25, 2019 4:40 am

Encrypted flash but plain text SPIFFS

Postby Flourhorn » Wed Sep 25, 2019 6:19 am

Hello ESP32-Community,

this is my first post at this form. :)

Project: Webserver with spiffs that holds the websites.
Flash partitions:

Code: Select all

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,  	 0xA000,  0x5000,
otadata,  data, ota,     0xF000,  0x2000,
app0,     app,  ota_0,   0x20000, 0x140000,
app1,     app,  ota_1,   0x160000,0x140000,
eeprom,   data, 0x99,    0x2A0000,0x1000,
spiffs,   data, spiffs,  0x2A1000,0x15F000,
The program is stored at app0 and the website is stored spiffs. without flash encryption everything works fine.

As I mention, data partitions will be handled as non-encrypted. My idea: writing program encryped and webdata as plain text:

Code: Select all

esptool.py --chip esp32 --port COM4 --baud 921600 write_flash 0x20000 \Release\prog_encrypted.bin 0x2A1000 website.bin
The encryped app starts, but with this Problem:

Code: Select all

SPIFFS: spiffs partition could not be found
I do not understand the problem.
One solutions is to use spiffs as nvs - but I am not sure if that is working with about 10MByte and how to program it.

Thank you.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Encrypted flash but plain text SPIFFS

Postby ESP_Angus » Mon Oct 07, 2019 11:20 pm

Hi Flourhorn,

This error means that the partition table in the flash doesn't contain an entry for type "data" and subtype "spiffs". Did you re-flash the partition table binary that corresponds to the values that are shown in your post?

The build output should include the offset and path to flash the partition table (usually it's at offset 0x8000 but this can be changed in the project config). Note that if the flash is already encrypted, the partition table should be flashed encrypted as well.


Angus

Who is online

Users browsing this forum: No registered users and 93 guests