Embedded development file system watcher
Automatically trigger build actions when source files change
In the web development space, file system watchers like nodemon and watchman are prevalent. These watchers trigger actions when files change (such as reloading a web server), making development much faster. In the embedded space, file system watchers are less prevalent but no less useful!
pw_watch is similar to file system watchers found in web development
tooling but is focused around embedded development use cases. After changing
pw_watch can instantly compile, flash, and run tests.
Combined with the GN-based build which expresses the full dependency tree, only the exact tests affected by source changes are run.
The demo below shows
pw_watch building for a STMicroelectronics
STM32F429I-DISC1 development board, flashing the board with the affected test,
and verifying the test runs as expected. Once this is set up, you can attach
multiple devices to run tests in a distributed manner to reduce the time it
takes to run tests.
cd ~/pigweed source activate.sh pw watch
The simplest way to get started with
pw_watch is to launch it from a shell
using the Pigweed environment as
pw watch. By default,
for repository changes and triggers the default Ninja build target at
To override this behavior, provide the
-C argument to