PlatformIO Integration

Ill start by saying that I am an avid PlatformIO user and lover.

Whenever I start and embedded project, the first thing I always do is type pio init

Here are the reasons that I feel Particle Devices should have support in the PlatformIO ecosystem:

  1. Library Management
    The PlatformIO library management system is fantastic. Not only does it allow you to easily include hosted libraries, but it allows you to include them with version controlling (minor updates, patch updates, no updates). Additionally, It allows easily including external libraries through .zip urls or git http/ssh urls. This is a fantastic feature for proprietary code you dont want to hand to another company, even if you have no reason not to trust them (No offense, I just dont trust anyone).
  2. Unit Testing
    PlatformIO makes it SUPER easy to do unit testing, both in software and on hardware. They have an entire framework setup to allow for automated flashing and testing of multiple scripts on multiple boards, all with 1 keyboard shortcut. This extends to unit testing filtering for different boards (exclude network tests for boards without network hardware, etc.)
  3. Continuous Integration
    The easy install nature of PlatformIO makes it easy to setup CI tasks for linting, unit testing, and other automatic crazy tasks. This makes it easy for teams of developers to review code and decided what is safe to merge and what isn’t. I don’t think anyone here needs me to tell them of the beauty of CI.
  4. Debugging
    PlatformIO also includes an entire debugging configuration. This could likely be easily integrated with the Particle debugging hardware that already exists with JTAG. This could make for some really smooth development.
  5. VScode Intellisense
    I don’t think anyone can argue that VScode provides one of the best Intelligent code completion systems around. Along with easy completion, you get goto\peek definition which allows you to read the function you are calling, you get doxygen comment support in C++ for documentation built into the code, and So many more wonderful things Ive come to love. If VScode isnt your development environment, thats cool, the PIO CLI is the real magic, the vscode extension just creates keyboard shortcuts and UI buttons for those less terminal savvy.
  6. Overall Compatibility
    Adding Particle support to PlatformIO would allow for developers to easily make more platform agnostic libraries. Adding Particle support would mean that developers could add support for particle devices without needing to switch to another IDE and check that their code works. This is ease is further extended by the CI aspect. Overall, this could allow Particle patrons yet another step in development: Particle Web IDE for basic project, Workbench for more complex projects, and PlatformIO for professional development and long term support projects.

In summary, Not only do I think it could enable more for the users, but it could broaden the appeal of the Particle platform.

Particle provides an exceptional IOT platform for device monitoring and support, Combining this with the professional development of PlatformIO would be a dream come true!

1 Like

It appears there is support for using Particle Gen 3 boards with PlatformIO using Zephyr.

I believe it could be possible to add support for DeviceOS by creating a custom platform in PlatformIO.


In the meantime, would you be interested in neopo, a Python-based implementation of Particle Workbench that I maintain?

Unfortunately, making a PlatformIO custom platform is a bit over my head.

Your neopo tool seems great, and it may be useful if a pip package can be used with the PlatformIO custom platform (instead of needing the Particle CLI installed).

I might have a go at it. I'm familiar enough with Particle's toolchains.

@m_m, Have you considered a PlatformIO integration for Particle?

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.