Summary
Embedded software development is a challenging endeavor due to a fragmented ecosystem of tools. Ivan Kravets experienced the pain of programming for different hardware platforms when embroiled in a home automation project. As a result he built the PlatformIO ecosystem to reduce the friction encountered by engineers working with multiple microcontroller architectures. In this episode he describes the complexities associated with targeting multiple platforms, the tools that PlatformIO offers to simplify the workflow, and how it fits into the development process. If you are feeling the pain of working with different editing environments and build toolchains for various microcontroller vendors then give this interview a listen and then try it out for yourself.
Announcements
- Hello and welcome to Podcast.__init__, the podcast about Python and the people who make it great.
- When you’re ready to launch your next app or want to try a project you hear about on the show, you’ll need somewhere to deploy it, so take a look at our friends over at Linode. With 200 Gbit/s private networking, node balancers, a 40 Gbit/s public network, and a brand new managed Kubernetes platform, all controlled by a convenient API you’ve got everything you need to scale up. And for your tasks that need fast computation, such as training machine learning models, they’ve got dedicated CPU and GPU instances. Go to pythonpodcast.com/linode to get a $20 credit and launch a new server in under a minute. And don’t forget to thank them for their continued support of this show!
- You listen to this show to learn and stay up to date with the ways that Python is being used, including the latest in machine learning and data analysis. For even more opportunities to meet, listen, and learn from your peers you don’t want to miss out on this year’s conference season. We have partnered with organizations such as O’Reilly Media, Corinium Global Intelligence, ODSC, and Data Council. Upcoming events include the Strata Data in San Jose, and PyCon US in Pittsburgh. Go to pythonpodcast.com/conferences to learn more about these and other events, and take advantage of our partner discounts to save money when you register today.
- Your host as usual is Tobias Macey and today I’m interviewing Ivan Kravets about PlatformIO, an open source ecosystem for IoT development including a cross-platform IDE, unified debugger, remote unit testing, and firmware updates.
Interview
- Introductions
- How did you get introduced to Python?
- Can you start by describing what PlatformIO is?
- What was your motivation for creating it?
- What are the aspects of embedded development that keep you interested and engaged in this space?
- What are some of the types of projects that someone might use PlatformIO to build?
- What are some of the common challenges that a developer might encounter when working on embedded systems?
- What are the additional complexities that get introduced as more hardware targets get added to a project?
- What is the workflow for someone using PlatformIO for embedded systems development?
- What are the different elements of PlatformIO and how do they simplify the work of building embedded systems projects?
- How is PlatformIO implemented and how has the system design evolved since you first began working on it?
- What was your reason for selecting Python as the implementation language?
- If you were to start over today what would you do differently?
- How has the embedded hardware and software landscape changed since you first started work on PlatformIO?
- How has that impacted your product direction?
- How do developers handle testing and validation of their applications?
- How does PlatformIO help with updating deployed devices with new firmware?
- What have been some of the most interesting/unexpected/innovative projects that you have seen built with PlatformIO?
- What have been some of the most interesting/unexpected/challenging aspects of building and maintaining PlatformIO?
- How are you approaching sustainability of the project and business?
- What do you have planned for the future of PlatformIO?
Keep In Touch
- Website
- ivankravets on GitHub
- @ikravets on Twitter
Picks
- Tobias
- Ivan
- Don’t focus on the money side of your project, just focus on building a great product.
Closing Announcements
- Thank you for listening! Don’t forget to check out our other show, the Data Engineering Podcast for the latest on modern data management.
- Visit the site to subscribe to the show, sign up for the mailing list, and read the show notes.
- If you’ve learned something or tried out a project from the show then tell us about it! Email hosts@podcastinit.com) with your story.
- To help other people find the show please leave a review on iTunes and tell your friends and co-workers
- Join the community in the new Zulip chat workspace at pythonpodcast.com/chat
Links
- PlatformIO
- Ukraine
- Home Automation
- Home Assistant
- Twisted
- Zigbee Radio
- Serial I/O
- RS-232
- ARM CPU Architecture
- RISC-V
- AVR Microcontrollers
- Arduino
- Texas Instruments Launchpad
- Eclipse IDE
- MCU == MicroController Unit
- VSCode
- SCons
- Make
- Raspberry Pi
- ESP8266
- Marlin 3D Printer Firmware
- ESP Home
- Zephyr Realtime Operating System
- Western Digital
The intro and outro music is from Requiem for a Fish The Freak Fandango Orchestra / CC BY-SA
Hello, and welcome to podcast dot in it, the podcast about Python and the people who make it great. When you're ready to launch your next app or want to try a project you hear about on the show, you'll need somewhere to deploy it. So take a look at our friends over at Linode. With 200 gigabit private networking, scalable shared block storage, node balancers, and a 40 gigabit public network, all controlled by a brand new API, you've got everything you need to scale up. And for your tasks that need fast computation, such as training machine learning models, they just launched dedicated CPU instances. And they also have a new object storage service to make storing data for your apps even easier.
Go to python podcast.com/linode, that's l I n o d e, today to get a $20 credit and launch a new server in under a minute. And don't forget to thank them for their continued support of this show. And you listen to this show to learn and stay up to date with the ways that Python is being used, including the latest in machine learning and data analysis. For even more opportunities to meet, listen, and learn from your peers, you don't want to miss out on this year's conference season. We have partnered with organizations such as O'Reilly Media, Pareteum Global Intelligence, ODSC, and Data Council.
Upcoming events include the software architecture conference, the Strata data conference, and PyCon US. Go to pythonpodcast.com/conferences
[00:01:41] Unknown:
Tobias Macy, and today I'm interviewing Ivan Krawetz about Platform. Io, an open source ecosystem for IoT development, including a cross platform IDE, unified debugger, remote unit testing, and firmware updates. So, Ivan, can you start by introducing yourself?
[00:01:55] Unknown:
Yes. So, hey, everybody. Tobias, thank you so much for hosting me at your podcast. My name is Ivan, and I am from Ukraine. And I'm the founder of the PlatformIO Project, where currently I'm responsible for different aspects of this project. It's the business size, architecture, marketing, and sometimes even technical support. I'm also a teacher, in the past and spent around 10 years in the web development. This is the weekend
[00:02:23] Unknown:
plus the front end where I mainly use PHP language. And do you remember how you first got introduced to Python?
[00:02:30] Unknown:
Yes. It was 2012 a year. No no no 1 introduced me to the Python. I actually moved to the new house, and I spent a lot of time for home automation. And I use different hardware in the home, and I had a problem to manage all these different devices because they use different, network, network interfaces. And I looked actually for the network driven asynchronous framework, and I found TwistIt. And this is actually how I met first Dan Debiter. It was a Twist engine. And have you taken a look at all at Home Assistant,
[00:03:10] Unknown:
or were you involved in the home automation before that project was even started?
[00:03:16] Unknown:
Yes. It was 2012 a year. I don't remember, how we had Home Assistant, in this time, but, the whole thing which I did in the 2012, it was actually to create the bridge between the hardware and actually the Home Assistant. And the project was named, like, Smart Anvil. I spent, 2 years for this project, and this is actually the place where the platform I was born because, Smart Hansel project, this is high level abstraction on top on on the hardware and the home assistant can actually communicate with the smart home who uses this API interface. And the platform IO was used here here just to deploy special firmware or we call this operating system to the different devices where end developer who will work with smart smart project will actually communicate with the network device. And it doesn't matter, which type of network the end device will use. The smart envelope emulate 1 type of connection and 1 time of, interface.
[00:04:23] Unknown:
And so were you dealing with things like Ethernet and ZigBee radios and 900 megahertz band and all these different types of interfaces that you're trying to abstract across? Yes. Yes. You're right. You're right. So I even I even called smart smart smart platinum, like, heterogeneous
[00:04:37] Unknown:
network. So where you can connect different device, even devices without connectivity. I mean, that you can connect your very simple constrained device through the, serial interface. And, actually, when you will work with the Smart Panfil, you will work with the device, which will look for you like a network. You can even ping this device. You will have special address on this device, but but, on the hardware wires, this is not the net networking device. So you you had the,
[00:05:08] Unknown:
dubious pleasure of being able to try and make r s 232 usable. Yes. Yes. Yes. Yes. And did you have much of a background in hardware engineering and dealing with these different embedded platforms prior to trying to build this home automation platform? Or is this something that you just learned as you got involved with it? Yes.
[00:05:28] Unknown:
This is this is really defining, but I am not electronic engineer. So I created this I mean, I founded PlatformIO and I am not professional or professional embedded engineer. And I think this is the main or the key success of the PlatformIO because I don't look on the PlatformIO from this hardware or embedded square. I don't have these limits. I look from the perspective where I can build amazing user experience for the developers. Because when I mentioned before that I say that I spent 10 years for web development. And when I worked with, web tools, they look for me really cool because you can press 1 button. You can do debugging.
You can, for example, press to run script. You will receive the result. And if we talk about the hardware, about the embedded, this is a really complicated step. Even trying to do debugging, you need to know a lot of different couple complex things. Not saying how to configure them, but you actually need to understand how this things work. And I actually, with the PlatformIO, learned a lot of things and went to the embedded together with the PlatformIO.
[00:06:43] Unknown:
And so can you give a bit of a description about what PlatformIO is now and some of the different features that it has and how it helps to simplify the work of interacting with and developing for these different embedded platforms?
[00:06:56] Unknown:
Yes. As I already mentioned before, the problem is to flash or to program this device. The Platform IO is the open source tool, and sometimes I even call it, like, the Swiss knife. Because with the Platform IO, you could be focused on the code writing. And you can actually just explain Platform IO what is the type of your hardware. And the same menu press run run button in your ID to run Python script, the same you do with the platform. Io. You press, like, hey, platform. Please flash these 3 boards. And before this, you will just display PlatformIO. I have the board a. It's based on the architecture arm, for example. I have the board b. It's based on the architecture. It's fine. Or I have 3 3 boards and serve of them is based on the ABR. And you ask platform IO, please build my project and flash all all these boards. And platform IO now resolve all of this complexity automatically for you. So it knows which tool chain to use because you know that for for these 3 different architectures, you actually need to use 3 different tools.
And if we talk about different frameworks or SDK, you also need to know how to link your software. I mean, your project with these frameworks, you need to write some build scripts similar to that. But this PlatformIO, you don't need to do to do this because before before adding new hardware or new new development key to the platform IO, we already provide full detailed information about this device, and we know how to do building, how to do uploading, how to do debugging, or how to do unit testing, or how to do codes, static analyzing, and different different aspects. Mainly, when people work with the PlatformIO, they even don't know which tool chain do we use or how do we compile code. And and I think this is the best what we, could achieve with the PlatformIO.
Because now developers, companies, they could be focused on the code writing and on the getting resolved in in a days, not in a weeks. So no need to spend just 1 week to learn how to program this board or read long long list, data sheets. No need to do this. And so you mentioned that the original inspiration for building PlatformIO
[00:09:12] Unknown:
was just trying to solve your own problem of getting all these different devices in your home to be able to talk to each other. And so what was your motivation for deciding to continue working on it and developing it as a product and then building a business around it? Yes.
[00:09:28] Unknown:
So the main motivation was just to save my time because PlatformIO wasn't created like the project like the business project. It was the happy project. And if this is the happy project, I I had limited time to work as on my, hobby projects, like the smart pound hill, which I mentioned before. And, you know, the domain motivation was to save my time. So I don't want to spend yet another week to learning how to program yet another hardware. I remember that night, it was 20, 000, 000 year. I had 3 different boards on my table, and I and I used 3 different ideas. So 1 1 idea to program Arduino board. The second, I use, RM bet today's RM bet. But before it was embed a project, I use their online ID to program this board. And the sort, I have Texas Instruments, Code Composer Studio to program their their Launchpad Launchpad device. So So, actually, the problem, every time when I back to my, habit project, I should spend 10, 20, or 30 minutes just to remember what I did before.
Every time I lost the time and this was the time on remember the context of the previous steps on which I stopped. So and the main motivation for the platform was to support hybrid configuration where I can easily add new hardware and no matter on the which type of architecture this hardware will be built or under which, which type of framework my project will be built. So the goal was to to have 1 universal
[00:11:09] Unknown:
instrument or tool which will do this work automatically for me. And 1 of the interesting things that has been a recurring theme in talking to people who start a project as a reason for facilitating a particular hobby is that they never actually end up completing the initial reason that they were starting on this other side project. So for instance, I know that glyph who created twisted built it because he wanted to have it as a component for building a video game, which he never completed. So I'm wondering if you ever actually ended up finishing, your home automation project or if you got too sidetracked into PlatformIO and now you've got some half implemented home automation platform?
[00:11:46] Unknown:
Actually, I stopped work on the SmartControl project, and I focused just on the on the PlatformIO because PlatformIO was really small, puzzle in the Smartbound Hill. And I thought that PlatformIO is very easy, project, but it's it's really complex. It's already had took 6 year or 6 year for us and a lot a lot a lot of work. But why I am super super happy that the PlatformIO wasn't start as a business project, and it means that we were not focused on the money. I mean, that we we had the time to talk with the customers. We talk with the user. I spent a lot of time, going to the end user machines where I wanted to learn how users work now, which tools do they use, Why they decided to try PlatformIO?
Which features are missed in the PlatformIO? I mean, that this this first 2 or 3 years, they were great for the platform value because we could get this market adoption. We finally realized which problems we resolve, and, now is yet another, how to correct say, is another level within the platform, you know, where we are going to the enterprise market. And this experience which we got from the makers, makers world, we are super happy to repeat with this, enterprise market because we need to do the same. You know, as in in the enterprise market, there are also yet another tools, and the tools these tools are different. Most of them are closed source. Most of them are paid. And, actually, for the enterprise companies, there is no problem to pay for these, tools. And even if our tools are cool or free, it's very difficult to convince some managers to use PlatformIO.
And, again, you need to you need to learn, need to understand what is missing in the PlatformIO. I mean, a lot a lot of 4 giga again for us now.
[00:13:53] Unknown:
And what are some of the aspects of embedded development that keep you interested and engaged in the space of the developing for these different types of hardware? And what are some of the types of projects that somebody might use PlatformIO to be able to build?
[00:14:09] Unknown:
To be honest, I don't do a lot of embedded programming, today. As I mentioned before, I moved from the, web world. And in this world, developer develop developers are mostly focused on the code writing or the code writing. And same as before, they don't want to spend these hours to get the result. Embedded work is really complex. And every day for me just to improve the user experience, to simplify as complex scenes which I mentioned before, like toolchains management, build scripts, moving between different cost machines. It's really the crazy problem. And the last really, really big problem is that the companies, which work on the hardware project raise the problem for them to find really skilled embedded engineer. And the goal of the PlatformIO is to allow these companies to hire just high level professional c plus plus developers and no need from them to be skilled with drone engineers. I mean, so if we have some, generic generic team, no need to have 100% of super skilled electron engineers. With the PlatformIO, we can have 1 or 2 engineers, for example, and 8 or 10 just super talented C plus plus developers who can read, API of the operating system or who can do classic scenes, which, they did before, the embedded wall, where I did whereas they would like to be focused just on the code writing. They just want to press some button to do debugging or or unit testing as they don't have time or and don't want to learn all these complex
[00:15:57] Unknown:
things from the embedded sites. And in the time since you first began working on PlatformIO, I know that there's been a lot of renewed interest in embedded systems development and hardware hacking, and there have been different projects that have tried to bring higher level languages to those platforms for at least hobbyist projects. Wondering how the overall evolution of the space has impacted the direction that you're going with PlatformIO and some of the focus that you've put into it as far as what problems you're trying to solve. I think that the most important what the most important thing is what which happened for the last years is that the finally,
[00:16:39] Unknown:
semiconductor companies have started looking into the onto the open source community. So you see a lot of news where different companies open source their real time operating system. This is the first. The second, if you if you take a look at the embedded market, most of IDs are based on the Eclipse. And today, these cheap vendors, they finally realized that the new generation developers, they would like to have something much better than the Eclipse, which has, a lot of different features capable for installing new plugins, easy for expanding.
And there are a lot a lot a lot of Internet things which change for the 6 for the 6 years. And the 3rd problem oh, sorry. The 3rd things which is very important for the last years, this is the Arbogino ecosystem because you know that before 2017, most of us looked on the Arboretum, like, on the natural and open source ecosystem. But you know that after that time when, Arm acquired Arduino, we have the problem with the Arduino today because all of their new hardware, they are mainly based on the Arm. And over their new tools, they are fully closed, fully sourced closed, and even paid. So and this is a really big problem for us because we spent first 3 years. We like so much Arduino, and we spent 3 years for the Arduino just to try, to improve this ecosystem to provide more advanced tools for developers who needs more advanced instruments. And now we're actually in the in the stage where we are looking to add more different frameworks to our ecosystem.
So today, we have support for our 20 different frameworks and SDK. And hardly, you know, this is just the small puzzle in our ecosystem today. So for engineers who are building
[00:18:45] Unknown:
software for these different embedded platforms, what are some of the common challenges that they might encounter, and how does the complexity of dealing with multiple different hardware targets influence the way that they might design and implement their software? So the problem is actually starting from the semiconductor vendor. So when when you when you start your project with some hardware,
[00:19:12] Unknown:
the cheap vendor works, you adjust to this hardware. Because if you go to the website of this, cheap vendor, you will see that this vendor recommends using their, special tool or ID. And for you, it's very big problem if you decide to move from this vendor vendor's ecosystem to something new. For example, if tomorrow there is new MCU, which is much, much better in comparison with the MCU which you use today, it will have a lot of problem if you want to switch to this competitive MCU because it's the it's the different SDK or different framework. You need to install yet another ID. You need to learn how to work with that.
And this is this is actually the big problem. And the PlatformIO is fully agnostic to the architecture of the MCU, and our customers no need to worry which hardware or which board they use because for them, it looks like a change in just a 1 line in the configuration file. So let's let's imagine the same. If tomorrow we have the better MCU or the better hardware, our customer will will just change this line, like, my new development kit is something new. PlatformIO, please build. And you don't need to do any changes your project. You can use your favorite ID. You can use your your favorite operating system. You don't need to move, for example, to the Windows if for if as if, Chip vendor supports only Windows. You can use you can use any operating system, anyway. You actually have full freedom. You personally decide how your development environment will look for you. And what is very interesting is that the only platform where you allow developers to use different operating system and work under the same project. So let's imagine that someone preferred to use macOS and Eclipse.
The second preferred to use Windows and Visual Studio Code, and the cert engineer preferred to use command line and v. All of them work under the same project. The configuration is located in the 1 on the 1 file called platformio.ini. No other configuration. Without the platformio, for example, if you use classic tools, which we have today in the embedded market, the whole configuration is is is located directly in the ID. So if you do 1 change in this ID, you need to ask your colleague to repeat the same. Like, you add new bill flex or you do some change to the debug, you need to explain other colleague to repeat, this step. I even don't, say how many problems you will have if you try to move this project to another host machine, Linux or car sized PC. It's the platform where you'll know this problem. Because as I mentioned before, all these problems were resolved with the smart function because these problems were for the smart, like a number top of 1. Because with with the smart, we we we just explain what is our hardware, and it doesn't matter which operating system you will use even car sized PC.
[00:22:24] Unknown:
And so for somebody who is using Platform IO for being able to work on 1 of these projects, can you talk through the overall workflow of getting started and setting it up and specifying what types of libraries you need and the different hardware platforms that you're targeting? So,
[00:22:40] Unknown:
it's today, it's it's very easy to get started with embedded because you can go to the platformio.org website. We recommend to get started from the Visual Studio Code, extension. We have official platform IO extension for the Visual Studio Code. We'll just download Visual Studio Code, go to the extension section, search for platform IO ID, press install button, and finish. You will see platform IO Home, really nice interface, which will ask you about your hardware. You select your hardware, select your framework, could be Arduino, and you can start writing simple prototype, blink or hello, similar to hello world and Borr flashed. No need to install any tool toolchains manually. No need to learn how to write a build script. Nothing. Just just need to be focused on the source code writing and read some some, guides how to do embedded development. So it's it's it's very easy with the PlatformIO.
[00:23:39] Unknown:
So can you talk through a bit about how the PlatformIO ecosystem is actually implemented and some of the different components that comprise it and just how some of the overall system design has evolved since you first began working on it? Yes. It's really good good question. So if we talk about the smart smart functions,
[00:23:59] Unknown:
the number 1 reason why Python was, used is the twisted. And if we talk about the platform IO, this is again, the right number 1 number 1 package or library, which we love so much. And this this is SCONCE or Esconce. I don't know what is correct pronunciation. So the SCONCE is super cool. It's amazing. So it could be used like a build system. So you can use it like the replacement for make or c make build system. But the magic side of the scans is that you can use it like a library. So the scans is the heart of the Platform IO. The whole things which we have is the build build workflow within the PlatformIO, we do it on the top of the s counts. So extended s counts with our interfaces.
We we created this unified interface for multiple different development platforms. And, oh, and now, this separated development platform, we call it, like, for ABR or for ARM or for other architecture, just communicate with the platform, your core API, and explain, hey, PlatformIO. I have this source code. I would like to use this flex to build c plus plus type files, this flex for assembly files. I would like to do a linking process or some system in this way. The upload process should should look in this way. And we call this things like decentralized architecture.
It means that if you take a look at the platform, your core, there is nothing common with with any architecture. It's fully agnostic to any architecture, and you can easily integrate any hardware and any architecture to the platform IO. No need to do any any contribution to the PlatformIO core from this side. It's very easy to create your own development platform for your hardware and just reuse whole whole power of the platform. Yeah. And the main benefits is that using this very simple interface, you will just explain within your development platform how to do building debugging and other things. And your hardware is automatically integrated into our 10 different IDs. The Eclipse, Visual Studio Code, QT, C Line, a lot a lot of that. Because you don't need to spend again your time to create extension for these ideas. We already did this. If your hardware is integrated to the PlatformIO, your customers automatically receive this huge list of ideas.
Your customer can use any operating system, Mac, Linux, Windows, RubySD, even car sized PC. Your customers can test their project with different continuous integration services. They can use different static tools, for static analyzers. They can ease easily do debugging even if they don't
[00:26:45] Unknown:
know how to do it because they will just select the type of debugging pro, press the debugging button, and they will be the main function. And you mentioned that sconce is the sort of core reason that PlatformIO is built around Python. But if you were to start the entire project over today, are there any things that you would do differently in terms of the overall design or project focus or the implementation language?
[00:27:10] Unknown:
I think ever since, ever since it was done, correct. And and if even back, to the platform or your core history, we haven't had any change since since 2016. So the architecture, which were which were implemented in 2016 were not changed today. The only the only 1 things, which, we may maybe would like to change. This is the mistakes that we were focused on the Arba, you know. And today, if you try to talk with someone and you ask, have you heard about the platform? Are you most of people will will say, yes. We know this is like replacement for the Arduino and amazing tool for for the makers. And this is actually the problem for us because most of people look on the platform IO, like, for their replacement for the Arduino or for the tool for the makers. And it makes the problem for us if we try to move to the enterprise market and to have support for this, low level frameworks, hardware, abstraction, library, and SDKs because most people think that platform will adjust only for the makers, world, but it is not true. So the I think this is the only 1 things which or seem to miss a mistake. I don't know.
It would it it could be really great if from the 1st year or later started support different frameworks, not on the update.
[00:28:40] Unknown:
And so beyond the development of the software for these different platforms, there's also the concern of verifying that what you're building is actually going to work. So things like unit testing, and you mentioned debugging. And I'm so I'm wondering what are some of the challenges in the embedded software space for being able to handle those aspects of the software development life cycle and some of the ways that PlatformIO helps in that effort? Yes. So, you know, if you
[00:29:10] Unknown:
if you do debugging for example, if you do debugging of Python application, this is this is not a a so complex, technical task because you do this work on the host machine. But if we talk about the hardware, debugging, unit testing, we should do on the hardware. And you know that hardware is very constrained. It's very limited. If we if we say about the host machine, it's a gigabytes of RAM. And and if we talk about embedded embedded device, this is kilobytes of RAM and also sometimes in kilobytes of flash. And you can't upload some complex testing framework to this device, and you can't do some crazy complex debugging of this device. And in this case, if you try to do this manually, it's a little bit difficult because you don't you need to you need to create some bridge interface to communicate with this device.
But this platform, you know, it's very easy because we have some abstraction based on top of Unity framework. It's the c plus plus framework. And you can actually use the same workflow which you use which you use for the Python. You can write, your unit tests. They look, very similar to the Python, unit, testing workflow. And the same, you will just press, test bat button. PlatformIO will compile your source code, deploy to the end device, gather results, analyze result, and just present you some feedback as results on your host machine. You can even do this, using platform, your remote service.
So it means that you can work with your hover or deploy, remote deploy tests to a remote device, which is not actually connected to your machine. Let's imagine that you have some device, for example, a Raspberry Pi or similar to that. You connect some some, embedded devices, so the cable or or so the Wi Fi. And you can you can work with these devices from anywhere in the world, and you can deploy this unit test or similar to that or flashes board or other layer updates and no need to be connected directly to this, device. And the big benefits of the PlatformIO remote that you don't need to open any SSH or other ports, to your remote machine. But the the right platform, your broker, we should resolve these problems automatically for both ends.
[00:31:40] Unknown:
And 1 of the other complexities with deployment, particularly in these embedded systems, is what happens when something goes wrong, and so being able to prevent that from being the case, or for cases where maybe you're trying to deliver remotely over the network where there might be some issues with corruption of the data in transit or where the network might drop out before the flashing operation is completed. And so I'm wondering, what are some of the guards that you have in place or some best practices for people who are working in the space to prevent that type of problem from happening?
[00:32:15] Unknown:
So is there is there actually, like, like, 2 type 2 types of, thermal flash in which you mentioned? So the first, you can flash your device using hardware, interface, the through the USB USB cable. Or the second, option is to deploy in firmwares through the air, like, or the air updates. So all these, operations, they are fully different. Because in the case with, with the USB, it depends on the upload protocol and upload tool. Most of them, most of them have built in different mechanism which, mechanisms which verify deployed firmware on the target device before flashing.
But in case with over the air updates, the end developers should personally implement as these things on the end device. So the flash, which is on the on the device, it should be split it. It's minimum into 2 parts. So 1 bank is for, for example, for the working firmware and the second bank for the update, which is coming through the our the air channel. And if you, for example, if you, I mean, if the firmware has not been, downloaded correctly, you will not change some special flag within your bootloaders that new firmware is ready. It means that if you if you deployed 70% of your firmware for the end devices, it's not 100%.
And this firmware will not be accepted. I mean, it's not it's not a problem. I mean, this is this is the response this is the responsibility of, the developer who will implement this. Different different different embedded devices, requires different, approach how to do this.
[00:34:13] Unknown:
And in the Platform IO remote, do you also have a facility for being able to track inventory of the different devices that you have out in the field and the version of the firmware that they're running so that you can see
[00:34:26] Unknown:
what you have and what still needs to be updated and maybe be able to handle some of those failed deployments by seeing that, oh, this still hasn't been updated. I need to retry the delivery. Mhmm. So PlatformIO remote actually emulates ever seen what you do in your host machine. So if if you can let's imagine that this device is connected to your machine. If you can check from your device the version or different things, you can do this the same as the platform IO, remote. So this is not like, device management system. This is actually, the tool which allow you to do the same what you do on your desktop machine. So if you can flash your device or you can, connect to the serial port, to the end device, which is connected to your machine, you can do the same operation with the device that just connect to the remote machine. If you if you provide some information from the serial interface, which will, return some information about the firmware version, you will receive the same if you if you try to connect as this device, from the platform you remote.
[00:35:28] Unknown:
And so in terms of the projects that you've seen people build using PlatformIO, what have been some of the most interesting or unexpected or innovative uses of the platform?
[00:35:40] Unknown:
Lot of interesting project built not on top of business using platform IO? I think the most of the most interesting was, and this is this is ESP. I don't know what is the correct name because a lot of interesting project are built on top of the pricing board. And as the Verizon company, and it, has very interesting MCU, which has onboard Wi Fi. Also, there is very interesting project called Marlin. So they created a universal firmware for different different 3 d printers. It means that anyone can download their firmware, select the type of, the main control in the printer, and choose this printer, tune configuration.
And there is also is is is ESP home project. It's very interesting library because it could be used in pair with the home assistants. So you install the home assistance. You will use the CSP home library, flash your device, and you can easily manage your home embedded devices with home assistants.
[00:36:50] Unknown:
And in terms of your own experience of building platform I o and working in this embedded hardware space, what have been some of the most interesting or unexpected or challenging lessons that you've learned in the process?
[00:37:02] Unknown:
I think that, the most interesting things when when we try to add support for some new SDK or operating system. The last time I remember, we added support for Zephyr real time operating system, And it was really, a really interesting case for us because Zephyr, is based on CMake generator tool. And, we finally decided to not use static code building. It means not to provide static flags for building the source code. And we actually communicate, with CMake, generators too, and, we can provide the same bill bill workflow, which you will receive if you will use make or other build tool. So it's really interesting because the final project is it Final project is final project is compatible with the PlatformIO, and also you can use it with stand alone CMake tool.
[00:38:07] Unknown:
And in terms of sustainability of the PlatformIO project and the business that you've built around it, what is the overall business model? And how are you approaching things like project governance so that people aren't, driven away by the perception of PlatformIO, kind of governing the entire process and not really taking community feedback and just the overall community, the ecosystem that you've been able to build up around it? Mhmm. Oh, it's really good good question.
[00:38:36] Unknown:
So we actually we actually had the problem with this because, as I mentioned before, the platform IO was a heavy project for me, and, I didn't think that it will be so so much popular. And, when I started work full time on the platform, Iov, it was 2016 year. I hoped that, cheap vendors companies, they will be interested in things what we do because our tools are open source. They are free. Developers are super happy, but, it was really a wrong way. And, I I remember the time I even created the post in our community forums and actually asked people what to do next because it was the it was actually, it was the the time where I thought what to do is the platform. Go to full time work and, again, back platform, you know, like, the hybrid project or continue to work on that. And in 20 in 2017, we added a few interesting features to the platform. Io and made them paid.
So, a lot of people supported us and actually were super thankful then because they help us to survive. And, the previous year, 2019 years, was really cool for the PlatformIO. We finally made a game PlatformIO fully open source and fully free. Thanks to the Western Digital Digital Company and the sci fi. So they help us to make all the things free, even the platform we are remote. And, the second the second part part of our business model, we provide consulting to companies which use PlatformIO for their project And, also, there is new new direction in our, in our business.
We worked so close with semiconductor companies and helped helped them to save a lot of not only financial resources, but also the time resources. Because if you ship vendor and you would like to introduce into the market yet another ship, you know, you you will need to spend a lot of resources to create yet another idea and to provide the interface how to work with this, hardware. Normally, it will take your 6 months or even the year, but but with the platform IO, it it can take you days, not even not not even weeks or months. The previous week, I posted in our social network a really interesting use case. We're a Chinese company, integrated their, processors into the platform IO in 2 days. So 2 days, and they receive full future with really professional idea, and they not only save save, time and resources.
They already have working solution for their customers. So they can personally decide which ID to use, which operating system to use. And this is really the great the great use case. And what do you have planned for the future of the PlatformIO project? So, I don't look on the Platform IO project? So, I don't look on the Platform IO, like, on the project for the 1 year or 2. For me, Platform IO, is the project for the years, and my, For me, PlatformIO, this is the project for the years, and my final goal is to see PlatformIO everywhere. This is similar similar to the Linux, where today, Linux is the mainstream operating system.
This is actually the same. So if we talk if we talk from the end developer perspectives, there lies the huge problem with this market embedded. Because if you have 10 different hardware on your table, you will need to install 10 different IDs every time you need to switch between these IDs. Not matter. Even even if this Eclipse, you need to have 10 different eclipses with different plugins and PlatformIO is unique solution and unique solution for these problems because we can have 1 ecosystem and 1 environment and 1 1 development tool for 1, 000 different market, MCUs and, development boards.
This is actually the goal. It's not it's not that it's not only win win win solution for the developers, but it also the winning solution for manufacturers. Because let's imagine, if you if you are super talented in creating, new hardware, You actually buy the MCU from cheap vendor, and you will be in the position where you you will need to provide some, interface to program your hardware. And you have a few options, or you will try to invest in your own software and your own ID, or you will try to contact the cheap vendor and ask, please add, support of my custom hardware to your ID. And the last step, it doesn't work. So in the platform, it platform is actually win win solution for developers, for manufacturers, and for chipenders too because all all of them will be focused on the 1 software or 2 for this hardware products.
[00:43:49] Unknown:
Are there any other aspects of the work that you've done on PlatformIO or your experience of working in the embedded hardware ecosystem or any of your overall experience in general of building and maintaining an open source project that we didn't discuss that you'd like to cover before we close out the show? No. I think the other thing is covered. Alright. Well, for anybody who wants to get in touch with you or follow along with the work that you're doing, I'll have you add your along with the work that you're doing, I'll have you add your preferred contact information to the show notes. And with that, I'll move us into the picks. And this week, I'm going to choose a brief article that I read recently University of Massachusetts Amherst about being able to harness electricity just from the humidity in the air by using these protein nanowires connected up to an electrode. So some pretty remarkable work being done and pretty exciting to think about some of the different ways that it can be applied. So I'll add a link to that in the show notes. And with that, I'll pass it to you, Ivan. Do you have any picks this week?
[00:44:46] Unknown:
Yeah. So I actually would like to share my short experience with the platform IO. So I think that, the 1 really great advice advice from, my side is to not to be strictly focused on the money side of your product if you started to work on that. Because business is this is not about the money. This is the about the processes, about the management of the processes. And the money is actually the mark of your, of your results. And if you try to work on your, own project, I would really recommend to contact with every everyone customer. Go to their machine using remote tools. Learn more which competitive tools do they use. Ask about why do they use.
Don't think that you will waste this time. This time is very well very well very available.
[00:45:39] Unknown:
Alright. Well, thank you very much for taking the time today to join me and discuss your experience of building and maintaining and using the PlatformIO project and working in this embedded hardware ecosystem. It's definitely an interesting and challenging space, and I'm glad to see that there are people like you who are out there trying to make it simpler. So thank you for all of your efforts on that front, and I hope you enjoy the rest of your day. Thank you so much too for your time and for the invitation. Thank you. Thank you for listening. Don't forget to check out our other show, the Data Engineering Podcast at data engineering podcast.com
[00:46:14] Unknown:
for the latest on modern data management. And visit the site of pythonpodcast.com to subscribe to the show, sign up for the mailing list, and read the show notes. And if you've learned something or tried out a project from the show, then tell us about it. Email host@podcastinit.com with your story. To help other people find the show, please leave a review on Itunes and tell your friends and coworkers.
Introduction to Ivan Krawetz and PlatformIO
Ivan's Journey to Python and Home Automation
Overview of PlatformIO Features
Motivation Behind PlatformIO
Challenges in Embedded Development
Common Challenges in Embedded Systems
Getting Started with PlatformIO
PlatformIO Ecosystem and Implementation
Reflections on PlatformIO's Development
Handling Firmware Deployment and Updates
Interesting Projects Built with PlatformIO
Lessons Learned from Building PlatformIO
Sustainability and Business Model of PlatformIO
Future Plans for PlatformIO
Closing Remarks and Picks