CodeWarrior for MCU10.3 comes with the ARM GNU 4.6.2 installed:
What about switching to a different (newer) gcc?
The ARM GCC GNU toolchain used is the one which is provided and maintained by ARM Inc. in the Launchpad. MCU10.3 has been released early December 2012, and just at the end of December ARM has released a new 4.7 version of gcc. So it would make sense at least to try the new 4.7.
For this I have copied the MCU10.3 installation layout and added the 4.7 toolchain. In order to avoid conflicts, I have removed the 4.6 toolchain, so I have this structure:
Note: at the time of this writing, there is already a 4.7.2 available.
The good news: my existing projects worked fine. The confusing part was that existing projects created with 4.6.0 created these pathentry warnings:
Description Resource Path Location Type Invalid project path: Include path not found (C:\Freescale\CW MCU v10.3_gcc4_7_0\Cross_Tools\arm-none-eabi-gcc-4_7_0\lib\gcc\arm-none-eabi\4.6.2\include-fixed). Freedom_Blue pathentry Path Entry Problem Invalid project path: Include path not found (C:\Freescale\CW MCU v10.3_gcc4_7_0\Cross_Tools\arm-none-eabi-gcc-4_7_0\lib\gcc\arm-none-eabi\4.6.2\include). Freedom_Blue pathentry Path Entry Problem
Looks like somehow the Eclipse build system got 4.6.2 and 4.7.0 mixed up? I checked the project and path settings, but I have not seen place to fix the warnings. Clean and rebuild did not help. And Google was not my friend this time :-(. What now?
Well, after long hours of searching and trying things, I have found finally a solution which works. The trick is to go into the Project > Properties > C/C++ Build > Discovery Options. Here both the Compiler and Assembler are set up for ‘Discovery‘: That way the toolchain can find its libraries and search paths. Obviously that did not work our well for me.
So the solution is to select one tool (ARM Ltd Windows GCC C Compiler and ARM Ltd Windows GCC Assembler) and to Clear the discovered entries (Clear button). This will trigger an informal dialog:
With that, my problem is solved.
❓ The Eclipse GNU build tools are storing that kind of information in the workspace .metadata folder. In my above case I used the same workspace with the changed GNU build tools. The problem could be avoided if I use separate workspaces for each Eclipse layout variant.
Happy ARMing 🙂
Thanks for this blog. I am following close behind, hoping you find all these useful tricks before I need to !
LikeLike
It doesn’t work for me :-(. I’ve the following issue:
Description Resource Path Location Type
mingw32-make: *** [Project_Settings/Startup_Code/__arm_end_c.obj] Error 1 gcc-4.7.2 C/C++ Problem
mingw32-make: *** [Project_Settings/Startup_Code/__arm_start_c.obj] Error 1 gcc-4.7.2 C/C++ Problem
mingw32-make: *** [Project_Settings/Startup_Code/kinetis_sysinit_c.obj] Error 1 gcc-4.7.2 C/C++ Problem
mingw32-make: *** [Sources/main_cpp.obj] Error 1 gcc-4.7.2 C/C++ Problem
mingw32-make: *** Waiting for unfinished jobs…. gcc-4.7.2 C/C++ Problem
Cannot run program “C:\Freescale\CW MCU v10.3_gcc4_7_2\Cross_Tools\arm-none-eabi-gcc-4_6_2\bin\arm-none-eabi-g++”: Launching failed gcc-4.7.2 [Discovery Options] page in project properties C/C++ Problem
Cannot run program “C:\Freescale\CW MCU v10.3_gcc4_7_2\Cross_Tools\arm-none-eabi-gcc-4_6_2\bin\arm-none-eabi-gcc”: Launching failed gcc-4.7.2 [Discovery Options] page in project properties C/C++ Problem
Error launching external scanner info generator (C:/Freescale/CW MCU v10.3_gcc4_7_2/Cross_Tools/arm-none-eabi-gcc-4_6_2/bin/arm-none-eabi-g++ -E -P -v -dD C:/Users/Elvis/workspace/gcc-4.7.2/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp) gcc-4.7.2 [Discovery Options] page in project properties C/C++ Problem
Error launching external scanner info generator (C:/Freescale/CW MCU v10.3_gcc4_7_2/Cross_Tools/arm-none-eabi-gcc-4_6_2/bin/arm-none-eabi-gcc -E -P -v -dD C:/Users/Elvis/workspace/gcc-4.7.2/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c) gcc-4.7.2 [Discovery Options] page in project properties C/C++ Problem
LikeLike
Hello Elvis,
hard to say what your probelm is giving the information provided?
Erich
LikeLike
The problem is this: “C:\Freescale\CW MCU v10.3_gcc4_7_2\Cross_Tools\arm-none-eabi-gcc-4_6_2\bin\arm-none-eabi-g++”
Eclipse has an enviorment variable ${ARMSourceryDir} that i cannot find how to change…
LikeLike
Thank you for this blog. It´s very helpful and it fixed my problem.
LG from Berlin
LikeLike
Glad to hear that this was helpful. I already switched to GNU ARM gcc 4.8 🙂
LG from Lucerne
LikeLike