Switching GNU toolchains in eclipse — the easy way
This is a method of switching to a different toolchain that I found in eclipse. Basically, my goal was to get eclipse to use a secondary toolchain. Primarily in my first step, I tried making eclipse use a crosscompiling gnu toolchain.
Doing this the “right” way seems to entail writing plugins eclipse, and to write lots of XML configurations and so forth. Not having the luxury of infinite time and money (yet wanting a managed build), but rather being result driven, I finally managed to solve it partially with a hack.
My secondary goal now is to make the build work with a completely “non-gnu toolchain” (renesas sh compiler), I will try to hack together this in the upcoming days. I’ll get back to this topic again, once I know if it works or not. In the meantime, this is how I got it to compile with “non-standard” toolchain, and “standard” cygwin toolchain at the same time.
- Install the toolchain somewhere.
- Setup your PATH with the /bin/ directory in it.
- Start -> Control Panel -> System.
- Enter the Advanced tab.
- Click Environment Variables.
- Find the PATH variable in System variables.
- Edit and add ;c:pathtoyourtoolchain at the end of it.
- OK
- OK
- Create a new Build Configuration (Target for example).
- Right click the project in the Project Explorer.
- Build Configurations -> Manage…
- New…
- Write name “Target” and a description.
- Copy settings from another target that might contain decent default values.
- Ok
- Ok
- Edit the Settings for the “Target” Build Configuration.
- Right click the project in the Project Explorer.
- Choose Properties.
- Go to C/C++ Build -> Settings.
- Choose the right Configuration at the top (Target in our case).
- For each heading in Tool Settings (GCC Assembler, Cygwin C Compiler, Cygwin C Linker)
- Click the heading.
- Edit the Command field (for example, instead of using gcc, you might be using arm-elf-gcc or m68k-uclinux-gcc).
- Apply.
- OK.
- Try to build the new “Target” Build.
Slow grasswidow evening
Filed under: Configuration Management, Development, Frozentux.net, Personal
What do you do when you are home alone a saturday evening? Personally, I web2.0’d my life (i got facebook, a blog, remember the milk, dipity, evernote, and decided to rewrite/update my webpage). Also, I really got started building the Fokker DR.1.
To update frozentux.net, I screwed around a bit with eclipse pdt. I want to do this since I think the whole site looks pretty awful. I was ok with it “back then”, but not any more. I’ve been using eclipse for a few months to code c, c++, qt and I’ve grown rather fond of it. My first time with eclipse left me… well, let’s just say i went back for a few years to vim and loved it. Still wish there was a decent vim/eclipse plugin as i love vims command/edit mode.
I digress. Basically, what I did was Install subversion, make a copy of frozentux.net in subersion and a few other projects in there. I setup subversion with apache2. I know I suck that haven’t done this before. After that, I installed pdt, subclipse and a few other modules in eclipse and got it all working together. I think I might like the subclipse module, but still got a few things I need to find out.
I’m gonna get started on rewriting frozentux today I hope. Now, going for a walk first.