Hello,
I just found out a port of FreeRTOS for the mcu I use: http://gonium.net/md/2008/08/10/... , http://gonium.net/media/freertos... ;
It compiles well and it works but... I want to use C++ code. I tried changing the CC variable to avr-g++ but it doesn't compile, first complaining about a cast, if I fix that, it complains about another cast in tasks.c ...
So I tried to go another way. I declared a variable CSRC where I enumerate the c files, CPPSRC, CC for c compiler, CPPC but it gives a linker error.
Can someone please point me in the right direction?
FreeRTOS on Atmega644
Author
Message
I guess freertos is all c..... if you know c++, 'all you have to do' is edit every c syntax in every file that confuses the c++ compiler and you're golden.
Last Edited: Tue. Mar 9, 2010 - 07:13 PM
I thought that I could compile every c file with gcc and every c++ file with g++ then link the resulted objects.
I thought there was some 'feature' of c++ called 'name mangling' that made linking mangled and unmangled symbols tricky?
Level: Moderator
Joined: Mon. Jul 18, 2005
Posts: 101062 View posts
Location: (using avr-gcc in) Finchingfield, Essex, England
Simplistic idea but simply rename all the .c source files to be .C files (which leads to the C++ rather than C compiler being invoked for them)
Where did you learn that tidbit? It bypassed me entirely.
Level: Moderator
Joined: Mon. Jul 18, 2005
Posts: 101062 View posts
Location: (using avr-gcc in) Finchingfield, Essex, England
Quote:
Where did you learn that tidbit?
http://www.gnu.org/software/make...
(that is GNU make manual - it invokes the C++ compiler for .cc, .cpp and .C)