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


Porting some C++ code to FreeRTOS

Posted by Leonidos mak on November 26, 2008
Would you help me with advice? I'm very new in ARM and FreeRTOS...

I need to port some C++ code to ARM with FreeRTOS.
There is 2 ways: rewrite code using only C, or make some changes and try to use C++.

It would be very nice if someone tells me how to enable C++ support with Eclipse+arm-none-eabi-gcc compiler and FreeRTOS. When I try to enable it I get many error message.... Would you give me some instructions and correct make_file.

Or its better to rewrite all in C? =)


P.S. I found this http://www.mediafire.com/?mmnth9cw99n. There is c++ example in it, but I can't build it. Many errors ).

RE: Porting some C++ code to FreeRTOS

Posted by Dave on November 26, 2008
Search this forum for C++. There are some posts with information on how to do this.

Basically, compiler the FreeRTOS code as C and your own code as C++ (the FreeRTOS headers are written for this), or remove the data hiding from the FreeRTOS code and compile it all as C++.

RE: Porting some C++ code to FreeRTOS

Posted by Richard Damon on November 27, 2008
While I don't use that exact combination, I do use FreeRTOS in a C++ project. The key is that the FreeRTOS files (which are of type .c) need to be compiled a "C" code, not C++ code. The compiler should have an option switch to make use the file extension to determine the compiling mode.

RE: Porting some C++ code to FreeRTOS

Posted by Leonidos mak on November 27, 2008
Thanks for your help.

I think I should go and learn about writing makefiles. =)
If anybody have such makefile it would be nice to see it.

RE: Porting some C++ code to FreeRTOS

Posted by ravaz on November 27, 2008

you can take a look on the following post, maybe it can help you:

http://www.luminarymicro.com/component/option,com_joomlaboard/Itemid,/func,view/catid,5/id,2306/ #2306

[ 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