Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Timer functions are missing from timers.c

Posted 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.c

Posted 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.c

Posted 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.c

Posted 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.c

Posted 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.c

Posted 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.c

Posted 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.c

Posted 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.c

Posted by Doini on November 1, 2012
Hello Erich,

I applied your advice and it worked.
Thank you,

Doini


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner