I’m trying to run the freeRTOS Hello World example on a Spartan 7 (Digilent CMOD S7) MicroBlaze core. The app seems to runs until it it to get to vTaskStartScheduler. After that, the app seems to be off in the weeds. No task switching or anything.
Looking closer at the configuration file generated by Vitis, the setting for freertos_timer_select is psu_ttc_0. It should be axi_timer_0, right? If so, how do I go about changing that?
Hi @motron93,
Do you create any task before calling vTaskStartScheduler? From vTaskStartScheduler - FreeRTOS™, vTaskStartScheduler() is an endless function if working correctly.
Thank you.
vTaskStartScheduler() will only return if there is insufficient RTOS heap available to create the idle or timer daemon tasks.
Yes. The code is the Vitis generated freertos hello world.c app. Here is the snippet of the two task created before vTaskStartScheduler():
xTaskCreate( prvTxTask, /* The function that implements the task. */
( const char * ) "Tx", /* Text name for the task, provided to assist debugging only. */
configMINIMAL_STACK_SIZE, /* The stack allocated to the task. */
NULL, /* The task parameter is not used, so set to NULL. */
tskIDLE_PRIORITY, /* The task runs at the idle priority. */
&xTxTask );
xil_printf( "Task 1 Created\r\n" );
xTaskCreate( prvRxTask,
( const char * ) "GB",
configMINIMAL_STACK_SIZE,
NULL,
tskIDLE_PRIORITY + 1,
&xRxTask );
xil_printf( "Task 2 Created\r\n" );
I think the problem is wrong timer is being selected for the scheduler timer tick. But any help will be appreciated.