I'm afraid I can't comment on PlatformIO, as I've never used it, but VisualMicro have made a comparison chart between VisualMicro, PlatformIO and the Arduino IDE. Obviously they are biased, but it is pretty clear that paying the extra for VisualMicro gets you some useful features over PlatformIO.
Wow, that comparison table is disingenuous.
“Arduino IDE Compatible
Yes - Visual Micro is fully compatible with the Arduino IDE, allowing backwards compatibility for your projects.
Yes - All Arduino IDE Sketches will work in the Arduino IDE
No - PlatformIO requires converting your INO to CPP, which makes it incompatible with the Arduino IDE” — outright false. Though it is true that PlatformIO is optimized to use .cpp files, I know for a fact that you can open .ino files in PlatformIO and they will compile and run. It knows that if it encounters a .ino file, to do what Arduino IDE (and VisualMicro) know, which is to silently insert the Arduino.h header and tweak some compiler flags or something.
“Supports Single INO
Yes - Visual Micro supports INO Sketches fully
Yes - Arduino IDE supports INO Sketches fully
No - PlatformIO requires conversion from INO to CPP and additional headers adding [sic].”
Nope. It doesn’t require it. And isn’t this just the same thing as above worded differently?
If you do choose to convert, converting to .cpp requires one single change: inserting the “#include <arduino.h>” line. AFAIK, adding that to a .ino file won’t hurt it even in Arduino IDE. Explicitly adding it to a .ino file in PlatformIO gives the IntelliSense engine the header to provide code autocompletion and gets rid of squiggly underlines.
“Supports Multiple INO
Yes - Visual Micro allows multiple INO files in line with the Arduino Specification
Yes - Arduino IDE supports multiple INO files in tabs
No - PlatformIO requires conversion from INO to CPP and #include statements using [sic]”
Could be. I never tried
not using #include statements in Arduino IDE…
“Sharing of variables and methods within multiple .ino files
Yes - Visual Micro allows sharing of variables and functions between your INO files
Yes - Arduino IDE allows sharing of variables and functions between your INO files
No - PlatformIO requires conversion from INO to CPP and #include statements using [sic]”
Isn’t this just the same thing worded differently?
“Use Arduino Examples (without code change)
Yes - All examples can be used in Visual Micro with no alterations
Yes - All examples can be used in Arduino IDE with no alterations
No - Examples have to be modified to work in PlatformIO”
And
“Use any historic Arduino project from the web (without code change)
Yes - All historic Arduino compatible projects are supported by Visual Micro without modification
Yes - All historic project are supported by the Arduino IDE without modification
No - PlatformIO requires modification to INO files as a minimum to use Arduino projects from the web”
The same point two more times, reworded again, and still mostly untrue.
“Use same hardware configuration as the Arduino IDE
Yes - All Arduino board options and board packages are fully supported in Visual Micro
Yes - All board options and board packages are supported by the Arduino IDE
No - Configuration is performed via an INI file with different options to standard Arduino pacakges”
True, but this is a good thing, in that it’s way more rational.
“Use same library configuration as the Arduino IDE
Yes - All Arduino Library specification options are supported in Visual Micro for seamless integration
Yes - All Arduino Library specification options are supported in the Arduino IDE
No - Libraries may differ for PlatformIO configurations and often require additional files adding to the package”
Library management in PlatformIO is one of its biggest strengths! Arduino IDE’s global-only library management, with no concern for libraries using the same file names, is absolutely bonkers bad, and one of the strongest arguments for switching to PlatformIO. Visual Micro continuing that tradition is nothing to brag about.
“Cross-compatible code editing with Arduino IDE
Yes - You can edit code in Visual Micro and the Arduino IDE without any changes
Yes - You can edit code in the Arduino IDE without modification from Visual Micro
No - Code changes are required to use the Arduino IDE again after PlatformIO”
Utter nonsense as far as I can tell.
If anything, code breaks in Arduino IDE
even when coming directly from Arduino IDE because of missing or conflicting libraries, and Arduino IDE has no way to fix that. PlatformIO, thanks to knowing exactly which libraries you use, will go and grab them, and one project’s libraries won’t conflict with another’s.
“Requires additional config outside of normal Arduino usage
No - All Arduino configuration is supported in Visual Micro without changes
No - All Arduino configuration is supported in the Arduino IDE
Yes - Additional INI file configuration is required which is not available for Arduino projects”
A tiny, tiny bit true. But mostly it’s just that the configuration is stored differently than in Arduino IDE. There’s still a config file, it’s just not normally edited as text by the user.
“Automatic Prototype Generation
Yes - Function Prototypes are generated automatically, and can be disabled if required (Optional)
Yes - Function Prototypes are generated automatically
No - Function Prototypes must be written with the code for correct compilation”
When you use PlatformIO with .ino files, it behaves like Arduino IDE and generates prototypes automatically.
“Supports Shared Projects
Yes - Shared Projects can be used to modularize code and use it in multiple cross platform projects
No - Only libraries are available in the Arduino IDE
No - Only libraries are avaiable in PlatformIO”
Or a user can learn to use #include…
Intellisense Code Suggestions
Yes - Code Suggestions are generated in Visual Micro as you type
Yes - Code Suggestions are available in the Arduino IDE 2.0
Yes - Code Suggerstions are shown in PlatformIO as you type”
Not mentioned: that the code suggestions in Arduino IDE are SLOOOOOW. I don’t know what’s happening behind the scenes, but it sometimes makes me think it’s actually compiling the code constantly, and since it can’t compile as fast as I can type, it gets behind.
No such trouble in PlatformIO or Visual Studio.
“Provides a Serial/USB debugger (No code changes, all boards)
Yes - Visual Micro's unique Serial Debugger is simple to setup, and requires no code changes to your project, with many features available'
No - Only Serial.println() can be used in the Arduino IDE, which requires modification to your sketch
No - Only Serial.println() can be used in PlatformIO, which requires modification to your sketch”
Nice little “no code changes, all boards” qualifier, since both Arduino IDE and PlatformIO support debugging with no code changes on
some boards, and support it with tiny code changes on other boards.
“Supports Hardware Debug Probes
Yes - Visual Micro supports a wide variety of debug probes in a few clicks, as well as custom configuration available to suit any scenario
Yes - Arduino IDE 2 supports some debug probes with some configuration required for some boards
Yes - PlatformIO supports a range of debug probes using the INI configuration system”
Maybe it has an advantage here. I’d have to test it. Debugging in PlatformIO is very easy to configure for some boards (like SMT32), fickle for others (like ESP32).
“On-PC Unit Testing (without code change)
Yes - PC based Unit Testing Projects are supported in Visual Micro to allow cross platform compatible code to be tested without the hardware being required
No - No PC based Unit Testing features are currently available in the Arduino IDE
No - No PC based Unit Testing features are currently available in PlatformIO”
And
“On Chip Unit Testing (with Code Changes)
No - Currently no On-Chip Unit Testing is available in Visual Micro
No - Currently no On-Chip Unit Testing is available in the Arduino IDE
Yes - PlatformIO supports On-Chip unit testing via Serial using a Library which requires code changes”
I have zero experience with unit testing so I can’t comment on these.
But basically, that table is designed to make PlatformIO appear WAY inferior to both Visual Micro
and Arduino IDE (!), when that certainly is not the case overall.
It certainly does seem as though they designed Visual Micro to be absolutely round-trip compatible with Arduino IDE with zero configuration changes needed. But migrating to (or from) PlatformIO is not the nightmare they try to portray it as.
What
is a nightmare is Arduino IDE’s library management, if you can call it “management”. It’s more like a collection of toddlers thrown into one sandbox. PlatformIO actually
manages libraries, including versioning and dependencies, and does it per-project, so that projects don’t trample on each other, and so that projects will always be able to compile later. I’ve seen too many Arduino projects that no longer compile because the author never documented which libraries they used, and the names of the header files are often not sufficient to identify the correct library. (For example, there are numerous DS3231 RTC libraries that all call themselves ds3231.h, but are incompatible with each other. Never mind that each one could have incompatible versions of itself!)