Unable to use uxTaskGetStackHighWaterMark – Compiler Error

Hi, I’m currently having issue trying to use uxTaskGetStackHighWaterMark to see smallest amount of remaining space after it has ran a task for the first time. I’m using GNU GCC Compiler and I did make some changes to FreeRTOSConfig.h to make it possible to use uxTaskGetStackHighWaterMark. ~~~

define INCLUDE_uxTaskGetStackHighWaterMark 1

~~~ I have the task function defined as follows ~~~

include “FreeRTOS.h”

include “task.h”

UBaseTypet uxHighWaterMark; UBaseTypet uxTaskGetStackHighWaterMark(TaskHandle_t xTask); void bc_tspr(void * pvParameters); void bc_tspr(void * pvParameters) {
uxHighWaterMark = uxTaskGetStackHighWaterMark( NULL );

for(;;){
    // Data Integration Handler
    data_integrator();

    // Data Stacker Handler
    data_stacker();

    // Stacked Data Transmission Sector
    stacked_data_sender();

    vTaskDelay(500);

    uxHighWaterMark = uxTaskGetStackHighWaterMark( NULL );
}
} ~~~ , and I create the task in the file as follows ~~~ extern void bctspr(void * pvParameters); xTaskCreate(bctspr, “BEAM”, 4000, NULL, taskpriolvl_1, NULL); ~~~ However, even if I followed the example that I read in FreeRTOS Manual, it would generate compiler error as follows ~~~ undefined reference to `uxTaskGetStackHighWaterMark’ collect2: ld returned 1 exit status ~~~ It’d be really appreciated if someone could help solve this issue. Thanks in advance.

Unable to use uxTaskGetStackHighWaterMark – Compiler Error

Hi, I rebuilt the project I was working from ground up again, and it still didn’t work with the option uxTaskGetStackHighWaterMark. On the other hand, I was able to achieve similar goal I was trying to make it out with vTaskList.

Unable to use uxTaskGetStackHighWaterMark – Compiler Error

I’ve checked the .c file and setting INCLUDE_uxTaskGetStackHighWaterMark to 1 is all that is required to make the function available.