Hi, I’ve posted an article on my blog describing the procedure to have the Eclipse CPP environment set up on a Windows machine, but I’m stuck with some weird errors reported within Eclipse but not blocking the build process.
When I open the application.cpp file I see errors on pinMode, digitalRead, digitalWrite, analogRead and analogWrite functions: for them all the message is something like
Hi @rlogiacco - I’m not particularly familiar with Eclipse so I don’t have great suggestions here, but it does seem like there’s some issue in pulling in dependencies. Are there settings for your project where you provide a list of files to be included? If so, perhaps that list is not currently including everything from all three firmware repositories?
@satishgn that re-index didn’t work: the indexer run for a little less than a minute but no joy. Is it possible I’ve to instruct somehow Eclipse to add some resources to the index?
Please find a screenshot of my core-firmware clone within Eclipse
rlogiacco posted a link in his blog for a better understanding for a windows setup. I have used the information for there and here to set up my environment. I also added the following lines to the makefile as per his blog.
I found the problem. On my system Win7 -64bit. It did not like the paths. "C:\Program Files (x86)"
I moved the following installed folders into a new folder i created "C:\Building"
GnuWin32
GNU Tools ARM Embedded
Git
dfu-util-0.6
Now i was able to run make and everything worked just fine!!!
I also was able to use the make files without modifying them for the path commands.
hope it helps someone.
I like Eclipse better than Netbeans @rlogiacco, .according to your blog, you mention “2) Select GNU Autotools as Toolchain” yet i do not have this option.
@chrisb2, when you mention “Properties -> C++ Build -> Discovery Option -> GCC C++ Compiler -> Compiler invocation command” i dont have this either. Is there some plugin that i am missing ?
Maybe when you have time on here or your blog you can snap some screenshots of all the pertinent settings so we can see them.
I have created a blog post which goes through the steps with screen shots, its pretty much identical to that of @rlogiacco. They key difference is I have a slightly different ARM tools location in my environment PATH.
The message, in italian, clearly states a file not found error and it refers to the arm-none-eabi-g++ which is available under C:\Apps\spark\GNU Tools ARM Embedded\4.8 2013q4\bin but not under C:\Apps\spark\GNU Tools ARM Embedded\4.8 2013q4\arm-none-eabi\bin: is it possible you have two entries in your path environment?
@seulater have you installed the GNU ARM Toolchain? I’m not sure, but I believe Eclipse shows that entry if it detects the toolchain on the system… I did nothing special to have it shown.
@chrisb2 I don’t have the Properties -> C++ Build -> Discovery Option -> GCC C++ Compiler -> Compiler invocation command option either, I’m using Eclipse Kepler
UPDATE: I tried to use a completely fresh Eclipse and Toolchain installation without any success. Whenever I open up the application.cpp file in the Eclipse editor I get those errors.
UPDATE #2: I fixed this by manual adding arm-none-eabi/include to the C/C++ General > Paths and Symbols > Includes > GNU C++ includes list… What surprises me is it seems you guys don’t need this step. Am I doing something wrong here?
@chrisb2 , Thanks for the screen shots. I too was at the same point with the settings when i received an update to this post. Even though everything compiles ok the indexer is still messed up. For some reason i cannot get eclipse to see all the includes.
@rlogiacco, It seems to be all working now.
Dam Windows. I have tried all these steps several times, and many other different combinations that have worked well with other things I have used. Nothing worked right. I decided this morning to revert my PC back to a virgin image and try again. Now everything is working properly.
The only thing different I did was when creating a new project and selecting external source files was that I pointed to the root of the sources so I could see all the 3 folders and their files.
@seulater just to double check, did you manually add the arm-none-eabi/include folder to the project Paths and Symbols (step 5 on my blog post)?
If you didn’t I wish to verify your installation steps against mine because I had to do that in order to fix my Eclipse editor warnings.
@chrisb2 I believe you didn’t have to manually add that folder: can you please check if it is there nevertheless? I’m considering the possibility something failed during import…
Does anybody else need that manual step?
Is it ok to have it there or am I including the wrong folder?
UPDATE I now have other errors in deeper includes, like in spark_-wiring.cpp
Multiple markers at line 57
- Symbol 'GPIO_Pin_7' could not be resolved
- Symbol 'TIM_Channel_2' could not be resolved
I believe the manual path addition is not going to solve this so I’m going for a more radical solution…
@rlogiacco, yes, I added C:\Spark\GNU Tools ARM Embedded\4.8 2013q4\arm-none-eabi\include.
One thing I noticed is that if you also add that to GNU C as well it messes up the indexer. so only add it to C++.
I also tried removing it and it does have an affect on the indexer.
Pulling in my old code to give it a run for the money, and now the indexer complains about this call.
SPI.setClockDivider(SPI_CLOCK_DIV8);
Description Resource Path Location Type
Symbol ‘SPI_BaudRatePrescaler_8’ could not be resolved application.cpp /Test/core-firmware/src line 44 Semantic Error
So close I can taste it, but still not working 100%
Thanks to everybody in this thread for the contributions, that helped me a great deal to have Eclipse setup for Core dev.
The only minor problem I seem to encounter is that I get some warnings, I don’t understand and can’t get rid of
make all
makefile:154: warning: overriding commands for target `obj%.o'
makefile:146: warning: ignoring old commands for target `obj%.o'
makefile:163: warning: overriding commands for target `obj%.o'
makefile:154: warning: ignoring old commands for target `obj%.o'
Building core-common-lib
makefile:95: warning: overriding commands for target `obj%.o'
makefile:86: warning: ignoring old commands for target `obj%.o'
make[1]: Nothing to be done for `all'.
ECHO is off.
Building core-communication-lib
makefile:97: warning: overriding commands for target `obj%.o'
makefile:88: warning: ignoring old commands for target `obj%.o'
make[1]: Nothing to be done for `all'.
ECHO is off.
I have changed the forward slashes in the makefile to backslashes and done the RM/MKDIR substitutes, and now I get these warnings.
It seems as if there was the path separator “” missing between “obj” and “%.o”, but why?
Are these of any interest? Has anybody an idea where they come from and how to get rid of them?
My best advice is to revert your changes to the makefiles and add <path-to-git-installation>\bin to your PATH env variable: let me know if that helps.
I believe once we have a fully reproducible instruction set it will be worth to update the official IDE installation instructions.
@ScruffR did you have to add the arm-none-eabi/include folder to the Path and Symbols? Have you encounter the additional missing symbols warnings I reported? I’m trying to understand if that’s relative to my environment or if it’s generic.
@satishgn have had to add anything to the Path and Symbols to have Eclipse properly parse all the includes? If you did it would greatly help if you could share your core-firmare settings