This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Can I dynamically create a task from within another task?

Here is the code I'm trying to run (called from another task, declared statically using the GUI tool).

void StartSplash()
{
	Error_Block eb;
	Error_init(&eb);

	Task_Params tp;
	Task_Params_init(&tp);
	tp.priority = 3;
	tp.stackSize = 512;
	tp.instance->name = "task_splash";

	th = Task_create((Task_FuncPtr)SplashTask_fxn, &tp, 0);
	if (th == 0)
		System_abort("Task create failed.");
}

It never returns from Task_create.

I've run the ROV tool and it seems there is still plenty of heap.