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

Problem importing a project in Eclipse

Post 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...
liamstask
Posts: 34
Joined: Wed Dec 08, 2010 5:42 pm

Re: STM32 ADC kickstart example

Post 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.
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 »

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
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post 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
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 »

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
Dave_fr
Posts: 27
Joined: Thu Feb 17, 2011 11:26 pm

Re: Problem importing a project in Eclipse

Post 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
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 »

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
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 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 ?
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 »

Try to use cs-make instead of make, probably you only have the CodeSourcery version of make.

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 once again for your very quick answer !

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