I have a Cypress PSoC4 kit that I want to be able to debug. I do have an STM32F4-Discovery, so I unplugged the target part of the discovery and plugged it to the cypress kit.
I have some troubles configuring OpenOCD to make it understand my configuration. I created a file:
maquette:openocd nraynaud$ cat /usr/local/share/openocd/scripts/board/psoc_4_stlink.cfg
source [find interface/stlink-v2.cfg]
transport select hla_swd
source [find target/psoc4.cfg]
and I launch openocd + GDB I get that:
maquette:openocd nraynaud$ openocd -f board/psoc_4_stlink.cfg
Open On-Chip Debugger 0.9.0-rc1-dev-00001-gabd7ad0 (2015-05-05-01:34)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1500 kHz
ocd_process_reset_inner
Info : Unable to match requested speed 1500 kHz, using 1200 kHz
Info : Unable to match requested speed 1500 kHz, using 1200 kHz
Info : clock speed 1200 kHz
Info : STLINK v2 JTAG v14 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.892416
Info : psoc4.cpu: hardware has 4 breakpoints, 2 watchpoints
I plugged gdb here, and openOCD gave me that:
Info : accepting 'gdb' connection on tcp/3333
Error: Target not halted
Error: auto_probe failed
Error: 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 rejected
With google, I can find some messages on the topic of halting on this MCU, but I don't know how to act on them: http://permalink.gmane.org/gmane.comp.debugging.openocd.devel/25478