FW: [platformio/platformio-core] ZephyrProject integration (#1613)
Nashif, Anas
Hi,
Please try and give feedback directly in the github issue.
Anas
From:
Ivan Kravets <notifications@...>
Hey all, We have a piece of good news. We've finally added support for Zephyr RTOS and would be glad to get some feedback. It was the most complicated integration for the last 6 years :) We even did some changes to our PlatformIO Core Build API. So, the only latest development version of PlatformIO Core will be compatible with Zephyr. All our efforts were directed on keeping the same workflow which we have with other frameworks (ARM mbed, ESP-IDF, Arduino, etc.). It means that we are still fully independent from operating system and IDE. No need to install any software, make, cmake, ninja, toolchains, different Python packages, other system-related tools. IntegrationWe did pure native integration and PlatformIO build system will be used. It's based on top of SCons and is super fast and smart. You can use Python language to control and extend the build process using
Advanced Scripting or quick shortcuts with The source code is here
https://github.com/platformio/zephyr/tree/v2.0-branch/scripts/platformio P.S: Thanks, @valeros, for the great professional work on this! 👍 Supported IDE and OSYou have a choice between 10+ different IDEs and all popular operating systems (Windows, macOS, Linux 32/64, Linux ARMv6+). Any combination of IDE+OS provides the same reproducibility with ZERO changes. Supported dev/platformsCurrently, 3 development platforms are Zephyr-enabled: · https://github.com/platformio/platform-nordicnrf52 · https://platformio.org/platforms/ststm32 · https://github.com/platformio/platform-ststm32 Support for other dev/platforms and boards will be added next week. How to try it?
1.
You need to have the latest development version of PlatformIO Core. If you use CLI, just run
2. You will need to use a development version of dev/platform mentioned above. Project ExamplesSee projects with · https://github.com/platformio/platform-nordicnrf52/tree/develop/examples · https://platformio.org/platforms/ststm32/tree/develop/examples · https://github.com/platformio/platform-ststm32/tree/develop/examples You can open/import any project and try it. The only change which you need to do is switching
[env:nrf52_board]
platform = https://github.com/platformio/platform-nordicnrf52.git
framework = zephyr
board = ...
[env:stm32_board]
platform = https://github.com/platformio/platform-ststm32.git
framework = zephyr
board = ...
[env:sifive_board]
platform = https://github.com/platformio/platform-sifive.git
framework = zephyr
board = ...
ConfigurationWe will provide soon extra information in our documentation on how to configure Zephyr RTOS within the PlatformIO project. In short, you can use any example from Zephyr repository with small changes:
1.
Create 2. Edit relative source paths in CMakeLists.txt, see example here https://github.com/platformio/platform-nordicnrf52/blob/develop/examples/zephyr-ble-beacon/zephyr/CMakeLists.txt#L7 The rest configuration should be done in CMakeLists.txt. It's the same when you use the official Zephyr build tools. DemoBelow are a few demos from different IDEs with PIO Unified Debugger and SiFive HiFive1 Rev B board: PlatformIO IDE for VSCodeCLion with PlatformIO pluginOld-school EclipseYour feedback is very important to us. — |
|