freertos: Increase minimum task stack size when stack smashing checker is enabled

Fixes issue with DPORT init task, this task uses minimum stack size and may not be
enough if stack smashing detection is set to Overall mode.

Also reworks the way we calculate minimum stack to allow for adding multiple
contributing factors.

Closes https://github.com/espressif/esp-idf/issues/6403
This commit is contained in:
Angus Gratton
2021-02-12 11:13:47 +11:00
committed by bot
parent c724236623
commit f5c6595cb4
3 changed files with 60 additions and 14 deletions

View File

@@ -163,6 +163,9 @@ static void dport_access_init_core(void *arg)
dport_access_end[core_id] = 0;
dport_core_state[core_id] = DPORT_CORE_STATE_RUNNING;
/* If this fails then the minimum stack size for this config is too close to running out */
assert(uxTaskGetStackHighWaterMark(NULL) > 128);
vTaskDelete(NULL);
}
#endif