Skip to content

Commit 863dcbb

Browse files
cederomxiaoxiang781216
authored andcommitted
DOC: Add information on STM32F0 and STM32L4 flashing/debugging.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <[email protected]>
1 parent 9b094e8 commit 863dcbb

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

Documentation/platforms/arm/stm32f0/index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,33 @@ USB Yes
5252
HDMI-CEC No
5353
========== ======= =====
5454

55+
Flashing and Debugging
56+
======================
57+
58+
NuttX firmware Flashing with STLink probe and OpenOCD::
59+
60+
openocd -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'program nuttx.bin 0x08000000; reset run; exit'
61+
62+
Remote target Reset with STLink probe and OpenOCD::
63+
64+
openocd -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; reset run; exit'
65+
66+
Remote target Debug with STLink probe and OpenOCD:
67+
68+
1. You need to have NuttX built with debug symbols, see :ref:`debugging`.
69+
70+
2. Launch the OpenOCD GDB server::
71+
72+
openocd -f interface/stlink.cfg -f target/stm32f0x.cfg -c 'init; reset halt'
73+
74+
3. You can now attach to remote OpenOCD GDB server with your favorite debugger,
75+
for instance gdb::
76+
77+
arm-none-eabi-gdb --tui nuttx -ex 'target extended-remote localhost:3333'
78+
(gdb) monitor reset halt
79+
(gdb) breakpoint nsh_main
80+
(gdb) continue
81+
5582
Supported Boards
5683
================
5784

Documentation/platforms/arm/stm32l4/index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,33 @@ OCTOSPI No
104104
OCTOSPIIOM No
105105
========== ======= ==============================
106106

107+
Flashing and Debugging
108+
======================
109+
110+
NuttX firmware Flashing with STLink probe and OpenOCD::
111+
112+
openocd -f interface/stlink.cfg -f target/stm32l4x.cfg -c 'program nuttx.bin 0x08000000; reset run; exit'
113+
114+
Remote target Reset with STLink probe and OpenOCD::
115+
116+
openocd -f interface/stlink.cfg -f target/stm32l4x.cfg -c 'init; reset run; exit'
117+
118+
Remote target Debug with STLink probe and OpenOCD:
119+
120+
1. You need to have NuttX built with debug symbols, see :ref:`debugging`.
121+
122+
2. Launch the OpenOCD GDB server::
123+
124+
openocd -f interface/stlink.cfg -f target/stm32l4x.cfg -c 'init; reset halt'
125+
126+
3. You can now attach to remote OpenOCD GDB server with your favorite debugger,
127+
for instance gdb::
128+
129+
arm-none-eabi-gdb --tui nuttx -ex 'target extended-remote localhost:3333'
130+
(gdb) monitor reset halt
131+
(gdb) breakpoint nsh_main
132+
(gdb) continue
133+
107134
Supported Boards
108135
================
109136

0 commit comments

Comments
 (0)