Google has announced the release of Pigweed, an open source collection of embedded libraries designed to speed development of software for 32-bit microcontrollers — though, it warns, the early-development project isn't ready for production use just yet.
"We’re excited to announce Pigweed, an open source collection of embedded-targeted libraries, or as we like to call them, modules," write Keir Mierle and Mohammed Habibulla, on behalf of the Pigweed team responsible for developing the libraries, in a blog post brought to our attention by CNX Software. "Pigweed modules are built to enable faster and more reliable development on 32-bit microcontrollers.
"Pigweed, also known as amaranth, is a nutritious grain and leafy salad green that is also a rapidly growing weed. When developing the project that eventually became Pigweed, we wanted to find a name that was fun, playful, and reflective of how we saw Pigweed growing. Teams would start out using one module that catches their eye, and after that goes well, they’d quickly start using more."
The Pigweed libraries, Google's development team explains, can speed each stage of the development process stages. For setup, a bootstrap script provides access to a standardised set of tools, including Python 3.8 and an Arm compiler, through a virtual environment; a pw_watch module, meanwhile, can automatically start the build process when a source file has been modified, complete with any required tests. Even code submission can be enhanced, through a pw_presubmit module designed to run an integrated suite of preconfigured linters across code before it's checked in.
Other tools included in the initial release perform tasks such as the conversion of strings to binary tokens at the point of compilation, a C++-style string manipulation library with smaller binary size impact and no dynamic memory allocation, a module for reporting the memory impact of code changes, unit testing facilities, a key-value store designed for flash-based storage with wear levelling, a fault handler for Arm Cortex-M processors, and a a preview version of a wire-format-oriented protocol buffer designed as an alternative to nanopb.
More information is available in the official announcement, while the Pigweed source code can be found on Google's Git repository under the permissive Apache 2.0 licence. Those looking to try it out, however, are advised that the project is in the very early stages of development and should not be considered production-ready.