Skip to content

Commit 16d7910

Browse files
committed
Merge branch 'feature/support_c5_eco2_rom' into 'master'
feat(rom): update rom for c5 eco2 See merge request espressif/esp-idf!38297
2 parents d930a38 + 1c5d48e commit 16d7910

File tree

154 files changed

+527
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+527
-751
lines changed

.gitlab/ci/default-build-test-rules.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ extra_default_build_targets:
1515
bypass_check_test_targets:
1616
- esp32h21
1717
- esp32h4
18+
- esp32c5
1819

1920
#
2021
# These lines would

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 IDF_ENV_BRINGUP
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/lowpower/port/esp32c5/sleep_clock.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ bool clock_domain_pd_allowed(void)
118118
* necessary to check the state of CLOCK_MODEM to determine MODEM domain on
119119
* or off. The clock and reset of digital peripherals are managed through
120120
* PCR, with TOP domain similar to MODEM domain. */
121+
#if SOC_WIFI_SUPPORTED || SOC_BLE_SUPPORTED || SOC_IEEE802154_SUPPORTED
121122
sleep_retention_module_bitmap_t modem_clk_dep_modules = (sleep_retention_module_bitmap_t){ .bitmap = { 0 } };
123+
#endif
122124
#if SOC_WIFI_SUPPORTED
123125
modem_clk_dep_modules.bitmap[SLEEP_RETENTION_MODULE_WIFI_MAC >> 5] |= BIT(SLEEP_RETENTION_MODULE_WIFI_MAC % 32);
124126
modem_clk_dep_modules.bitmap[SLEEP_RETENTION_MODULE_WIFI_BB >> 5] |= BIT(SLEEP_RETENTION_MODULE_WIFI_BB % 32);

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
*/

0 commit comments

Comments
 (0)