fix(modem_etm): fixed the compile issue

This commit is contained in:
laokaiyao
2025-08-19 15:54:50 +08:00
parent 2044fba6e7
commit 093a444d74
5 changed files with 30 additions and 2 deletions

View File

@@ -54,6 +54,9 @@ if(NOT non_os_build)
if(CONFIG_SOC_PAU_SUPPORTED) if(CONFIG_SOC_PAU_SUPPORTED)
list(APPEND srcs "sleep_retention.c") list(APPEND srcs "sleep_retention.c")
endif() endif()
if(CONFIG_SOC_MODEM_SUPPORT_ETM)
list(APPEND srcs "modem/modem_etm.c")
endif()
if(CONFIG_SOC_LIGHT_SLEEP_SUPPORTED) if(CONFIG_SOC_LIGHT_SLEEP_SUPPORTED)
list(APPEND srcs "sleep_modem.c" list(APPEND srcs "sleep_modem.c"
"sleep_modes.c" "sleep_modes.c"
@@ -177,7 +180,7 @@ endif()
set(public_include_dirs "include" "include/soc" set(public_include_dirs "include" "include/soc"
"dma/include" "ldo/include" "debug_probe/include" "etm/include" "dma/include" "ldo/include" "debug_probe/include" "etm/include"
"mspi_timing_tuning/include" "mspi_timing_tuning/tuning_scheme_impl/include" "mspi_timing_tuning/include" "mspi_timing_tuning/tuning_scheme_impl/include"
"power_supply/include") "power_supply/include" "modem/include")
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/include/soc/${target}") if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/include/soc/${target}")
list(APPEND public_include_dirs list(APPEND public_include_dirs

View File

@@ -7,11 +7,15 @@
#pragma once #pragma once
#include <stdbool.h> #include <stdbool.h>
#include "esp_etm.h"
#include "soc/soc_caps.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if SOC_MODEM_SUPPORT_ETM
/** /**
* @brief Modem ETM event type * @brief Modem ETM event type
* *
@@ -81,6 +85,8 @@ esp_err_t modem_new_etm_event(const modem_etm_event_config_t *config, esp_etm_ev
*/ */
esp_err_t modem_new_etm_task(const modem_etm_task_config_t *config, esp_etm_task_handle_t *out_task); esp_err_t modem_new_etm_task(const modem_etm_task_config_t *config, esp_etm_task_handle_t *out_task);
#endif /* SOC_MODEM_SUPPORT_ETM */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -11,7 +11,7 @@
#include "esp_check.h" #include "esp_check.h"
#include "esp_heap_caps.h" #include "esp_heap_caps.h"
#include "modem/modem_etm.h" #include "modem/modem_etm.h"
#include "hal/modem_ll.h" #include "hal/modem_etm_ll.h"
#include "esp_private/etm_interface.h" #include "esp_private/etm_interface.h"
#define ETM_MEM_ALLOC_CAPS MALLOC_CAP_DEFAULT #define ETM_MEM_ALLOC_CAPS MALLOC_CAP_DEFAULT

View File

@@ -267,6 +267,18 @@ config SOC_AHB_GDMA_SUPPORT_PSRAM
bool bool
default y default y
config SOC_ETM_GROUPS
int
default 1
config SOC_ETM_CHANNELS_PER_GROUP
int
default 50
config SOC_MODEM_SUPPORT_ETM
bool
default y
config SOC_GPIO_PORT config SOC_GPIO_PORT
int int
default 1 default 1

View File

@@ -185,6 +185,13 @@
#define SOC_GDMA_SUPPORT_SLEEP_RETENTION 1 #define SOC_GDMA_SUPPORT_SLEEP_RETENTION 1
#define SOC_AHB_GDMA_SUPPORT_PSRAM 1 #define SOC_AHB_GDMA_SUPPORT_PSRAM 1
/*-------------------------- ETM CAPS --------------------------------------*/
#define SOC_ETM_GROUPS 1U // Number of ETM groups
#define SOC_ETM_CHANNELS_PER_GROUP 50 // Number of ETM channels in the group
/*-------------------------- MODEM CAPS --------------------------------------*/
#define SOC_MODEM_SUPPORT_ETM 1
/*-------------------------- GPIO CAPS ---------------------------------------*/ /*-------------------------- GPIO CAPS ---------------------------------------*/
// ESP32-H4 has 1 GPIO peripheral // ESP32-H4 has 1 GPIO peripheral
#define SOC_GPIO_PORT 1U #define SOC_GPIO_PORT 1U