Problem importing a project in Eclipse

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post by Dave_fr »

I did install the yagarto tools. Put the directory of "make.exe" in the envirronement variable.

This is what I get :

Image

I tried with other demos and the same type of error occurs...
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Problem importing a project in Eclipse

Post by Giovanni »

This is not good, there is something in your PC conflicting with the tools, I never saw make fail that way.

I suggest to uninstall the yagarto-tools, try installing cygwin instead, it includes all the required commands, hopefully cygwin does not have the same problem.

http://www.cygwin.com/

Giovanni
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post by Dave_fr »

Ok so apparently there was a problem with the g++. In fact, after reinstalling g++ it gives me now the same error message as with yagarto that is to say :

Image

Now the two compilers give me de same error. This leads me to think that I must have done something wrong with the files.
I'll try with older chibios packages just in case...
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Problem importing a project in Eclipse

Post by Giovanni »

Just try to unzip the 2.2.0 again just in case something got inadvertently modified.

Giovanni
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post by Dave_fr »

This last problem is now fixed. When make gives you : : Interrupt/Exeption caught <code = 0xc00000fd ... it is apparently a bug with windows and enviromment variables. The PATH in the environment varible should NOT contain any "(".
When you install compilers, the default directory leads you to install in "C:\Program Files (x86)". The "(x86)" causes it to crash.
One way to go around this wird bug is simply to install the compiler in a directory that doesn't contain "(" for instance "c:", update the environment path with the new directory, reboot and it works !

I can now compile using command line but I still have issues with making Eclipse to reference the includes. Somehow, when I right click on the project and hit "Clean project" it seems to be compiling. Still a long to go before I can get familiar with all the Eclipse's subtleties but definitely going somewhere...
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Problem importing a project in Eclipse

Post by Giovanni »

Being able to compile from the command line clears the path for compiling into Eclipse. As general rule, it is always better use paths that do not contain spaces and symbols.

I suggest you delete the project from Eclipse (make sure to delete the .project and .cproject files it created into the demo) and then follow again the steps required for importing the project in Eclipse.

Giovanni
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post by Dave_fr »

I don't know why now it doesn't compile ...

Here is another screen shot :

Image
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Problem importing a project in Eclipse

Post by Giovanni »

Because you should do a "make clean" before compiling other demos else the object files from different demos get mixed.

Giovanni
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post by Dave_fr »

Thanks Giovanni,

Now no problem with the command line builds.
Nevertheless I don't really how to achieve the same thing in eclipse. I still had had all the includes not referenced. I found that by first clicking "clean project" this would make eclispe to find the includes :-) . By the way, when I click "clean project" it looks like the process finishes by a normal ans successful build. If right after I click "build project", it's going to say "make: Nothing to be done for `all'.". Then I try to modify the code and launch another build. It still says "make: Nothing to be done for `all'.".
Lastly if I modify the code with a big mistake or something missing and then click "clean project" it will perform like everything was fine.
Given these little tests I don't understand how to use eclipse the modify rebuild test ...
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Problem importing a project in Eclipse

Post by Giovanni »

If you get:

"make: Nothing to be done for `all'."

Make is telling you that the program has already be compiled so there is no need to compile it again. If you do "clean project" then you are able to compile again.

It is the normal behavior.

Giovanni
Post Reply