pw_system CLI reference#
Pigweed AI summary: The pw_system CLI reference provides a list of named arguments for the pw system console command, including options for specifying the serial port, baud rate, output file, log files, socket address, tokenizer database, config file, and more. It also includes options for enabling debug logging, using IPython instead of pw_console, and using HDLC encoding on transfer interfaces. The default values for each option are also provided.
usage: pw system console [-h] [-d DEVICE] [-b BAUDRATE] [--serial-debug]
[-o OUTPUT] [--logfile LOGFILE]
[--merge-device-and-host-logs]
[--host-logfile HOST_LOGFILE]
[--device-logfile DEVICE_LOGFILE]
[--json-logfile JSON_LOGFILE] [-s SOCKET_ADDR]
[--token-databases elf_or_token_database [elf_or_token_database ...]]
[--config-file CONFIG_FILE]
[--proto-globs PROTO_GLOBS [PROTO_GLOBS ...]] [-v]
[--ipython] [--rpc-logging] [--no-rpc-logging]
[--hdlc-encoding] [--no-hdlc-encoding]
[--channel-id CHANNEL_ID]
Named Arguments#
Pigweed AI summary: This paragraph describes the various named arguments that can be used with a program, including options for specifying the serial port and baud rate, enabling debug log tracing, specifying output files, and setting various logging options. Other options include using IPython instead of the default console, enabling or disabling RPC-based logging, and using HDLC encoding on transfer interfaces. Default values are provided for some options.
- -d, --device
the serial port to use
- -b, --baudrate
the baud rate to use
Default: 115200
- --serial-debug
Enable debug log tracing of all data passed throughpyserial read and write.
- -o, --output
The file to which to write device output (HDLC channel 1); provide - or omit for stdout.
Default: <_io.BufferedWriter name=’<stdout>’>
- --logfile
Default log file. This will contain host side log messages only unles the –merge-device-and-host-logs argument is used.
Default: “pw_console-logs.txt”
- --merge-device-and-host-logs
Include device logs in the default –logfile.These are normally shown in a separate device only log file.
- --host-logfile
Additional host only log file. Normally all logs in the default logfile are host only.
- --device-logfile
Device only log file.
Default: “pw_console-device-logs.txt”
- --json-logfile
Device only JSON formatted log file.
- -s, --socket-addr
Socket address used to connect to server. Type “default” to use localhost:33000, pass the server address and port as address:port, or prefix the path to a forwarded socket with “file:” as file:path_to_file.
- --token-databases
Path to tokenizer database csv file(s).
- --config-file
Path to a pw_console yaml config file.
- --proto-globs
glob pattern for .proto files.
Default: []
- -v, --verbose
Enables debug logging when set.
- --ipython
Use IPython instead of pw_console.
- --rpc-logging
Use pw_rpc based logging.
- --no-rpc-logging
Don’t use pw_rpc based logging.
- --hdlc-encoding
Use HDLC encoding on transfer interfaces.
- --no-hdlc-encoding
Don’t use HDLC encoding on transfer interface.
- --channel-id
Channel ID used in RPC communications.
Default: 1