Skip to content

Commit

Permalink
doc/man: Fix double dash issue (fixes #746)
Browse files Browse the repository at this point in the history
  • Loading branch information
xor-gate committed Nov 19, 2018
1 parent e059ea7 commit f87076f
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 136 deletions.
64 changes: 23 additions & 41 deletions doc/man/st-flash.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 2.1.1
.\" Automatically generated by Pandoc 2.4
.\"
.TH "st\-flash" "1" "Feb 2018" "Open Source STMicroelectronics Stlink Tools" "stlink"
.hy
Expand All @@ -7,92 +7,74 @@
st\-flash \- Flash binary files to STM32 device
.SH SYNOPSIS
.PP
\f[I]st\-flash\f[] [\f[I]OPTIONS\f[]] {read|write|erase} [\f[I]FILE\f[]]
<ADDR> <SIZE>
\f[I]st\-flash\f[R] [\f[I]OPTIONS\f[R]] {read|write|erase}
[\f[I]FILE\f[R]] <ADDR> <SIZE>
.SH DESCRIPTION
.PP
Flash binary files to arbitrary sections of memory, or read arbitrary
addresses of memory out to a binary file.
.PP
You can use this instead of st\-util(1) if you prefer, but remember to
use the \f[B].bin\f[] image, rather than the \f[B].elf\f[] file.
use the \f[B].bin\f[R] image, rather than the \f[B].elf\f[R] file.
.PP
Use hexadecimal format for the \f[I]ADDR\f[] and \f[I]SIZE\f[].
Use hexadecimal format for the \f[I]ADDR\f[R] and \f[I]SIZE\f[R].
.SH COMMANDS
.TP
.B write \f[I]FILE\f[] \f[I]ADDR\f[]
Write firmware \f[I]FILE\f[] to device starting from \f[I]ADDR\f[]
.RS
.RE
.B write \f[I]FILE\f[R] \f[I]ADDR\f[R]
Write firmware \f[I]FILE\f[R] to device starting from \f[I]ADDR\f[R]
.TP
.B read \f[I]FILE\f[] \f[I]ADDR\f[] \f[I]SIZE\f[]
Read firmware from device starting from \f[I]ADDR\f[] up to
\f[I]SIZE\f[] bytes to \f[I]FILE\f[]
.RS
.RE
.B read \f[I]FILE\f[R] \f[I]ADDR\f[R] \f[I]SIZE\f[R]
Read firmware from device starting from \f[I]ADDR\f[R] up to
\f[I]SIZE\f[R] bytes to \f[I]FILE\f[R]
.TP
.B erase
Perform a mass erasing of the device firmware
.RS
.RE
.TP
.B reset
Reset the target
.RS
.RE
.SH OPTIONS
.TP
.B \f[C]\-\-version\f[]
.B \-\-version
Print version information
.RS
.RE
.TP
.B \f[C]\-\-debug\f[]
.B \-\-debug
TODO
.RS
.RE
.TP
.B \f[C]\-\-reset\f[]
.B \-\-reset
TODO
.RS
.RE
.TP
.B \f[C]\-\-serial\f[] \f[I]iSerial\f[]
.B \-\-serial \f[I]iSerial\f[R]
TODO
.RS
.RE
.TP
.B \f[C]\-\-flash=fsize\f[]
.B \-\-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 \[lq]0x\[rq] to specify hexadecimal, or a leading zero for
octal.
.RS
.RE
.SH EXAMPLES
.PP
Flash \f[C]firmware.bin\f[] to device
Flash \f[C]firmware.bin\f[R] to device
.IP
.nf
\f[C]
$\ st\-flash\ write\ firmware.bin\ 0x8000000
\f[]
$ st\-flash write firmware.bin 0x8000000
\f[R]
.fi
.PP
Read firmware from device (4096 bytes)
.IP
.nf
\f[C]
$\ st\-flash\ read\ firmware.bin\ 0x8000000\ 4096
\f[]
$ st\-flash read firmware.bin 0x8000000 4096
\f[R]
.fi
.PP
Erase firmware from device
.IP
.nf
\f[C]
$\ st\-flash\ erase
\f[]
$ st\-flash erase
\f[R]
.fi
.SH SEE ALSO
.PP
Expand All @@ -101,4 +83,4 @@ st\-util(1), st\-info(1)
.PP
This work is copyrighted.
Stlink contributors.
See \f[I]LICENSE\f[] file in the stlink source distribution.
See \f[I]LICENSE\f[R] file in the stlink source distribution.
10 changes: 5 additions & 5 deletions doc/man/st-flash.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ 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.
Expand Down
44 changes: 13 additions & 31 deletions doc/man/st-info.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 2.1.1
.\" Automatically generated by Pandoc 2.4
.\"
.TH "st\-flash" "1" "Feb 2018" "Open Source STMicroelectronics Stlink Tools" "stlink"
.hy
Expand All @@ -8,7 +8,7 @@ st\-info \- Provides information about connected STLink and STM32
devices
.SH SYNOPSIS
.PP
\f[I]st\-info\f[] [\f[I]OPTIONS\f[]]
\f[I]st\-info\f[R] [\f[I]OPTIONS\f[R]]
.SH DESCRIPTION
.PP
Provides information about connected STLink programmers and STM32
Expand All @@ -18,57 +18,39 @@ description.
.TP
.B \[en]version
Print version information
.RS
.RE
.TP
.B \[en]flash
.B \-\-flash
Display amount of flash memory available in the device
.RS
.RE
.TP
.B \[en]sram
.B \-\-sram
Display amount of sram memory available in device
.RS
.RE
.TP
.B \[en]descr
.B \-\-descr
Display textual description of the device
.RS
.RE
.TP
.B \[en]pagesize
.B \-\-pagesize
Display the page size of the device
.RS
.RE
.TP
.B \[en]chipid
.B \-\-chipid
Display the chip ID of the device
.RS
.RE
.TP
.B \[en]serial
.B \-\-serial
Display the serial code of the device
.RS
.RE
.TP
.B \[en]hla\-serial
.B \-\-hla\-serial
Display the hex escaped serial code of the device
.RS
.RE
.TP
.B \[en]probe
.B \-\-probe
Display the summarized information of the connected programmers and
devices
.RS
.RE
.SH EXAMPLES
.PP
Display information about connected programmers and devices
.IP
.nf
\f[C]
$\ st\-info\ \-\-probe
\f[]
$ st\-info \-\-probe
\f[R]
.fi
.SH SEE ALSO
.PP
Expand All @@ -77,4 +59,4 @@ st\-util(1), st\-flash(1)
.PP
This work is copyrighted.
Stlink contributors.
See \f[I]LICENSE\f[] file in the stlink source distribution.
See \f[I]LICENSE\f[R] file in the stlink source distribution.
18 changes: 9 additions & 9 deletions doc/man/st-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,31 @@ Serial code, openocd, flash, sram, page size, chipid, description.

# OPTIONS

--version
\--version
: Print version information

--flash
\--flash
: Display amount of flash memory available in the device

--sram
\--sram
: Display amount of sram memory available in device

--descr
\--descr
: Display textual description of the device

--pagesize
\--pagesize
: Display the page size of the device

--chipid
\--chipid
: Display the chip ID of the device

--serial
\--serial
: Display the serial code of the device

--hla-serial
\--hla-serial
: Display the hex escaped serial code of the device

--probe
\--probe
: Display the summarized information of the connected programmers and devices


Expand Down
60 changes: 20 additions & 40 deletions doc/man/st-util.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.\" Automatically generated by Pandoc 2.1.1
.\" Automatically generated by Pandoc 2.4
.\"
.TH "st\-util" "1" "Feb 2018" "Open Source STMicroelectronics Stlink Tools" "stlink"
.hy
Expand All @@ -7,83 +7,63 @@
st\-util \- Run GDB server to interact with STM32 device
.SH SYNOPSIS
.PP
\f[I]st\-util\f[] [<ARGS>\&...]
\f[I]st\-util\f[R] [<ARGS>\&...]
.SH DESCRIPTION
.PP
Start a GDB server to interact with a STM32 device Run the main binary
of the local package (src/main.rs).
.PP
If a port number is not specified using the \f[B]\[en]listen_port\f[]
option, the default \f[B]4242\f[] port will be used.
If a port number is not specified using the \f[B]\[en]listen_port\f[R]
option, the default \f[B]4242\f[R] port will be used.
.PP
Stlink version 2 is used by default unless the option
\f[B]\[en]stlinkv1\f[] is given.
\f[B]\[en]stlinkv1\f[R] is given.
.PP
The STLinkV2 device to use can be specified in the environment variable
STLINK_DEVICE on the format :.
.SH OPTIONS
.TP
.B \-h, \f[C]\-\-help\f[]
.B \-h, \-\-help
Print this message.
.RS
.RE
.TP
.B \f[C]\-\-version\f[]
.B \-\-version
Print version information
.RS
.RE
.TP
.B \-v \f[I]XX\f[], \f[C]\-\-verbose=XX\f[]
.B \-v \f[I]XX\f[R], \-\-verbose=XX
Specify a specific verbosity level (0..99)
.RS
.RE
.TP
.B \-v, \f[C]\-\-verbose\f[]
.B \-v, \-\-verbose
Specify generally verbose logging
.RS
.RE
.TP
.B \-s \f[I]X\f[], \f[C]\-\-stlink_version=X\f[]
.B \-s \f[I]X\f[R], \-\-stlink_version=X
Choose what version of stlink to use, (defaults to 2)
.RS
.RE
.TP
.B \-1, \f[C]\-\-stlinkv1\f[]
.B \-1, \-\-stlinkv1
Force stlink version 1
.RS
.RE
.TP
.B \-p \f[I]4242\f[], \f[C]\-\-listen_port=1234\f[]
.B \-p \f[I]4242\f[R], \-\-listen_port=1234
Set the gdb server listen port.
(default port: 4242)
.RS
.RE
.TP
.B \-m, \f[C]\-\-multi\f[]
.B \-m, \-\-multi
Set gdb server to extended mode.
st\-util will continue listening for connections after disconnect.
.RS
.RE
.TP
.B \-n, \f[C]\-\-no\-reset\f[]
.B \-n, \-\-no\-reset
Do not reset board on connection.
.RS
.RE
.TP
.B \f[C]\-\-semihosting\f[]
.B \-\-semihosting
Enable ARM Semihosting output on stdout
.RS
.RE
.SH EXAMPLES
.PP
Run GDB server on port 4500 and connect to it
.IP
.nf
\f[C]
$\ st\-util\ \-p\ 4500
$\ gdb
(gdb)\ target\ extended\-remote\ localhost:4500
\f[]
$ st\-util \-p 4500
$ gdb
(gdb) target extended\-remote localhost:4500
\f[R]
.fi
.SH SEE ALSO
.PP
Expand All @@ -92,4 +72,4 @@ st\-flash(1), st\-info(1)
.PP
This work is copyrighted.
Stlink contributors.
See \f[I]LICENSE\f[] file in the stlink source distribution.
See \f[I]LICENSE\f[R] file in the stlink source distribution.
Loading

0 comments on commit f87076f

Please sign in to comment.