I have a custom STM32 microcontroller board. I have verified all of the electrical connections, and I am able to program the board with Texane's st-flash utility. However, I would like to debug the board as well, and I am having trouble doing this. I am using Visual Studio Code with cortex-debug extension. The extension (I haven't used the command line utility for debugging much, not sure if it has the same requirements) requires that I have the SVD file for the specific chip - something I was unable to find online. The chip is the STM32F439ZIT6. For other boards, including the F407 discovery, I have not had any issues programming or debugging the board, but I also already have the SVD files for those chips that I found online. So, my question is where can I find the SVD files? Or how do I make them?
Alternatively, I looked a bit into using OpenOCD to debug - however I have been unsuccessful in getting that working at all. The most success I've had is running
openocd -f interface/stlink-v2-1.cfg -f target/stm32f4x.cfg
but this hits the error:
Info : 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/SWD adapter speed: 2000 kHz adapter_nsrst_delay: 100 none separate Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : Unable to match requested speed 2000 kHz, using 1800 kHz Info : clock speed 1800 kHz Error: open failed in procedure 'init' in procedure 'ocd_bouncer'
I think OpenOCD might be more powerful and something useful to learn, but from what I've found, there aren't many resources for using it with the ST-Link programmers and a custom board.
Thanks for help!