This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 863dcbbb45 DOC: Add information on STM32F0 and STM32L4 
flashing/debugging.
863dcbbb45 is described below

commit 863dcbbb45eb2874733ad7d467021c92feade31b
Author: Tomasz 'CeDeROM' CEDRO <to...@cedro.info>
AuthorDate: Mon Oct 14 20:20:27 2024 +0200

    DOC: Add information on STM32F0 and STM32L4 flashing/debugging.
    
    Signed-off-by: Tomasz 'CeDeROM' CEDRO <to...@cedro.info>
---
 Documentation/platforms/arm/stm32f0/index.rst | 27 +++++++++++++++++++++++++++
 Documentation/platforms/arm/stm32l4/index.rst | 27 +++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/Documentation/platforms/arm/stm32f0/index.rst 
b/Documentation/platforms/arm/stm32f0/index.rst
index 3b0ecfbbac..9849ed5281 100644
--- a/Documentation/platforms/arm/stm32f0/index.rst
+++ b/Documentation/platforms/arm/stm32f0/index.rst
@@ -52,6 +52,33 @@ USB         Yes
 HDMI-CEC    No
 ==========  =======  =====
 
+Flashing and Debugging
+======================
+
+NuttX firmware Flashing with STLink probe and OpenOCD::
+
+   openocd -f  interface/stlink.cfg -f target/stm32f0x.cfg -c 'program 
nuttx.bin 0x08000000; reset run; exit'
+
+Remote target Reset with STLink probe and OpenOCD::
+
+   openocd -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; reset run; 
exit'
+
+Remote target Debug with STLink probe and OpenOCD:
+
+ 1. You need to have NuttX built with debug symbols, see :ref:`debugging`.
+
+ 2. Launch the OpenOCD GDB server::
+
+     openocd -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; reset 
halt'
+
+ 3. You can now attach to remote OpenOCD GDB server with your favorite 
debugger,
+    for instance gdb::
+
+     arm-none-eabi-gdb --tui nuttx -ex 'target extended-remote localhost:3333'
+     (gdb) monitor reset halt
+     (gdb) breakpoint nsh_main
+     (gdb) continue
+
 Supported Boards
 ================
 
diff --git a/Documentation/platforms/arm/stm32l4/index.rst 
b/Documentation/platforms/arm/stm32l4/index.rst
index 4d094ae271..6be0b2f932 100644
--- a/Documentation/platforms/arm/stm32l4/index.rst
+++ b/Documentation/platforms/arm/stm32l4/index.rst
@@ -104,6 +104,33 @@ OCTOSPI     No
 OCTOSPIIOM  No
 ==========  =======  ==============================
 
+Flashing and Debugging
+======================
+
+NuttX firmware Flashing with STLink probe and OpenOCD::
+
+   openocd -f  interface/stlink.cfg -f target/stm32l4x.cfg -c 'program 
nuttx.bin 0x08000000; reset run; exit'
+
+Remote target Reset with STLink probe and OpenOCD::
+
+   openocd -f interface/stlink.cfg -f target/stm32l4x.cfg -c 'init; reset run; 
exit'
+
+Remote target Debug with STLink probe and OpenOCD:
+
+ 1. You need to have NuttX built with debug symbols, see :ref:`debugging`.
+
+ 2. Launch the OpenOCD GDB server::
+
+     openocd -f interface/stlink.cfg -f target/stm32l4x.cfg -c 'init; reset 
halt'
+
+ 3. You can now attach to remote OpenOCD GDB server with your favorite 
debugger,
+    for instance gdb::
+
+     arm-none-eabi-gdb --tui nuttx -ex 'target extended-remote localhost:3333'
+     (gdb) monitor reset halt
+     (gdb) breakpoint nsh_main
+     (gdb) continue
+
 Supported Boards
 ================
 

Reply via email to