CLI reference#

pw_emu: Flexible emulators frontend

usage: pw emu [-h] [-i STRING] [-C WORKING_DIR] [-c CONFIG]
              {start,restart,run,stop,load,reset,gdb,prop-ls,prop-get,prop-set,gdb-cmds,term,resume}
              ...

Positional Arguments#

command

Possible choices: start, restart, run, stop, load, reset, gdb, prop-ls, prop-get, prop-set, gdb-cmds, term, resume

Named Arguments#

-i, --instance

Run multiple instances simultaneously by assigning each instance an ID (default: "default")

Default: “default”

-C, --working-dir

Absolute path to the working directory (default: None)

-c, --config

Absolute path to config file (default: None)

Sub-commands#

start#

Launch the emulator and start executing, unless --pause is set.

pw emu start [-h] [--file FILE] [--runner {None,qemu,renode}] [--args ARGS]
             [--pause] [--debug] [--foreground]
             target

Positional Arguments#

target

Named Arguments#

--file, -f

File to load before starting

--runner, -r

Possible choices: None, qemu, renode

The emulator to use (automatically detected if not set)

--args, -a

Options to pass to the emulator

--pause, -p

Pause the emulator after starting it

--debug, -d

Start the emulator in debug mode

--foreground, -F

Start the emulator in foreground mode

restart#

Restart the emulator and start executing, unless --pause is set.

pw emu restart [-h] [--file FILE] [--runner {None,qemu,renode}] [--args ARGS]
               [--pause] [--debug] [--foreground]
               target

Positional Arguments#

target

Named Arguments#

--file, -f

File to load before starting

--runner, -r

Possible choices: None, qemu, renode

The emulator to use (automatically detected if not set)

--args, -a

Options to pass to the emulator

--pause, -p

Pause the emulator after starting it

--debug, -d

Start the emulator in debug mode

--foreground, -F

Start the emulator in foreground mode

run#

Start the emulator and connect the terminal to a channel. Stop

the emulator when exiting the terminal.

pw emu run [-h] [--args ARGS] [--channel CHANNEL] target FILE

Positional Arguments#

target
FILE

File to load before starting

Named Arguments#

--args, -a

Options to pass to the emulator

--channel, -n

Channel to connect the terminal to

stop#

Stop the emulator.

pw emu stop [-h]

load#

Load an executable image via gdb and start executing it if

--pause is not set

pw emu load [-h] [--pause] [--offset ADDRESS] FILE

Positional Arguments#

FILE

File to load via gdb

Named Arguments#

--pause, -p

Pause the emulator after loading the file

--offset, -o

Address to load the file at

reset#

Perform a software reset.

pw emu reset [-h]

gdb#

Start a gdb interactive session.

pw emu gdb [-h] [--executable FILE]

Named Arguments#

--executable, -e

File to use for the debugging session

prop-ls#

List emulator object properties.

pw emu prop-ls [-h] path

Positional Arguments#

path

Absolute path to the emulator object

prop-get#

Show the emulator’s object properties.

pw emu prop-get [-h] path property

Positional Arguments#

path

Absolute path to the emulator object

property

Name of the object property

prop-set#

Set emulator’s object properties.

pw emu prop-set [-h] path property value

Positional Arguments#

path

Absolute path to the emulator object

property

Name of the object property

value

Value to set for the object property

gdb-cmds#

Run gdb commands in batch mode.

pw emu gdb-cmds [-h] [--pause] [--executable FILE] gdb_cmd [gdb_cmd ...]

Positional Arguments#

gdb_cmd

gdb command to execute

Named Arguments#

--pause, -p

Do not resume execution after running the commands

--executable, -e

Executable to use while running gdb commands

term#

Connect with an interactive terminal to an emulator channel

pw emu term [-h] channel

Positional Arguments#

channel

Channel name

resume#

Resume the execution of a paused emulator.

pw emu resume [-h]

More pw_emu docs#

Get started & guides

How to set up and use pw_emu

CLI reference

Reference details about the pw_emu command line interface

API reference

Reference details about the pw_emu Python API

Configuration

Reference details about pw_emu declarative configuration

Design

Design details about pw_emu

SEED-0108: Emulators Frontend

The RFC explaining the initial design and motivations for pw_emu

Source code

Source code for pw_emu