I’m trying to perform a simple FreeRTOS task on milk-v duo
#include "FreeRTOS.h"
#include "task.h"
void app_task(void * param)
{
while(1) {
printf("Hello RiSC-V!\r\n");
vTaskDelay(1000);
}
}
void main_cvirtos(void)
{
printf("create cvi task\n");
/* Start the tasks and timer running. */
xTaskCreate(app_task, "app_task", 1024, NULL, 1, NULL);
vTaskStartScheduler();
/* If all is well, the scheduler will now be running, and the following
line will never be reached. If the following line does execute, then
there was either insufficient FreeRTOS heap memory available for the idle
and/or timer tasks to be created, or vTaskStartScheduler() was called from
User mode. See the memory management section on the FreeRTOS web site for
more details on the FreeRTOS heap http://www.freertos.org/a00111.html. The
mode from which main() is called is set in the C start up code and must be
a privileged mode (not user mode). */
printf("cvi task end\n");
for (;;)
;
}
Extracted UART log shows :
[ 3.016780] res-reg: start: 0x1900000, end: 0x1900fff, virt-addr(ffffffd004228000).
[ 3.025246] cvi_rtos_cmdqu_probe DONE
[ 3.029765] [cvi_spinlock_init] success
[ 3.219010] random: crng init done
[ 3.222543] random: 1 urandom warning(s) missed due to ratelimiting
[ 3.249413] RTOS_CMDQU_SEND_WAIT timeout
[ 3.253536] SYS_CMD_INFO_LINUX_INIT_DONE fail
[ 3.258579] communicate with rtos fail