Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [cdt-dev] MBS in CDT 2.1 - defining toolchain with post linking steps not supported?

I tried a similar approach a few weeks ago (wanted to FTP my binary to the target after linking). I got the following hint from Olav Zarges:
Hi Norbert,
You can you use an  ant script to upload the executable to your target.
1 - create the ant build xml-file (see file content below)
2 - open the builders page of your projects properties
3 - add a new builder (select "ant build")
4 - select the proper "buildfile" (file created above) and "base
directory" (your project directory)
5 - make sure you changed the properties to your needs! (you can enter
your properties on "Properties"-page in the "Edit launch configuration
properties" dialog or you can change it in the xml-file)
Thats it.
Regads Olav
P.S. better is to enter the upload as an external  tool --> "Run /
External Tools / External Tools"  and use import in Step 3
So the core idea is to add another builder to the project and let it call your tools in order to do any post-build steps. In my case it was to call an FTP client, which is well supported by ant. You may have to do a little more.
CDT 3.0 will have "custom build steps".
Hope this helps somewhat.

Von: cdt-dev-admin@xxxxxxxxxxx [mailto:cdt-dev-admin@xxxxxxxxxxx] Im Auftrag von Emanuel Schleussinger (
Gesendet: Mittwoch, 9. März 2005 11:06
An: cdt-dev@xxxxxxxxxxx
Betreff: [cdt-dev] MBS in CDT 2.1 - defining toolchain with post linking steps not supported?

Hi all,
I am running into troubles with extending the current (CDT 2.1) Managed Build System for my embedded platform. Here is the problem:
I created a Configuration that will ultimately produce a binary Image for the Gameboy advance. To do so, I need to accomplish the following steps:
1) compile .c -> .o
2) link .o -> .elf
3) run a objcopy on the elf to produce the ROM file
Therefore, I extended the MBS (org.eclipse.cdt.managedbuilder.core.buildDefinitions), and added a toolchain as follows:
Tool1 (Compiler): input: .c output: .o
Tool2 (Linker): input: .o output: .elf
Tool3 (Objcopy): input: .elf output: .gba

If you would like  to look at this more closely, here is my complete
I have set my artifact extension (which i think is the final extension
required to build the result of the managed make process), to "gba"
,and this is what happens when i attempt to compile:
make -k all
Building file: ../sdf.c
arm-elf-gcc -c -osdf.o ../sdf.c
Finished building: ../sdf.c
Building target: sdfsdf.gba <------------------------ PROBLEM: it did not run Tool2 (Linker)
arm-elf-objcopy   sdfsdf.gba sdf.o  
c:\dka\bin\arm-elf-objcopy.exe: 'sdfsdf.gba': No such file
make: *** [sdfsdf.gba] Error 1
make: Target `all' not remade because of errors.
After a good discussion of this issue on the newsgroup, I am wondering if the problem with the current implementation of the CDT MBS may be as follows:
At the time of makefile generation, the only resources that are
available in the project  will be ".c" files, and the information that
".gba" is to be built.
So I wonder if this may be whats happening in the MakefileGenerator
1) finds .c files and adds rules to transform them to .o
2) finds no other resources (as nothing was built yet), but knows it
needs to generate ".gba"
3) and therefore adds Tool3 (which it knows produces .gba), feeding it with ".o" instead of ".elf"
Any help on how to get such a toolchain working would be much appreciated
all the best
PS: this issue has been discussed by a few people on the newsgroup, but ultimately, we did not yet manage to come up wuth a solution - so i am posting this to the email list.
-----------------------------+ -
Emanuel Schleussinger        |
Snr. Software Developer      :
Dropshop GmbH                .
office: +49 (89) 74847 203

Back to the top