Closed mttbx closed 3 years ago
pyocd outptus:
Enter the number of the debug probe to connect:
> 1
0001813:WARNING:mbed_board:Unsupported board found 29AA
0001813:INFO:board:Target type is cortex_m
0004226:ERROR:__main__:uncaught exception:
Traceback (most recent call last):
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/cmsis_dap_probe.py", line 251, in read_dp_result_callback
return result()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 679, in read_reg_cb
res = transfer.get_result()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 119, in get_result
self.daplink.flush()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 610, in flush
self._read_packet()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 765, in _read_packet
decoded_data = cmd.decode_data(raw_data)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 417, in decode_data
data = self._decode_transfer_block_data(data)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 384, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 95, in init
self.read_id_code()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 105, in read_id_code
self.dpidr = self.read_reg(DP_IDCODE)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 119, in read_reg
return self.read_dp(addr, now)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 234, in read_dp
return read_dp_cb()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 225, in read_dp_cb
result = result_cb()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/cmsis_dap_probe.py", line 254, in read_dp_result_callback
six.raise_from(self._convert_exception(error), error)
File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/cmsis_dap_probe.py", line 251, in read_dp_result_callback
return result()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 679, in read_reg_cb
res = transfer.get_result()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 119, in get_result
self.daplink.flush()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 610, in flush
self._read_packet()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 765, in _read_packet
decoded_data = cmd.decode_data(raw_data)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 417, in decode_data
data = self._decode_transfer_block_data(data)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 384, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError()
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/__main__.py", line 298, in run
self._commands[self._args.cmd]()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/__main__.py", line 443, in do_gdbserver
session = ConnectHelper.session_with_chosen_probe(
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/core/helpers.py", line 199, in session_with_chosen_probe
session.open()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/core/session.py", line 157, in open
self._board.init()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/board/board.py", line 52, in init
self.target.init()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/core/coresight_target.py", line 136, in init
seq.invoke()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/utility/sequencer.py", line 189, in invoke
resultSequence = call()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 100, in init
self.read_id_code()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 105, in read_id_code
self.dpidr = self.read_reg(DP_IDCODE)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 119, in read_reg
return self.read_dp(addr, now)
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 234, in read_dp
return read_dp_cb()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/coresight/dap.py", line 225, in read_dp_cb
result = result_cb()
File "/home/xx/.local/lib/python3.8/site-packages/pyocd/probe/cmsis_dap_probe.py", line 254, in read_dp_result_callback
six.raise_from(self._convert_exception(error), error)
File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError
I can debug it with jlink
Open On-Chip Debugger 0.10.0+dev-01405-gc56aa667c (2020-11-30-17:08)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : J-Link V9 compiled Oct 25 2018 11:46:07
Info : Hardware version: 9.40
Info : VTarget = 3.158 V
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020 (STMicroelectronics), part: 0x6410, ver: 0x1)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f1x.cpu on 8888
Info : Listening on port 8888 for gdb connections
Info : Listening on port 9999 for tcl connections
Info : Listening on port 7777 for telnet connections
So what's the issue, can you help me ?
solved.
你好,请问你是怎么解决的
How did you solve it?
Noticed that I can debug stm32f1 with swd mode.
openocd.cfg:
result: