embeddedlab wrote on Wednesday, January 28, 2015:
Hello!! I had just started using FreeRTOS as i had read a lot about it.
I open the Microsoft Visual Studio Demo and compile, it works perfectly but the problem is that the project is very complex for me to understand as i don’t have any idea about traces.
I just want to start with basics.
I read anatomy of FreeRTOS available on website and started in the same way as described there.
I added all source files, header files portable files properly.
Added all directories in project properties but when i compile my code i am getting numerous errors.
Here is my program in main file
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
/* FreeRTOS kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
void vTask1( void *pvParameters )
{
const char *pcTaskName = "Task 1 is running\r\n";
volatile unsigned long ul;
/* As per most tasks, this task is implemented in an infinite loop. */
for( ;; )
{
/* Print out the name of this task. */
vPrintString( pcTaskName );
/* Delay for a period. */
for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
{
}
}
}
void vTask2( void *pvParameters )
{
const char *pcTaskName = "Task 2 is running\r\n";
volatile unsigned long ul;
/* As per most tasks, this task is implemented in an infinite loop. */
for( ;; )
{
/* Print out the name of this task. */
vPrintString( pcTaskName );
/* Delay for a period. */
for( ul = 0; ul < mainDELAY_LOOP_COUNT; ul++ )
{
}
}
}
int main()
{
// Create Task 1
xTaskCreate( vTask1, "Task 1", 1000, NULL, 1, NULL);
// Create Task 2
xTaskCreate( vTask2, "Task 2", 1000, NULL, 1, NULL );
// Start Scheduler
vTaskStartScheduler();
while(1);
return 0;
}
What i think is that vPrintString is not supported now and i replaced it with printf, but there are lots of other error also.
I am attaching my project on google site, please someone help me, and tell me what i am doing wrong.
Please guys help me getting started with FreeRTOS.
Download Link is as follow, copy and paste it in browser and please help
https://sites.google.com/site/coolembeddedlaboratory/home/softwares/TaskTest.zip?attredirects=0&d=1
Thanks in advance.