
PlatformIO, open source ecosystem for IoT - wiradikusuma
http://platformio.org/
======
geokon
I've only heard good things about PlatformIO, but it always seems like they
sorta reinvented the wheel instead of using existing tools. They've done a LOT
of the hard work of making stuff "just-work", but why didn't they do all this
using the normal tool-chain like CMake/git/GNU-tools/crosstool-NG/etc.?

Is there something extra I'm missing that you can't do with the existing
tools? Or is it to get some kind of lock-in and promote a commercial product?
I've only done a very little programming for Arduino and the ESP8266 (where
you can get the normal toolchain running... with some effort), but I got the
impression that the embedded world has been trying to move away from magic
"platforms" that do things for you in the background

~~~
luca_ing
I agree.

I've been in a row with their founder over the same criticism you offer.

PlatformIO is really nice and smooth and seamless, as long as you do exactly
what they think you should be doing.

It would be a great product if it un-bundled all the functions. Of course that
would make it not-really-a-product, and they couldn't charge money for it as
easily. But instead it's a monolith that offers you little wiggle-room.

For instance for the longest time it didn't expect you would do unit testing.
There was no way to include it in your build, other than hacking PlatformIO
itself. They've since added unit testing, but only using a framework of their
choice. Which is nice, unless you already have a code base, or a preference
for a framework.

My friend put it quite succinctly:

"I understand it from a vendors POV: they know that customers feel the pain of
integrating disparate systems, so the sell the product that has done all that
for them. Once both sides have bought in, they are reluctant to acknowledge
that what they have is a monolith that makes the integration problem _harder_
rather than making it go away."

> Is there something extra I'm missing that you can't do with the existing
> tools?

There isn't. And in fact there are other build systems you can use without
having to use either the vendor's tools, or start form scratch.

> Or is it to get some kind of lock-in and promote a commercial product?

Pretty much. They're a company, and are (legitimately) trying to make a
profit.

~~~
ikravets
> It would be a great product if it un-bundled all the functions. Of course
> that would make it not-really-a-product, and they couldn't charge money for
> it as easily. But instead it's a monolith that offers you little wiggle-
> room.

Could you explain in details? Do you know that you can create own development
platform or add support for new embedded board wihout our support? \-
[http://docs.platformio.org/en/latest/platforms/custom_platfo...](http://docs.platformio.org/en/latest/platforms/custom_platform_and_board.html)

Yes, PIO Core 2.0 was monolitic. We rewrote it from scratch and announced
decentrizlied PIO Core 3.0 in September, 2016: \-
[http://docs.platformio.org/en/latest/history.html#id7](http://docs.platformio.org/en/latest/history.html#id7)

> They've since added unit testing, but only using a framework of their
> choice. Which is nice, unless you already have a code base, or a preference
> for a framework.

Which framework/workflow do you use for unit testing?

~~~
luca_ing
> Could you explain in details?

Mayb ein a separate post. That's a lot details :-)

> Do you know that you can create own development platform or add support for
> new embedded board wihout our support?

But you would still force me to use PlatformIO as my build system, correct?

Now, assuming I accepted that:

How much effort is it for someone who doesn't know PlatformIO that well,
doesn't know (or car about) SCons? Is it more or less effort than just using
make/cmake/build system of my choice instead?

Can I be certain that I won't find out too late that I'm now locked in
somehow? Are its processes truly flexible enough for what I need, and might
need in the future?

Can I even (with reasonable effort) create new commands (e.g. platformio
static_code_analysis) to shape PlatformIO to my needs?

> Yes, PIO Core 2.0 was monolitic. We rewrote it from scratch and announced
> decentrizlied PIO Core 3.0

Nice. Can you give me a quick pointer on how to just use the uploader portion
of PlatformIO given I already have binaries at some location?

> Which framework/workflow do you use for unit testing?

The one that makes the most sense. If I get to pick, I like to use Catch. But
since the decision tends to have already been made for me (through existing
test suites, or coworker's preferences), I use whichever is most practical.

Or even several in parallel, as is the case on my current project.

------
IgorPartola
PlatformIO is great. If you want to do serious work, and not just mess around
with Arduino, it provides a great ecosystem and excellent tooling. No custom
IDE necessary.

~~~
StavrosK
I especially love the library management part. There's no versioning, but it's
really helpful to be able to just list your libraries and have them be
automatically downloaded and linked to your executable.

~~~
Sembiance
I love and use PlatformIO, but I've dumped their library system because often
the libraries in the pio db are a version or two behind what I can get from
github.

~~~
ikravets
It depends on a library manifest (library.json, library.properties or
module.json). If library's author updates "version" field, then PIO Library
Crawler will update it in a registry.

Please note that you can manually update manifest and make PR to author's
repository. Click on "Manifest" tab when looking at a library in Web Registry
and you will see "Edit" button.

------
formulahendry
PlatformIO is just cool. Let me switch from Arduino IDE. Also, it provides
great CLI tool so that it could be well integrated with other IDEs/Editors.
Since I am a VS Code fan, so I could leverage the good CLI and build a
PlatformIO extension for VS Code:
[https://marketplace.visualstudio.com/items?itemName=formulah...](https://marketplace.visualstudio.com/items?itemName=formulahendry.platformio)

------
Mazzen
One major error in principle is that PlatformIO will infiltrate an existing
Atom installation. PlatformIO can not be installed in parallel (as far as I
know) and it will not warn before doing serious changes to your nicely
nurtured Atom configuration.

~~~
StavrosK
I'm guessing you mean the PlatformIO editor, which is different from
PlatformIO itself. You can install PlatformIO without installing the editor at
all, which is entirely how I use it.

~~~
Mazzen
Yeah sure but Atom is one of the most intriguing parts of PlatformIO,
especially if you want a better alternative to the shitty Arduino Editor...

------
cryptarch
I really enjoyed using its CLI in a summer job two years ago, I used it for
making some basic light-responsive RGB leds. Ivan Kravets was also very
helpful and responsive in the issue tracker.

------
Yaggo
Happy user here as well. Doing Arduino/ESP8266 development using macOS host.
PlatformIO is a fresh breeze for embedded development.

~~~
swah
I've been using [https://github.com/SuperHouse/esp-open-
rtos](https://github.com/SuperHouse/esp-open-rtos). Who exactly is the target
audience for PlatformIO?

~~~
Yaggo
Compare the 'Quick Start' documentation of esp-open-tool to ´brew install
platformio´, ´platformio init´. That's pretty much the point of PlatformIO, I
guess.

~~~
swah
Right, but is the expectation to stay in that platform as one improves his
skills?

~~~
Yaggo
I don't know. Personally, embedded programming is a hobby for me. As a long
time unix user, I've no problems with complex development environment setups,
but if there exists a _scripted_ , _tested_ , and _mainained_ alternative,
I'll probably prefer that, because I don't want to recall the configuration
details for every platform I program on (esp. if it's non-daily activity).

------
msurguy
I work with Arduino on ESP chips.

I could not imagine embedded development without PlatformIO. With just so many
types of hardware, each having slight dofferences and intricacies, it quickly
becomes wasteful to use individual solutions. PlatformIO accomplishes so many
goals at once, I am deeply grateful for this product!

------
poyu
I've been using it for a while developing ESP8266 projects. It's really
enjoyable to not having to mess around with Makefiles and managing
dependencies myself.

------
skywal_l
Been using it for a while. It's pretty good. Allows to do serious work in a
controlled environment.

------
jasiek
I've been using it for at least a year now, A++ would code again.

