Skip to content

Commit 0abc755

Browse files
committed
feat(rom): update rom for c5 eco2
Breaking: Starting from this commit, ESP-IDF can only support ESP32-C5 v1.0 (ECO2)
1 parent 61064b4 commit 0abc755

24 files changed

+241
-392
lines changed

Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ mainmenu "Espressif IoT Development Framework Configuration"
118118
default "y" if IDF_TARGET="esp32c5"
119119
select FREERTOS_UNICORE
120120
select IDF_TARGET_ARCH_RISCV
121+
# TODO: [ESPTOOL-1044] remove when stub supported
122+
select ESPTOOLPY_NO_STUB
121123

122124
config IDF_TARGET_ESP32P4
123125
bool

components/bootloader/subproject/main/ld/esp32c5/bootloader.ld

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
* Make sure the bootloader can load into main memory without overwriting itself.
88
*
99
* ESP32-C5 ROM static data usage is as follows:
10-
* - 0x4084e9a0 - 0x4085c9a0: Shared buffers, used in UART/USB/SPI download mode only
11-
* - 0x4085c9a0 - 0x4085e9a0: PRO CPU stack, can be reclaimed as heap after RTOS startup
12-
* - 0x4085e9a0 - 0x40860000: ROM .bss and .data (not easily reclaimable)
10+
* - 0x4084e5a0 - 0x4085c5a0: Shared buffers, used in UART/USB/SPI download mode only
11+
* - 0x4085c5a0 - 0x4085e5a0: PRO CPU stack, can be reclaimed as heap after RTOS startup
12+
* - 0x4085e5a0 - 0x40860000: ROM .bss and .data (not easily reclaimable)
1313
*
1414
* The 2nd stage bootloader can take space up to the end of ROM shared
15-
* buffers area (0x4085c9a0).
15+
* buffers area (0x4085c5a0).
1616
*/
1717

18-
/* We consider 0x4085c9a0 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
18+
/* We consider 0x4085c5a0 to be the last usable address for 2nd stage bootloader stack overhead, dram_seg,
1919
* and work out iram_seg and iram_loader_seg addresses from there, backwards.
2020
*/
2121

2222
/* These lengths can be adjusted, if necessary: */
23-
bootloader_usable_dram_end = 0x4085c9a0;
23+
bootloader_usable_dram_end = 0x4085c5a0;
2424
bootloader_stack_overhead = 0x2000; /* For safety margin between bootloader data section and startup stacks */
2525
bootloader_dram_seg_len = 0x5000;
2626
bootloader_iram_loader_seg_len = 0x7000;
@@ -45,7 +45,7 @@ MEMORY
4545
* 2. Update the value in this assert.
4646
* 3. Update SRAM_DRAM_END in components/esp_system/ld/esp32c5/memory.ld.in to the same value.
4747
*/
48-
ASSERT(bootloader_iram_loader_seg_start == 0x4084E9A0, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
48+
ASSERT(bootloader_iram_loader_seg_start == 0x4084e5a0, "bootloader_iram_loader_seg_start inconsistent with SRAM_DRAM_END");
4949

5050
/* Default entry point: */
5151
ENTRY(call_start_cpu0);
@@ -277,32 +277,32 @@ SECTIONS
277277
/**
278278
* Appendix: Memory Usage of ROM bootloader
279279
*
280-
* 0x4084e9a0 ------------------> _dram0_0_start
280+
* 0x4084e5a0 ------------------> _dram0_0_start
281281
* | |
282282
* | |
283283
* | | 1. Large buffers that are only used in certain boot modes, see shared_buffers.h
284284
* | |
285285
* | |
286-
* 0x4085c9a0 ------------------> __stack_sentry
286+
* 0x4085c5a0 ------------------> __stack_sentry
287287
* | |
288288
* | | 2. Startup pro cpu stack (freed when IDF app is running)
289289
* | |
290-
* 0x4085e9a0 ------------------> __stack (pro cpu)
290+
* 0x4085e5a0 ------------------> __stack (pro cpu)
291291
* | |
292292
* | |
293293
* | | 3. Shared memory only used in startup code or nonos/early boot*
294294
* | | (can be freed when IDF runs)
295295
* | |
296296
* | |
297-
* 0x4085f500 ------------------> _dram0_rtos_reserved_start
297+
* 0x4085f4f8 ------------------> _dram0_rtos_reserved_start
298298
* | |
299299
* | |
300300
* | | 4. Shared memory used in startup code and when IDF runs
301301
* | |
302302
* | |
303-
* 0x4085fc5c ------------------> _dram0_rtos_reserved_end
303+
* 0x4085fbb4 ------------------> _dram0_rtos_reserved_end
304304
* | |
305-
* 0x4085fc70 ------------------> _data_start_interface
305+
* 0x4085fc60 ------------------> _data_start_interface
306306
* | |
307307
* | | 5. End of DRAM is the 'interface' data with constant addresses (ECO compatible)
308308
* | |

components/esp_hw_support/port/esp32c5/Kconfig.hw_support

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
choice ESP32C5_REV_MIN
22
prompt "Minimum Supported ESP32-C5 Revision"
3-
default ESP32C5_REV_MIN_0
3+
default ESP32C5_REV_MIN_100
44
help
55
Required minimum chip revision. ESP-IDF will check for it and
66
reject to boot if the chip revision fails the check.
@@ -9,16 +9,13 @@ choice ESP32C5_REV_MIN
99
The complied binary will only support chips above this revision,
1010
this will also help to reduce binary size.
1111

12-
config ESP32C5_REV_MIN_0
13-
bool "Rev v0.0 (ECO0)"
14-
config ESP32C5_REV_MIN_1
15-
bool "Rev v0.1 (ECO1)"
12+
config ESP32C5_REV_MIN_100
13+
bool "Rev v1.0 (ECO2)"
1614
endchoice
1715

1816
config ESP32C5_REV_MIN_FULL
1917
int
20-
default 0 if ESP32C5_REV_MIN_0
21-
default 1 if ESP32C5_REV_MIN_1
18+
default 100 if ESP32C5_REV_MIN_100
2219

2320
config ESP_REV_MIN_FULL
2421
int
@@ -28,15 +25,15 @@ config ESP_REV_MIN_FULL
2825
# MAX Revision
2926
#
3027

31-
comment "Maximum Supported ESP32-C5 Revision (Rev v0.99)"
28+
comment "Maximum Supported ESP32-C5 Revision (Rev v1.99)"
3229
# Maximum revision that IDF supports.
3330
# It can not be changed by user.
3431
# Only Espressif can change it when a new version will be supported in IDF.
3532
# Supports all chips starting from ESP32C5_REV_MIN_FULL to ESP32C5_REV_MAX_FULL
3633

3734
config ESP32C5_REV_MAX_FULL
3835
int
39-
default 99
36+
default 199
4037
# keep in sync the "Maximum Supported Revision" description with this value
4138

4239
config ESP_REV_MAX_FULL

components/esp_rom/esp32c5/Kconfig.soc_caps.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ config ESP_ROM_HAS_NEWLIB
7575
bool
7676
default y
7777

78-
config ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT
78+
config ESP_ROM_HAS_NEWLIB_NANO_FORMAT
7979
bool
8080
default y
8181

components/esp_rom/esp32c5/esp_rom_caps.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define ESP_ROM_HAS_SPI_FLASH_MMAP (1) // ROM has the implementation of SPI Flash mmap driver
2525
#define ESP_ROM_WITHOUT_REGI2C (1) // ROM has no regi2c APIs TODO: IDF-10110 need refactor
2626
#define ESP_ROM_HAS_NEWLIB (1) // ROM has newlib (at least parts of it) functions included
27-
#define ESP_ROM_HAS_NEWLIB_NORMAL_FORMAT (1) // ROM has the newlib normal/full version of formatting functions (as opposed to the nano versions)
27+
#define ESP_ROM_HAS_NEWLIB_NANO_FORMAT (1) // ROM has the newlib nano version of formatting functions
2828
#define ESP_ROM_WDT_INIT_PATCH (1) // ROM version does not configure the clock
2929
#define ESP_ROM_NEEDS_SET_CACHE_MMU_SIZE (1) // ROM needs to set cache MMU size according to instruction and rodata for flash mmap
3030
#define ESP_ROM_RAM_APP_NEEDS_MMU_INIT (1) // ROM doesn't init cache MMU when it's a RAM APP, needs MMU hal to init

components/esp_rom/esp32c5/ld/esp32c5.rom.api.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/

components/esp_rom/esp32c5/ld/esp32c5.rom.coexist.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* ROM function interface esp32c5.rom.coexist.ld for esp32c5
77
*
88
*
9-
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum f5c146321f24f88ad1f27234da5aed11
9+
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum 4dfe6ccc311ca3575012c23e3753353c
1010
*
11-
* Compatible with ROM where ECO version equal or greater to 0.
11+
* Compatible with ROM where ECO version equal or greater to 2.
1212
*
1313
* THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.
1414
*/

components/esp_rom/esp32c5/ld/esp32c5.rom.heap.ld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* ROM function interface esp32c5.rom.heap.ld for esp32c5
77
*
88
*
9-
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum f5c146321f24f88ad1f27234da5aed11
9+
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum 4dfe6ccc311ca3575012c23e3753353c
1010
*
11-
* Compatible with ROM where ECO version equal or greater to 0.
11+
* Compatible with ROM where ECO version equal or greater to 2.
1212
*
1313
* THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.
1414
*/

components/esp_rom/esp32c5/ld/esp32c5.rom.ld

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66
/* ROM function interface esp32c5.rom.ld for esp32c5
77
*
88
*
9-
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum f5c146321f24f88ad1f27234da5aed11
9+
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum 4dfe6ccc311ca3575012c23e3753353c
1010
*
11-
* Compatible with ROM where ECO version equal or greater to 0.
11+
* Compatible with ROM where ECO version equal or greater to 2.
1212
*
1313
* THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.
1414
*/
@@ -429,3 +429,60 @@ usb_serial_device_rx_one_char = 0x40000ab8;
429429
usb_serial_device_rx_one_char_block = 0x40000abc;
430430
usb_serial_device_tx_flush = 0x40000ac0;
431431
usb_serial_device_tx_one_char = 0x40000ac4;
432+
433+
434+
/***************************************
435+
Group recovery_bootloader
436+
***************************************/
437+
438+
/* Functions */
439+
ets_get_bootloader_offset = 0x40001544;
440+
ets_set_bootloader_offset = 0x40001548;
441+
442+
443+
/***************************************
444+
Group lldesc
445+
***************************************/
446+
447+
/* Functions */
448+
lldesc_build_chain = 0x4000154c;
449+
450+
451+
/***************************************
452+
Group sip
453+
***************************************/
454+
455+
/* Functions */
456+
sip_after_tx_complete = 0x40001550;
457+
sip_alloc_to_host_evt = 0x40001554;
458+
sip_download_begin = 0x40001558;
459+
sip_get_ptr = 0x4000155c;
460+
sip_get_state = 0x40001560;
461+
sip_init_attach = 0x40001564;
462+
sip_install_rx_ctrl_cb = 0x40001568;
463+
sip_install_rx_data_cb = 0x4000156c;
464+
sip_is_active = 0x40001570;
465+
sip_post_init = 0x40001574;
466+
sip_reclaim_from_host_cmd = 0x40001578;
467+
sip_reclaim_tx_data_pkt = 0x4000157c;
468+
sip_send = 0x40001580;
469+
sip_to_host_chain_append = 0x40001584;
470+
sip_to_host_evt_send_done = 0x40001588;
471+
472+
473+
/***************************************
474+
Group slc
475+
***************************************/
476+
477+
/* Functions */
478+
slc_add_credits = 0x4000158c;
479+
slc_enable = 0x40001590;
480+
slc_from_host_chain_fetch = 0x40001594;
481+
slc_from_host_chain_recycle = 0x40001598;
482+
slc_has_pkt_to_host = 0x4000159c;
483+
slc_init_attach = 0x400015a0;
484+
slc_init_credit = 0x400015a4;
485+
slc_reattach = 0x400015a8;
486+
slc_send_to_host_chain = 0x400015ac;
487+
slc_set_host_io_max_window = 0x400015b0;
488+
slc_to_host_chain_recycle = 0x400015b4;

components/esp_rom/esp32c5/ld/esp32c5.rom.libc.ld

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6+
/* ROM function interface esp32c5.rom.libc.ld for esp32c5
7+
*
8+
*
9+
* Generated from ./target/esp32c5/interface-esp32c5.yml md5sum e68b5b3e3d244713e5743335f3857c57
10+
*
11+
* Compatible with ROM where ECO version equal or greater to 0.
12+
*
13+
* THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.
14+
*/
15+
16+
/***************************************
17+
Group libc
18+
***************************************/
19+
20+
/* Functions */
621
esp_rom_newlib_init_common_mutexes = 0x400004b4;
722
memset = 0x400004b8;
823
strlen = 0x400004d8;

0 commit comments

Comments
 (0)