Skip to content

Commit 3555fe1

Browse files
Dzarda7radimkarnis
authored andcommitted
fix: Not reading app description for some SoCs
This commit updates the DROM and IROM addresses for the ESP32-C5, ESP32-C6, and ESP32-C61. This also fixes the issue when reading app description using image_info command when there are multiple DROM sections. Closes espressif#1039
1 parent b23e60f commit 3555fe1

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

esptool/cmds.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,8 @@ def get_key_from_value(dict, val):
875875
for idx, seg in enumerate(image.segments):
876876
segs = seg.get_memory_type(image)
877877
seg_name = ", ".join(segs)
878-
if "DROM" in segs: # The DROM segment starts with the esp_app_desc_t struct
878+
# The DROM segment starts with the esp_app_desc_t struct
879+
if "DROM" in segs and app_desc is None:
879880
app_desc = seg.data[:256]
880881
elif "DRAM" in segs:
881882
# The DRAM segment starts with the esp_bootloader_desc_t struct

esptool/targets/esp32c5.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class ESP32C5ROM(ESP32C6ROM):
4444
EFUSE_SECURE_BOOT_EN_MASK = 1 << 20
4545

4646
IROM_MAP_START = 0x42000000
47-
IROM_MAP_END = 0x42800000
48-
DROM_MAP_START = 0x42800000
49-
DROM_MAP_END = 0x43000000
47+
IROM_MAP_END = 0x44000000
48+
DROM_MAP_START = 0x42000000
49+
DROM_MAP_END = 0x44000000
5050

5151
PCR_SYSCLK_CONF_REG = 0x60096110
5252
PCR_SYSCLK_XTAL_FREQ_V = 0x7F << 24
@@ -65,12 +65,12 @@ class ESP32C5ROM(ESP32C6ROM):
6565

6666
MEMORY_MAP = [
6767
[0x00000000, 0x00010000, "PADDING"],
68-
[0x42800000, 0x43000000, "DROM"],
68+
[0x42000000, 0x44000000, "DROM"],
6969
[0x40800000, 0x40860000, "DRAM"],
7070
[0x40800000, 0x40860000, "BYTE_ACCESSIBLE"],
7171
[0x4003A000, 0x40040000, "DROM_MASK"],
7272
[0x40000000, 0x4003A000, "IROM_MASK"],
73-
[0x42000000, 0x42800000, "IROM"],
73+
[0x42000000, 0x44000000, "IROM"],
7474
[0x40800000, 0x40860000, "IRAM"],
7575
[0x50000000, 0x50004000, "RTC_IRAM"],
7676
[0x50000000, 0x50004000, "RTC_DRAM"],

esptool/targets/esp32c6.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ class ESP32C6ROM(ESP32C3ROM):
8989

9090
MEMORY_MAP = [
9191
[0x00000000, 0x00010000, "PADDING"],
92-
[0x42800000, 0x43000000, "DROM"],
92+
[0x42000000, 0x43000000, "DROM"],
9393
[0x40800000, 0x40880000, "DRAM"],
9494
[0x40800000, 0x40880000, "BYTE_ACCESSIBLE"],
9595
[0x4004AC00, 0x40050000, "DROM_MASK"],
9696
[0x40000000, 0x4004AC00, "IROM_MASK"],
97-
[0x42000000, 0x42800000, "IROM"],
97+
[0x42000000, 0x43000000, "IROM"],
9898
[0x40800000, 0x40880000, "IRAM"],
9999
[0x50000000, 0x50004000, "RTC_IRAM"],
100100
[0x50000000, 0x50004000, "RTC_DRAM"],

esptool/targets/esp32c61.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ class ESP32C61ROM(ESP32C6ROM):
5353

5454
MEMORY_MAP = [
5555
[0x00000000, 0x00010000, "PADDING"],
56-
[0x41800000, 0x42000000, "DROM"],
56+
[0x42000000, 0x44000000, "DROM"],
5757
[0x40800000, 0x40860000, "DRAM"],
5858
[0x40800000, 0x40860000, "BYTE_ACCESSIBLE"],
5959
[0x4004AC00, 0x40050000, "DROM_MASK"],
6060
[0x40000000, 0x4004AC00, "IROM_MASK"],
61-
[0x41000000, 0x41800000, "IROM"],
61+
[0x42000000, 0x44000000, "IROM"],
6262
[0x40800000, 0x40860000, "IRAM"],
6363
[0x50000000, 0x50004000, "RTC_IRAM"],
6464
[0x50000000, 0x50004000, "RTC_DRAM"],

0 commit comments

Comments
 (0)