User forums > Embedded development

MSP GCC not detected (Linux) (SOLVED)

<< < (2/2)

drvlas:
This window is hard to catch:

oBFusCATed:
So the problem is that you're using the GNU GCC Compiler for MSP430 (HighTec) compiler, but you've setup the GNU GCC Compiler.
You have to options:
1. Either fix the setup of the compiler you're using. The log tells you exactly what to do!
2. Change your project to use the GNU GCC Compiler. This is done in the Project -> Build options.

drvlas:

--- Quote from: oBFusCATed on January 15, 2017, 04:15:01 pm ---So the problem is that you're using the GNU GCC Compiler for MSP430 (HighTec) compiler
--- End quote ---
No, I'm not.
The only Compiler that has "MSP430" in its name is "GNU GCC Compiler for MSP430 (HighTec)". But I use the MSP430 Compiler of Red Hat (maintained by SOMNIUM Technologies). I've installed it, I tested it (and I use it for a some time), so it's the one in a world Compiler I need here.
What have I to do? I'm far from expert in IDEs. I don't understand what does C::B accept as a suitable compiler type for MSP430 chips.
I try the 1-st way:

1) Settings - Compiler - Global... - Selected compiler.
I select "GNU GCC Compiler for MSP430 (HighTec)"
I may or may not auto-detect the path, but anyway I leave in the :Compiler's installation directory" the right path to the directory where the Compiler's bin directory lies: /home/tkm/ti/msp430_gcc
2) As soon as I press OK I see that yellow warning.
3) Return to Settings - Compiler - Global... - Selected compiler. What do I see? GNU GCC Compiler.
So, C::B ignores my selection  "GNU GCC Compiler for MSP430 (HighTec)" if it cannot find Compiler.

Another way.
Let's try to use a plain  "GNU GCC Compiler".

0) Project - Build options... set  "GNU GCC Compiler"
1) Settings - Compiler - Global... - Selected compiler.
I select "GNU GCC Compiler" or rather leave it there as it's present always @ the entry.
Sure that "Compiler's installation directory": /home/tkm/ti/msp430_gcc
2) As soon as I press OK I see that yellow warning. The same warning about HighTec! Where is any word about the HighTec?

Cannot believe it's impossible. I may err, but it seems I used C::B 16.1 in my crashed PC. I sure I used Red Hat compiler. So the point is - I'm mistaken in my settings...

drvlas:

--- Quote from: drvlas on January 15, 2017, 05:42:11 pm ---it seems I used C::B 16.1 in my crashed PC. I sure I used Red Hat compiler.
--- End quote ---
N.B.! There's 2 (important?) points about the latter:

1) I used GCC from the TI Code Compose Studio package. The CCS gives options - to compile with the TI Compiler (up to 16KB code) or to use Red Hat Compiler. So the CCS package actually has the Red Hat Compiler. TI says it's the same as the standalone MSP430-GCC-OPENSOURCE (SOMNIUM Technologies) Compiler, but the directory structure is very different.
When I configured my C::B last time, I was the same dummy as I'm now. And I tried both packages - TI CCS package and stamdalone MSP430-GCC-OPENSOURCE package. And the latter was unsuccessful. I didn't ask this forum. I just used the TI CCS package GCC Compiler. Making a lot of stupid tries by the way... But it worked.

2) I can read the config files from my crashed PC and just copy all settings, copy TI CCS directory and use TI Compiler again.
But... I'd like to understand the C::B rules. So I ask oBFusCATed to help.

What should be in the directory that is marked "Compiler's installation directory"? Is it the "bin" where the compiler, linker and so on are?



drvlas:
God bless text config files!

I've managed it somehow.
I decided that the best way to walk around (unknown for me) C::B procedures of configuration - to edit config files.
So I edited ~/.config/codeblocks/default.conf in a part of Compiler for MSP430:

--- Code: --- <msp430_gcc>
<NAME>
<str>
<![CDATA[MSP430-GCC-OPENSOURCE (SOMNIUM Technologies)]]>
</str>
</NAME>
<COMPILER_OPTIONS>
<str>
<![CDATA[-c -g -Os -Wall -ffunction-sections -fdata-sections;]]>
</str>
</COMPILER_OPTIONS>
<LINKER_OPTIONS>
<str>
<![CDATA[-Wl,-Map,${PROJECT_DIR}${TARGET_OUTPUT_FILE}.map;]]>
</str>
</LINKER_OPTIONS>
<INCLUDE_DIRS>
<str>
<![CDATA[/home/tkm/ti/msp430_gcc/include;/home/tkm/ti/msp430_gcc/msp430-elf/include;]]>
</str>
</INCLUDE_DIRS>
<LIBRARY_DIRS>
<str>
<![CDATA[/home/tkm/ti/msp430_gcc/include;]]>
</str>
</LIBRARY_DIRS>
<MASTER_PATH>
<str>
<![CDATA[/home/tkm/ti/msp430_gcc]]>
</str>
</MASTER_PATH>
<C_COMPILER>
<str>
<![CDATA[msp430-elf-gcc]]>
</str>
</C_COMPILER>
<CPP_COMPILER>
<str>
<![CDATA[msp430-elf-g++]]>
</str>
</CPP_COMPILER>
<LINKER>
<str>
<![CDATA[msp430-elf-g++]]>
</str>
</LINKER>
<LIB_LINKER>
<str>
<![CDATA[msp430-elf-ar]]>
</str>
</LIB_LINKER>
<DEBUGGER_CONFIG>
<str>
<![CDATA[gdb_debugger:Default]]>
</str>
</DEBUGGER_CONFIG>
</msp430_gcc>

--- End code ---
...and made msp430_gcc a default Compiler

Maybe there are some minor errors or rather non-efficient code - it's not as important as the fact that the C::B accepted the changes.
Thanks to oBFusCATed for the hints! You made me to read a little - and I found a very useful way to set editor colors. In the previous life I used to create all colors manually. But now I've imported that beautiful file with themes and set my favorite dark one. The only thing that spoils the evening is: I cannot highlight the current line... Well, it's for tomorrow.

Navigation

[0] Message Index

[*] Previous page

Go to full version