
Platform.io for embedded development
Platform.io for embedded development
Hi guys ! A very short post relating my fresh experience with Platform.io (https://platformio.org/).
To keep it short: it is pretty cool, easy to setup and simple to use !
From time to time, I need a small pause on the slicer development part to breath out. I have a few STM32 Nucleo boards that are more or less dust catcher since several months (to not say years...). I used to setup the cross compiler and perform the tedious work of setup my whole environment manually (debugger, uploader, libs ...). So, I was thinking why not give a try to Platform.io.
Installation
Super easy, just download and install Visual Studio Code, go in the plugins and search for Platform.io then install.
Setup First Project
Select the board and the target platform you want to install. For my STM32 Nucleo boards (FE411 and FE446), I had the choice with Arduino and Arm Mbed, I prefer the second one. Platform.io setups the whole thing cross-compiler, download the library and setup the thing. The only issue I had was to add under Linux myself as part of the dialout group to enable uploading the firmware to the board. In less than 30 minutes you can start tweaking small firmware and play with it.
Basically, there are few main rules for the project: build, upload and launch the serial terminal.
Customize Project
There are a few parameters that can be setup for the board you are using, kind of debugger/upload, serial port used. The complexity of the setup is low, making it easy to setup and to fix. It seems easy to add an unsupported board if you are doing custom hardware, which is pretty important.
Examples:
- https://docs.platformio.org/en/latest/boards/ststm32/nucleo_f411re.html
- Upload and debug performed through stlink
- https://docs.platformio.org/en/latest/projectconf/section_platformio.html#options
- Various directories for the environment, libs ...
Drawbacks
- Loosing a bit the control on the whole chain, need to dig further which version for the compiler toolchain, debugger/uploader, libraries and so on.
- Visual Studio Code is not the best editor, some automated corrections are painful and sometimes buggy.
- Few libraries for Mbed, but it is not a big deal, it is easy to handle that in a project by project basis that gives more control.
Conclusion
The integration within Visual Studio Code is pretty good and the experience really nice. The stability is good, It is an effective tool for daily tinkering. The ability to support multi-platform and multi-environment makes it a killer feature: it is very error prone and time consuming to setup such cross-platform environment for any kind of board. Very happy to play with this tool, even if it a bit young and not mature, it has a great potential and it enables anyone to start programming those little funny micro-controllers very quickly and with ease.
Leave Platform.io for embedded development to:
Read more #technology posts
Best Posts From Julien BOUCARON
We have not curated any of boucaron's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Julien BOUCARON
- Gandalf Testing Ender 3 Profile on ChopChop3D Slicer
- ChopChop3D Slicer History in Images
- 3D Printing Face shields -> Print quickly and reliably
- ChopChop3D Slicer BETA forthcoming update
- Platform.io for embedded development
- Tutorial: Setup an Apple MacOS Mojave Virtual Box VM
- Tutorial: How to backup all your Steem posts ?
- High throughput 3D printing with a regular nozzle ^^
- XMas stuff: OpenSCAD Vase/Bowl Generator
- ChopChop3D Slicer BETA_08 is out ! Having fun with the new Brim algorithm
- ChopChop3D Slicer BETA_07 is out !
- ChopChop3D Slicer BETA_06 is out !
- Cryptomarket is down and I don't care because there is much more to come !
- ChopChop3D Slicer BETA_05 is out !
- Printing Orientation Examples for a Bust
- Designing a cantilever heatbed assembly
- ChopChop3D Slicer is in beta
- Forthcoming 25% Price Increase on many discrete parts for Makers (CN to US)
- 3DPrinting, Big Nozzles are cool !
- ODrive: cheap, powerful and hackable motor controller