From e7ba9d8ba85e9f720fc263f3d81c2196e1491c75 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sat, 17 Sep 2016 23:04:12 -0500 Subject: [PATCH 1/9] stlink: add st-flash page --- pages/common/st-flash.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/st-flash.md diff --git a/pages/common/st-flash.md b/pages/common/st-flash.md new file mode 100644 index 0000000000..268bd16cad --- /dev/null +++ b/pages/common/st-flash.md @@ -0,0 +1,15 @@ +# st-flash + +> Flash binary files to STM32 ARM Cortex microcontrollers. + +- Read 4096 bytes of the firmware: + +`st-flash read {{firmware.bin}} 0x8000000 4096` + +- Write firmware to device: + +`st-flash write {{firmware.bin}} 0x8000000` + +- Erase firmware from device: + +`st-flash erase` From bee393809e037d78a594b5465bb85567174d8770 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sat, 17 Sep 2016 23:09:04 -0500 Subject: [PATCH 2/9] stlink: add st-util page --- pages/common/st-util.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/st-util.md diff --git a/pages/common/st-util.md b/pages/common/st-util.md new file mode 100644 index 0000000000..6b0861f88b --- /dev/null +++ b/pages/common/st-util.md @@ -0,0 +1,15 @@ +# st-util + +> Run GDB server to interact with STM32 ARM Cortex microcontoller. + +- Run GDB server on port 4500: + +`st-util -p 4500` + +- Connect to GDB server: + +`(gdb) target extended-remote localhost:4500` + +- Write firmware to device: + +`(gdb) load {{firmware.elf}}` From 57e32a7e5214c3d6cea58ef2602bd9b8a2b3eced Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sat, 17 Sep 2016 23:13:42 -0500 Subject: [PATCH 3/9] stlink: add st-info page --- pages/common/st-info.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/st-info.md diff --git a/pages/common/st-info.md b/pages/common/st-info.md new file mode 100644 index 0000000000..cdd6a6bf46 --- /dev/null +++ b/pages/common/st-info.md @@ -0,0 +1,15 @@ +# st-info + +> Provides information about connected STLink and STM32 devices. + +- Display about of program memory available: + +`st-info --flash` + +- Display about of sram memory available: + +`st-info --sram` + +- Display summarized information of the device: + +`st-info --probe` From 40a785d199191295196375cf2ce972e8c667b8ec Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sun, 18 Sep 2016 09:19:53 -0500 Subject: [PATCH 4/9] stflash: use spelled out options --- pages/common/st-util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/st-util.md b/pages/common/st-util.md index 6b0861f88b..8dad0a7359 100644 --- a/pages/common/st-util.md +++ b/pages/common/st-util.md @@ -4,7 +4,7 @@ - Run GDB server on port 4500: -`st-util -p 4500` +`st-util --listen_port {{4500}}` - Connect to GDB server: From 5c9c8b402317310c34208f5f0dda76ad3c0fc0c3 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sun, 18 Sep 2016 09:22:00 -0500 Subject: [PATCH 5/9] stlink: add extra clarification on descriptions --- pages/common/st-flash.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/common/st-flash.md b/pages/common/st-flash.md index 268bd16cad..957bb89306 100644 --- a/pages/common/st-flash.md +++ b/pages/common/st-flash.md @@ -2,13 +2,13 @@ > Flash binary files to STM32 ARM Cortex microcontrollers. -- Read 4096 bytes of the firmware: +- Read 4096 bytes from the device starting from 0x8000000: -`st-flash read {{firmware.bin}} 0x8000000 4096` +`st-flash read {{firmware}}.bin {{0x8000000}} {{4096}}` -- Write firmware to device: +- Write firmware to device starting from 0x8000000: -`st-flash write {{firmware.bin}} 0x8000000` +`st-flash write {{firmware}}.bin {{0x8000000}}` - Erase firmware from device: From a6d469a036d92c18d8ee7b2201c0b39176163fc2 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sun, 18 Sep 2016 13:25:24 -0500 Subject: [PATCH 6/9] stlink: fix typo --- pages/common/st-info.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/st-info.md b/pages/common/st-info.md index cdd6a6bf46..3cfe37a407 100644 --- a/pages/common/st-info.md +++ b/pages/common/st-info.md @@ -2,11 +2,11 @@ > Provides information about connected STLink and STM32 devices. -- Display about of program memory available: +- Display amount of program memory available: `st-info --flash` -- Display about of sram memory available: +- Display amount of sram memory available: `st-info --sram` From f07e797642f6757a0d9a4e30046b90b4f6a66e06 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sun, 18 Sep 2016 13:25:47 -0500 Subject: [PATCH 7/9] stlink: expand GDB name --- pages/common/st-util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/st-util.md b/pages/common/st-util.md index 8dad0a7359..3ffd7b1464 100644 --- a/pages/common/st-util.md +++ b/pages/common/st-util.md @@ -1,6 +1,6 @@ # st-util -> Run GDB server to interact with STM32 ARM Cortex microcontoller. +> Run GDB (GNU Debugger) server to interact with STM32 ARM Cortex microcontoller. - Run GDB server on port 4500: From 29d7166a4de66c2bf5c16b42e23c9199aaafcd65 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Sun, 18 Sep 2016 17:36:50 -0500 Subject: [PATCH 8/9] stlink: use {{localhost}} --- pages/common/st-util.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/common/st-util.md b/pages/common/st-util.md index 3ffd7b1464..2183ef75b0 100644 --- a/pages/common/st-util.md +++ b/pages/common/st-util.md @@ -4,11 +4,11 @@ - Run GDB server on port 4500: -`st-util --listen_port {{4500}}` +`st-util -p {{4500}}` - Connect to GDB server: -`(gdb) target extended-remote localhost:4500` +`(gdb) target extended-remote {{localhost}}:4500` - Write firmware to device: From bcaef1f8ab16680623a2cf2497b87d21b3645b0e Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" Date: Tue, 20 Sep 2016 13:27:56 -0500 Subject: [PATCH 9/9] stlink: wrap port number in {{}} --- pages/common/st-util.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/st-util.md b/pages/common/st-util.md index 2183ef75b0..4cef470cd2 100644 --- a/pages/common/st-util.md +++ b/pages/common/st-util.md @@ -8,7 +8,7 @@ - Connect to GDB server: -`(gdb) target extended-remote {{localhost}}:4500` +`(gdb) target extended-remote {{localhost}}:{{4500}}` - Write firmware to device: