Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




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 ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists