Problem importing a project in Eclipse
Moderators: RoccoMarco, lbednarz, tfAteba
Re: Problem importing a project in Eclipse
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...
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...
- 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
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
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
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
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
- 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
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
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
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
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
- 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
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
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
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:
==>
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!
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!
- 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
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
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
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!
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!
- 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
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
After creating the folder perform a reindex operation (right click on the project, then search "Index").
Giovanni