我有一个赛普拉斯PSoC4套件,我希望能够进行调试。我有一个STM32F4-Discovery,所以我拔掉了发现的目标部分并将其插入了柏树套件。
我在配置OpenOCD时遇到了一些麻烦,使其了解我的配置。我创建了一个文件:
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]
我启动openocd + GDB我得到了:
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
我在这里插入gdb,openOCD给了我:
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
使用谷歌,我可以找到关于暂停此MCU的主题的一些消息,但我不知道如何采取行动:http://permalink.gmane.org/gmane.comp.debugging.openocd.devel/25478