PlatformIO Community

Registering new platform and framework?


Dear all,

I would like to register a new platform and framework at PlatformIO, but have found no documentation how to do so.

They are based on the Cosa framework:
In my fork I have updated and tested the build scripts according to the latest pio:

Is there a way to register not only new libraries, but also platform and framework?

Generally speaking, I also expected that it should not be needed to create a new platform for this (as the underlying one is atmelavr), so I expected that only a framework is enough. However, I have not found a way to add a new framework and allow existing boards to use it without modifying the board definitions in the atmelavr platform board files?



Thank you so much for this work! We would be glad to see Corsa in our registry. A few questions, why do you need these?


You need just to add ROOT libraries directory. See

Also, ?

Why you can’t generate valid macro on-the-fly in the Python script?


Ivan, thanks for your prompt reply!

Regarding your questions:

  1. I wasn’t aware that adding root only is enough - will try it out
  2. It should be possible to create macros on-the-fly, but:
  • It should generally be easier to maintain the macro mapping in .h rather than .py, and the general split of responsibilities between basic build scripts and board-specific mappings seems clearer this way
  • I would expect that updating build scripts should not be needed while adding support for new boards

That said, I have a couple of clarifying questions:
3) I’ve managed to eliminate the need to define a new platform, so platform=atmelavr can readily be used in combination with framework=cosa (readme with instructions added to Git). However, adding a new framework seems to affect the underlying platform package: a) it’s platform.json needs to be updated to introduce the new framework as supported, and b) all board.json files need to be updated as well. How do you manage these inter-package dependencies in terms of release alignment? E.g. if the framework adds support for lets say attiny8x - this needs to be reflected in a new platform release too?