May 3, 2021 at 04:22 #30439
Does anyone now if it is possible to upgrade OpenOCD for VisualGDB to the latest version, 0.11.0?
I’m trying to create a project in VisualGDB for a ST NUCLEO-G0B1RE board, following the Embedded Project Wizard.
But when I open the VisualGDB project properties and press Test in the Debug settings, there is an error, see output below, that the CPU isn’t recognized.
I suspect it is the OpenOCD version that needs to be updated to latest (0.11.0). I have tried with both VisualGDB 5.5r4 and 5.6 beta-1 and OpenOCD 20201228-0.10.0 and 20210407-0.10.0 running on Windows 10.
OpenOCD output:C++1234567891011121314151617181920212223242526C:\Users\H655374\AppData\Local\VisualGDB\EmbeddedDebugPackages\com.sysprogs.arm.openocd\bin\openocd.exe -c "gdb_port 65387" -c "telnet_port 65385" -f interface/stlink.cfg -f target/stm32g0x.cfg -c init -c "reset init" -c "echo VisualGDB_OpenOCD_Ready"Open On-Chip Debugger 0.10.0 (2020-12-28) [https://github.com/sysprogs/openocd]Licensed under GNU GPL v2libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3For bug reports, readhttp://openocd.org/doc/doxygen/bugs.htmlInfo : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWDInfo : clock speed 2000 kHzInfo : STLINK V2J37M27 (API v2) VID:PID 0483:374BInfo : Target voltage: 3.232169Info : stm32g0x.cpu: hardware has 4 breakpoints, 2 watchpointsInfo : starting gdb server for stm32g0x.cpu on 65387Info : Listening on port 65387 for gdb connectionsInfo : Unable to match requested speed 2000 kHz, using 1800 kHzInfo : Unable to match requested speed 2000 kHz, using 1800 kHztarget halted due to debug-request, current mode: ThreadxPSR: 0xf1000000 pc: 0xfffffffe msp: 0xfffffffcVisualGDB_OpenOCD_ReadyInfo : Listening on port 6666 for tcl connectionsInfo : Listening on port 65385 for telnet connectionsInfo : accepting 'gdb' connection on tcp/65387Warn : Cannot identify target as an STM32G0/G4/L4/L4+/L5/WB/WL family device.Error: auto_probe failedError: Connect failed. Consider setting up a gdb-attach event for the target to prepare target for GDB connect, or use 'gdb_memory_map disable'.Error: attempted 'gdb' connection rejectedMay 3, 2021 at 09:15 #30443
The 20210407-0.10.0 version is based on the snapshot of the OpenOCD’s master branch from 2021-04-07 that does correspond to OpenOCD 0.11.0, so other than the older version number, it should be equivalent to 0.11.
Either way, we have released another package (20210503-0.11.0) based on the current git snapshot. Feel free to update to it.
If it still doesn’t contain support for the necessary devices, please consider waiting a couple of months for ST to add support for them, or try building OpenOCD manually as shown here and patching it manually. It typically involves searching for the error message and adding an entry for your device to the supported device list (the entry would map the flash ID to the parameters like page size taken from the device datasheet).May 4, 2021 at 07:28 #30451
Thanks for the new OpenOCD build. Unfortunately it didn’t help, but your support is really great.
Looking into the OpenOCD output above once again, could it have something to do with GDB?May 4, 2021 at 08:18 #30452
The “Cannot identify target as an STM32G0/G4/L4/L4+/L5/WB/WL family device” message means that the support for your device has not been added to OpenOCD yet.
Please consider waiting a couple of months for ST to add support for them, or try building OpenOCD manually as shown here and patching it manually. It typically involves searching for the error message and adding an entry for your device to the supported device list (the entry would map the flash ID to the parameters like page size taken from the device datasheet).
Another option would be to use Segger J-Link with the Segger software. It gets updated much more often than OpenOCD and hence gets to support new devices much faster.
You must be logged in to reply to this topic.