Failure to load firmware on ESP32C6

endi83
Posts: 24
Joined: Wed Nov 22, 2023 2:43 pm

Failure to load firmware on ESP32C6

Postby endi83 » Tue Apr 23, 2024 12:09 pm

I have an ESP32C6 connected to COM15 port that doesn’t have a loaded firmware (FW), and I want to load a .bin FW in a non-development environment. I am using this command which seems to execute correctly, but the device remains in a state that does not start:

esptool --port COM15 write_flash 0x180000 C:\Users\efernandez\Desktop\Wifi6_1.00.109.01.bin

I have this partition table:

# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, , 0x4000,
otadata, data, ota, , 0x2000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 0x110000,
ota_0, app, ota_0, , 0x110000,
ota_1, app, ota_1, , 0x110000,


I am trying to load it into ota_0, am I doing it correctly? Is the start address of the ota_0 partition 0x180000? If it’s the first load, should I do it in factory?

The load seems to be correct, I get this result:

esptool.py v4.7.0
Serial port COM15
Connecting...
Detecting chip type... ESP32-C6
Chip is ESP32-C6 (QFN40) (revision v0.0)
Features: WiFi 6, BT 5, IEEE802.15.4
Crystal is 40MHz
MAC: 40:4c:ca:ff:fe:42:43:8c
BASE MAC: 40:4c:ca:42:43:8c
MAC_EXT: ff:fe
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00180000 to 0x00286fff...
Compressed 1074816 bytes to 577712...
Wrote 1074816 bytes (577712 compressed) at 0x00180000 in 3.4 seconds (effective 2509.1 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...


However, the device remains in a state that does not respond and does not run the program.

ESP_Sprite
Posts: 9619
Joined: Thu Nov 26, 2015 4:08 am

Re: Failure to load firmware on ESP32C6

Postby ESP_Sprite » Wed Apr 24, 2024 12:49 am

You're only flashing the application code. If your ESP32C6 flash is entirely erased, you'll also need to flash the bootloader and partition table.

chegewara
Posts: 2333
Joined: Wed Jun 14, 2017 9:00 pm

Re: Failure to load firmware on ESP32C6

Postby chegewara » Wed Apr 24, 2024 1:14 am

The address is also incorrect.
The value will be more close to 0x120000 or 0x130000, but its not the exact number i think.
Factory app partition most likely will be at 0x10000, so it should be 0x120000.

In your case it would be best if you configure factory partition start address.

endi83
Posts: 24
Joined: Wed Nov 22, 2023 2:43 pm

Re: Failure to load firmware on ESP32C6

Postby endi83 » Wed Apr 24, 2024 6:39 am

Thank you very much for your response! I have managed to load everything necessary and in the appropriate flash memory position thanks to your help!

In case anyone is in the same situation, these have been the 4 commands that I have used for the ESP32C6 to load everything correctly:

esptool --port COM15 erase_flash
esptool --port COM15 write_flash 0x0 C:\Users\efernandez\Desktop\bootloader.bin
esptool --port COM15 write_flash 0x8000 C:\Users\efernandez\Desktop\partition-table.bin
esptool --port COM15 write_flash 0x10000 C:\Users\efernandez\Desktop\Wifi6_1.00.109.01.bin

Who is online

Users browsing this forum: No registered users and 96 guests