From 3268ea1250da16d682704ab2e3b9f9fef4f625bb Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Thu, 15 Sep 2016 18:18:27 -0500 Subject: [PATCH 1/4] Add st-flash man page --- doc/man/CMakeLists.txt | 1 + doc/man/st-flash.md | 70 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 doc/man/st-flash.md diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt index 956b76a..baf482e 100644 --- a/doc/man/CMakeLists.txt +++ b/doc/man/CMakeLists.txt @@ -1,5 +1,6 @@ set(MANPAGES st-util + st-flash ) # Only generate manpages with pandoc in Debug builds diff --git a/doc/man/st-flash.md b/doc/man/st-flash.md new file mode 100644 index 0000000..88ba587 --- /dev/null +++ b/doc/man/st-flash.md @@ -0,0 +1,70 @@ +% ST-FLASH(1) Open Source STMicroelectronics Stlink Tools | STLINK +% +% Sep 2016 + + +# NAME +st-flash - Flash binary files to STM32 device + + +# SYNOPSIS +*st-flash* \[*OPTIONS*\] \{read|write|erase\} \[*FILE*\] \ \ + + +# DESCRIPTION +Flash binary files to arbitrary sections of memory, or read arbitrary addresses +of memory out to a binary file. + +You can use this instead of st-util(1) if you prefer, but remember to use the +**.bin** image, rather than the **.elf** file. + +Use hexadecimal format for the *ADDR* and *SIZE*. + + +# COMMANDS + +write *FILE* *ADDR* +: Write firmware *FILE* to device starting from *ADDR* + +read *FILE* *ADDR* *SIZE* +: Read firmware from device starting from *ADDR* up to *SIZE* bytes to *FILE* + +erase +: Perform a mass erasing of the device firmware + + +# OPTIONS + +--debug +: TODO + +--reset +: TODO + +--serial *iSerial* +: TODO + + +# 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-term(1) + + +# COPYRIGHT +This work is copyrighted. Stlink contributors. +See *LICENSE* file in the stlink source distribution. From 759f423987b89610546f55bb053db4c30c600543 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Thu, 15 Sep 2016 18:18:45 -0500 Subject: [PATCH 2/4] Add st-info man page --- doc/man/CMakeLists.txt | 1 + doc/man/st-info.md | 58 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 doc/man/st-info.md diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt index baf482e..795b6fa 100644 --- a/doc/man/CMakeLists.txt +++ b/doc/man/CMakeLists.txt @@ -1,6 +1,7 @@ set(MANPAGES st-util st-flash + st-info ) # Only generate manpages with pandoc in Debug builds diff --git a/doc/man/st-info.md b/doc/man/st-info.md new file mode 100644 index 0000000..9cc48e9 --- /dev/null +++ b/doc/man/st-info.md @@ -0,0 +1,58 @@ +% ST-INFO(1) Open Source STMicroelectronics Stlink Tools | STLINK +% +% Sep 2016 + + +# NAME +st-info - Provides information about connected STLINK and STM32 devices + + +# SYNOPSIS +*st-info* \[*OPTIONS*\] + + +# DESCRIPTION +Provides information about connected STLINK programmers and STM32 devices: +Serial code, openocd, flash, sram, page size, chipid, description. + + +# OPTIONS + +--flash +: Display amount of flash memory available in the device + +--sram +: Display amount of sram memory available in device + +--descr +: Display textual description of the device + +--pagesize +: Display the page size of the device + +--chipid +: Display the chip ID of the device + +--serial +: Display the serial code of the device + +--hla-serial +: Display the hex escaped serial code of the device + +--probe +: Display the summarized information of the connected programmers and devices + + +# EXAMPLES +Display information about connected programmers and devices + + $ st-info --probe + + +# SEE ALSO +st-util(1), st-flash(1), st-term(1) + + +# COPYRIGHT +This work is copyrighted. Stlink contributors. +See *LICENSE* file in the stlink source distribution. From 3c28cf15a79b50d273fa8147b93eb7c09c770f0b Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Thu, 15 Sep 2016 18:52:58 -0500 Subject: [PATCH 3/4] Add st-term man page --- doc/man/CMakeLists.txt | 1 + doc/man/st-term.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 doc/man/st-term.md diff --git a/doc/man/CMakeLists.txt b/doc/man/CMakeLists.txt index 795b6fa..96e1734 100644 --- a/doc/man/CMakeLists.txt +++ b/doc/man/CMakeLists.txt @@ -2,6 +2,7 @@ set(MANPAGES st-util st-flash st-info + st-term ) # Only generate manpages with pandoc in Debug builds diff --git a/doc/man/st-term.md b/doc/man/st-term.md new file mode 100644 index 0000000..e9b635e --- /dev/null +++ b/doc/man/st-term.md @@ -0,0 +1,36 @@ +% ST-TERM(1) Open Source STMicroelectronics Stlink Tools | STLINK +% +% Sep 2016 + + +# NAME +st-term - Serial terminal interface for debugging using STLink device only + + +# SYNOPSIS +*st-term* + + +# DESCRIPTION +Provides a serial terminal that works through the STLink device, allowing to do +the kind of debugging you would do using the UART of the STM32 device without +having to connect a UART-USB serial adapter dongle. + +It works by having a magic number in sram of the MCU within a structure that +serves as IO buffer. + +The required setup consist of some code that establishes the magic number, +buffer structure and helper functions for actual data transmission between host +and MCU. + +`stlinky.h` and `stlinky.c` are available in the Antares build system libraries +source: https://github.com/nekromant/antares/tree/master/include/lib + + +# SEE ALSO +st-util(1), st-info(1), st-term(1) + + +# COPYRIGHT +This work is copyrighted. Stlink contributors. +See *LICENSE* file in the stlink source distribution. From c23732c8329a244d7b083b3af771edd8143f4000 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Thu, 15 Sep 2016 18:53:10 -0500 Subject: [PATCH 4/4] Use 'STLink' in man pages --- doc/man/st-info.md | 4 ++-- doc/man/st-util.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/st-info.md b/doc/man/st-info.md index 9cc48e9..34192b9 100644 --- a/doc/man/st-info.md +++ b/doc/man/st-info.md @@ -4,7 +4,7 @@ # NAME -st-info - Provides information about connected STLINK and STM32 devices +st-info - Provides information about connected STLink and STM32 devices # SYNOPSIS @@ -12,7 +12,7 @@ st-info - Provides information about connected STLINK and STM32 devices # DESCRIPTION -Provides information about connected STLINK programmers and STM32 devices: +Provides information about connected STLink programmers and STM32 devices: Serial code, openocd, flash, sram, page size, chipid, description. diff --git a/doc/man/st-util.md b/doc/man/st-util.md index 8f015c8..2b68a56 100644 --- a/doc/man/st-util.md +++ b/doc/man/st-util.md @@ -20,7 +20,7 @@ default **4242** port will be used. Stlink version 2 is used by default unless the option **--stlinkv1** is given. -The STLINKv2 device to use can be specified in the environment +The STLinkV2 device to use can be specified in the environment variable STLINK_DEVICE on the format :.