PlatformIO Core 4.3 🚀

We’re happy to announce the next release of PlatformIO Core 4.3!

platformio_core_4.3

What is new

  • Initial support for an official PlatformIO for CLion IDE plugin:
    • Smart C and C++ editor
    • Code refactoring
    • On-the-fly code analysis
    • “New PlatformIO Project” wizard
    • Building, Uploading, Testing
    • Integrated debugger (inline variable view, conditional breakpoints, expressions, watchpoints, peripheral registers, multi-thread support, etc.)
  • Device Monitor 2.0
    • Added PlatformIO Device Monitor Filter API (dev-platforms can extend base device monitor with a custom functionality, such as exception decoding) (pull #3383)
    • Configure project device monitor with monitor_filters option
    • Capture device monitor output to a file with log2file filter (issue #670)
    • Show a timestamp for each new line with time filter (issue #981)
    • Send a text to device on ENTER with send_on_enter filter (issue #926)
    • Show a hexadecimal representation of the data (code point of each character) with hexlify filter
  • New standalone (1-script) PlatformIO Core Installer
  • Initial support for Renode simulation framework (issue #3401)
  • Added support for Arm Mbed “module.json” dependencies field (issue #3400)
  • Improved support for Arduino “library.properties” depends field
  • Other improvements and bug fixes.

See PlatformIO 4.3.0 Release Notes for details.

PlatformIO for CLion

The CLion is a cross-platform C/C++ IDE for Linux, OS X, and Windows. CLion includes such features as a smart editor, code generation, code quality assurance, automated refactorings, on-the-fly code analysis, project manager, integrated version control systems and debugger.

We are thrilled to announce a new native IDE’s plugin for PlatformIO - it’s PlatformIO for CLion! This is an official plugin by JetBrains Team. It’s still experimental but we would be thankful for your feedback! :blush:

ide-platformio-clion-new

Device Monitor 2.0

We have finally found a time and extended PlatformIO Device Monitor with a new feature called Filters. You can apply an unlimited number of filters to the device’s I/O.

We also introduced Device Monitor Filter API which can be used for writing the custom filters for dev-platform. A great example is the exception decoder for ESP8266/ESP32 (big THANK YOU to Vojtěch Boček for his huge contribution!):

Please note that you can configure filters per-project environment using “platformio.ini” (Project Configuration File) and monitor_filters:

[env:log_output_to_file]
...
platform = ...
monitor_filters = log2file, time, default

Here are a few useful filters:

Filter “time”

Show timestamp with milliseconds for each new line. Please do not forget to apply the default filter too.

$ pio device monitor -b 115200 -f time -f default 

--- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at http://bit.ly/pio-monitor-filters
--- Miniterm on /dev/cu.usbmodem0009790006261  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
15:43:24.907 > threadA: Hello World from hifive1_revb!
15:43:24.912 > threadB: Hello World from hifive1_revb!
15:43:25.459 > threadA: Hello World from hifive1_revb!
15:43:26.005 > threadB: Hello World from hifive1_revb!
15:43:26.552 > threadA: Hello World from hifive1_revb!
15:43:27.099 > threadB: Hello World from hifive1_revb!

Filter “log2file”

Log data to a file “platformio-device-monitor-%date%.log” located in the current working directory

$ pio device monitor -b 115200 -f log2file -f time -f default

--- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at http://bit.ly/pio-monitor-filters
--- Logging an output to platformio-device-monitor-200320-154738.log
--- Miniterm on /dev/cu.usbmodem0009790006261  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
15:47:38.660 > threadA: Hello World from hifive1_revb!
15:47:38.665 > threadB: Hello World from hifive1_revb!
15:47:39.213 > threadA: Hello World from hifive1_revb!
15:47:39.759 > threadB: Hello World from hifive1_revb!
15:47:40.307 > threadA: Hello World from hifive1_revb!

Filter “hexlify”

Show a hexadecimal representation of the data (code point of each character)

$ pio device monitor -b 115200 -f hexlify

--- Available filters and text transformations: colorize, debug, default, direct, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at http://bit.ly/pio-monitor-filters
--- Miniterm on /dev/cu.usbmodem0009790006261  115200,8,N,1 ---
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

0000 | 74 68 72 65 61 64 42 3A 20 48 65 6C 6C 6F 20 57
0010 | 6F 72 6C 64 20 66 72 6F 6D 20 68 69 66 69 76 65
0020 | 31 5F 72 65 76 62 21 0D 0A 74 68 72 65 61 64 41
0030 | 3A 20 48 65 6C 6C 6F 20 57 6F 72 6C 64 20 66 72
0040 | 6F 6D 20 68 69 66 69 76 65 31 5F 72 65 76 62 21
0050 | 0D 0A 74 68 72 65 61 64 42 3A 20 48 65 6C 6C 6F
0060 | 20 57 6F 72 6C 64 20 66 72 6F 6D 20 68 69 66 69
0070 | 76 65 31 5F 72 65 76 62 21 0D 0A 74 68 72 65 61
0080 | 64 41 3A 20 48 65 6C 6C 6F 20 57 6F 72 6C 64 20
0090 | 66 72 6F 6D 20 68 69 66 69 76 65 31 5F 72 65 76

Renode Hardware Simulation

Renode is a development framework which accelerates IoT and embedded systems development by letting you simulate physical hardware systems - including both the CPU, peripherals, sensors, environment and wired or wireless medium between nodes.

This is initial support inside PlatformIO Core and we work an integration Renode into our dev-platforms.

This feature could not be added to PlatformIO without great research by Carlos Eduardo, RISC-V Ambassador / Red Hat. More details in his amazing article Developing Zephyr RTOS embedded applications on PlatformIO and simulating on Antmicro Renode.

Demo

To use Renode with PlatformIO just set debug_tool = renode. Pleate take a look at a demo for Zephyr RTOS Synchronization example:

platformio.ini

[env:hifive1-revb]
platform = https://github.com/platformio/platform-sifive.git
framework = zephyr
board = hifive1-revb
build_type = debug
monitor_speed = 115200
debug_init_break = tbreak bg_thread_main
debug_tool = renode

Screen Shot 2020-03-20 at 16.18.14

Upgrade

  • PlatformIO IDE: Left Sidebar > PlatformIO (icon) > Quick Access > Upgrade PlatformIO Core
  • Terminal: Please run pio upgrade command in terminal.

Regards,
Your friends at PlatformIO

2 Likes

Oh my… you could have limited it to just one new feature, you know! :laughing: Device Monitor filters (allowing for exception decoding, timestams, logging) and this new Renode simulation framework to try out… STM32 F103 ‘blue pill’ support could be both handy AND quite popular! :slight_smile:

1 Like

To be honest, we planned 4.2.2. These new features were contribute by people from our Community :blush: I described more here Ivan Kravets on LinkedIn: #professional #embedded #opensource #unified #debugger #esp32 #esp8266

1 Like

PlatformIO Core 4.3.2 is out!

  • New Account Management System (preview)
  • Open source PIO Remote client
  • Improved PIO Check with more accurate project processing
  • Echo what is typed when send_on_enter device monitor filter is used (issue #3452)
  • Fixed PIO Unit Testing for Zephyr RTOS
  • Fixed UnicodeDecodeError on Windows when network drive (NAS) is used (issue #3417)
  • Fixed an issue when saving libraries in new project results in error “No option ‘lib_deps’ in section” (issue #3442)
  • Fixed an incorrect node path used for pattern matching when processing middleware nodes
  • Fixed an issue with missing lib_extra_dirs option in SRC_LIST for CLion (issue #3460)

See PlatformIO 4.3.2 Release Notes for details.

Upgrade

  • PlatformIO IDE: Left Sidebar > PlatformIO (icon) > Quick Access > Upgrade PlatformIO Core
  • Terminal: Please run pio upgrade command in terminal.

Regards,
Your friends at PlatformIO

PlatformIO Core 4.3.4 is out!

See PlatformIO 4.3.4 Release Notes for details.

Upgrade

  • PlatformIO IDE: Left Sidebar > PlatformIO (icon) > Quick Access > Upgrade PlatformIO Core
  • Terminal: Please run pio upgrade command in terminal.

Regards,
Your friends at PlatformIO

1 Like