I know there is uxTaskGetStackHighWaterMark FreeRTOS function which can be used to get the minimum size of unused task stack, but I wonder if there is a ESP-IDF way of achieving this.
Also I would like to know what is the best method for watching the free heap size.
Stack overflow & heap monitoring
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: Stack overflow & heap monitoring
Esp-idf uses FreeRTOS as its RTOS, so you can happily use uxTaskGetStackHighWaterMark. For the free heap size, you can use heap_caps_get_free_size(MALLOC_CAP_DEFAULT|MALLOC_CAP_8BIT). (Or use any other cap if you want to know stuff about the more specialized heap regions.)
Who is online
Users browsing this forum: Baidu [Spider] and 132 guests