Sorry, I was talking about Visual Studio Express Edition 2012.
(NOTE:- I am using Visual Studio 2012 and FreeRTOS version 8.1.2)
I opened the demo project in that and it works properly in Visual Studio which is using Visual C++ compiler.
But as i already told, the demo project is very complicated for me as trace feature is also used and i don't know, what is that.
So read anatomy of FreeRTOS from their website and then created a new project by using FreeRTOS Source files, i had done most of the things but i am getting errors.
My main code is as follow:-
Code C - [expand] |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| #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;
} |
I am getting lots of error, like vPrintString identifier not found and mainDELAY_LOOP_COUNT not found, then i thought that it might be possible that vPrintString is not available in newer version of FreeRTOS and i checked the demo they had used simple printf, by replacing these things i am not getting error related to vPrintString, but still there are some 12 errors related to task.c file.
Please someone check and help to get started.
(I had asked the similar question of freertos forums also)
Thanks in advance.
I just want to learn FreeRTOS and move into the world of RTOS
View attachment TaskTest.zip