I think the whole flash encryption topic is describe very detailly in the docs, but there are so much steps to follow to do it right, that it gets quite confusing... After studying the docs for days, I anyway bricked a chip yesterday
Maybe you guys could review my procedure first, before trying it with the next chip?
1. Enabled Flash encryption
(For beginning: No secure boot. I want to enable this in a later step. First get flash-encryption running.)
Code: Select all
make menuconfigCode: Select all
make erase_flashCode: Select all
make clean + make allCode: Select all
espsecure.py generate_flash_encryption_key MY_KEY.binCode: Select all
espefuse.py --port *COMport" burn_key flash_encryption MY_KEY.binPlease note, that I use a custom partition-table with no factory app and 2 OTA partitions: ota1 @ 0x10000 and ota2 @ 0x110000
Code: Select all
espsecure.py encrypt_flash_data --keyfile MY_KEY.bin --address 0x10000 -o MY_APP_encrypted.bin *path*/build/MY_APP.binCode: Select all
esptool.py --chip esp32 --port *COMport* --baud *baud* --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 40m --flash_size detect 0x10000 MY_APP_encrypted.binIs this right?
Is the device now ready to run or is something missing?
Big thanks!
