Skip to content

Commit 4ea1fac

Browse files
committed
Merge branch 'feature/esp32h21_core_support' into 'master'
feat(esp32h21): added support for misc core system features Closes IDF-12042, IDF-11598, IDF-11596, IDF-11874, IDF-11873, IDF-11528, and IDF-11511 See merge request espressif/esp-idf!38773
2 parents 8344af1 + 1256078 commit 4ea1fac

File tree

13 files changed

+60
-26
lines changed

13 files changed

+60
-26
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
2-
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- |
1+
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-H21 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
2+
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | --------- | -------- | -------- | -------- |

components/esp_system/ld/esp32h2/memory.ld.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ MEMORY
6161
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
6262

6363
/**
64-
* lp ram memory (RWX). Persists over deep sleep. // ESP32H2-TODO IDF-6272
64+
* lp ram memory (RWX). Persists over deep sleep.
6565
*/
6666
lp_ram_seg(RW) : org = 0x50000000, len = 0x1000 - RESERVE_RTC_MEM
6767

@@ -83,7 +83,7 @@ _data_seg_org = ORIGIN(rtc_data_seg);
8383

8484
/**
8585
* The lines below define location alias for .rtc.data section
86-
* As C3 only has RTC fast memory, this is not configurable like on other targets
86+
* As H2 only has RTC fast memory, this is not configurable like on other targets
8787
*/
8888
REGION_ALIAS("rtc_iram_seg", lp_ram_seg );
8989
REGION_ALIAS("rtc_data_seg", rtc_iram_seg );

components/esp_system/ld/esp32h21/memory.ld.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
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

7-
/* TODO: [ESP32H21] IDF-11900, IDF-11908 */
87

98
/**
109
* ESP32-H21 Linker Script Memory Layout
@@ -63,7 +62,7 @@ MEMORY
6362
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
6463

6564
/**
66-
* lp ram memory (RWX). Persists over deep sleep. // ESP32H21-TODO IDF-11899
65+
* lp ram memory (RWX). Persists over deep sleep.
6766
*/
6867
lp_ram_seg(RW) : org = 0x50000000, len = 0x1000 - RESERVE_RTC_MEM
6968

@@ -85,7 +84,8 @@ _data_seg_org = ORIGIN(rtc_data_seg);
8584

8685
/**
8786
* The lines below define location alias for .rtc.data section
88-
* As H21 only has RTC fast memory, this is not configurable like on other targets
87+
* H21 has no distinguished LP(RTC) fast and slow memory sections, instead, there is a unified LP_RAM section
88+
* Thus, the following region segments are not configurable like on other targets
8989
*/
9090
REGION_ALIAS("rtc_iram_seg", lp_ram_seg );
9191
REGION_ALIAS("rtc_data_seg", rtc_iram_seg );

components/esp_system/test_apps/esp_system_unity_tests/main/test_task_wdt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ TEST_CASE("Task WDT task timeout", "[task_wdt]")
4949
TEST_ASSERT_EQUAL(ESP_OK, esp_task_wdt_deinit());
5050
}
5151

52-
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && SOC_MWDT_SUPPORT_SLEEP_RETENTION
52+
#if CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP && SOC_MWDT_SUPPORT_SLEEP_RETENTION && SOC_LIGHT_SLEEP_SUPPORTED
5353
TEST_CASE("Task WDT task timeout after peripheral powerdown lightsleep", "[task_wdt]")
5454
{
5555
timeout_flag = false;
@@ -89,7 +89,7 @@ TEST_CASE("Task WDT task timeout after peripheral powerdown lightsleep", "[task_
8989

9090
#if SOC_MWDT_SUPPORT_XTAL
9191

92-
#if CONFIG_IDF_TARGET_ESP32H2
92+
#if CONFIG_IDF_TARGET_ESP32H2 || CONFIG_IDF_TARGET_ESP32H21
9393
#define TEST_CPU_FREQUENCY_MHZ 48
9494
#else
9595
#define TEST_CPU_FREQUENCY_MHZ 40

components/hal/esp32h21/include/hal/cpu_utility_ll.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#include "soc/pcr_reg.h"
1111
#include "esp_attr.h"
1212

13-
//TODO: [ESP32H21] IDF-11873, inherit from h2
14-
1513
#ifdef __cplusplus
1614
extern "C" {
1715
#endif

components/hal/esp32h21/include/hal/lpwdt_ll.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ extern "C" {
2323

2424
#include "rom/ets_sys.h"
2525

26-
//TODO: [ESP32H21] IDF-11511, inherit from h2
27-
2826
/* The value that needs to be written to LP_WDT_WKEY to write-enable the wdt registers */
2927
#define LP_WDT_WKEY_VALUE 0x50D83AA1
3028
/* The value that needs to be written to LP_WDT_SWD_WPROTECT_REG to write-enable the swd registers */

components/hal/esp32h21/include/hal/mwdt_ll.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ extern "C" {
2323
#include "esp_attr.h"
2424
#include "hal/misc.h"
2525

26-
//TODO: [ESP32H21] IDF-11528, inherit from h2
27-
2826
/* Pre-calculated prescaler to achieve 500 ticks/us (MWDT1_TICKS_PER_US) when using default clock (MWDT_CLK_SRC_DEFAULT ) */
2927
#define MWDT_LL_DEFAULT_CLK_PRESCALER 16000
3028

components/hal/esp32h21/include/hal/rwdt_ll.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ extern "C" {
1414

1515
#include "hal/lpwdt_ll.h"
1616

17-
//TODO: [ESP32H21] IDF-11511, inherit from h2
18-
1917
typedef lp_wdt_dev_t rwdt_dev_t;
2018

2119
#define RWDT_DEV_GET() &LP_WDT

components/hal/esp32h21/include/hal/systimer_ll.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
*/
@@ -12,7 +12,6 @@
1212
#include "soc/pcr_struct.h"
1313
#include "hal/assert.h"
1414

15-
//TODO: [ESP32H21] IDF-11596, inherit from h2
1615

1716
#ifdef __cplusplus
1817
extern "C" {

components/heap/port/esp32h21/memory_layout.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "heap_memory_layout.h"
1313
#include "esp_heap_caps.h"
1414

15-
//TODO: [ESP32H21] IDF-11525
1615

1716
/**
1817
* @brief Memory type descriptors. These describe the capabilities of a type of memory in the SoC.

0 commit comments

Comments
 (0)