mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 20:54:32 +02:00
change: fix build clang test apps job error
This commit is contained in:
@@ -26,6 +26,12 @@
|
|||||||
|
|
||||||
#define MHZ (1000000)
|
#define MHZ (1000000)
|
||||||
|
|
||||||
|
#if CONFIG_PM_SLP_IRAM_OPT
|
||||||
|
# define ESP_CLK_FN_ATTR IRAM_ATTR
|
||||||
|
#else
|
||||||
|
# define ESP_CLK_FN_ATTR
|
||||||
|
#endif
|
||||||
|
|
||||||
// g_ticks_us defined in ROMs for PRO and APP CPU
|
// g_ticks_us defined in ROMs for PRO and APP CPU
|
||||||
extern uint32_t g_ticks_per_us_pro;
|
extern uint32_t g_ticks_per_us_pro;
|
||||||
|
|
||||||
@@ -48,7 +54,7 @@ _Static_assert(offsetof(retain_mem_t, checksum) == sizeof(retain_mem_t) - sizeof
|
|||||||
#if !NON_OS_BUILD
|
#if !NON_OS_BUILD
|
||||||
static __attribute__((section(".rtc_timer_data_in_rtc_mem"))) retain_mem_t s_rtc_timer_retain_mem;
|
static __attribute__((section(".rtc_timer_data_in_rtc_mem"))) retain_mem_t s_rtc_timer_retain_mem;
|
||||||
|
|
||||||
static uint32_t calc_checksum(void)
|
static ESP_CLK_FN_ATTR uint32_t calc_checksum(void)
|
||||||
{
|
{
|
||||||
uint32_t checksum = 0;
|
uint32_t checksum = 0;
|
||||||
uint32_t *data = (uint32_t*) &s_rtc_timer_retain_mem;
|
uint32_t *data = (uint32_t*) &s_rtc_timer_retain_mem;
|
||||||
|
@@ -33,6 +33,12 @@ static const char *TAG_TSENS = "temperature_sensor";
|
|||||||
#define TSENS_RCC_ATOMIC()
|
#define TSENS_RCC_ATOMIC()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_PM_SLP_IRAM_OPT
|
||||||
|
# define SAR_PERIPH_CTRL_COMMON_FN_ATTR IRAM_ATTR
|
||||||
|
#else
|
||||||
|
# define SAR_PERIPH_CTRL_COMMON_FN_ATTR
|
||||||
|
#endif
|
||||||
|
|
||||||
static int s_record_min = INT_NOT_USED;
|
static int s_record_min = INT_NOT_USED;
|
||||||
static int s_record_max = INT_NOT_USED;
|
static int s_record_max = INT_NOT_USED;
|
||||||
static int s_temperature_sensor_power_cnt;
|
static int s_temperature_sensor_power_cnt;
|
||||||
@@ -79,7 +85,7 @@ void temperature_sensor_power_release(void)
|
|||||||
portEXIT_CRITICAL(&rtc_spinlock);
|
portEXIT_CRITICAL(&rtc_spinlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int temperature_sensor_get_raw_value(void)
|
static SAR_PERIPH_CTRL_COMMON_FN_ATTR int temperature_sensor_get_raw_value(void)
|
||||||
{
|
{
|
||||||
int raw_value = temperature_sensor_ll_get_raw_value();
|
int raw_value = temperature_sensor_ll_get_raw_value();
|
||||||
return (TEMPERATURE_SENSOR_LL_ADC_FACTOR * raw_value - TEMPERATURE_SENSOR_LL_DAC_FACTOR * temperature_sensor_attributes[s_tsens_idx].offset - TEMPERATURE_SENSOR_LL_OFFSET_FACTOR);
|
return (TEMPERATURE_SENSOR_LL_ADC_FACTOR * raw_value - TEMPERATURE_SENSOR_LL_DAC_FACTOR * temperature_sensor_attributes[s_tsens_idx].offset - TEMPERATURE_SENSOR_LL_OFFSET_FACTOR);
|
||||||
|
@@ -39,8 +39,6 @@ entries:
|
|||||||
esp_clk:esp_rtc_get_time_us (noflash)
|
esp_clk:esp_rtc_get_time_us (noflash)
|
||||||
esp_clk:esp_clk_private_lock (noflash)
|
esp_clk:esp_clk_private_lock (noflash)
|
||||||
esp_clk:esp_clk_private_unlock (noflash)
|
esp_clk:esp_clk_private_unlock (noflash)
|
||||||
if SOC_RTC_MEM_SUPPORTED = y:
|
|
||||||
esp_clk:calc_checksum (noflash)
|
|
||||||
if SOC_SYSTIMER_SUPPORTED = y:
|
if SOC_SYSTIMER_SUPPORTED = y:
|
||||||
systimer (noflash)
|
systimer (noflash)
|
||||||
if IDF_TARGET_ESP32H21 != y && IDF_TARGET_ESP32H4 != y:
|
if IDF_TARGET_ESP32H21 != y && IDF_TARGET_ESP32H4 != y:
|
||||||
@@ -48,7 +46,6 @@ entries:
|
|||||||
if SOC_TEMP_SENSOR_SUPPORTED = y:
|
if SOC_TEMP_SENSOR_SUPPORTED = y:
|
||||||
sar_periph_ctrl_common:temperature_sensor_power_acquire (noflash)
|
sar_periph_ctrl_common:temperature_sensor_power_acquire (noflash)
|
||||||
sar_periph_ctrl_common:temperature_sensor_power_release (noflash)
|
sar_periph_ctrl_common:temperature_sensor_power_release (noflash)
|
||||||
sar_periph_ctrl_common:temperature_sensor_get_raw_value (noflash)
|
|
||||||
sar_periph_ctrl_common:temp_sensor_get_raw_value (noflash)
|
sar_periph_ctrl_common:temp_sensor_get_raw_value (noflash)
|
||||||
regi2c_ctrl:regi2c_saradc_enable (noflash)
|
regi2c_ctrl:regi2c_saradc_enable (noflash)
|
||||||
regi2c_ctrl:regi2c_saradc_disable (noflash)
|
regi2c_ctrl:regi2c_saradc_disable (noflash)
|
||||||
@@ -61,17 +58,6 @@ archive: libesp_system.a
|
|||||||
entries:
|
entries:
|
||||||
if PM_RTOS_IDLE_OPT = y:
|
if PM_RTOS_IDLE_OPT = y:
|
||||||
freertos_hooks:esp_vApplicationIdleHook (noflash)
|
freertos_hooks:esp_vApplicationIdleHook (noflash)
|
||||||
if PM_SLP_IRAM_OPT = y:
|
|
||||||
task_wdt:idle_hook_cb (noflash)
|
|
||||||
task_wdt:task_wdt_timer_feed (noflash)
|
|
||||||
task_wdt:find_entry_and_check_all_reset (noflash)
|
|
||||||
task_wdt:find_entry_from_task_handle_and_check_all_reset (noflash)
|
|
||||||
task_wdt:esp_task_wdt_reset (noflash)
|
|
||||||
task_wdt:esp_task_wdt_reset_user (noflash)
|
|
||||||
if ESP_TASK_WDT_USE_ESP_TIMER = y:
|
|
||||||
task_wdt_impl_esp_timer:esp_task_wdt_impl_timer_feed (noflash)
|
|
||||||
else:
|
|
||||||
task_wdt_impl_timergroup:esp_task_wdt_impl_timer_feed (noflash)
|
|
||||||
|
|
||||||
[mapping:esp_timer_pm]
|
[mapping:esp_timer_pm]
|
||||||
archive: libesp_timer.a
|
archive: libesp_timer.a
|
||||||
|
@@ -36,6 +36,12 @@
|
|||||||
#define BACKTRACE_MSG "backtrace"
|
#define BACKTRACE_MSG "backtrace"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_PM_RTOS_IDLE_OPT
|
||||||
|
# define TASK_WDT_FN_ATTR IRAM_ATTR
|
||||||
|
#else
|
||||||
|
# define TASK_WDT_FN_ATTR
|
||||||
|
#endif
|
||||||
|
|
||||||
/* We will use this function in order to simulate an `abort()` occurring in
|
/* We will use this function in order to simulate an `abort()` occurring in
|
||||||
* a different context than the one it's called from. */
|
* a different context than the one it's called from. */
|
||||||
extern void xt_unhandled_exception(void *frame);
|
extern void xt_unhandled_exception(void *frame);
|
||||||
@@ -96,7 +102,7 @@ static char core_user_names[CONFIG_FREERTOS_NUMBER_OF_CORES][CORE_USER_NAME_LEN]
|
|||||||
* @brief Reset the timer and reset flags of each entry
|
* @brief Reset the timer and reset flags of each entry
|
||||||
* When entering this function, the spinlock has already been taken, no need to take it back.
|
* When entering this function, the spinlock has already been taken, no need to take it back.
|
||||||
*/
|
*/
|
||||||
static void task_wdt_timer_feed(void)
|
static TASK_WDT_FN_ATTR void task_wdt_timer_feed(void)
|
||||||
{
|
{
|
||||||
esp_task_wdt_impl_timer_feed(p_twdt_obj->impl_ctx);
|
esp_task_wdt_impl_timer_feed(p_twdt_obj->impl_ctx);
|
||||||
|
|
||||||
@@ -114,7 +120,7 @@ static void task_wdt_timer_feed(void)
|
|||||||
* @param[out] all_reset Whether all entries have been reset
|
* @param[out] all_reset Whether all entries have been reset
|
||||||
* @return Whether the user entry exists
|
* @return Whether the user entry exists
|
||||||
*/
|
*/
|
||||||
static bool find_entry_and_check_all_reset(twdt_entry_t *user_entry, bool *all_reset)
|
static TASK_WDT_FN_ATTR bool find_entry_and_check_all_reset(twdt_entry_t *user_entry, bool *all_reset)
|
||||||
{
|
{
|
||||||
bool found_user_entry = false;
|
bool found_user_entry = false;
|
||||||
bool found_non_reset = false;
|
bool found_non_reset = false;
|
||||||
@@ -139,7 +145,7 @@ static bool find_entry_and_check_all_reset(twdt_entry_t *user_entry, bool *all_r
|
|||||||
* @param[out] all_reset Whether all entries have been reset
|
* @param[out] all_reset Whether all entries have been reset
|
||||||
* @return Task entry, or NULL if not found
|
* @return Task entry, or NULL if not found
|
||||||
*/
|
*/
|
||||||
static twdt_entry_t *find_entry_from_task_handle_and_check_all_reset(TaskHandle_t handle, bool *all_reset)
|
static TASK_WDT_FN_ATTR twdt_entry_t *find_entry_from_task_handle_and_check_all_reset(TaskHandle_t handle, bool *all_reset)
|
||||||
{
|
{
|
||||||
twdt_entry_t *target = NULL;
|
twdt_entry_t *target = NULL;
|
||||||
bool found_non_reset = false;
|
bool found_non_reset = false;
|
||||||
@@ -448,7 +454,7 @@ static void task_wdt_timeout_handling(int cores_fail, bool panic)
|
|||||||
*
|
*
|
||||||
* @return Whether the idle tasks should continue idling
|
* @return Whether the idle tasks should continue idling
|
||||||
*/
|
*/
|
||||||
static bool idle_hook_cb(void)
|
static TASK_WDT_FN_ATTR bool idle_hook_cb(void)
|
||||||
{
|
{
|
||||||
#if CONFIG_FREERTOS_SMP
|
#if CONFIG_FREERTOS_SMP
|
||||||
esp_task_wdt_reset_user(core_user_handles[xPortGetCoreID()]);
|
esp_task_wdt_reset_user(core_user_handles[xPortGetCoreID()]);
|
||||||
@@ -687,7 +693,7 @@ esp_err_t esp_task_wdt_add_user(const char *user_name, esp_task_wdt_user_handle_
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_task_wdt_reset(void)
|
esp_err_t TASK_WDT_FN_ATTR esp_task_wdt_reset(void)
|
||||||
{
|
{
|
||||||
ESP_RETURN_ON_FALSE(p_twdt_obj != NULL, ESP_ERR_INVALID_STATE, TAG, "TWDT was never initialized");
|
ESP_RETURN_ON_FALSE(p_twdt_obj != NULL, ESP_ERR_INVALID_STATE, TAG, "TWDT was never initialized");
|
||||||
esp_err_t ret;
|
esp_err_t ret;
|
||||||
@@ -711,7 +717,7 @@ err:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_task_wdt_reset_user(esp_task_wdt_user_handle_t user_handle)
|
esp_err_t TASK_WDT_FN_ATTR esp_task_wdt_reset_user(esp_task_wdt_user_handle_t user_handle)
|
||||||
{
|
{
|
||||||
ESP_RETURN_ON_FALSE(user_handle != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid arguments");
|
ESP_RETURN_ON_FALSE(user_handle != NULL, ESP_ERR_INVALID_ARG, TAG, "Invalid arguments");
|
||||||
ESP_RETURN_ON_FALSE(p_twdt_obj != NULL, ESP_ERR_INVALID_STATE, TAG, "TWDT was never initialized");
|
ESP_RETURN_ON_FALSE(p_twdt_obj != NULL, ESP_ERR_INVALID_STATE, TAG, "TWDT was never initialized");
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -17,6 +17,12 @@
|
|||||||
#include "esp_timer.h"
|
#include "esp_timer.h"
|
||||||
#include "esp_private/esp_task_wdt_impl.h"
|
#include "esp_private/esp_task_wdt_impl.h"
|
||||||
|
|
||||||
|
#if CONFIG_PM_SLP_IRAM_OPT
|
||||||
|
# define TASK_WDT_FN_ATTR IRAM_ATTR
|
||||||
|
#else
|
||||||
|
# define TASK_WDT_FN_ATTR
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context for the software implementation of the Task WatchDog Timer.
|
* Context for the software implementation of the Task WatchDog Timer.
|
||||||
* This will be passed as a parameter to public functions below. */
|
* This will be passed as a parameter to public functions below. */
|
||||||
@@ -50,7 +56,7 @@ esp_err_t esp_task_wdt_impl_timer_allocate(const esp_task_wdt_config_t *config,
|
|||||||
esp_err_t ret = esp_timer_create(&timer_args, &ctx->sw_timer);
|
esp_err_t ret = esp_timer_create(&timer_args, &ctx->sw_timer);
|
||||||
ESP_GOTO_ON_FALSE((ret == ESP_OK), ret, reterr, TAG, "could not start periodic timer");
|
ESP_GOTO_ON_FALSE((ret == ESP_OK), ret, reterr, TAG, "could not start periodic timer");
|
||||||
|
|
||||||
/* Configure it as a periodic timer, so that we check the Tasks everytime it is triggered.
|
/* Configure it as a periodic timer, so that we check the Tasks every time it is triggered.
|
||||||
* No need to start the timer here, it will be started later with `esp_task_wdt_impl_timer_restart` */
|
* No need to start the timer here, it will be started later with `esp_task_wdt_impl_timer_restart` */
|
||||||
ctx->period_ms = config->timeout_ms;
|
ctx->period_ms = config->timeout_ms;
|
||||||
|
|
||||||
@@ -89,7 +95,7 @@ void esp_task_wdt_impl_timer_free(twdt_ctx_t obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_task_wdt_impl_timer_feed(twdt_ctx_t obj)
|
esp_err_t TASK_WDT_FN_ATTR esp_task_wdt_impl_timer_feed(twdt_ctx_t obj)
|
||||||
{
|
{
|
||||||
esp_err_t ret = ESP_OK;
|
esp_err_t ret = ESP_OK;
|
||||||
const twdt_ctx_soft_t* ctx = (twdt_ctx_soft_t*) obj;
|
const twdt_ctx_soft_t* ctx = (twdt_ctx_soft_t*) obj;
|
||||||
|
@@ -32,6 +32,12 @@
|
|||||||
#define TWDT_TIMER_GROUP 0
|
#define TWDT_TIMER_GROUP 0
|
||||||
#define TWDT_INTR_SOURCE SYS_TG0_WDT_INTR_SOURCE
|
#define TWDT_INTR_SOURCE SYS_TG0_WDT_INTR_SOURCE
|
||||||
|
|
||||||
|
#if CONFIG_PM_SLP_IRAM_OPT
|
||||||
|
# define TASK_WDT_FN_ATTR IRAM_ATTR
|
||||||
|
#else
|
||||||
|
# define TASK_WDT_FN_ATTR
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Context for the software implementation of the Task WatchDog Timer.
|
* Context for the software implementation of the Task WatchDog Timer.
|
||||||
* This will be passed as a parameter to public functions below. */
|
* This will be passed as a parameter to public functions below. */
|
||||||
@@ -177,7 +183,7 @@ void esp_task_wdt_impl_timer_free(twdt_ctx_t obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_task_wdt_impl_timer_feed(twdt_ctx_t obj)
|
esp_err_t TASK_WDT_FN_ATTR esp_task_wdt_impl_timer_feed(twdt_ctx_t obj)
|
||||||
{
|
{
|
||||||
esp_err_t ret = ESP_OK;
|
esp_err_t ret = ESP_OK;
|
||||||
twdt_ctx_hard_t* ctx = (twdt_ctx_hard_t*) obj;
|
twdt_ctx_hard_t* ctx = (twdt_ctx_hard_t*) obj;
|
||||||
|
Reference in New Issue
Block a user