From 736e0ac34fa3e6b44e4242782cd4d3b1a8cc1dcd Mon Sep 17 00:00:00 2001 From: Tomasz 'CeDeROM' CEDRO Date: Fri, 27 Sep 2024 18:19:27 +0200 Subject: [PATCH] DOC: STM32F3 add example flash/reset/debug information. * Information on how to flash NuttX firmware to STM32F3 target was missing in the documentation and asked by new users on the dev@ list. * Example on how to Flash, Reset, Debug with OpenOCD is now added to docs. Signed-off-by: Tomasz 'CeDeROM' CEDRO --- Documentation/platforms/arm/stm32f3/index.rst | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/platforms/arm/stm32f3/index.rst b/Documentation/platforms/arm/stm32f3/index.rst index a2a7829d30..2ab617c4b6 100644 --- a/Documentation/platforms/arm/stm32f3/index.rst +++ b/Documentation/platforms/arm/stm32f3/index.rst @@ -215,6 +215,33 @@ There are two version of the FPU support built into the STM32 port. CONFIG_ARCH_FPU=y +Flashing and Debugging +====================== + +NuttX firmware Flashing with STLink probe and OpenOCD:: + + openocd -f interface/stlink.cfg -f target/stm32f3x.cfg -c 'program nuttx.bin 0x08000000; reset run; exit' + +Remote target Reset with STLink probe and OpenOCD:: + + openocd -f interface/stlink.cfg -f target/stm32f3x.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/stm32f3x.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 ================