Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

serial.invocation

Klemens David Morgenstern edited this page May 6, 2018 · 1 revision

This section describes the usage of the metal.serial. We will assume that the command is available, though you might need to either use the absolute path or add the path to the PATH variable.

Here's an overview of all parameters:

Plugins can add other parameters.

Option Shortcut Description Value type
--config-file C Configuration file single string
--binary G The binary generating the input single string
--dbg-args U Arguments to pass to debugger multiple string
--addr2line A The command for the addr2line tool of the toolchain single string
--lib P Macro plugins multiple strings
--log L Log file multiple strings
--source-dir S Folder to look for sources, should be the root path of the output addr2line generates path
--init-script I The init script(s) for the debugger initialization multiple paths
--help H List all parameters, including those of plugins, then do nothing bool switch

The parameter exe is required.

You can also use stderr and stdout instead of a filename for log.

Config File

Since the call might get rather long, configuration and response files can be used. Config files are set through --config-file or -C. Configuration files have a simple format of key=value. Response files are passed as with gnu tools in the form of @response-file where response-file contains text in the same format as passed to the program.

E.g. if you have a configuration file config-file

exe=test.exe

response file response-file with the following content

--exe=test.exe

and a config file with the following

the follwing commands are equal:

metal.serial --exe=test.exe
metal.serial --config-file=config-file
metal.serial @response-file

This also works for plugin-provided commands.

Addr2Line call

The addr2line -command can be set explicitly, if the location might need to be changed or the addr2line has a prefix, as in avr-none-eabi-addr2line.

If the addr2line-command contains a string, you will need to put it in quotes.

Log file

By default, all the output generated by the metal.serial tool itself is written to std::cerr, while all the output regarding the target is written to std::cout. The log parameter allows to redirect the former to a file.