PlatformIO Core 5.2 π
Professional collaborative platform for embedded development
We are happy to announce the next release of PlatformIO Core with the boosted PlatformIO Debugging performance, support for the latest SCons 4.2, improved package management system, and many other minor fixes and improvements.
Table of Contents
What is New
In this section, we are going to highlight the most important changes and features introduced in PlatformIO Core 5.2. Please visit PlatformIO 5.2.0 Release Notes for more detailed information.
Debugging
In our ongoing effort to improve the debugging experience in PlatformIO, weβve managed to prepare several great new features and enhancements that will help developers debug their projects in a much faster and effective way.
Boosted Performance
PlatformIO Core 5.2 brings significantly boosted debugging performance by migrating the codebase to the pure Python 3 Asynchronous I/O stack. This approach solves previous issues caused by the Twisted engine that depends on operating system libraries and 3rd-party Python packages. Thanks to these improvements, developers can get a blazingly fast and responsive debugging experience even in CLI mode!
Unit Tests Debugging
Itβs an incredibly frustrating situation when a test fails for no obvious reason. Printing variables to the console while trying to find where your test is misbehaving can take a significant amount of time and patience. On the other hand, a full-featured debug session with the ability to step through the code of your unit tests can give all the necessary information to hunt down and isolate bugs in your codebase. PlatformIO Core 5.2 makes debugging tests incredibly easy simply by adding a single line your configuration file:
[env:debug_unit_tests]
platform = ststm32
framework = arduino
board = nucleo_f401re
; Use a test file located in the test directory as the entry point
debug_test = *
Debugger for Native Platform
Even though PlatformIO was created to help develop embedded projects, itβs always handy to be able to run and debug projects locally without the need to upload the code to an embedded target. Starting with PlatformIO Core 5.2, embedded developers can debug their applications on host machines using the same usual workflow.
Debugging in CLI Mode on Windows
Another commonly requested feature implemented in PlatformIO Core 5.2 is debugging projects on Windows OS via the command-line interface. Although the CLI might not be as user-friendly as a feature-rich IDE, itβs still a great instrument to quickly and efficiently find bugs in your codebase.
Build System
SCons 4.2
The PlatformIO Core 5.2 build engine has been upgraded to the latest SCons 4.2 - a next-generation software construction tool:
- Configuration files are Python scripts β use the power of a real programming language to solve build problems
- Built-in reliable and automatic dependency analysis
Package Management
PlatformIO Core 5.2 introduces the updated package management system with a more error-proof and intuitive package publishing process. Now, any package manifest is validated on the client side and its metadata is shown in a readable format before publishing it to the PlatformIO Trusted Registry.
Improved checks for conflicting names and duplicates will catch accidental errors and typos in package manifests and wonβt allow developers to publish erroneous packages to the PlatformIO Trusted Registry.
Additionally, a new CLI option --non-interactive
might come in handy for automated uploads directly from CI/CD services in your deployment pipeline.
Static Code Analysis
Weβve updated backend static analysis tools to the latest available versions. Now developers can identify even more potential bugs, vulnerabilities and security threats.
- Clang-Tidy v12.0.1 with new modules and extended checks list
- Cppcheck v2.5.0 with improved code analysis and MISRA improvements
- PVS-Studio v7.14 with support for intermodular analysis, improved MISRA support and new diagnostics
Upgrade
- PlatformIO IDE: Left Sidebar > PlatformIO (icon) > Quick Access > Upgrade PlatformIO Core
- Terminal: Please run
pio upgrade
command in terminal.
Stay in touch with us
Stay tuned to this blog or follow us on LinkedIn and Twitter @PlatformIO_Org to keep up to date with the latest news, articles and tips!