fix(esp32c5): fix bootloader address

This commit is contained in:
Jaroslav Burian
2025-03-24 15:44:05 +01:00
parent c292d6f689
commit 83e09736aa
7 changed files with 22 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
{IDF_TARGET_STRAP_BOOT_2_GPIO:default="GPIO8", esp32="GPIO2", esp32s2="GPIO46", esp32s3="GPIO46", esp32p4="GPIO36", esp32c5="GPIO27"} {IDF_TARGET_STRAP_BOOT_2_GPIO:default="GPIO8", esp32="GPIO2", esp32s2="GPIO46", esp32s3="GPIO46", esp32p4="GPIO36", esp32c5="GPIO27"}
{IDF_TARGET_BOOTLOADER_OFFSET:default="0", esp32="1000", esp32s2="1000", esp32p4="2000"} {IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
.. _boot-mode: .. _boot-mode:
@@ -224,7 +224,7 @@ Depending on the kind of hardware you have, it may also be possible to manually
**chksum:** **chksum:**
If value of chksum == value of csum, it means flash has been read correctly during booting. If value of "chksum" == value of "csum", it means flash has been read correctly during booting.
The rest of boot messages are used internally by Espressif. The rest of boot messages are used internally by Espressif.
@@ -290,15 +290,23 @@ Depending on the kind of hardware you have, it may also be possible to manually
Early Flash Read Error Early Flash Read Error
"""""""""""""""""""""" """"""""""""""""""""""
.. only:: esp8266
:: ::
flash read err, {IDF_TARGET_BOOTLOADER_OFFSET} flash read err, 0
This fatal error indicates that the bootloader tried to read the software bootloader header at address 0x{IDF_TARGET_BOOTLOADER_OFFSET} but failed to read valid data. Possible reasons for this include: .. only:: not esp8266
::
Invalid header <value at {IDF_TARGET_BOOTLOADER_OFFSET}>
This fatal error indicates that the bootloader tried to read the software bootloader header at address {IDF_TARGET_BOOTLOADER_OFFSET} but failed to read valid data. Possible reasons for this include:
.. list:: .. list::
- There isn't actually a bootloader at offset 0x{IDF_TARGET_BOOTLOADER_OFFSET} (maybe the bootloader was flashed to the wrong offset by mistake, or the flash has been erased and no bootloader has been flashed yet.) - There isn't actually a bootloader at offset {IDF_TARGET_BOOTLOADER_OFFSET} (maybe the bootloader was flashed to the wrong offset by mistake, or the flash has been erased and no bootloader has been flashed yet.)
- Physical problem with the connection to the flash chip, or flash chip power. - Physical problem with the connection to the flash chip, or flash chip power.
- Flash encryption is enabled but the bootloader is plaintext. Alternatively, flash encryption is disabled but the bootloader is encrypted ciphertext. - Flash encryption is enabled but the bootloader is plaintext. Alternatively, flash encryption is disabled but the bootloader is encrypted ciphertext.
@@ -326,7 +334,7 @@ Depending on the kind of hardware you have, it may also be possible to manually
mode:DIO, clock div:1 mode:DIO, clock div:1
This is normal boot output based on a combination of eFuse values and information read from the bootloader header at flash offset 0x{IDF_TARGET_BOOTLOADER_OFFSET}: This is normal boot output based on a combination of eFuse values and information read from the bootloader header at flash offset {IDF_TARGET_BOOTLOADER_OFFSET}:
.. list:: .. list::

View File

@@ -6,7 +6,7 @@
{IDF_TARGET_FLASH_FREQ_2:default="20", esp32c2="15", esp32h2="12"} {IDF_TARGET_FLASH_FREQ_2:default="20", esp32c2="15", esp32h2="12"}
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"} {IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
.. _image-format: .. _image-format:

View File

@@ -1,4 +1,4 @@
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"} {IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
.. _advanced-commands: .. _advanced-commands:

View File

@@ -1,4 +1,4 @@
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"} {IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
{IDF_TARGET_FLASH_FREQ_F:default="80", esp32c2="60", esp32h2="48"} {IDF_TARGET_FLASH_FREQ_F:default="80", esp32c2="60", esp32h2="48"}

View File

@@ -1,4 +1,4 @@
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"} {IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
.. _flashing: .. _flashing:

View File

@@ -1,4 +1,4 @@
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"} {IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
.. _troubleshooting: .. _troubleshooting:

View File

@@ -16,6 +16,8 @@ class ESP32C5ROM(ESP32C6ROM):
CHIP_NAME = "ESP32-C5" CHIP_NAME = "ESP32-C5"
IMAGE_CHIP_ID = 23 IMAGE_CHIP_ID = 23
BOOTLOADER_FLASH_OFFSET = 0x2000
EFUSE_BASE = 0x600B4800 EFUSE_BASE = 0x600B4800
EFUSE_BLOCK1_ADDR = EFUSE_BASE + 0x044 EFUSE_BLOCK1_ADDR = EFUSE_BASE + 0x044
MAC_EFUSE_REG = EFUSE_BASE + 0x044 MAC_EFUSE_REG = EFUSE_BASE + 0x044