Timers: I cant create :(

Posted by ulmus on January 19, 2012
There is no info in API documentation but i found in customisation that i have to add in FreeRTOSConfig.h:

#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY 1
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE

I added those, i have added
#include "timers.h"
in icon.c file where i am using timers, but compiling project i have still errors:

compiling\tasks.o: In function `vTaskStartScheduler':
C:\Users\......................FreeRTOS/Source/tasks.c:1064: undefined reference to `xTimerCreateTimerTask'
compiling\icon.o: In function `Icon_Init':
C:\Users\...................../source/icon.c:39: undefined reference to `xTimerCreate'
collect2: ld returned 1 exit status

I was changing order of #includes header files but nothing.
I dont know about somethig?

RE: Timers: I cant create :(

Posted by ulmus on January 19, 2012
P.S.
icon.c start like that:


#include "FreeRTOS.h"
#include "task.h"
#include "queue.h"
#include "timers.h"
#include "lcd.h"
#include "icon.h"
....

RE: Timers: I cant create :(

Posted by Richard on January 19, 2012
“There is no info in API documentation but i found in customisation that i have to add in FreeRTOSConfig.h:

#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY 1
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE”


These are documented here http://www.freertos.org/RTOS-software-timer.html

“C:\Users\......................FreeRTOS/Source/tasks.c:1064: undefined reference to `xTimerCreateTimerTask'
compiling\icon.o: In function `Icon_Init':
C:\Users\...................../source/icon.c:39: undefined reference to `xTimerCreate'
collect2: ld returned 1 exit status
”


Have you added FreeRTOS/source/timers.c to you build?

Regards.

RE: Timers: I cant create :(

Posted by ulmus on January 19, 2012
How Stupid I am! God bless You!
:) I havent added timers.c to the project!
Now all is working like a charm :)