Page 1 of 5

Problem importing a project in Eclipse

Posted: Thu Feb 17, 2011 11:41 pm
by Dave_fr
Hi,

I know this maybe a bit off topic but I'm desperately trying to get Chibios demos to compile on Eclipse. I followed the installation guide for Eclipse as well as the Eclipse user guide page. The problem is that Eclipse doesn't seem to recognize includes such as :

#include "ch.h"
#include "hal.h"
#include "evtimer.h"

On the side of the includes there are "?"s . When selected here is what it says : Unresolved inclusion: "ch.h" .

Am I suppose to had other files to the project ?

The looked at some MTLAB freeRTOS code and the whole RTOS code is included along the side of the actual code.

I don't know what I'm missing. No doubt it is something really basic...

Re: STM32 ADC kickstart example

Posted: Fri Feb 18, 2011 12:08 am
by liamstask
Is it a problem building the project, or just in Eclipse's ability to find the includes within its editor?

If it's the latter, probably trying to specify the include paths for those files in the project settings would be good. Otherwise, sounds more like a Makefile-related issue.

Also - it would be better to create a new topic for a new question in the future.

Re: Problem importing a project in Eclipse

Posted: Fri Feb 18, 2011 8:57 am
by Giovanni
Hi Dave,

Sorry if I had to move the topic in the correct forum.

About your problem, Eclipse needs to build an index of all the include files. Try to rebuild the index this way:
- Right click on the project.
- Index->Rebuild.

Those ? should not prevent the project from building, those would only affect the auto-completion feature of the Eclipse C/C++ editor.

Giovanni

Re: Problem importing a project in Eclipse

Posted: Fri Feb 18, 2011 11:28 am
by Dave_fr
Thank you for your quick answers.

I tried all mentioned solutions and still doesn't work. I thought a screen shot might save a long time describing the problem.

Image

Re: Problem importing a project in Eclipse

Posted: Fri Feb 18, 2011 11:50 am
by Giovanni
It is an error while compiling then.

It could be a problem with make.exe, try this command:

make --version

and verify the version number, it should be 3.81.

Also verify if the project path contains spaces, it is possible this can cause problems, you may try a different path. You may try to compile the demo from a command prompt and see if you get the same error, just give the command "make" from within the demo directory.

Giovanni

Re: Problem importing a project in Eclipse

Posted: Fri Feb 18, 2011 5:10 pm
by Dave_fr
I think my knowledge of Eclipse and toolchains is so superficial that it makes me feel that I don't belong to this group of advanced users lol

From what I understand, if it is a compiler problem, shouldn't it work with another compiler ?? I've tried yagarto, ARM GNU doesn't give me any more positive results.

Now, I don't even know how to access the g++ compiler command interface therefore, I don't know where to paste "make --version".

Is it me and my poor understanding or setting up Eclipse IDE isn't an easy task ?

Dave

Re: Problem importing a project in Eclipse

Posted: Fri Feb 18, 2011 6:13 pm
by Giovanni
Hi Dave,

Eclipse is not so easy to setup and use, so don't worry, you are not alone :-)

There is not a specific G++ command interface, you have to use the normal Windows command prompt, the one under Start -> Programs -> Accessories.

Change directory to the directory containing the demo you want to compile then type "make --version" and then just "make" in order to compile the demo.

Giovanni

Re: Problem importing a project in Eclipse

Posted: Sat Feb 19, 2011 12:03 pm
by Dave_fr
Ok so I've tried and it says that this command isn't recognized as an internal command.
Would this have anything to do with the environnement variable path in windows ?

Re: Problem importing a project in Eclipse

Posted: Sat Feb 19, 2011 12:12 pm
by Giovanni
Try to use cs-make instead of make, probably you only have the CodeSourcery version of make.

Giovanni

Re: Problem importing a project in Eclipse

Posted: Sat Feb 19, 2011 12:17 pm
by Dave_fr
Thanks Giovanni once again for your very quick answer !

So "cs-make --version" gives :
"GNU Make <Sourcery G++ Lite 2010.09-51> 3.81"