Skip to content

Commit

Permalink
doc/man: Add semihosting parameter documentation, fix styling issue w…
Browse files Browse the repository at this point in the history
…ith double dashhes. Fixes #674.
  • Loading branch information
xor-gate committed Mar 1, 2018
1 parent c8dbc0a commit 1f18a18
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 42 deletions.
10 changes: 5 additions & 5 deletions doc/man/st-flash.1
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@ Reset the target
.RE
.SH OPTIONS
.TP
.B \[en]version
.B \f[C]\-\-version\f[]
Print version information
.RS
.RE
.TP
.B \[en]debug
.B \f[C]\-\-debug\f[]
TODO
.RS
.RE
.TP
.B \[en]reset
.B \f[C]\-\-reset\f[]
TODO
.RS
.RE
.TP
.B \[en]serial \f[I]iSerial\f[]
.B \f[C]\-\-serial\f[] \f[I]iSerial\f[]
TODO
.RS
.RE
.TP
.B \[en]flash=fsize
.B \f[C]\-\-flash=fsize\f[]
Where fsize is the size in decimal, octal, or hex followed by an
optional multiplier `k' for KB, or `m' for MB.
Use a leading \[lq]0x\[rq] to specify hexadecimal, or a leading zero for
Expand Down
24 changes: 11 additions & 13 deletions doc/man/st-flash.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
%
% Feb 2018


# NAME
st-flash - Flash binary files to STM32 device

st-flash - Flash binary files to STM32 device

# SYNOPSIS
*st-flash* \[*OPTIONS*\] \{read|write|erase\} \[*FILE*\] \<ADDR\> \<SIZE\>

*st-flash* \[*OPTIONS*\] \{read|write|erase\} \[*FILE*\] \<ADDR\> \<SIZE\>

# DESCRIPTION

Flash binary files to arbitrary sections of memory, or read arbitrary addresses
of memory out to a binary file.

Expand All @@ -20,7 +20,6 @@ You can use this instead of st-util(1) if you prefer, but remember to use the

Use hexadecimal format for the *ADDR* and *SIZE*.


# COMMANDS

write *FILE* *ADDR*
Expand All @@ -37,43 +36,42 @@ reset

# OPTIONS

--version
`--version`
: Print version information

--debug
`--debug`
: TODO

--reset
`--reset`
: TODO

--serial *iSerial*
`--serial` *iSerial*
: TODO

--flash=fsize
`--flash=fsize`
: Where fsize is the size in decimal, octal, or hex followed by an optional multiplier
'k' for KB, or 'm' for MB.
Use a leading "0x" to specify hexadecimal, or a leading zero for octal.

# EXAMPLES

Flash `firmware.bin` to device

$ st-flash write firmware.bin 0x8000000


Read firmware from device (4096 bytes)

$ st-flash read firmware.bin 0x8000000 4096


Erase firmware from device

$ st-flash erase


# SEE ALSO
st-util(1), st-info(1)

st-util(1), st-info(1)

# COPYRIGHT

This work is copyrighted. Stlink contributors.
See *LICENSE* file in the stlink source distribution.
23 changes: 14 additions & 9 deletions doc/man/st-util.1
Original file line number Diff line number Diff line change
Expand Up @@ -23,52 +23,57 @@ The STLinkV2 device to use can be specified in the environment variable
STLINK_DEVICE on the format :.
.SH OPTIONS
.TP
.B \-h, \[en]help
.B \-h, \f[C]\-\-help\f[]
Print this message.
.RS
.RE
.TP
.B \[en]version
.B \f[C]\-\-version\f[]
Print version information
.RS
.RE
.TP
.B \-v \f[I]XX\f[], \[en]verbose=XX
.B \-v \f[I]XX\f[], \f[C]\-\-verbose=XX\f[]
Specify a specific verbosity level (0..99)
.RS
.RE
.TP
.B \-v, \[en]verbose
.B \-v, \f[C]\-\-verbose\f[]
Specify generally verbose logging
.RS
.RE
.TP
.B \-s \f[I]X\f[], \[en]stlink_version=X
.B \-s \f[I]X\f[], \f[C]\-\-stlink_version=X\f[]
Choose what version of stlink to use, (defaults to 2)
.RS
.RE
.TP
.B \-1, \[en]stlinkv1
.B \-1, \f[C]\-\-stlinkv1\f[]
Force stlink version 1
.RS
.RE
.TP
.B \-p \f[I]4242\f[], \[en]listen_port=1234
.B \-p \f[I]4242\f[], \f[C]\-\-listen_port=1234\f[]
Set the gdb server listen port.
(default port: 4242)
.RS
.RE
.TP
.B \-m, \[en]multi
.B \-m, \f[C]\-\-multi\f[]
Set gdb server to extended mode.
st\-util will continue listening for connections after disconnect.
.RS
.RE
.TP
.B \-n, \[en]no\-reset
.B \-n, \f[C]\-\-no\-reset\f[]
Do not reset board on connection.
.RS
.RE
.TP
.B \f[C]\-\-semihosting\f[]
Enable ARM Semihosting output on stdout
.RS
.RE
.SH EXAMPLES
.PP
Run GDB server on port 4500 and connect to it
Expand Down
31 changes: 16 additions & 15 deletions doc/man/st-util.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
%
% Feb 2018


# NAME
st-util - Run GDB server to interact with STM32 device

st-util - Run GDB server to interact with STM32 device

# SYNOPSIS
*st-util* \[\<ARGS>...]

*st-util* \[\<ARGS>...]

# DESCRIPTION
Start a GDB server to interact with a STM32 device
Expand All @@ -23,49 +22,51 @@ Stlink version 2 is used by default unless the option **--stlinkv1** is given.
The STLinkV2 device to use can be specified in the environment
variable STLINK_DEVICE on the format <USB_BUS>:<USB_ADDR>.


# OPTIONS

-h, --help
-h, `--help`
: Print this message.

--version
`--version`
: Print version information

-v *XX*, --verbose=XX
-v *XX*, `--verbose=XX`
: Specify a specific verbosity level (0..99)

-v, --verbose
-v, `--verbose`
: Specify generally verbose logging

-s *X*, --stlink_version=X
-s *X*, `--stlink_version=X`
: Choose what version of stlink to use, (defaults to 2)

-1, --stlinkv1
-1, `--stlinkv1`
: Force stlink version 1

-p *4242*, --listen_port=1234
-p *4242*, `--listen_port=1234`
: Set the gdb server listen port. (default port: 4242)

-m, --multi
-m, `--multi`
: Set gdb server to extended mode. st-util will continue listening for connections after disconnect.

-n, --no-reset
-n, `--no-reset`
: Do not reset board on connection.

`--semihosting`
: Enable ARM Semihosting output on stdout

# EXAMPLES

Run GDB server on port 4500 and connect to it

$ st-util -p 4500
$ gdb
(gdb) target extended-remote localhost:4500


# SEE ALSO
st-flash(1), st-info(1)

st-flash(1), st-info(1)

# COPYRIGHT

This work is copyrighted. Stlink contributors.
See *LICENSE* file in the stlink source distribution.

0 comments on commit 1f18a18

Please sign in to comment.