this is my template.
const TASK_TEMPLATE_STRUCT MQX_template_list[] =
{
/* Task Index, Function, Stack, Priority, Name, Attributes, Param, Time Slice */
{TELNET_TASK_ID, uTelnet_task, 1500, 10, "nc500_Telnet" , 0, 0, 0 },
{HTTP_TASK_ID, uhttp_task, 1750, 7, "http" , 0, 0, 0 },
{ARCNET_TASK_ID, uArcnet_task, 512, 9, "Arcnet" , 0, 0, 0 },
{SOCKET_TASK_ID, uSocket_task, 1000, 7, "Socket" , 0, 0, 0 },
{LIF_TASK_ID, uLif_task, 700, 10, "Lif" , 0, 0, 0 },
{FLASH_UP_TASK_ID, uFlash_Up_task, 1000, 10, "Flash_up" , MQX_AUTO_START_TASK, 0, 0 },
{VNC_TASK_ID, uVNC_task, 4500, 10, "VNC", 0, 0, 10 },
{A2D_TASK_ID, uA2D_task, 660, 10, "A2D", 0, 0, 10 },
{0, 0, 0, 0, 0, 0, 0, 0 }
};
Don't forget to leave a NULL record at the end.
I only use one MQX_AUTO_START_TASK. This task creates the VNC task once it is satisfied it doesn't have to upgrade.
_task_create(0, VNC_TASK_ID, 0);
VNC task starts up the other tasks as required.