platformio-core icon indicating copy to clipboard operation
platformio-core copied to clipboard

Support Arduino IDE compatible file layout

Open pelikhan opened this issue 11 years ago • 12 comments

When trying to open a sketch file in Arduous IDE from the src folder, it insist on moving it to a sketch folder. Could pio support a file layout that just works with arduous ide? (Or at least as much as possible).

pelikhan avatar Dec 24 '14 22:12 pelikhan

I hope, PlatformIO will have own IDE in the future :smile: Why do you use Arduino IDE? You can integrate PlatformIO into popular IDE with any modifications to PlatformIO. See examples of IDE Integration.

For example, I use VIM + PlatformIO or Eclipse + PlatformIO. Also, it is easy to integrate with Sublime Text.

ivankravets avatar Dec 24 '14 22:12 ivankravets

I use Arduino IDE because that is the most popular IDE for Arduino. All tutorials use it.

A couple simple changes, like using the proper folder names, would reduce the friction between platformio and arduino ide.

pelikhan avatar Dec 25 '14 03:12 pelikhan

Similarly, if you want to share a library or program with the broader community its better if it can be easily used with the Arduino IDE. I've never actually used the Arduino IDE for editing code, but for compatibility with existing Arduino sketches and such its basically required currently.

(I'm just getting onboard with platformio rather than trying to build makefiles directly using the newer Arduino command line tools, but for my purposes to work I'd need to be able to easily share the code with folks that have probably never used a Unix based command line, so compatibility with Arduino IDE would be a must)

aphelps avatar Dec 25 '14 05:12 aphelps

"100% arduous comparibility" great for arduous fans

pelikhan avatar Dec 25 '14 17:12 pelikhan

Hey @pelikhan @aphelps ,

Thank you for your arguments. I will implement that feature in the next release :+1:

ivankravets avatar Dec 25 '14 17:12 ivankravets

Hey @pelikhan @aphelps,

I found a solution in this situation - just rename your file to src.ino. It will be compiled by PlatformIO and is compatible with Arduino IDE.

Does it work for you?

ivankravets avatar Dec 28 '14 16:12 ivankravets

Do you mean to rename the file or the folder?

pelikhan avatar Jan 03 '15 19:01 pelikhan

Do you mean to rename the file or the folder?

File. Like:

.
lib
src
   |-- src.ino
platformio.ini

ivankravets avatar Jan 03 '15 20:01 ivankravets

@pelikhan @aphelps did you try this solution?

ivankravets avatar Jan 06 '15 15:01 ivankravets

I did verify that it would compile those src.ino files over the holidays, but its going to be a bit before I get time again to play with this extensively. I have some projects that need to be converted to a better make system than the IDE (and platformio looks to be one of the best options), but they're pretty extensive with a bunch of library dependencies (both personal libraries and 3rd party ones) so its going to take me a good bit of work to make the switch. I'll definitely let you know if I hit issues that seem to be related to platformio once I get to the time to work on the conversion (probably a week or two).

aphelps avatar Jan 06 '15 18:01 aphelps

but they're pretty extensive with a bunch of library dependencies (both personal libraries and 3rd party ones)

You can use 3rd party libraries from Library Registry. If some libs are not listed here, please tell me and I will add them.

As for "own" libs - just move them to lib dir in project. PlatformIO will automatically use them.

ivankravets avatar Jan 08 '15 17:01 ivankravets

Solution works great.

pelikhan avatar Jan 20 '15 15:01 pelikhan