Some thoughts about Frameworks and a build system question

I’ve been digging into the build system a bit (have come up with questions beyond what’s in the documentation) and it looks like Frameworks are not “plug-ins” like libraries are because they’re hardcoded into the manifest for each Platform that supports them.

That is, you can’t just add a new framework that the Platform doesn’t know about, you’d have to modify the platform or create a new custom platform that knows what to do with a new Framework.

I think the reason for this is probably because Frameworks are usually assumed to be vendor-supplied SDKs or third-party RTOS’s which have no knowledge of (or build logic for) PlatformIO, so the Platform is given a way to include a builder script to build a package that doesn’t have to contain any PlatformIO build logic and doesn’t need any modification to work.

But it appears that due to extraScripts in the manifest for Libraries, a Framework could also just be a Library package (which is a “plug-in” that the Platform doesn’t need any special support for) and it would still be able to modify the build process the same way as a Platform does for a Framework?

Is there anything special about Frameworks other than showing up in the GUI list of Frameworks for a given Platform? Or could any Library operate exactly like a Framework if included in a project and it had the necessary scripts to modify the build process?

1 Like