PlatformIO Community

I'd like to add a 'framework' for a new "Arduino on linux" library/tool. But

Hi,

To facilitate porting my platformio based mesh-radio project (Meshtastic) to run on a non RTOS platform (linux) I’ve (kinda) made a port of the Arduino API to run on top of linux:

My first rough test approximately works but I still need to do cleanup and add more real device adapters (I hope to be approximately finished with this next week). Currently my build for this is a nasty hacked up makefile, but I’d really like to be able to build this as just another environment underneath platformio.

I know very little about the innards of platformio and I’m looking for advice on how to best achieve this. I would love any feedback or advice ya’ll can offer.

Questions:

  • I suspect I’ll need to make a new ‘framework’?
  • Can I use frameworks even if I want the user to select “platform = linux_x86_64”?
  • Are there any docs you would recommend on how to do this? My reading has failed me.
  • Where should I register it so the framework= line in client apps platformio.ini will work?
  • Should I start from just looking into something like “framework-arduinoespressif32” and using that as a template?
  • I assume once I make this as a 1st class framework, the lib_deps list of libs (which say they require ‘arduino’ as the framework) will happily then fetch and I can compile them just like I’m one of the more conventional arduino ports?

Thanks again for any advice. :heart_eyes:

Update: by copying one of the existing frameworks I think I have most of these questions answered. I’ll convert the notes into a little how to make a framework blurb later.