0

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

nraynaud
  • 4,924
  • 7
  • 39
  • 54
  • 1
    did you try telnetting into openocd, much simpler, default is port 4444, type a halt command once connected to see it halt, resume to see it resume, if you are not connected right the halt will probably timeout. – old_timer May 15 '15 at 14:55
  • 1
    You can rebuild openocd with applied dirtyhack from link you found. Just add this code to the file src/target/cortex_m.c and rebuild openocd. Building openocd is not a big deal. Good luck! – Anton Glukhov May 16 '15 at 16:38

0 Answers0