FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2016 Threads]
Hello,
i'm new to FreeRTOS and just want to set up a test project with Windows Port.
So i've started the demo project therefor and it works fine.
For my project i didn't changed anything in the demo except of starting with the function main_blinky(), i start with the function usrAppInit(), which looks like that:
~~~
void usrAppInit(void)
{
printf("Initn");
StartTasks();
}
void StartTasks(void)
{
TaskHandlet xNvmTaskHandle = NULL;
TaskHandlet xMainTaskHandle = NULL;
xTaskCreate(NVMTask, "tNVMTask",initNVM_STACK_SIZE, ( void * ) 1, initNVM_TASK_PRIORITY, &xNvmTaskHandle );
xTaskCreate(MainTask, "tMainTask", initMAIN_STACK_SIZE, (void *) 1, initMAIN_TASK_PRIORITY, &xMainTaskHandle );
vTaskStartScheduler();
for (;; );
}
~~~
and both Tasks are empty(just a printf):
~~~
void MainTask( void * pvParameters )
{
/* Prevent the compiler warning about the unused parameter. */
( void ) pvParameters;
for ( ;; )
{
printf("Task Main ist dran\n");
}
}
~~~
When i debug this, i always get the following:
"ASSERT! Line 422, file c:...timers.c, GetLastError() 0
Trace output saved to Trace.dump"
I know that the Assertion is caused by vTaskStartScheduling, but why? What can be wrong? I think it's quite the same as in the demo which is running within the same project.
Thank you for helping!
Ok, i have found the fail. Its because of my implementation to get my application started. It looks like this:
~~~
define mainCREATESIMPLEBLINKYDEMOONLY 2
#if ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 1 )
{
main_blinky();
}
#elif ( mainCREATE_SIMPLE_BLINKY_DEMO_ONLY == 2 )
{
usrAppInit();
}
#else
{
main_full();
}
#endif
~~~
I don't know which Line of Code exact causes the fail, but if i put my function instead of the blinky and start with mainCREATESIMPLEBLINKYDEMOONLY declared as 1, it should be ok.
You can delete or close.
Printf are not in general terms, "rtos friendly". You might try running without them and see if you have the same issue.
Their is a friendly version in some of the demo code
Yes, i read this. But i think for test purposes it's ok to use printf. In my final project shouldn't be any printf.
This didn't cause the error.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.