Skip to content

Commit 83e0973

Browse files
committed
fix(esp32c5): fix bootloader address
1 parent c292d6f commit 83e0973

File tree

7 files changed

+22
-12
lines changed

7 files changed

+22
-12
lines changed

docs/en/advanced-topics/boot-mode-selection.rst

+15-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{IDF_TARGET_STRAP_BOOT_2_GPIO:default="GPIO8", esp32="GPIO2", esp32s2="GPIO46", esp32s3="GPIO46", esp32p4="GPIO36", esp32c5="GPIO27"}
44

5-
{IDF_TARGET_BOOTLOADER_OFFSET:default="0", esp32="1000", esp32s2="1000", esp32p4="2000"}
5+
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
66

77
.. _boot-mode:
88

@@ -224,7 +224,7 @@ Depending on the kind of hardware you have, it may also be possible to manually
224224

225225
**chksum:**
226226

227-
If value of chksum == value of csum, it means flash has been read correctly during booting.
227+
If value of "chksum" == value of "csum", it means flash has been read correctly during booting.
228228

229229
The rest of boot messages are used internally by Espressif.
230230

@@ -290,15 +290,23 @@ Depending on the kind of hardware you have, it may also be possible to manually
290290
Early Flash Read Error
291291
""""""""""""""""""""""
292292

293-
::
293+
.. only:: esp8266
294+
295+
::
296+
297+
flash read err, 0
298+
299+
.. only:: not esp8266
300+
301+
::
294302

295-
flash read err, {IDF_TARGET_BOOTLOADER_OFFSET}
303+
Invalid header <value at {IDF_TARGET_BOOTLOADER_OFFSET}>
296304

297-
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:
305+
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:
298306

299307
.. list::
300308

301-
- 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.)
309+
- 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.)
302310
- Physical problem with the connection to the flash chip, or flash chip power.
303311
- Flash encryption is enabled but the bootloader is plaintext. Alternatively, flash encryption is disabled but the bootloader is encrypted ciphertext.
304312

@@ -326,7 +334,7 @@ Depending on the kind of hardware you have, it may also be possible to manually
326334
mode:DIO, clock div:1
327335

328336

329-
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}:
337+
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}:
330338

331339
.. list::
332340

docs/en/advanced-topics/firmware-image-format.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
{IDF_TARGET_FLASH_FREQ_2:default="20", esp32c2="15", esp32h2="12"}
88

9-
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"}
9+
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
1010

1111

1212
.. _image-format:

docs/en/esptool/advanced-commands.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"}
1+
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
22

33
.. _advanced-commands:
44

docs/en/esptool/flash-modes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"}
1+
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
22

33
{IDF_TARGET_FLASH_FREQ_F:default="80", esp32c2="60", esp32h2="48"}
44

docs/en/esptool/flashing-firmware.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"}
1+
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
22

33
.. _flashing:
44

docs/en/troubleshooting.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000"}
1+
{IDF_TARGET_BOOTLOADER_OFFSET:default="0x0", esp32="0x1000", esp32s2="0x1000", esp32p4="0x2000", esp32c5="0x2000"}
22

33
.. _troubleshooting:
44

esptool/targets/esp32c5.py

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class ESP32C5ROM(ESP32C6ROM):
1616
CHIP_NAME = "ESP32-C5"
1717
IMAGE_CHIP_ID = 23
1818

19+
BOOTLOADER_FLASH_OFFSET = 0x2000
20+
1921
EFUSE_BASE = 0x600B4800
2022
EFUSE_BLOCK1_ADDR = EFUSE_BASE + 0x044
2123
MAC_EFUSE_REG = EFUSE_BASE + 0x044

0 commit comments

Comments
 (0)