Skip to content

Hardware serial port as "Serial" #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GHPS opened this issue Apr 20, 2012 · 2 comments
Closed

Hardware serial port as "Serial" #10

GHPS opened this issue Apr 20, 2012 · 2 comments

Comments

@GHPS
Copy link

GHPS commented Apr 20, 2012

First of all: Thanks for the great plugin! It has made the work with
Eclipse and Arduino much easier - especially linking libraries.

Unfortunately the Serial library doesn't work out of the box.

The solution is quite simple: Include

extern HardwareSerial Serial;

in the specific project .h file.

A new version of the plugin could do this by default.

@jantje
Copy link
Member

jantje commented Apr 21, 2012

GHPS
Thanks fro the nice words.
The serial problem is a known problem.
please see http://eclipse.baeyens.it/Arduino%20eclipse%20plugin%20FAQ.htm#bugs on the best way to get rid of the issue.
Note that adding extern HardwareSerial Serial; is not a good solution as it may create conflicts on some boards (for instance the mega)
Best regards
Jantje

@jantje jantje closed this as completed Apr 21, 2012
@GHPS
Copy link
Author

GHPS commented Apr 22, 2012

Great - thanks for your fast help!

Indeed it helped to change the index settings. The Serial library is found after
these steps (quote from the FAQ):

Setting the preference windows->preferences->C/C++->indexer->index unused headers.
Setting the preference windows->preferences->C/C++->indexer->index source and header files opened in the editor.
Setting the preference windows->preferences->C/C++->indexer->Files to index upfront . Add arduino.h and or WProgram.h.
Do next four in this sequence
Right click the project->index->Search for unresolved includes.
Right click the project->index->Freshen all Files.
Right click the project->index->Update with modified files.
Right click the project->index->Rebuild.

@pep pep mentioned this issue Sep 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants