espressif / esp-serial-flasher

Library for flashing Espressif SoCs from other MCUs.
Apache License 2.0
388 stars 113 forks source link

There is always an error burning C2. (ESF-186) #125

Open vvvyky opened 2 days ago

vvvyky commented 2 days ago

Port

ESP32

Target chip

ESP32C2

Hardware Configuration

ESP32-C2 4MB FLASH 26MHZ

Log output

Initializing serial port... 115200

Chip model: ESP32-C2

Flash size: 0MB

MAC: d0:ef:76:9c:7a:14

Target chip: ESP32-C2

Ecosystem version: 1

Secure Boot: Disabled

Flash Encryption: Disabled

Secure Download Mode: Disabled

Secure Boot Key 0 Disabled: Disabled

Secure Boot Key 1 Disabled: Disabled

Secure Boot Key 2 Disabled: Disabled

JTAG access: Enabled

USB access: Enabled

Data cache in UART download mode: Enabled

Instruction cache in UART download mode: Enabled

Connection successful!

Erasing flash, programming...

Flash erase failed!

More Information

There is always an error in burning C2. I can't identify the storage. What is the reason?

DNedic commented 2 days ago

Interesting, it looks like the flash either isn't getting detected or isn't there at all. Can you for a start check if your board/module has the flash chip onboard? We've had cases where some third party boards didn't have flash installed at all.

Dzarda7 commented 2 days ago

Hi @vvvyky, thanks for noticing this. Can you please try to flash the chip using the esp32_example and paste the log here? It Is possible that flash detection registers are incorrect.

vvvyky commented 1 day ago

Hi @vvvyky, thanks for noticing this. Can you please try to flash the chip using the esp32_example and paste the log here? It Is possible that flash detection registers are incorrect.

It is the modification of this esp32_example routine, except that esp_loader_flash_detect_size is added. The detection chip fails to detect the size of the flash memory in C2 chip in detail, and the recording fails at the same time. The parameters of 32, s2, s3 and c3 are fine.

vvvyky commented 1 day ago

Interesting, it looks like the flash either isn't getting detected or isn't there at all. Can you for a start check if your board/module has the flash chip onboard? We've had cases where some third party boards didn't have flash installed at all.

C2 is an on-chip flash memory, and I don't know why the size can't be detected.