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] [March 2017 Threads]
Hello guys,
So I am new to RTOS . I tried to start with using the Visual studio IDE to build the project.
I created two tasks with following params.
Task1 name="Task1"Task2 name="Task2"
Task1 stack size = 1000
Task2 stack size = 100
Task1 priority = 3
Task2 priority = 1
started the scheduler.
Now i put two printf statements in each tasks .to check in console. but none of them show up. Please chek the code below .
//1st task that we have
void vTaskCode1(void * param)
{
while(1)
{
printf("This is task 1...%dn",i+1);
vTaskDelay(100);
}
}
// Create func. for the first task
void vTaskCreate1(void)
{
BaseTypet xReturned;
TaskHandlet xHandle = NULL;
/* Create the task, storing the handle. /
printf("about to create task 1...n");
xReturned = xTaskCreate(
vTaskCode1, / Function that implements the task. /
"Task1", / Text name for the task. /
1000, / Stack size in words, not bytes. /
(int *)1, / Parameter passed into the task. /
3, / Priority at which the task is created. /
&xHandle); / Used to pass out the created task's handle. */
if (xReturned == pdPASS)
{
/* The task was created. Use the task's handle to delete the task. */
vTaskDelete(xHandle);
}
}
void main()
{
prvInitialiseHeap();
vTraceInitTraceData();
xTickTraceUserEvent = xTraceOpenLabel("tick");
vTaskCreate1();
vTaskCreate2();
vTaskStartScheduler();
}
Any help or suggestion is really welcome. Thank You
Without having read the entire code....:
within a Windows FreeRTOS project, you can not make a call to printf()
or any other system API.
If you want to send out logging, please refer to the module demo_logging.c
and its function vLoggingPrintf()
.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.