2022-01-12 08:47 PM
I need to write code using STM32CubeIDE for the STM32F407ZG on the STM32-E407 dev board from Olimex. The dev board is connected to the PC running windows 10 via the Olimex ARM-USB-OCD-H Jtag debugger.
I installed the drivers (WinUSB (v6.1.7600.16385)) for the ARM-USB-OCD-H using Zadig, then run openocd (openocd-0.9.0-rc1).
To test it, I created and built a simple program using STM32CubeIDE. In another terminal, I run arm-none-eabi-gdb.exe. I can connect to the openocd and program the board.
Everything is working so far.
But when I loaded it using STM32CubeIDE (Version: 1.8.0, Build: 11526_20211125_0815 (UTC), I got this error: Could not verify ST device!
OpenOCD reported that: invalid command name "WriteDP�?
This is my debug configuration settings:
Using STM32CubeIDE version 1.6 and with the same settings and same program, I can load and debug the program.
I really want to use the latest STM32CubeIDE. Any help appreciated.
2022-01-14 05:27 AM
Hello there!
It seems that OpenOCD is unable to detect the device correctly, perhaps due to the set-up you are using.
I'm not sure if it would work but you could try to use a custom "User Defined" script and then use STs own ST_scripts cfg files to have the DP_write, DP_read, AP_rd and AP_wr routines that can be found in the mon_cmd_extension.cfg files that is sourced from another cfg file.
That might be able to get around the issue, let me know if it works or not!
2022-01-29 01:59 AM
Hi Markus,
Thanks for your reply.
But sorry I can't follow your instructions. How to create and use a custom script? Is there an example?
Thanks,
Paul.
2022-02-11 02:30 AM
Search for mon_cmd_extension.cfg in your STM32Cube installation.
Copy the definitions of those commands into your own OpenOCD script (you might be able to just -f the ST script, but the paths would get messy really quickly).
I encountered the same bug as you - spent a while reimplementing those commands manually before finding out that ST already implemented them.
Just make sure that your debug adapter driver provides DAP access.
2022-10-19 09:32 AM
Hi. Did you solve the problem? I have same problem and I couldn't solve.