Skip to content

Commit 08a2035

Browse files
committed
feat(freertos): Make trace facility configurable
This commit makes configUSE_TRACE_FACILITY and configUSE_STATS_FORMATTING_FUNCTIONS configurable in kconfig. Closes #495
1 parent 4372b84 commit 08a2035

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

components/freertos/Kconfig

+17
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,21 @@ config ENABLE_FREERTOS_SLEEP
7676

7777
The module is not working now, so if users want to make it work, they should do this themselves.
7878

79+
config FREERTOS_USE_TRACE_FACILITY
80+
bool "Enable FreeRTOS trace facility"
81+
default n
82+
help
83+
If enabled, configUSE_TRACE_FACILITY will be defined as 1 in FreeRTOS.
84+
This will allow the usage of trace facility functions such as
85+
uxTaskGetSystemState().
86+
87+
config FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
88+
bool "Enable FreeRTOS stats formatting functions"
89+
depends on FREERTOS_USE_TRACE_FACILITY
90+
default n
91+
help
92+
If enabled, configUSE_STATS_FORMATTING_FUNCTIONS will be defined as 1 in
93+
FreeRTOS. This will allow the usage of stats formatting functions such
94+
as vTaskList().
95+
7996
endmenu

components/freertos/port/esp8266/include/freertos/FreeRTOSConfig.h

+9-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 768 )
6060
//#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 17 * 1024 ) )
6161
#define configMAX_TASK_NAME_LEN ( 16 )
62-
#define configUSE_TRACE_FACILITY 0
63-
#define configUSE_STATS_FORMATTING_FUNCTIONS 0
62+
6463
#define configUSE_16_BIT_TICKS 0
6564
#define configIDLE_SHOULD_YIELD 1
6665

@@ -137,5 +136,13 @@ NVIC value of 255. */
137136
#define configUSE_QUEUE_SETS 1
138137
#endif
139138

139+
#ifdef CONFIG_FREERTOS_USE_TRACE_FACILITY
140+
#define configUSE_TRACE_FACILITY 1 /* Used by uxTaskGetSystemState(), and other trace facility functions */
141+
#endif
142+
143+
#ifdef CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS
144+
#define configUSE_STATS_FORMATTING_FUNCTIONS 1 /* Used by vTaskList() */
145+
#endif
146+
140147
#endif /* FREERTOS_CONFIG_H */
141148

0 commit comments

Comments
 (0)