Cross compile project [message #172429] |
Mon, 10 July 2006 09:30 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mschnell.lumino.de
Hi Experts,
I'm intending to do a cross compile project on a Linux PC host for a
Linux/ARM target.
I do have a source tree containing Makefile that generates the cross
environment and calls the standard Makefile that can compile the Kernel
and I can create a Kernel and using this I also can create an Eclipse
"standard make project" that (seemingly correctly) shows the source
tree. As this project is huge, I did not dare to try to do the make from
within Eclipse.
This huge project also contains several Kernel space driver and user
space test programs that can be built with appropriate make target keywords.
Now, based on this, I at first of course would like to do a smallish
Eclipse project that creates a "Hallo World" application.
I suppose I can extract the appropriate stuff from the Makefiles I have
and try to create an Eclipse "standard make project".
I understand that "managed projects" is the correct way to go.
For a "cross" project, is it recommended to set up eclipse in a way to
do "managed projects" for same ? How can this be done ?
Thanks,
-Michael
|
|
|
Re: Cross compile project [message #172471 is a reply to message #172429] |
Mon, 10 July 2006 16:32 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: asdf.dd.dd
> I suppose I can extract the appropriate stuff from the Makefiles I have
> and try to create an Eclipse "standard make project".
>
> I understand that "managed projects" is the correct way to go.
>
I am also new to eclipse and CDT , but ...
Why touch your makefiles if they work ?
I understand "managed make" as a gui to help you create the make file, and
this is not your situation.
I have a Standard Make Project.
chose the "build targets" tab in the window at the right.
right click -> add build target (can also be found in the project properties
somewhere)
I then made a "clean all" target, beause I often write "make clean all"
The output from the compiler will be shown in the console tab, and if you
have an appropriate errorparser, it will create markers on the "problems"
tab, so that you can click the errors an be located in the source where the
error is. If you don't have an errorparser for your ARM compiler (most
likely you haven't!!), you can write one page of java code that does this,
and add it to CDT!!! Well ... havn't made it work yet , see my thread about
the errorParser ....
tpt
|
|
|
|
Re: Cross compile project [message #172529 is a reply to message #172471] |
Tue, 11 July 2006 09:13 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mschnell.lumino.de
Troels Thomsen wrote:
> Why touch your makefiles if they work ?
I don't want to modify the working project (Makefile) that builds the
Kernel and some additional stuff.
I want to create a new Eclipse project with a new Makefile. I hope I can
derive this from the existing Makefile. The new Project should be small
and not contain thousands of files, like the "Kernel building" project does
> I understand "managed make" as a gui to help you create the make file, and
> this is not your situation.
I do want to create a new Makefile here, so this is _exactly_ what I
want. But of course the default Eclipse setup will create a Makefile
that is meant to build a program for the PC and not to use the cross
development environment.
>
> I have a Standard Make Project.
> chose the "build targets" tab in the window at the right.
> right click -> add build target (can also be found in the project properties
> somewhere)
> I then made a "clean all" target, beause I often write "make clean all"
So you already do have a Makefile. I don't (yet).
>
> If you don't have an errorparser for your ARM compiler (most
> likely you haven't!!), you can write one page of java code that does this,
> and add it to CDT!!!
The ARN compiler is just the GNU C compiler (configured to run on PC and
to create output for ARM). It's output should be the same like GCC for
PC. So I _hope_ I don't need to do additions to Eclipse (I never wrote a
line of Java, yet).
Thanks,
-Michael
|
|
|
Re: Cross compile project [message #172544 is a reply to message #172499] |
Tue, 11 July 2006 09:38 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mschnell.lumino.de
Norbert Ploett wrote:
> Michael,
>
>> tree. As this project is huge, I did not dare to try to do the make from
>> within Eclipse.
>
> eclipse will not do anything but call the makefile.
It will do indexing, scan the project files when starting, terminating,
enabling and disabling indexing etc. It takes long (10 hours at least
for indexing) or crashes (when trying to switch off indexing), even
before I get to a point where I can try to make the project. That is why
I need a small project to start with.
(after starting the indexer starts running in the background and
prevents any useful work. Don't ask me to switch off the indexer. If I
do so I get an "internal error during CDT project async save".)
The makefile works just fine when calling it without Eclipse.
> If you go to the Menu Windows -> Show View -> Make Targets
> The view replicates the directory structure of your Standard Make Project.
OK. I see a tree of hundreds of nested directories (as this project
contains the complete Linux Kernel tree).
> From the context menu of any directory node you can create a new make target
> which means that make will be called in that directory with the parameters
> you specified.
(I need to get more accustomed to GNU make.)
I suppose this will write a new target in the main Makefile and same
will call a Makefile in the local directory.
I'm not sure if this will not break the cross environment
I can't test this as I can't do much with this huge directory tree. I
definitely need a small "hallo World" cross project first.
>
>> For a "cross" project, is it recommended to set up eclipse in a way to do
>> "managed projects" for same ? How can this be done ?
>
> That would mean you need to define a new project type for your cross
> toolchain. It is feasible but it takes some internal knowledge of the CDT's
> managed build system. In the CDT online help, go to CDT Plug-in Developer
> Guide -> Programmer's Guide -> Managed Build System Extensibility Document
Thanks for the pointer. I think I'll delay this until I have a working
"hallo World" cross project.
>
> My guess is that you will be happier writing your own makefiles and using
> Standard Make projects for a start.
>
I hope I can extract this from the huge project I have.
One more question:
When I create as new project, the second dialog box shows all existing
projects in this path (the "default location according to the first
dialog box) as "referenced C/C++ projects. At the moment I here have the
huge cross project I mentioned and a small non-cross project I created
using Eclipse (with no Makefile yet, Eclipse just created some header
files etc.). In what way are these projects "referenced" ones ? It seems
to me that they are quite unrelated.
Thanks a lot.
-Michael
|
|
|
Re: Cross compile project [message #172568 is a reply to message #172499] |
Tue, 11 July 2006 15:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: mschnell.lumino.de
I finally was able to create a small project by extracting the
appropriate stuff from the huge project I have, renaming some files and
modifying the make files appropriately.
It does work when making it from the command line. It also works when I
do a "clean" or a "build" in Eclipse.
I can load and edit the makefiles in Eclipse just fine.
But when I try to edit a .c file I get an error message
"Error notifying a preference change listener"
Pressing "OK" on the dialog box makes it reappear ad infinitum. So I
only can "kill" the Eclipse process (gij) with a system tool.
I have no idea what this means.
Any help ?
-Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03152 seconds