ESP32 Flash加密和安全启动相关

安全启动
启动安全启动后在文件夹放入 secure_boot_signing_key.pem 文件

Flash加密
使用生成的 my_flash_encryption_key.bin 加密文件
这里是加密 开启安全启动后的 bootloader-reflash-digest.bin 文件 需要先手动烧录这个文件,然后才能在加密的情况下使用 idf.py encrypted-flash monitor 更新程序

python.exe %IDF_PATH%\components\esptool_py\esptool\espsecure.py encrypt_flash_data --keyfile my_flash_encryption_key.bin --address 0x0 -o .\build\bootloader\encrypt-bootloader-reflash-digest.bin .\build\bootloader\bootloader-reflash-digest.bin

烧录指令

python.exe %IDF_PATH%\components\esptool_py\esptool\esptool.py --port com3 --baud 921600 write_flash 0x00 .\build\bootloader\encrypt-bootloader-reflash-digest.bin

然后就可以使用 idf.py encrypted-flash monitor来更新程序了

其他会使用到的指令,后续有空在更新

idf.py encrypted-flash monitor
idf.py encrypted-app-flash monitor

esptool.py erase_flash --force
esptool.py flash_id
esptool.py read_mac

espefuse.py summary --port com3
espefuse.py burn_efuse FLASH_CRYPT_CNT 0x01

你可能感兴趣的:(安全,前端,javascript)