Debugging with ST-Link V2
I have created a SW4STM32 project using STM32CubeMX. I then imported the project into System Workbench. The project builds.
I then created a new custom board debug script (target-actuator.cfg) using means 5.3 as discussed here; i.e. Get a custom board debug script created when creating a project using your custom board (may be a no-firmware project with an empty main program). Copy the System Workbench-generated debug script in your project and browse to it. This is usually convenient if you define your own board, create a custom board in a System Workbench-generated test project and want to reuse it in your STM32CubeMX-generated project (see Create a custom board).
I also confirmed that the project target properties were correct; i.e.
Series: STM32F4
Mcu: STM32F405RGTx
Board: target-actuator
I then created a debug configuration as discussed here. When I selected “Use local script”, and clicked on Debug, I got the error:
‘Launching target-actuator Debug’ has encountered a problem.
OpenOCD Script not found (or not support yet): target-actuator.cfg
(/home/gateway/eclipse/plugins/fr.ac6.mcu.debug_1.11.0.201610101240/resources/openocd/scripts/st_board)
I read this to mean, that it has ignored my selection of “Use local script” and instead looked in the plugins folder. I copied the script into the plugins folder, and the error has gone away.
My first question is, what further needs to be done so I can use a script local to my project?
When I debug my application, it doesn’t immediatly halt on main(). There is a single thread (as expected) which never halts. In order to get it to halt at main(), I need to do the following (as discussed here).
Step1: press “Suspend”: button to pause my program.
Step2: Go to “Console Window”, type “monitor reset halt”.
Step3: Press “F8” (Resume).
My second question is, is this necessary? Or have I missed something?
Regards, Matt.