-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add PlatformIO library.json #31
Conversation
Since the headers are now in a subdirectory, a library.json file is necessary to allow PlatformIO to find them.
Thanks for the PR. But I'm confused because EpoxyDuino was never intended to run under PlatformIO. It was designed to allow Arduino programs to compile under a Unix-like environment, using Make. Can you help me understand how and why you are using EpoxyDuino under PlatformIO? |
PlatformIO supports the "native" platform, which tries to compile the Arduino program to target the development machine, just like your Makefile. I use this feature with EpoxyDuino to run unit tests. |
So I don't fully understand the advantages of using PlatformIO in native mode, but I am willing to merge this in, since it was important enough for you send me the PR. However, I will be adding a comment in the README.md to explain that this feature is unsupported by me. If I happen to break it in the future, I won't be maintaining it. |
Thanks for merging this! I build my firmware for my device using PlatformIO, and use it to manage all my dependencies and build settings, so using it for unit testing as well is convenient. This will also likely be useful to other users, since a couple of people have mentioned that they are using PlatformIO as well (#20, #6). |
When I looked into PlatformIO, about 2 years ago I think, there were many things that I liked about it, for example, using a |
I don't use the Arduino IDE or |
Yeah, although I don't use the Arduino IDE for my own development, I have to maintain compatibility with the IDE to allow my Arduino libraries to be accessible by the general community. I cannot say, "Here are the example sketches that show how to use my libraries, but they compile only with PlatformIO". I once tried to use a symlink to allow both PlatformIO and the IDE to work. That works on my machine, but the Arduino Library Manager silently rejects any git repo with a symlink, probably because symlinks are not compatible with Windows. |
Thanks very much for merging this library.json. Using this makes it very easy to work with PlatformIO. As already mentioned in further posts the 'native' Platform is a standard platform (and not an unsupported feature) in PlatformIO. It uses built-in linux toolchains (preferable based on GCC). Regarding the '.ino' vs '.cpp' ist is very easy:
...and here my 'platform.ini' file:
the definition of the compiler switch 'EPOXY_DUINO' is important to use the predefined main-loop in the existing 'main.cpp', the 'EXOXY_CORE_ESP8255' is optional for my ESP simulation. the 'lib_deps' definition automatic download the ExpoxyDuino-files from github ...that’s all ! (no further download or installation, no custom 'make' file, or any other modification) complete demo-project is available at: @bxparks: take a second look at PlatformIO...it is (as extention in VS-Code) a very powerful and user-friendly tool. |
This PR allows this library to be included as a PlatformIO dependency. Only the basic library is supported, not any of the extras in the
libraries
directory. PlatformIO doesn't support multiple libraries in a single repo (https://community.platformio.org/t/how-to-install-libraries-from-a-github-repos-subfolders/13458), but I think basic support is better than none.In the past (version <=0.5), the files were all in the base directory, so PlatformIO could figure out how to build it without any help. Since the headers are now in a subdirectory, a
library.json
file is necessary to allow PlatformIO to find them.