I'm using the energia framework because of an internal requirement. I use code composer studio to code and do the day to day programming. I would like to use some basic C++11 functionality (such as nullptr
and Non-static data member initializers
). The first can be done by compiling with -std=c++0x
but the latter requires -std=c++11
and this won't compile because the compiler is gcc version 4.6.
I have tried switching to the most current compiler version for the MSP430 which is 8.3. This doesn't compile because it is missing an include:
C:/Program Files (x86)/energia-1.8.7E21/hardware/energia/msp430/cores/msp430/Energia.h:4:10: fatal error: msp430.h: No such file or directory
#include <msp430.h>
I have tried to include this directory in the include path. This will result in a declaration conflict with the current compilers's include path. As such I've tried removing ${CG_TOOL_INCLUDE_PATH}
from the include path.
This also fails with:
In file included from C:/Program Files (x86)/energia-1.8.7E21/hardware/tools/msp430/msp430/include/in430.h:4,
from C:/Program Files (x86)/energia-1.8.7E21/hardware/tools/msp430/msp430/include/msp430fr6989.h:114,
from C:/Program Files (x86)/energia-1.8.7E21/hardware/tools/msp430/msp430/include/msp430.h:1663,
from C:/Program Files (x86)/energia-1.8.7E21/hardware/energia/msp430/cores/msp430/Energia.h:4,
from sketch_dec13a.cpp:1:
C:/Program Files (x86)/energia-1.8.7E21/hardware/tools/msp430/msp430/include/intrinsics.h:108:6: error: new declaration 'void __delay_cycles(long unsigned int)' ambiguates built-in declaration 'void __delay_cycles(long long int)' [-fpermissive]
So, how can I use the newest compiler with the energia framework? Do I just need to strip these functions from the library?
update:
removing the offending declaration results in a missing linker script:
makefile:145: recipe for target 'sketch_dec13a.out' failed
c:/ti/ccs920/ccs/tools/compiler/msp430-gcc-8.3.0.16_win32/bin/../lib/gcc/msp430-elf/8.3.0/../../../../msp430-elf/bin/ld.exe: cannot open linker script file msp430fr6989.ld: No such file or directory