I have two tasks and want to run them together. A tasks need 768 stack size in xTaskCreate function, another need 1280 stack size in xTaskCreate function. but i found that i can’t create and run them together . is it FreeRTOS heaplimitation ?
i define #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32 * 1024 ) ) . but it still can’t work
xTaskCreate(ssh_task, “SSH”, configMINIMAL_STACK_SIZE*6, NULL, SSHSERVER_THREAD_PRIO,NULL);
xTaskCreate(ssl_server,“HTTPS”, configMINIMAL_STACK_SIZE*10, NULL, HTTPSERVER_THREAD_PRIO, NULL)
the calls to xTaskCreate in main () return following value,
ssh ret: 536871004
https: ret: 1
obviously, https is created successfully, ssh is created fail, I also can see https running with vTaskLIst
vTaskStartScheduler() work weill .
where do i found the malloc failed hook defined
When a task is deleted it will appear in the list with a ‘D’ next to it until the idle task has cleaned up the resources allocated to that task. Normally that will happen very quickly. It would therefore appear that something has called vTaskDelete() for the SSH task (maybe the task itself, or maybe a different task) and the idle task has not been able to run to clean it up.
Where is vTaskDelete() being called and why?
Are you starving the idle task of execution time (that will happen if there are one or more higher priority tasks that never block)?