Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: stamasd on December 10, 2009, 04:51:25 pm

Title: mspgcc/compiler plugin
Post by: stamasd on December 10, 2009, 04:51:25 pm
How come mspgcc is supported as a compiler in C::B only under Windows? I have found no way to specify it as a compiler toolchain under Linux.
Title: Re: mspgcc/compiler plugin
Post by: stahta01 on December 10, 2009, 06:20:08 pm
How come mspgcc is supported as a compiler in C::B only under Windows? I have found no way to specify it as a compiler toolchain under Linux.

I suggest copying the normal GCC compiler setting if the mspgcc does not exist under Linux. It should be a starting point. If that works, compile C::B from SVN trunk and enable the mspgcc under Linux. (Note, I did not confirm it does not exist under Linux.)

Did you find a way to install mspgcc under Linux without using WINE?
Or, is this GCC targeted to the MSP target?

Tim S.
Title: Re: mspgcc/compiler plugin
Post by: stamasd on December 10, 2009, 11:20:42 pm
I am talking about http://mspgcc.sourceforge.net/ - a dedicated toolchain for MSP430. Basically gcc cross-compiler targeted to MSP430.  No need for wine, it runs natively on Linux. The Windows port of it is supported under the Windows port of C::B, but the native Linux mspgcc is not supported by the Linux C::B. I don't want to use wine if I can help it at all.

I have just checked out the latest SVN and compiled it. I found no way to enable support for mspgcc.
Title: Re: mspgcc/compiler plugin
Post by: Jenna on December 11, 2009, 07:08:58 am
I have just checked out the latest SVN and compiled it. I found no way to enable support for mspgcc.

You can try the following patch:
Code
--- tmp/tmpShCtKc-meld/compilergcc.cpp 
+++ home/jens/codeblocks-build/codeblocks.trunk/src/plugins/compilergcc/compilergcc.cpp
@@ -58,10 +58,10 @@
     #include "compilerDMD.h"
     #include "compilerGNUARM.h"
     #include "compilerGNUAVR.h"
-    #include "compilerGNUMSP430.h"
     #include "compilerCYGWIN.h"
     #include "compilerLCC.h"
 #endif
+#include "compilerGNUMSP430.h"
 #include "compilerICC.h"
 #include "compilerSDCC.h"
 #include "compilerTcc.h"
@@ -385,7 +385,6 @@
     CompilerFactory::RegisterCompiler(new CompilerBCC);
     CompilerFactory::RegisterCompiler(new CompilerDMC);
     CompilerFactory::RegisterCompiler(new CompilerOW);
-    CompilerFactory::RegisterCompiler(new CompilerGNUMSP430);
     CompilerFactory::RegisterCompiler(new CompilerCYGWIN);
     CompilerFactory::RegisterCompiler(new CompilerLCC);
 #endif
@@ -393,6 +392,7 @@
     CompilerFactory::RegisterCompiler(new CompilerSDCC);
     CompilerFactory::RegisterCompiler(new CompilerTcc);
     CompilerFactory::RegisterCompiler(new CompilerGDC);
+    CompilerFactory::RegisterCompiler(new CompilerGNUMSP430);
 #if defined(__WIN32__) || defined(__linux__)
     CompilerFactory::RegisterCompiler(new CompilerDMD);
     CompilerFactory::RegisterCompiler(new CompilerGNUARM);

I don't know if it works correctly (no way to test it here), but at least the ms430 cpmpiler can be chosen.
You most likely have to fix (at least) the toolchain.

There might be other changes needed, but this is at least a startingpoint.
Title: Re: mspgcc/compiler plugin
Post by: stamasd on December 11, 2009, 06:01:43 pm
Thanks, I'll try when I get back to my Linux machine (Windows-only at work).