Rickta59 589 Posted July 24, 2014 Share Posted July 24, 2014 I've been trying out the new msp430-elf-gcc compiler. I like that we have a supported platform from TI that is part of the standard gcc distribution. However, it seems to have a few nits. If you try to compile a simple c++ program with msp430-elf-g++, it fails because of problems with iomacros.h. I've reported this on the e2e.ti.com forums. In the meantime I put together a fix that seems to work for me. I threw together a gist so you can see how I addressed it: gist.github.com/RickKimball/1303030#file-include-iomacros-h As a bonus you get some assembler code that uses interrupts with the new msp430-elf-gcc to blink an led. You will have to copy my iomacros.h and in430.h into the directory where you downloaded the headers from TI. I've tested this with .c, .cpp and .S files. [Links to e2e.ti.com discussions] e2e.ti.com/support/development_tools/compiler/f/343/t/356902.aspx -rick Quote Link to post Share on other sites
pabigot 355 Posted July 24, 2014 Share Posted July 24, 2014 Thanks for tackling this. Maybe TI will pay more attention to you than they did to me when I noted the problems and provided fixes last December. (For C++ it's pretty simple: all uses of those macros are within the extern "C" block provided in each header when C++ is enabled, so you don't even have to bother special-casing their definitions for C++.) Quote Link to post Share on other sites
Rickta59 589 Posted July 24, 2014 Author Share Posted July 24, 2014 Do you know who actually maintains the header files now? It didn't seem like the compiler team thinks it is their problem based on the response I got on e2e.ti.com. -rick Quote Link to post Share on other sites
pabigot 355 Posted July 24, 2014 Share Posted July 24, 2014 Do you know who actually maintains the header files now? In a word: no. More than one word would just get me all wound up. I'm just gonna go take a blood pressure pill and lie down for a while. Quote Link to post Share on other sites
Rickta59 589 Posted November 2, 2017 Author Share Posted November 2, 2017 I went to modify the code at the gist above, however github wouldn't allow me to update. The error message was complaining because I had directories in my gist. It seems directories are no longer allowed on gist.github.com. I fixed the code for the latest msp430-elf-gcc and created a new repo: https://gist.github.com/RickKimball/ead0b3b0f28f0dbf426c51f46ced59 BTW: iomacros.h is fixed now so I removed the custom version I had created. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.