void vMenuTask(void* pvParameters) {
/* The parameter value is expected to be 1 as 1 is passed in the
pvParameters value in the call to xTaskCreate() below. */
//configASSERT(((uintptr_t)pvParameters) == 1);
for (;;) {
printf("Test\n\n");
vTaskDelay(pdMS_TO_TICKS(100));
}
}void vInitMenuTask(void) {
// Create the task dynamically
BaseType_t xTaskCreated = xTaskCreate(vMenuTask, // Task function
"Menu Task", // Task name
MENU_TASK_STACK_SIZE, // Stack size
(void*)1, // Task parameter
MENU_TASK_PRIORITY, // Priority
&xMenuTaskHandle // Task handle
);
if (xTaskCreated == pdPASS) {
safePrintf("Menu task created successfully.\n");
}
else {
safeFprintf(stderr, "Failed to create menu task. Not enough heap RAM.\n");
}
}
vInitMenuTask();
safePrintf("FreeRTOS initialization complete.\n");
vTaskStartScheduler();
/* vTaskStartScheduler should not return, but if it does, enter an infinite loop: */
for (;;) {
}
}
Hi, I have a strange problem with a MKV59F24F24C. I am running he latest edition of FreeRTOS and trying to create a very simple task. The debugger gets stuck at configASSERT(( pxQueue )); in queue.c. My code is shown above.
Any insights from anyone please?