I try to encrypt, so enable Secure Boot v1 and encrypt flash. generate key with puttygen
build and flash processed fine without errors, but when chip start I got error
Code: Select all
ESP-ROM:esp32c3-api1-20210207
Build:Feb 7 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x40048b82
0x40048b82: ets_secure_boot_verify_bootloader_with_keys in ROM
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5988,len:0x2ba4
load:0x403cc710,len:0x968
load:0x403ce710,len:0x4aa0
entry 0x403cc710
I (39) boot: ESP-IDF v5.1.1 2nd stage bootloader
I (40) boot: compile time Sep 12 2023 22:54:37
I (40) boot: chip revision: v0.3
I (43) boot.esp32c3: SPI Speed : 80MHz
I (47) boot.esp32c3: SPI Mode : DIO
I (52) boot.esp32c3: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (66) boot: ## Label Usage Type ST Offset Length
I (73) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (81) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (88) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (95) boot: 3 factory factory app 00 00 00010000 00100000
I (103) boot: 4 ota_0 OTA app 00 10 00110000 00100000
I (111) boot: 5 ota_1 OTA app 00 11 00210000 00100000
I (118) boot: End of partition table
E (122) boot: ota data partition invalid, falling back to factory
E (129) esp_image: image at 0x10000 has invalid magic byte (nothing flashed here?)
E (137) boot: Factory app partition is not bootable
E (143) esp_image: image at 0x110000 has invalid magic byte (nothing flashed here?)
E (151) boot: OTA app partition slot 0 is not bootable
E (157) esp_image: image at 0x210000 has invalid magic byte (nothing flashed here?)
E (165) boot: OTA app partition slot 1 is not bootable
E (171) boot: No bootable app partitions in the partition table
so I try to flesh factory image
Code: Select all
C:\Users\Work\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Users\Work\esp\esp-idf\components\esptool_py\esptool\esptool.py --chip esp32c3 --port COM8 --baud 460800 write_flash -z 0x0 c:/Users/Work/Downloads/ESP32_GENERIC_C3-20230426-v1.20.0.bin
Code: Select all
encrypt3> C:\Users\Work\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:\Users\Work\esp\esp-idf\components\esptool_py\esptool\esptool.py --chip esp32c3 --port COM8 --baud 460800 write_flash -z 0x0 c:/Users/Work/Downloads/ESP32_GENERIC_C3-20230426-v1.20.0.bin
esptool.py v4.7.dev1
Serial port COM8
Connecting....
Chip is ESP32-C3 (QFN32) (revision v0.3)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 7c:df:a1:b0:3f:98
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00000000 to 0x00164fff...
Compressed 1461232 bytes to 891797...
Wrote 1461232 bytes (891797 compressed) at 0x00000000 in 24.8 seconds (effective 470.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Code: Select all
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d
invalid header: 0x3767d29d