Enabling configGENERATE_RUN_TIME_STATS on FreeRTOS MicroBlaze breaks the OS tick timer

Hello!

I am running into a problem trying to analyze task preemption in a FreeRTOS application running on MicroBlaze.

I am using Vitis 2020.2 with FreeRTOS 1.7 and freertos_hello_world.c sample app.

When I have “generate_runtime_stats” set to 0 (sets configGENERATE_RUN_TIME_STATS to 0) in the BSP OS configuration the app runs fine. However, when I do enable it (configGENERATE_RUN_TIME_STATS 1) the OS tick / timer interrupt stops working. The main symptom is that tasks block forever in vTaskDelay().

I placed a breakpoint in vPortTickISR() and it never gets hit indicating that the timer interrupt is disabled, or all interrupts are disabled.

I verified that the timer interrupt handler is installed via Xilinx API.

Has anyone here seen this or similar issue?

Is the clock used for the run time stats the same as that used to generate the RTOS tick? If so, initialising the run-time stats might undo any configuration already done to generate the tick (just guessing).

Did you enable/define configASSERT and is it hit ?
Maybe there is an issue occurring while starting the scheduler and the SysTick isn’t started. You might also try to step into the vTaskStartScheduler code with a debugger given that everything is fine (including task stack sizes) until starting the scheduler.