Tamarinen 1 Posted May 30, 2015 Share Posted May 30, 2015 Hi, I'm trying to port existing code, written for mspgcc and IAR, to the new TI toolchain. There are, as I understand it, a few vital differences in how you should write your code for the two chains. I've tried to find a summary of the differences, and how one should proceed to convert code from the old to the new chains, but I've failed to find very much on the subject. Is there any such tutorial or guide available? It's pretty risk-free to assume that I'm a beginner when it comes to MSP430 and related tools. Quote Link to post Share on other sites
RROMANO001 6 Posted May 31, 2015 Share Posted May 31, 2015 Hi, I'm trying to port existing code, written for mspgcc and IAR, to the new TI toolchain. There are, as I understand it, a few vital differences in how you should write your code for the two chains. I've tried to find a summary of the differences, and how one should proceed to convert code from the old to the new chains, but I've failed to find very much on the subject. Is there any such tutorial or guide available? Hi for reference you can find here the old toolchain reported as obsolete: http://sourceforge.net/projects/mspgcc/ And here the reference to the new TI supported MSP430-GCC, some reference are present for calling difference, if this is enough otherwise ask again for specific. http://www.ti.com/tool/msp430-gcc-opensource Quote Link to post Share on other sites
RROMANO001 6 Posted May 31, 2015 Share Posted May 31, 2015 It's pretty risk-free to assume that I'm a beginner when it comes to MSP430 and related tools. I was, am, shall be again beginner when tools change and need adapt to changes, in the past I used IAR limited, full licence and Quadravox, the best I used was Qvox for code quality and support, now I am using CCS and code written for IAR seems compile quite fine with some refinement on interrupt management. I am not so proficient on GCC version but again change are on interrupt declaration. Quote Link to post Share on other sites
abecedarian 330 Posted May 31, 2015 Share Posted May 31, 2015 Also, TI's "Engineer to Engineer" forums can be quite helpful: http://e2e.ti.com Quote Link to post Share on other sites
rockets4kids 204 Posted May 31, 2015 Share Posted May 31, 2015 Before migrating to TIs gcc compiler you will really want to investigate its actual condition and level of support. For instance, can you even find any proper documentation on the new compiler? The older toolchain, though obsolete, is more reliable and much better suited for most projects. RROMANO001 1 Quote Link to post Share on other sites
RROMANO001 6 Posted May 31, 2015 Share Posted May 31, 2015 Before migrating to TIs gcc compiler you will really want to investigate its actual condition and level of support. For instance, can you even find any proper documentation on the new compiler? The older toolchain, though obsolete, is more reliable and much better suited for most projects. IMHO, no, and what about TI compiler too? Site is so broken is quite difficult find devices sometimes... I think TI got a big error getting the actual responsible for web and forum, it was near perfection, now is near useless... Quote Link to post Share on other sites
Tamarinen 1 Posted June 1, 2015 Author Share Posted June 1, 2015 Thank you for all your responses, The question about documentation is a very good one, and SLAA664 plus SLAU591A, available from their download page, does indeed seem a bit meager, documentation-wise. SLAA534, linked from them, seem to contain interesting reading material for an evening or two, and SLAU132J should keep me busy for the rest of the week. Is there anything else a beginner in this field should read up on? I often find statements such as "no biggie, just tweak the interrupts, and it works", which does sound encouraging. I'll just have to learn the old and new interrupt syntax, and I'm good to go. Is there anything in particular you should keep in mind when converting makefiles and such? Like "sumthin-elf looks like it's compatible with the mspgcc sumthin, but watch out for the -z flag, it deletes your source in the new environment, while giving it an oil bath in the old". I'm a Fedora type of guy, and the last Fedora with a working mspgcc chain seem to be 20 ( https://bugzilla.redhat.com/show_bug.cgi?id=1175942), otherwise I'd try that to get up to speed before jumping on the new chain. RROMANO001 1 Quote Link to post Share on other sites
RROMANO001 6 Posted June 1, 2015 Share Posted June 1, 2015 Thank you for all your responses, I'm a Fedora type of guy, and the last Fedora with a working mspgcc chain seem to be 20 ( https://bugzilla.redhat.com/show_bug.cgi?id=1175942), otherwise I'd try that to get up to speed before jumping on the new chain. Good choice, you can experiment CCS for Linux too, it is much more better than Win version but forever it use TI version. Quote Link to post Share on other sites
Tamarinen 1 Posted June 4, 2015 Author Share Posted June 4, 2015 Ok, now I have one specific question. If I compile with mspgcc, this can be detected by __MSPGCC__ being defined. But how do I do the same thing with MSP430-GCC? SLAU132 http://www.ti.com.cn/general/cn/docs/lit/getliterature.tsp?baseLiteratureNumber=slau132&fileType=pdfseem to indicate that __TI_COMPILER_VERSION__ is the best available option? Quote Link to post Share on other sites
spirilis 1,264 Posted June 4, 2015 Share Posted June 4, 2015 Should have __GNUC__ defined in both gcc options iirc. Sent from my Galaxy Note II using Tapatalk Quote Link to post Share on other sites
Tamarinen 1 Posted June 5, 2015 Author Share Posted June 5, 2015 Actually, TI doesn't seem to use that one. And if I want to keep the code compilable by IAR and mspgcc in addition to msp430-gcc, I'll have to differentiate between mspgcc and msp430-gcc in order to feed them, at least, different interrupt code. Quote Link to post Share on other sites
rockets4kids 204 Posted June 5, 2015 Share Posted June 5, 2015 I believe mspgcc supports the interrupt format used by msp430-gcc, so that shouldn't be a problem. Historically mspgcc used only the gcc-style interrupt declaration format and only added the IAR/CL430 format late in its development run. It is because msp430-gcc tries to say closer to pure gcc that it only supports the gcc format. 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.