Compiler Settings and Project.mk
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Compiler Settings and Project.mk
I'm trying to use CodeLite with a Sourcery Codebench Lite arm-none-eabi compiler. I'm quite familiar with the compiler as I've used it successfully in both Eclipse and Code::Blocks. But I'm having some trouble with CodeLite.
When I first created the compiler, I modified the "C++ Compiler Name" to arm-none-eabi-g++ -std=c++11 -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mlittle-endian -ffunction-sections -fsingle-precision-constant -Wa,-EL.
I then made a new project. Since I need to call a different "build system" from the default "mingw32-make.exe", I made a custom build as shown below: This does what I want it to do.
However, now when I modify the "C++ Compiler Name" setting to arm-none-eabi-g++ -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mlittle-endian -ffunction-sections -fsingle-precision-constant -Wa,-EL (e.g. removed -std=c++). Notice no "-std=c++11"
It still appears appears to use it in the compiler output: "-std=c++11" still there The only way I've been able to get around this is to modify "TestProject.mk" in a text editor by changing the CXX variable to match that in the compiler settings. Am I doing something wrong?
CodeLite v4.1.5770 (not self-compiled). Windows 8 Pro. Nice tool btw.
When I first created the compiler, I modified the "C++ Compiler Name" to arm-none-eabi-g++ -std=c++11 -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mlittle-endian -ffunction-sections -fsingle-precision-constant -Wa,-EL.
I then made a new project. Since I need to call a different "build system" from the default "mingw32-make.exe", I made a custom build as shown below: This does what I want it to do.
However, now when I modify the "C++ Compiler Name" setting to arm-none-eabi-g++ -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mlittle-endian -ffunction-sections -fsingle-precision-constant -Wa,-EL (e.g. removed -std=c++). Notice no "-std=c++11"
It still appears appears to use it in the compiler output: "-std=c++11" still there The only way I've been able to get around this is to modify "TestProject.mk" in a text editor by changing the CXX variable to match that in the compiler settings. Am I doing something wrong?
CodeLite v4.1.5770 (not self-compiled). Windows 8 Pro. Nice tool btw.
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
so what u did is this:
- Used codelite to generate the makefile with the compiler settings
- You then enabled 'custom build'
- You modified the compiler (removed -std=c++11)
And your problem is that the makefile is still using '-std=c++11' ?
Well, once you enabled custom build, codelite will stop generating the makefile. From this point on, it will simply execute the commands as written in the custom build
So the old makefile remains
I am guessing that you are using the release 4.1.5770? ( you should read this before posting )
In trunk version, the MAKE command is part of the toolchain
I have sent you are download link in Private Message that allows you to set different make per compiler
Eran
- Used codelite to generate the makefile with the compiler settings
- You then enabled 'custom build'
- You modified the compiler (removed -std=c++11)
And your problem is that the makefile is still using '-std=c++11' ?
Well, once you enabled custom build, codelite will stop generating the makefile. From this point on, it will simply execute the commands as written in the custom build
So the old makefile remains
I am guessing that you are using the release 4.1.5770? ( you should read this before posting )
In trunk version, the MAKE command is part of the toolchain
I have sent you are download link in Private Message that allows you to set different make per compiler
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
I understand now. Thanks.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
Note that with the installer that I have sent you in private message, you simply need to define new compiler like this:
Settings -> build settings -> compilers
and click on the 'New' button
Once clicked, fill in the toolchain (including the 'make' command you need)
And use that instead.
BTW, if you think its generic enough, I will be happy to add it to codelite default compilers
Eran
Settings -> build settings -> compilers
and click on the 'New' button
Once clicked, fill in the toolchain (including the 'make' command you need)
And use that instead.
BTW, if you think its generic enough, I will be happy to add it to codelite default compilers
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
Thanks for the bits, but I don't see the MAKE setting in the toolchain. It still seems to be global for all compilers in the "Build Systems" tab.
CodeLite v5.0.6147, Windows 8 Pro.You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
mm, I might have sent you an older version ...
uploading new one now
Eran
uploading new one now
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
I have sent you another private message with a more up-to-date link
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
Work's great. If you're ever in there again and want to add an "Assembler" command, that will probably make me and some other embedded developers happy. But I'm thrilled with this tool so far, and I think I can get what I need out of the "File Types" settings.
Thanks so much for your attention, and helpful support.
I'm not sure what you meant here. Did you mean the cs-make command? Actually I've only seen the cs- prefix with the CodeSourcery compiler. I'm guessing it stands for CodeSourcery-make, so I don't think it's very generic, but I'm coming from long career with Microsoft Tools, so I'm not sure.BTW, if you think its generic enough, I will be happy to add it to codelite default compilers
Thanks so much for your attention, and helpful support.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
I meant, if the toolchain is commonly used, I can add it so it will be part of codelite's default compilers definition setVerax wrote:I'm not sure what you meant here.
so other people might enjoy it as well.
By "generic" I menat: it does not contains some hard coded paths to your machine and that the toolchain can be used on other machines as well
No problemVerax wrote:Thanks so much for your attention, and helpful support.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 46
- Joined: Sat Jan 19, 2013 10:31 am
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Compiler Settings and Project.mk
Sorry I misunderstood. Sourcery CodeBench Lite is just a GCC cross-compiler, so it doesn't have any hard-coded paths or other rigid limitations that I'm aware of. I think trying to include an embedded compiler would be great, but the the problem is "which one?". Sourcery CodeBench Lite comes in 16 different editions according to processor (ARM, ColdFire, Mips, etc...), operating system (none, linux, uClinux, etc...), and ABI (none, ELF, EABI, etc...). You can see the list here (http://www.mentor.com/embedded-software ... e-edition/).I meant, if the toolchain is commonly used, I can add it so it will be part of codelite's default compilers definition set so other people might enjoy it as well. By "generic" I menat: it does not contains some hard coded paths to your machine and that the toolchain can be used on other machines as well
There's also:
- GNU Tools for ARM Embedded Processors here (https://launchpad.net/gcc-arm-embedded)
- crosstool-ng (http://crosstool-ng.org/)
- summon-arm-toolchain here (https://github.com/esden/summon-arm-toolchain)
All these toolchains seem to name their executables with a processor-operatingsystem-abi prefix, so the commands in the CodeLite "Build Settings" would have to be different for each compiler flavor. Maybe if someone finds a way to unify all these different flavors into one, then it would be worth including.
In my opinion, just having the ability to configure a new compiler, as CodeLite already does, is all one should need.