Skip to content

Commit 093a444

Browse files
committed
fix(modem_etm): fixed the compile issue
1 parent 2044fba commit 093a444

File tree

5 files changed

+30
-2
lines changed

5 files changed

+30
-2
lines changed

components/esp_hw_support/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ if(NOT non_os_build)
5454
if(CONFIG_SOC_PAU_SUPPORTED)
5555
list(APPEND srcs "sleep_retention.c")
5656
endif()
57+
if(CONFIG_SOC_MODEM_SUPPORT_ETM)
58+
list(APPEND srcs "modem/modem_etm.c")
59+
endif()
5760
if(CONFIG_SOC_LIGHT_SLEEP_SUPPORTED)
5861
list(APPEND srcs "sleep_modem.c"
5962
"sleep_modes.c"
@@ -177,7 +180,7 @@ endif()
177180
set(public_include_dirs "include" "include/soc"
178181
"dma/include" "ldo/include" "debug_probe/include" "etm/include"
179182
"mspi_timing_tuning/include" "mspi_timing_tuning/tuning_scheme_impl/include"
180-
"power_supply/include")
183+
"power_supply/include" "modem/include")
181184

182185
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/include/soc/${target}")
183186
list(APPEND public_include_dirs

components/esp_hw_support/modem/include/modem/modem_etm.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
#pragma once
88

99
#include <stdbool.h>
10+
#include "esp_etm.h"
11+
#include "soc/soc_caps.h"
1012

1113
#ifdef __cplusplus
1214
extern "C" {
1315
#endif
1416

17+
#if SOC_MODEM_SUPPORT_ETM
18+
1519
/**
1620
* @brief Modem ETM event type
1721
*
@@ -81,6 +85,8 @@ esp_err_t modem_new_etm_event(const modem_etm_event_config_t *config, esp_etm_ev
8185
*/
8286
esp_err_t modem_new_etm_task(const modem_etm_task_config_t *config, esp_etm_task_handle_t *out_task);
8387

88+
#endif /* SOC_MODEM_SUPPORT_ETM */
89+
8490
#ifdef __cplusplus
8591
}
8692
#endif

components/esp_hw_support/modem/modem_etm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "esp_check.h"
1212
#include "esp_heap_caps.h"
1313
#include "modem/modem_etm.h"
14-
#include "hal/modem_ll.h"
14+
#include "hal/modem_etm_ll.h"
1515
#include "esp_private/etm_interface.h"
1616

1717
#define ETM_MEM_ALLOC_CAPS MALLOC_CAP_DEFAULT

components/soc/esp32h4/include/soc/Kconfig.soc_caps.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,18 @@ config SOC_AHB_GDMA_SUPPORT_PSRAM
267267
bool
268268
default y
269269

270+
config SOC_ETM_GROUPS
271+
int
272+
default 1
273+
274+
config SOC_ETM_CHANNELS_PER_GROUP
275+
int
276+
default 50
277+
278+
config SOC_MODEM_SUPPORT_ETM
279+
bool
280+
default y
281+
270282
config SOC_GPIO_PORT
271283
int
272284
default 1

components/soc/esp32h4/include/soc/soc_caps.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,13 @@
185185
#define SOC_GDMA_SUPPORT_SLEEP_RETENTION 1
186186
#define SOC_AHB_GDMA_SUPPORT_PSRAM 1
187187

188+
/*-------------------------- ETM CAPS --------------------------------------*/
189+
#define SOC_ETM_GROUPS 1U // Number of ETM groups
190+
#define SOC_ETM_CHANNELS_PER_GROUP 50 // Number of ETM channels in the group
191+
192+
/*-------------------------- MODEM CAPS --------------------------------------*/
193+
#define SOC_MODEM_SUPPORT_ETM 1
194+
188195
/*-------------------------- GPIO CAPS ---------------------------------------*/
189196
// ESP32-H4 has 1 GPIO peripheral
190197
#define SOC_GPIO_PORT 1U

0 commit comments

Comments
 (0)