Hi,
The official documentation for the uxTaskGetStackHighWaterMark2()
functions says (for kernel V10.4.3)":
“INCLUDE_uxTaskGetStackHighWaterMark must be defined as 1 for these functions to be available. See the RTOS Configuration documentation for more information.”
However that isn’t true anymore (I guess that was true some time ago). In the kernel file task.h you can read:
/** (Line 1514)
* task.h
* <PRE>configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask );</PRE>
*
* INCLUDE_uxTaskGetStackHighWaterMark2 must be set to 1 in FreeRTOSConfig.h for
* this function to be available.
*
* Returns the high water mark of the stack associated with xTask. That is, ...
I was getting some undefined references from my compiler when in my FreeRTOSConfig.h file I had:
#define INCLUDE_uxTaskGetStackHighWaterMark 1
And now my project compiles as it should when I have:
#define INCLUDE_uxTaskGetStackHighWaterMark2 1
#define configSTACK_DEPTH_TYPE uint16_t
(I’m using an 8 bit microcontroller, so I needed to set the configSTACK_DEPTH_TYPE
constant.)
Greetings!