mirror of
https://github.com/espressif/esp-idf.git
synced 2025-12-03 15:49:51 +01:00
freertos: add kconfig options for task snapshot functions
Task snapshots is required by other modules that don't use gdbstub or core dump. Add a Kconfig option to manage these possibilities.
This commit is contained in:
@@ -4,6 +4,7 @@ menu "GDB Stub"
|
||||
# menu in the target component.
|
||||
config ESP_GDBSTUB_ENABLED
|
||||
bool
|
||||
select FREERTOS_ENABLE_TASK_SNAPSHOT
|
||||
|
||||
config ESP_GDBSTUB_SUPPORT_TASKS
|
||||
bool "Enable listing FreeRTOS tasks through GDB Stub"
|
||||
|
||||
@@ -15,9 +15,11 @@ menu "Core dump"
|
||||
config ESP_COREDUMP_ENABLE_TO_FLASH
|
||||
bool "Flash"
|
||||
depends on !SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
|
||||
select FREERTOS_ENABLE_TASK_SNAPSHOT
|
||||
select ESP_COREDUMP_ENABLE
|
||||
config ESP_COREDUMP_ENABLE_TO_UART
|
||||
bool "UART"
|
||||
select FREERTOS_ENABLE_TASK_SNAPSHOT
|
||||
select ESP_COREDUMP_ENABLE
|
||||
config ESP_COREDUMP_ENABLE_TO_NONE
|
||||
bool "None"
|
||||
|
||||
@@ -465,4 +465,18 @@ menu "FreeRTOS"
|
||||
When enabled, the usage of float type is allowed inside Level 1
|
||||
ISRs.
|
||||
|
||||
config FREERTOS_ENABLE_TASK_SNAPSHOT
|
||||
bool "Enable task snapshot functions"
|
||||
default y
|
||||
help
|
||||
When enabled, the functions related to snapshots, such as vTaskGetSnapshot or uxTaskGetSnapshotAll,
|
||||
are compiled and linked.
|
||||
|
||||
config FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH
|
||||
bool "Place task snapshot functions into flash"
|
||||
default n
|
||||
depends on FREERTOS_ENABLE_TASK_SNAPSHOT && !ESP_PANIC_HANDLER_IRAM
|
||||
help
|
||||
When enabled, the functions related to snapshots, such as vTaskGetSnapshot or uxTaskGetSnapshotAll,
|
||||
will be placed in flash. Note that if enabled, these functions cannot be called when cache is disabled.
|
||||
endmenu
|
||||
|
||||
@@ -277,7 +277,7 @@ extern void vPortCleanUpTCB ( void *pxTCB );
|
||||
#endif //configUSE_TICKLESS_IDLE
|
||||
|
||||
|
||||
#if CONFIG_ESP_COREDUMP_ENABLE || CONFIG_ESP_GDBSTUB_SUPPORT_TASKS
|
||||
#if CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT
|
||||
#define configENABLE_TASK_SNAPSHOT 1
|
||||
#endif
|
||||
#ifndef configENABLE_TASK_SNAPSHOT
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
archive: libfreertos.a
|
||||
entries:
|
||||
* (noflash_text)
|
||||
if ESP_PANIC_HANDLER_IRAM != y:
|
||||
if FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH = y:
|
||||
task_snapshot (default)
|
||||
if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
|
||||
port: pxPortInitialiseStack (default)
|
||||
|
||||
Reference in New Issue
Block a user