环境:win11 vscode IDF4.4.1 使用ESP32S2官方那个
开发板
我在官方例程中使用flash_encryp
tion 例程测试时,不打开flash加密选项烧录运行都没有问题(打开了efuse虚拟功能)。在打开flash加密功能后,编译通过后在烧录时就提示key未编程。但是我在看官方文档时并没有提示需要编程密钥。官方文档中说明是esp32会在启动的时候自动生成密钥并加密分区。我是用的是ESP32S2.烧写输入日志如下。
esptool.py v3.3-dev
Serial port COM18
Connecting....
Chip is ESP32-S2
Features: WiFi, No Embedded Flash, No Embedded PSRAM, ADC and temperature sensor calibration in BLK2 of efuse V2
Crystal is 40MHz
MAC: 84:f7:03:c6:88:82
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash encryption key is not programmed
A fatal error occurred: Can't perform encrypted flash write, consult Flash Encryption documentation for more information
终端进程“D:softwareEspressifpython_envidf4.4_py3.8_envScriptspython.exe 'D:softwareEspressifframeworksesp-idf-v4.4.1componentsesptool_pyesptoolesptool.py', '-p', 'COM18', '-b', '460800', '--before', 'default_reset', '--after', 'no_reset', '--chip', 'esp32s2', 'write_flash', '--flash_mode', 'dio', '--flash_freq', '80m', '--flash_size', 'detect', '0x9000', 'partition_table/partition-table.bin', '--encrypt-files', '0x20000', 'flash_encryption.bin', '0x1000', 'bootloader/bootloader.bin'”已终止,退出代码: 2。