Open asierdanjou opened 2 months ago
How about using --force option as instruction said.
A fatal error occurred: Active security features detected, erasing flash is disabled as a safety measure. Use --force to override, please use with caution, otherwise it may brick your device!
Hi, I can't find any documentation for the --force argument for parttool.py, nor for esptool.py. Is there any example of its use ?
Anyway I tried the following:
asier@DESKTOP-F9FS6J3:~/st-device-sdk-c-ref/apps/esp32c3/switch_example_plaintext_ota_sinJSON_enc/output_bulk/20240417_190809/TEST01/stnv/keys$ python /home/asier/st-device-sdk-c-ref/bsp/esp32c3/components/esptool_py/esptool/esptool.py erase_region 0x16000 0x1000
esptool.py v3.1-dev
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32-C3
Chip is unknown ESP32-C3 (revision 4)
Features: Wi-Fi
Crystal is 40MHz
MAC: 48:27:e2:ad:91:cc
Uploading stub...
Running stub...
Stub running...
Erasing region (may be slow depending on size)...
Erase completed successfully in 0.1 seconds.
Hard resetting via RTS pin...
asier@DESKTOP-F9FS6J3:~/st-device-sdk-c-ref/apps/esp32c3/switch_example_plaintext_ota_sinJSON_enc/output_bulk/20240417_190809/TEST01/stnv/keys$ python /home/asier/st-device-sdk-c-ref/bsp/esp32c3/components/esptool_py/esptool/esptool.py write_flash 0x16000 keys-04-18_09-59.bin --encrypt
esptool.py v3.1-dev
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP32-C3
Chip is unknown ESP32-C3 (revision 4)
Features: Wi-Fi
Crystal is 40MHz
MAC: 48:27:e2:ad:91:cc
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00016000 to 0x00016fff...
WARNING: - compress and encrypt options are mutually exclusive
Will flash keys-04-18_09-59.bin uncompressed
Wrote 16384 bytes at 0x00016000 in 1.5 seconds (86.2 kbit/s)...
Leaving...
Hard resetting via RTS pin...
But after doing that it doesn't work either.
Asier.
Hi, Any help with that? Thank you, Asier.
Sorry, it's too late. We start to preparing the guide for nvs encryption. If we complete the guide, we will update.
Hi, I'm trying to flash nvs-key partition again when "encrypted flash on boot" option is enabled. I add two options to parttool.py: --esptool-write-args encrypt --partition-table-file partitions.2MB.csv
How should I do it? Thanks, Asier