Creating tasks within tasks

rageshtr wrote on Tuesday, February 14, 2012:

I have taken the lpc2148 demo code provided by J.C.Wren and was modifying it to add one more command processing task to it.This task I am creating before the scheduler starts.Now from this task I need to create another task which is not getting spawned.Is there any limitation in FreeRTOS for doing this?

davedoors wrote on Tuesday, February 14, 2012:

You have probably just run out of FreeRTOS heap. Try increasing configTOTAL_HEAP_SIZE in FreeRTOSConfig.h. If you can’t link your application after increasing the heap you will have to optimize your RAM usage instead by reducing stack sizes, combining tasks, looking for other RAM savings.

rageshtr wrote on Thursday, February 16, 2012:

Thanks for the quick response. I verified that I have not run out of FreeRTOS heap. Meanwhile, when I removed the optimization in the Makefile(it wa O3), the code behaves correctly. Still could not figure out what exactly was going wrong