Stack usage win32 simulator VS2017

Hi FreeRTOS team, I’m study FreeRTOS via FreeRTOSv10.0.1FreeRTOSDemoWIN32-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. c 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

Stack usage win32 simulator VS2017

The Windows port does not use the stack in the same way the other ports do so the stack checking functions will not work. As I recall there is only one item ever stored on the stack created when the task is created, hence the value you get will be the same for every task.

Stack usage win32 simulator VS2017

Hi Richard, Thanks for your reply. Leslie