The initial issue is that changing SPI_BOOT_CRYPT_CNT from 0b001 -> 0b011 changing my device from normal operation to getting
which is quite unexpected since values 1 and 3 should have the same behavior.invalid header: 0xeecc68ce
This error generally means the
instead of the encrypted binarybootloader partition is re-flashed with a plaintext second stage bootloader image
https://docs.espressif.com/projects/esp ... e-failures
Now when trying to flash again via
I getesptool write-flash --encrypt ..
andWarning: Security features enabled, so not changing any flash settings.
which makes me think something is changed internally where I can no longer use the --encrypt flag.Cannot verify written data if encrypted or in secure download mode.
Prior to changing SPI_BOOT_CRYPT_CNT from 1 to 3, flash encryption (from what I could tell) and secure boot were working together.
Background
I am working with the esp32-s3. My intent is to protect firmware (keys, IP) and nvs (user data) while making my device as user friendly as possible.
Thus I am using flash encryption and secure boot. My flash encryption I have been using has been in development mode as I don't see a reason to use release mode and I would like the esp to internally handle keys for encryption (as I believe it does for dev mode). I do know SPI_BOOT_CRYPT_CNT then must be burned to 3 in order to secure device flash which is the step that caused my issue.