Google filed a new trademark application for “Pigweed” with the USPTO (U.S. Patent and Trademark Office) in late January. According to the content of the application, the Pigweed trademark covers “computer operating software”. At the time, there was speculation that it was a new operating system trademark, but no information was available.
Yesterday, Google announced and opened up Pigweed without warning. Unlike previous guesses, this is a collection of embedded libraries (or modules). The Pigweed module enables faster and more reliable development on 32-bit microcontrollers( small computers embedded in single-circuit chips.
Pigweed offers modules that meet the broad needs of embedded developers. Throughout the lifecycle, Pigweed can effectively improve the efficiency of embedded development, from setup to development to code submission. Based on the above development process, Google introduces some of Pigweed’s modules around these aspects.
The classic challenge in embedded space is to reduce the time from running git clones to executing binaries on the device. For embedded projects, a complete set of tools is often required. Pigweed, on the other hand, provides tools for simplified setup through virtual environments, specifically, boot scripts in Pigweed’s pw_env_setup module can set up the current shell to access a set of standardized tools, including Python 3.8, the clang format, and the ARM compiler. All of this is done in a virtual environment, so there is no need to modify the system’s default environment.
In typical embedded development, even adding small changes requires some additional manual steps. Pigweed’s pw_watch module directly addresses this inefficiency by providing a watcher who can automatically call builds when saving files, and can run specific tests that are affected by code changes. This greatly shortens the edit-compile-refresh test cycle for changes.
These tests are done automatically, so users don’t have to leave their code editor. In addition, you can use the pw_target_runner module to run tests in parallel on multiple devices, saving more time.
Team development code needs to emphasize consistency, however, setting up lint, configuring code formats, and adding automated pre-commit checks often delay this work indefinitely. At this point, Pigweed’s pw_presubmit module comes in handy. It provides an out-of-the-box Lint integration suite based on tools that the user may already be using and is pre-configured for immediate use by microcontroller developers.
As for why the project was named “Pigweed,” Google explains: “Pigweed, also known as amaranth, is a nutrient-rich grain and leafy salad dish, and a fast-growing weed. “The Pigweed project team wanted the name to be interesting and reflect the growth of the project itself, just like the fast-growing weed Pigweed.
Currently, Pigweed has provided a number of modules, and more modules will be added in the future. It is important to note that it is still in the early stages of development and is not currently suitable for production.