NUCLEO-F746ZG debug error (Failed to launch GDB: .pioinit:13: Error in sourced command file: Remote communication error. Target disconnected.: Success. (from interpreter-exec console "source .pioinit) )

I get the error above when I start debug in platformIO using VS Code. I’m using VS Code 1.52.1 and platformIO (core 5.0.4, home 3.3.1) with NUCLEO-F746ZG (mbed framework, upload protocol is mbed as well). The code is able to run (build and upload) on the board without any problems. Any ideas on how to fix this issue?

Reading symbols from c:\msys64\home\MikoNore\GitHub\Multipack_BMU\ISO-SPI-Emulator\CSB-master.pio\build\nucleo_f746zg\firmware.elf…
undefinedC:\Users\MikoNore.platformio\packages\toolchain-gccarmnoneeabi\bin\arm-none-eabi-gdb.exe: warning: Couldn’t determine a path for the index cache directory.
PlatformIO Unified Debugger → Redirecting...
PlatformIO: debug_tool = stlink
PlatformIO: Initializing remote target…
xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-09:29)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
srst_only separate srst_nogate srst_open_drain connect_deassert_srst

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 2000 kHz
Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B
Info : Target voltage: 3.252840
Info : stm32f7x.cpu: hardware has 0 breakpoints, 10 watchpoints
Info : starting gdb server for stm32f7x.cpu on pipe
Info : accepting ‘gdb’ connection from pipe
Info : device id = 0xa05f0000
Warn : Cannot identify target as a STM32 family.
Error: auto_probe failed

Thanks!

I can only find two references to this thing – OpenOCD - Open On-Chip Debugger / Tickets / #178 stlink-v2-1 fails to initialize with openocd (sometimes) when trace output was previously enabled and stm32 - Debugging STM32F767 with OpenOCD - unknown device id problem - Stack Overflow. There may be a problem with the OpenOCD version supporting it correctly.

Were you able to flash it using other software or another openocd version previously?

Yes I was able to flash it using platformio on VS code and on mbed Studio.
I will try reinstalling openOCD!