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

prvIdleTask issue (GCC)

Posted by iammrt on November 27, 2009
Hey there,

i want to compile FreeRTOS (v6.0.1) with gcc 4.2.3. I get the Error "prvIdleTask undeclared (first use in function)" in tasks.c line 1027. As i can see there is the implementation of the function as macro in line 1781 where i get the Warning ("return type default to int") and there is the Prototype declaration in line 325 where i get the warning "parameter names without types in function declaration".
Is this a compiler specific problem? I havent touched the Kernel code, so this can only be a problem with the port, an problem with the compiler or a general issue in the OS (what i dont think can be).


Is there someone getting the same error with GCC?

RE: prvIdleTask issue (GCC)

Posted by Richard on November 27, 2009
tasks.c is part of the core code, not the port code, so this is not a port issue as such. Although portTASK_FUNCTION_PROTO and portTASK_FUNCTION, which are used in the prototype and definition of prvIdleTask(), should be defined in portmacro.h which is part of the port layer.

+ Which port are you using? Are these macros in the portmacro.h file you are including?
+ Where did you get your GCC version from, I didn't realise there was a 4.2.3 version.
+ Did you build your GCC exe yourself?

In nearly all ports the macros don't actually do anything and expand to

void prvIdleTask( void *pvParameters );

You could manually change the offending lines to that to get running, but I would be interested to know what the problem is.

Regards.

RE: prvIdleTask issue (GCC)

Posted by iammrt on November 27, 2009
- I'am using this Port: "FreeRTOS\Source\portable\GCC\ARM_CM3" I think the macros are included in the file, and the header file is included to the build.
- You can find GCC 4.2.3 here http://gcc.gnu.org/gcc-4.2 I know there is 4.4.x allready avaible but the 4.2.x is still working fine for me, and why change it when there is everything working fine.
- Since i'm using openSuse I compiled GCC bymyself, yes.

RE: prvIdleTask issue (GCC)

Posted by Richard on November 27, 2009
Are you sure that version of GCC supports THUMB2 instructions. It might do, but if it does I would guess it was one of the first versions that does. See http://www.codesourcery.com/sgpp/lite/arm/download.html - EABI is the build you want.

I would suggest getting a pre-built version of GCC. You can get the CodeSourcery Lite version for free with a convenient installer. That should compile the code with no problem.

Also, start with a pre-configured makefile, that is what they are there for. You should be able to build the makefile found in the directory FreeRTOS\Demo\CORTEX_LM3Sxxxx_Eclipse\RTOSDemo using the CodeSourcery build without any problems (unless you are using Linux, in which case you may find the occasional case sensitivity problem in file names or include file names). The makefile uses files from the directory you say you are trying to use.

Regards.

RE: prvIdleTask issue (GCC)

Posted by iammrt on November 30, 2009
Thanks for advice. I installed latest version of GCC and it worked. So the problem was probably the Thumb-2 Support of the 4.2.x Version of GCC. It supports Thumb code for sure, but Thumb-2 not.


[ 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