leslieyang0509 wrote on Wednesday, October 24, 2018:
Hi FreeRTOS team,
I’m study FreeRTOS via \FreeRTOSv10.0.1\FreeRTOS\Demo\WIN32-MSVC-Static-Allocation-Only project, the IDE is Visual Studio 2017 community.
In order to measure stack usage, configSUPPORT_STATIC_ALLOCATION
is set 1(one) in FreeRTOSConfig.h.
Every tasks is create and run without any problem.
In my understanding, the vTaskGetInfo()
function will get the related task information.
TaskStatus_t TaskStatus;
vTaskGetInfo(pTaskHandle, &TaskStatus, pdTRUE, eRunning);
The TaskStatus.pcTaskName
is correct for every task, but TaskStatus.usStackHighWaterMark
value is always 2.
Even declaration a large local variable in a sub-routines and memset all zero, TaskStatus.usStackHighWaterMark
still 2.
Is it because the FreeRTOS on win32 simulator, the local variables are locate in win32 process virtual memory instead of the xTaskCreateStatic
6th argument?
Is there any configuration setting that I forget?
Leslie Yang