Hi,
I hope this is the right forum for my question. If not, please redirect me to the proper place.
We're using this gcc toolchain version 1_01_00_00 on Windows 7 x64 (with eclipse and msys make):
http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/index_FDS.html
We want to use C++ instead of C, but the compiler complains about the >>extern "C"<< statement:
msp430-elf-g++ "-IC:\\devel\\toolchains\\msp430-ti-1.01\\include" -O0 -g3 -Wall -c -fmessage-length=0 -mmcu=msp430f5529 -mlarge -o main.o "..\\main.cpp"
In file included from C:\devel\toolchains\msp430-ti-1.01\include/msp430f5529.h:63:0,
from ..\main.cpp:1:
C:\devel\toolchains\msp430-ti-1.01\include/iomacros.h:50:32: error: expected unqualified-id before string constant
#define sfrb_(x,x_) extern "C" volatile unsigned char x asm(#x_)
^
A dirty workaround is to remove the >>extern "C"<<, then the project compiles fine. But I cannot mix C with C++ code because the compiler doesn't seem to understand the >>extern "C"<< statement.
Any ideas?
Thanks
Christoph