Author Topic: mspgcc/compiler plugin  (Read 4727 times)

Offline stamasd

  • Single posting newcomer
  • *
  • Posts: 6
mspgcc/compiler plugin
« 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: mspgcc/compiler plugin
« Reply #1 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.
« Last Edit: December 10, 2009, 06:24:14 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stamasd

  • Single posting newcomer
  • *
  • Posts: 6
Re: mspgcc/compiler plugin
« Reply #2 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.
« Last Edit: December 11, 2009, 01:49:03 am by stamasd »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: mspgcc/compiler plugin
« Reply #3 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.

Offline stamasd

  • Single posting newcomer
  • *
  • Posts: 6
Re: mspgcc/compiler plugin
« Reply #4 on: December 11, 2009, 06:01:43 pm »
Thanks, I'll try when I get back to my Linux machine (Windows-only at work).