TaskCreate is not working in my project

Hi, I created two task as below , but only MainTask1 been invoking , do I missing something ?
xReturn = xTaskCreate( MainTask1,
             "MainTask1", 
             configMINIMAL_STACK_SIZE, 
             ( void * ) NULL, 
             1, 
             &xHandle1 );

xReturn = xTaskCreate( MainTask2,
             "MainTask2", 
             configMINIMAL_STACK_SIZE, 
             ( void * ) NULL, 
             1, 
             &xHandle2 );
vTaskStartScheduler();

TaskCreate is not working in my project

What is the value of xReturn after the second call to xTaskCreate()? Maybe you just ran out of heap. Do you have a malloc failed hook defined?

TaskCreate is not working in my project

A second possiblility would be does MainTask1 ever block to leave time for MainTask2 to execute?

TaskCreate is not working in my project

thanks Richard, you second idea is the case. I change as below , I can see two tasks get executed. However , I expected they get executed in turn but they are only get executed once. and system stuck at “prvCheckTasksWaitingTermination” function. any idea ? void MainTask1( void *pvParameters ) { TickType_t xNextWakeTime;
xNextWakeTime = xTaskGetTickCount();

for( ;; ){

    TRACE0(182, RTOS, 0, "Task1 loop");
    vTaskDelayUntil( &xNextWakeTime,  200 / portTICK_PERIOD_MS );
}
} void MainTask2( void *pvParameters ) { TickType_t xNextWakeTime;
xNextWakeTime = xTaskGetTickCount();

for( ;; ){

    TRACE0(182, RTOS, 0, "Task2 loop");
    vTaskDelayUntil( &xNextWakeTime,  200 / portTICK_PERIOD_MS );
}
}

TaskCreate is not working in my project

Make sure the tick interrupt is running. That function is called in the idle task, which runs when no other task is ready. The Idle task checks to see if it needs to do any cleanup, does it then checks again, (and so on).