I’ve been working on a project for a while where I enabled encryption in release mode and it worked.
Recently I made some updates and now when I flash the ESP32-S3-mini-1 I get the “Invalid Header” warning after uploading.
To try to solve the issue I completely removed PlatformIO and ESP-IDF and reinstalled both.
Then I opened a clean project, used all the default parameters, standard partition table, ran menuconfig and only enabled “Enable usage mode(Development)”.
I still get the “invalid header” printed in the console.
When I disable encryption, the code runs just fine.
I also checked the fuses, but I do not see the crypt_cnt fuse flashed:
SPI_BOOT_CRYPT_CNT (BLOCK0) Enables flash encryption when 1 or 3 bits are set = Disable R/W (0b000)
and disabled otherwise
Is there an issue with PlatformIO menuconfig?
I’m so confused what is going wrong here.
-
I loaded a new example project called “espidf-hello-world”
-
Changed the board to board = esp32-s3-devkitc-1
-
Flashed the board…
Succes! Board boots up fine.
-
I go to menuconfig in platformio
-
I check security features → Enable flash encryption on boot (READ DOCS FIRST) → Development
UART ROM download mode (UART ROM download mode (Enabled (not recommended)))
-
I flash the board again…
“invalid header: 0x115542bf”
There’s not much I could do wrong there?
I’m afraid that’s very deeply technical for ESP32-S3 for this forum, you might have better chances to ask Espressif if this reproduces in their ESP-IDF environment too. If it does work in ESP-IDF, then you should open an issue in https://github.com/platformio/platform-espressif32/issues/.
1 Like
I just tried with ESP-IDF directly and it works.
I can see that the right fuses are now set, while they were not set using platformIO.
I’ll generate a ticket as per recommendation. Thanks.