Using Platformio ide is impossible to debug the STM32 NUCLEO-H745ZI-Q. The code I’m trying to upload/debug is a simple led blinking Zephyr sample code, directly gotten from the Platformio samples library. I’m on Windows10
This is the platformio.ini
[env:nucleo_h745zi_q]
platform = ststm32
board = nucleo_h745zi_q
framework = zephyr
upload_protocol = stlink
debug_tool = stlink
And this is the console output that I’m getting:
PlatformIO: debug_tool = stlink
PlatformIO: Initializing remote target…
xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2021-10-16-21:19)
Licensed under GNU GPL v2
For bug reports, read
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : tcl server disabled
Info : telnet server disabled
Info : STLINK V3J2M1 (API v3) VID:PID 0483:374E
Info : Target voltage: 3.277815
Info : Unable to match requested speed 1800 kHz, using 1000 kHz
Info : Unable to match requested speed 1800 kHz, using 1000 kHz
Info : clock speed 1000 kHz
Info : stlink_dap_op_connect(connect)
Info : SWD DPIDR 0x6ba02477
Info : stm32h7x.cpu0: Cortex-M7 r1p1 processor detected
Info : stm32h7x.cpu0: target has 8 breakpoints, 4 watchpoints
Info : stm32h7x.cpu1: Cortex-M4 r0p1 processor detected
Info : stm32h7x.cpu1: target has 6 breakpoints, 4 watchpoints
Error: stm32h7x.cpu1 – clearing lockup after double fault
Polling target stm32h7x.cpu1 failed, trying to reexamine
Info : stm32h7x.cpu1: Cortex-M4 r0p1 processor detected
Info : stm32h7x.cpu1: target has 6 breakpoints, 4 watchpoints
Info : gdb port disabled
Info : starting gdb server for stm32h7x.cpu0 on pipe
Info : starting gdb server for stm32h7x.cpu1 on pipe
Info : accepting ‘gdb’ connection from pipe
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 : Device: STM32H74x/75x
Info : flash size probed value 2048
Info : STM32H7 flash has dual banks
Info : Bank (1) size is 1024 kb, base address is 0x08100000
Info : New GDB Connection: 1, Target stm32h7x.cpu0, state: halted
Info : accepting ‘gdb’ connection from pipe
Info : Device: STM32H74x/75x
Error: Failed to read memory at 0x1ff1e882
Info : STM32H7 flash has dual banks
Info : Bank (2) size is 1024 kb, base address is 0x08000000
Info : Device: STM32H74x/75x
Error: Failed to read memory at 0x1ff1e882
Info : STM32H7 flash has dual banks
Info : Bank (3) size is 1024 kb, base address is 0x08100000
Info : New GDB Connection: 2, Target stm32h7x.cpu1, state: halted
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1010 ms). Workaround: increase “set remotetimeout” in GDB
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: Failed to read memory at 0xfffff000
0xfffffffe in ?? ()
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001030 msp: 0x24000700
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Info : Unable to match requested speed 4000 kHz, using 3300 kHz
Info : Unable to match requested speed 4000 kHz, using 3300 kHz
Warn : keep_alive() was not invoked in the 1000 ms timelimit. GDB alive packet not sent! (1013 ms). Workaround: increase “set remotetimeout” in GDB
Loading section rom_start, size 0x298 lma 0x8000000
Error: GDB missing ack(2) - assumed good
Loading section text, size 0x32d2 lma 0x8000298
Error: GDB missing ack(2) - assumed good
Loading section .ARM.exidx, size 0x8 lma 0x800356c
Error: GDB missing ack(2) - assumed good
Loading section initlevel, size 0x98 lma 0x8003574
Error: GDB missing ack(2) - assumed good
Loading section devices, size 0x168 lma 0x800360c
Error: GDB missing ack(2) - assumed good
Loading section sw_isr_table, size 0x4b0 lma 0x8003774
Error: GDB missing ack(2) - assumed good
Loading section device_handles, size 0x78 lma 0x8003c24
Error: GDB missing ack(2) - assumed good
Loading section rodata, size 0x318 lma 0x8003c9c
Error: GDB missing ack(2) - assumed good
Loading section datas, size 0x30 lma 0x8003fb4
Error: GDB missing ack(2) - assumed good
Loading section device_states, size 0x3c lma 0x8003fe4
Error: GDB missing ack(2) - assumed good
Error: GDB missing ack(2) - assumed good
Info : Padding image section 0 at 0x0800356a with 2 bytes
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001038 msp: 0x24000700
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Start address 0x8001038, load size 16414
Error: GDB missing ack(2) - assumed good
Transfer rate: 5 KB/sec, 1641 bytes/write.
Error: GDB missing ack(2) - assumed good
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001038 msp: 0x24000700
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001038 msp: 0x24000700
Warn : negative reply, retrying
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001038 msp: 0x24000700
Warn : negative reply, retrying
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001038 msp: 0x24000700
Then the debugger hangs indefinitely.
It is worth noting that when using the older NUCLEO-F401RE everything works fine.
Thanks in advance.