Context Management Error

Hello,
I am trying to run a basic example of creating two tasks (with hello world) on Aurix TC399 controller.

During this process, FreeRTOS is going into a CPU Trap - . Please find the below screenshot.

Could you please help me to solve the issue? Do you have any leads where I need to look closer to solve it?

Thanks in advance!

My code is as follows:

void **vTask1**( void *pvParameters )
{

        //Commenting above code and trying with UART communication as printf gives error on AURIX Development Studio
        send_UART_message1();
        const TickType_t xDelay1000ms = pdMS_TO_TICKS(1000);
        char breakpoint;

}


void **vTask2**( void *pvParameters )
{

    send_UART_message2();
    const TickType_t xDelay1000ms = pdMS_TO_TICKS(1000);
    char breakpoint;

}

void core0_main(void)
{
ret0 = xTaskCreate( vTask1, "Task 1", 1000, NULL, 1, NULL );   
ret1 = xTaskCreate( vTask2, "Task 2", 1000, NULL, 1, NULL );

    printf("Starting the scheduler  now!");
    vTaskStartScheduler();

    printf("Scheduler exited - It should never reach here\n");

    while (1)
    {
        Ifx_print("never here!\r\n");
    }
}

Welcome to the FreeRTOS forums! Thank you for your post.

From a cursory look it looks like your task functionality are not in an infinite loop? Task code need to be inside infinite loops: Writing RTOS tasks in FreeRTOS - implementing tasks as forever loops

Could you see if you wrap your code in infinite loops would your application still go into a trapped state? Additionally you would need to call vTaskDelay(xDelay1000ms) to actually delay the task.

Not an answer to your question (which I think has been answered already) - but where did you get the Aurix port from?

Hello,

There is an example in Aurix Development Studio for FreeRTOS - TC275!