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 2012 Threads] Timer functions are missing from timers.cPosted by Doini on October 30, 2012 Hello, I am using FreeRTOS in my project, and I would like to use the timer functions. But I noticed that the timers.c file does not have all the timer functions. Functions such as xTimerStart(), xTimerStop(), xTimerChangePeriod(), xTimerDelete(), xTimerReset() are missing. I downloaded again the FreeRTOS files, but still the timers.c file does not have those functions.
Would you like to give me some advice? I would really appreciate your help.
Thank you, Doini
RE: Timer functions are missing from timers.cPosted by Richard on October 30, 2012 To use those functions you have to include FreeRTOS.h, then timers.h, and then you will be able to compile and link code with those functions. They are actually macros in timers.h that call generic functions in timers.c.
Regards.
RE: Timer functions are missing from timers.cPosted by Doini on October 31, 2012 Hello,
Thank you very much, that answers my question.
I included FreeRTOS.h, then timers.h in my project, and now it will recognize definitions (like xTimerHandle) from timers.h, but I have another problem:
I defined configUSE_TIMERS, but still everything after #if ( configUSE_TIMERS == 1 ) is grey in timers.c, as it did not recognize the fact that I defined configUSE_TIMERS. In fact I defined the following in FreeRTOSConfig.h:
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 ) #define configUSE_TIMERS 1 #define configTIMER_TASK_PRIORITY 3 #define configTIMER_QUEUE_LENGTH 5 #define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 4)
I would really appreciate your help.
Thank you, Doini
RE: Timer functions are missing from timers.cPosted by MEdwards on October 31, 2012 You said it recognizes the definitions, so everything is ok. The editor might show them as being grayed out, but editors often get that wrong, especially if the editor is based on Eclipse.
RE: Timer functions are missing from timers.cPosted by Doini on October 31, 2012 Yes, my editor is based on Eclipse. I'll see if I'll have further issues.
Thank you very much, I appreciate your answer. Doini
RE: Timer functions are missing from timers.cPosted by Erich Styger on November 1, 2012 Hello, Although not FreeRTOS related at all: The Eclipse editor used the Indexer for that kind of source coloring. I have seen many Eclipse distributions having the 'Heuristic' settings enabled, which can lead to wrong coloring. Switching that setting off helped for me, and it always fixed the problem for me. See http://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/
Erich
RE: Timer functions are missing from timers.cPosted by Dave on November 1, 2012 Staying off topic for a moment, as you seem to be an Eclipse expert, is there a way of making Eclipse remember your workspace settings so they are the default settings when you create a new workspace?
RE: Timer functions are missing from timers.cPosted by Erich Styger on November 1, 2012 Yes, there is. See http://mcuoneclipse.com/2012/04/06/eclipse-global-preferences/ And too keep these kind of questions out of this email list: simply post a comment on http://mcuoneclipse.com and I see if I can help from there.
Erich
RE: Timer functions are missing from timers.cPosted by Doini on November 1, 2012 Hello Erich,
I applied your advice and it worked. Thank you,
Doini
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|