Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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