Flashing STM32H745I-DISCO board

$ sudo openocd -f interface/stlink.cfg -f target/stm32h7x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"
Open On-Chip Debugger 0.11.0+dev-00062-g6405d35f3-dirty (2021-05-15-10:34)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
Info : clock speed 1800 kHz
Info : STLINK V3J3M2 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.274900
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000340 msp: 0x24000ec8
Info : Device: STM32H74x/75x
Info : flash size probed value 2048
Info : STM32H7 flash has dual banks
Info : Bank (0) size is 1024 kb, base address is 0x08000000
Info : Padding image section 0 at 0x08017e10 with 16 bytes (bank write end alignment)
Warn : Adding extra erase range, 0x08017e20 .. 0x0801ffff
auto erase enabled
wrote 97824 bytes from file nuttx.bin in 2.126441s (44.925 KiB/s)
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
^Cshutdown command invoked

2 thoughts on “Flashing STM32H745I-DISCO board

  1. Thanks. I am planning on getting back into STM32 and have never used openocd and was unaware that it is also a vehicle for flashing. I’ll bookmark this.

  2. Yes, OpenOCD can be used for debugging and for flashing. This is default flashing tool used by NuttX, Zephyr, RIOT and others.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s