Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 2 months ago.
Eclipse indexer does not recognize certain mbed classes, does recognize others
Hello. I setup Eclipse C++ with the gcc arm embedded toolchain (not gcc4mbed). It works great, but I ran into an issue related to the indexer (I think) on my latest project.
My problem should be clear if I give the steps to reproduce my issue:
1. Create some class and #include "mbed.h"
2. Declare some member variable of type DigitalOut. Notice that Eclipse recognizes this just fine because the text turns bold, and code completion works fine when interacting with the variable.
3. Declare another member variable of type PwmOut. Notice that Eclipse does NOT recognize this, the text does not turn bold, and code completion doesn't work because Eclipse doesn't know what a PwmOut is. Eclipse says:
Errors (1 item)
Type 'PwmOut' could not be resolved.
4. Build project completes successfully, compiler throws no errors, even though Eclipse still does not recognize PwmOut. Binary runs correctly on my LPC1768.
How is it possible that Eclipse can recognize DigitalOut but not PwmOut? Both are listed in the same code block inside mbed.h, and DigitalOut.h is in the same directory as PwmOut.h.
I have tried adapting suggestions I found when searching on Google, including messing with Paths and Symbols, rebuilding the index, and "Freshening" all files in the index.
Any help is appreciated! yankee
HI Edward,
Have you checked to see if Pwmout.h Is included in the source?
posted by Andrea Corrado 19 Sep 2016Yes, it is. It turns out that Eclipse couldn't recognize device-specific types like PwmOut because developer.mbed.org does not export a required header file with a list of #define's for each device. Please see my stackoverflow post for details http://stackoverflow.com/q/39553139
posted by Yankee 14 20 Sep 2016