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”
UBaseType
t 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 bc
tspr(void * pvParameters);
xTaskCreate(bctspr, “BEAM”, 4000, NULL, task
priolvl_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.