esp_common: move freertos hooks

This commit is contained in:
Renz Bagaporo
2021-01-26 11:41:19 +08:00
parent 840e2c0e50
commit 0e0914476c
5 changed files with 8 additions and 8 deletions

View File

@@ -10,8 +10,7 @@ if(BOOTLOADER_BUILD)
else() else()
# Regular app build # Regular app build
list(APPEND srcs "src/esp_err.c" list(APPEND srcs "src/esp_err.c"
"src/esp_err_to_name.c" "src/esp_err_to_name.c")
"src/freertos_hooks.c")
# Note: esp_ipc, esp_pm added as a public requirement to keep compatibility as to be located here. # Note: esp_ipc, esp_pm added as a public requirement to keep compatibility as to be located here.
idf_component_register(SRCS "${srcs}" idf_component_register(SRCS "${srcs}"

View File

@@ -7,11 +7,6 @@ entries:
if PM_SLP_IRAM_OPT = y && IDF_TARGET_ESP32 = n: if PM_SLP_IRAM_OPT = y && IDF_TARGET_ESP32 = n:
pm_impl:periph_inform_out_light_sleep_overhead (noflash) pm_impl:periph_inform_out_light_sleep_overhead (noflash)
[mapping:esp_common_pm]
archive: libesp_common.a
entries:
if PM_RTOS_IDLE_OPT = y:
freertos_hooks:esp_vApplicationIdleHook (noflash)
[mapping:esp_hw_support_pm] [mapping:esp_hw_support_pm]
archive: libesp_hw_support.a archive: libesp_hw_support.a
entries: entries:
@@ -21,6 +16,8 @@ entries:
[mapping:esp_system_pm] [mapping:esp_system_pm]
archive: libesp_system.a archive: libesp_system.a
entries: entries:
if PM_RTOS_IDLE_OPT = y:
freertos_hooks:esp_vApplicationIdleHook (noflash)
if PM_SLP_IRAM_OPT = y: if PM_SLP_IRAM_OPT = y:
sleep_modes:esp_light_sleep_start (noflash) sleep_modes:esp_light_sleep_start (noflash)
sleep_modes:esp_sleep_enable_timer_wakeup (noflash) sleep_modes:esp_sleep_enable_timer_wakeup (noflash)

View File

@@ -15,7 +15,8 @@ set(srcs "intr_alloc.c"
"sleep_modes.c" "sleep_modes.c"
"task_wdt.c" "task_wdt.c"
"int_wdt.c" "int_wdt.c"
"stack_check.c") "stack_check.c"
"freertos_hooks.c")
if(NOT (${target} STREQUAL "esp32c3") ) if(NOT (${target} STREQUAL "esp32c3") )
list(APPEND srcs "dbg_stubs.c") list(APPEND srcs "dbg_stubs.c")

View File

@@ -16,6 +16,9 @@
#define __ESP_FREERTOS_HOOKS_H__ #define __ESP_FREERTOS_HOOKS_H__
#include <stdbool.h> #include <stdbool.h>
#include "freertos/portmacro.h"
#include "esp_err.h" #include "esp_err.h"
#ifdef __cplusplus #ifdef __cplusplus