Page 4 of 5

Re: Problem importing a project in Eclipse

Posted: Wed Feb 23, 2011 9:59 pm
by Dave_fr
Hi Giovanni,

Ok cool, it looks like now it is working the way it should. I still have more questions. How is it that when I introduce mistakes in the code, Eclipse doesn't seem to notice that there is error (by, for example underlining) like it's always been the case with the other IDEs I used ? And why does it let you compile ? I Check in the console messages no mention of an error is being made. I really don't understand that...

Re: Problem importing a project in Eclipse

Posted: Thu Feb 24, 2011 9:06 am
by Giovanni
Eclipse does not prevent you from compiling.

It parses the output log from the compiler and builds a structured view of errors into the "Problems" tab. If the "Problems" tab is empty then there are no problems.

Giovanni

Re: Problem importing a project in Eclipse

Posted: Mon Jun 06, 2011 4:20 pm
by Dave_fr
Hi,

Everything now works appart from the "Unresolved inclusion:" warning eg:"ch.h". I read somewhere that you had to go to "Project" => "Properties" expand "C/C++ General" => "paths and symbols" and from there add the path to something.
Can you tell me what path to add ?

Is it the path to a compiler's folder ?
Is it a path to a Chibios folder ?

Best regards,

Dave

Re: Problem importing a project in Eclipse

Posted: Mon Jun 06, 2011 5:49 pm
by Giovanni
Hi,

Do you see that warning while compiling or within the eclipse edit window (the yellow icon)?

If it is the icon then probably you have to rebuild the index: right_click_on_project->Index->Rebuild

Giovanni

Re: Problem importing a project in Eclipse

Posted: Mon Jun 06, 2011 9:33 pm
by Dave_fr
Hi,

I see it with the yellow icon on the left side and the include is underlined in yellow. I compiles without any problem. I can even load the code and get it running on the board.
I rebuilt the index, no success.
Maybe my rebuilt index options aren't right ....?

Ps : I'm only starting now to play with the RTOS. Even though it is a LOT to learn for me, I must say that I'm much IMPRESSED with Chibios capabilities. Amazing piece of work !

Best regards,

Dave

Re: Problem importing a project in Eclipse

Posted: Mon Jun 06, 2011 9:41 pm
by Giovanni
Hi,

Thanks for appreciation :-)

You may try to delete and then re-import the project in Eclipse but it is just an Eclipse minor issue, the important thing is that you are able to compile and run your code.

Giovanni

Re: Problem importing a project in Eclipse

Posted: Tue Sep 20, 2011 11:09 am
by OlivierD
Hello there, I'm trying to do the same thing. I tried 2 solutions, the first is to include manually all the repertories including the .h files. This is pretty painful because you have to include one repertory for each file (worst case) because of the direct inclusion of the files. The other solution is pretty similar, this time I include the whole ChibiOS path in the "Path and Symbols" menu and then I change the relative inclusions like this:

Code: Select all

#include "hal.h"

==>

Code: Select all

#include "hal/include/hal.h"


It works but it's quite painful to put in place in all the files. Do you have a better idea? All the error messages are pretty annoying if using Eclipse as an IDE. I get the warnings for the inclusions and Eclipse gives me errors for every missing declaration. It compiles fine at least!

I'm getting a JTAG probe in a few days, I'm really curious to play with this OS!

Re: Problem importing a project in Eclipse

Posted: Tue Sep 20, 2011 11:45 am
by Giovanni
Hi Olivier,

Try this guide:

http://www.chibios.org/dokuwiki/doku.ph ... s:eclipse2

Look at this part "Importing Makefile projects into Eclipse".

I believe you are trying to recreate a project under Eclipse manually, there is no need for that, Eclipse can create a project from the Makefile automatically and there is no need to modify anything (I do this all time).

Giovanni

Re: Problem importing a project in Eclipse

Posted: Tue Sep 20, 2011 12:22 pm
by OlivierD
That's the one I followed (among many others that led to the same result). I don't know why but Eclipse gives me an "undefined reference to xxx.h" with each include and errors relative to the declarations in those files (i.e. Eclipse does not find the files by himself, I have to insert them in the Path and Symbols menu). It compiles perfectly, but I can't really use all the features of Eclipse to create my code.

To be clear, I generated the Eclipse project using the demo folder (ARMCM3-STM32F103-FATFS-GCC) and I rebuilt the index. I'm using Eclipse Indigo, if that matters.
EDIT: I forgot, I'm on a Mac =P Well it shouldn't change anything relative to Eclipse, I followed a tutorial similar to yours in every way too.

What I intend to do (if I can't fix this) is to generate a .xml file containing all of my inclusions in the Path and Symbols menu. This way I'll be able to quickly correct the problem. But if you have any better idea, I'd be glad to hear it!

Re: Problem importing a project in Eclipse

Posted: Tue Sep 20, 2011 12:41 pm
by Giovanni
Inside the imported project create a virtual folder linked to the ./os/ directory, this will let Eclipse index all the OS files (needed for auto-completion and other features).

After creating the folder perform a reindex operation (right click on the project, then search "Index").

Giovanni