Google at the moment open-sourced Pigweed, a set of microcontroller modules designed for builders utilizing 32-bit units. They’re supposed to allow quicker and extra dependable improvement on microcontrollers — i.e., the small computer systems embedded inside single circuit chips. Assuming it really works as marketed, Pigweed might speed up the event of {hardware} in a spread of industries, from sensible residence and manufacturing to robotics, automotive, and even telecommunications.

Google filed a trademark for Pigweed with the U.S. Patent and Trademark Office in late January, and the paperwork recommended that the venture would contain a “computer operating software.” Some took this to imply a brand new working system akin to Google’s Fuchsia, however in a weblog put up this morning, Google made it clear that Pigweed is solely a set of microcontroller libraries.

Pigweed ships with instruments that supply a simplified setup by way of a digital atmosphere. The bootstrap script in Pigweed’s pw_env_setup module units up the present shell to have entry to a standardized set of utilities — together with Python 3.8, clang-format, and an ARM compiler — all with out modifying the system’s default atmosphere.

Google open-sources Pigweed, a collection of microcontroller modules for device developers

Pigweed helps distributed testing, in addition to pre-configured code formatting and built-in pre-submit checks. From the code editor, the pw_watch module offers a watcher that robotically invokes a construct when a file is saved, and that runs the assessments affected by the code modifications to scale back the edit-compile-flash-test cycle for modifications. For occasion, pw_watch can detect file modifications earlier than constructing the affected libraries and binaries, flashing the assessments to the goal system, and working the precise unit assessments.

Google open-sources Pigweed, a collection of microcontroller modules for device developers

Pigweed’s pw_target_runner module runs assessments in parallel throughout a number of units, whereas its pw_pressubmit module offers an off-the-shelf built-in suite of linters (instruments that analyze supply code to flag errors and bugs) primarily based on instruments which are pre-configured to be used for microcontroller builders. Pw_tokenizer converts strings to binary tokens at compile time, enabling logging with much less overhead in flash, RAM, and CPU utilization. And pw_bloat generates reminiscence experiences for output binaries to empower builders with info concerning the reminiscence affect of modifications.

Google open-sources Pigweed, a collection of microcontroller modules for device developers

Here’s a listing of different modules included within the preliminary Pigweed launch:

  • Pw_string: A module that gives the flexibleness and security of C++-style string manipulation, however with no dynamic reminiscence allocation and a a lot smaller binary dimension affect.
  • Pw_unit_test: A module constructed on prime of embedded pleasant primitives that doesn’t use dynamic reminiscence allocation. It can be utilized to port to new goal platforms by implementing the check occasion handler interface.
  • Pw_kvs: A key-value-store implementation for flash-backed persistent storage with built-in put on leveling; a light-weight different to a file system for embedded units.
  • Pw_cpu_exception_armv7m: A low-level {hardware} fault handler for ARM Cortex-M; the handler has unit assessments written in meeting to confirm nested-hardware-fault dealing with.
  • Pw_protobuf: An early preview of a wire-format-oriented protocol buffer implementation.

As of at the moment, the Pigweed supply is available underneath an Apache license. Google cautions that it’s nonetheless in early improvement and isn’t really useful for manufacturing right now.

So, what concerning the origin of the identify “Pigweed”? Google notes that it’s a nutritious grain and leafy salad inexperienced that’s additionally a quickly rising weed. When creating the venture that finally turned Pigweed, the tech large wished to discover a identify that was “fun, playful, and reflective” of the way it noticed Pigweed rising. “Teams would start out using one module that catches their eye, and after that goes well, they’d quickly start using more,” wrote Google. “We’re continuing to evolve the collection and add new modules. It’s our hope that others in the embedded community find these modules helpful for their projects.”