CLI reference#

Pigweed emulator 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

instance to use (default: “default”)

Default: “default”

-C, --working-dir

path to working directory (default: None)

-c, --config

path 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

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

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 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

path of the emulator object

prop-get#

Show the emulator’s object properties.

pw emu prop-get [-h] path property

Positional Arguments#

path

path of 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

path of 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 the 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]