Emulators frontend



pw_emu is an emulators frontend with the following features:

  • It allows users to define an emulation target that encapsulates the emulated machine configuration, the tools configuration and the host channels configuration.

  • It provides a command line interface that manages multiple emulator instances and provides interactive access to the emulator’s host channels.

  • It provides a Python API to control emulator instances and access the emulator’s host channels (e.g. serial ports).

  • It supports multiple emulators, QEMU and renode.

  • It expose channels for gdb, monitor and user selected devices through configurable host resources like sockets and ptys.

For background on why the module exists and some of the design choices see 0108: Emulators Frontend.

Get started#

Include the desired emulator target files in the pigweed.json configuration file, e.g.:

"pw_emu": {
   "target_files": [


Build the qemu_gcc target and use pw emu run command to run the target binaries on the host using the qemu-lm3s6965evb emulation target:

ninja -C out qemu_gcc
pw emu run --args=-no-reboot qemu-lm3s6965evb out/lm3s6965evb_qemu_gcc_size_optimized/obj/pw_snapshot/test/cpp_compile_test

See How-to guide for more examples, Configuration for detailed configuration information, CLI reference for detailed CLI usage information and API reference for managing emulators with Python APIs.