Creating, debugging & using custom Arduino library [message #1769429] |
Mon, 31 July 2017 09:25 |
Eclipse User |
|
|
|
I just started using the Eclipse C++ Arduino IDE in Eclipse Oxygen, installed according to the manuals. After testing it with the Hello World example, I wanted to continue with writing and using a (simple) library. So far, this is driving me a bit crazy.. Up front: I am fairly unexperienced with C++ and no experience with Eclipse. I do have plenty experience with Python (using PyCharm IDE) though.
My main struggle: how do I create and easily debug Arduino libraries to use these? What I have tried:
- Create a header and source file in the main project, and include the header in the main file. The header is not recognised, resulting in a fatal error upon building.
- Creating a Static Library project, and from my main project copy (or link to) the header & source files. Again, header is not recognised resulting in a fatal error.
- Creating the Static Library project directly in my Arduino libraries folder, add a library.properties file and include the library via Properties > Libraries in the main project. This results in conflicts with the makefiles ("make: *** no target ...")
My only "working" solution so far is to create a Static Library project in my workspace folder and copying the files manually to the Arduino libraries folder. Besides it being a pain having to copy/paste the files after each edit, my library files cannot find the included standard Arduino library, nor any other standard library, and consequently I can't use auto-complete and all the used functions are marked as errors.
I did find the tutorial of Baeyens on creating libraries, but it uses the Sloeber plugin and it is slightly different from the Eclipse Arduino C++ IDE plugin.
Any thoughts on this? I have looked the entire morning and did not find any satisfactory explanations unfortunately.
|
|
|
Powered by
FUDForum. Page generated in 0.03022 seconds