We’re building a new, free IDE for embedded software:
Embeetle IDE is not based on any existing IDE, such as Eclipse or VSCode. We built it from scratch, focusing solely on embedded software. That gives us a great flexibility in shaping its design - an advantage we wouldn’t have if we had based it on an existing, general-purpose IDE.
We would like to integrate PlatformIO into into Embeetle. Unfortunately, there is a technical barrier here before we can even get started. I’ll explain.
Embeetle: self-contained projects
In Embeetle, we stick to the “self-contained project” principle. Each Embeetle project should have all its source files within the project folder (and its sub-folders). Even libraries should be inside the project. There are pro and contra arguments for this. I’ll just mention them for completeness, although they’re not the topic of this post:
PRO:
It’s easy to navigate through the code-base. There’s no need to figure out a “library system” first, to know what files actually belong to the project and where to find them. A pure, self-contained project is as simple as it can get: only the files inside the project folder belong to the project. No confusion possible - not for the user, nor for the source code analyzer/parser.
You send a project to a colleague, and it will just work on his PC. There are no dependencies on files outside the project folder.
CONTRA:
- All libraries are duplicated each time you create a new project. However, this shouldn’t be a big deal if you use a version control system like Git.
Now we get to the actual problem at hand: PlatformIO is following a different strategy here. Unlike Embeetle, PlatformIO projects rely on external libraries (without a local copy in the project itself).
PlatformIO: 'external' libraries
My experience with PlatformIO is still limited, but I understand that the typical project looks like this:
📂 my_project
├ 📁 include project header files and header
│ files from external libraries
├ 📁 lib project specific / private libraries
├ 📁 src project source files
└ 📄 platformio.ini project config
Only the so-called “private / specific” libraries are fully present within the project folder. All other libraries are somewhere in an external folder, such as ~/.platformio/
. Take for example the Arduino Wire library, which can be found at:
~/.platformio/packages/framework-arduino-avr/libraries/Wire/src/Wire.cpp
Is there a way to instruct PlatformIO to make all libraries local? In other words, can one “ask” PlatformIO to keep a local copy in the my_project/lib
folder for each library?
If yes, that would make it so much easier for us to integrate PlatformIO into Embeetle.