pyocd / pyocd/pyOCD

"Remote failure reply: E01" with FRDM-K64F

Open
#351 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

backlog bug
Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

Hi,

I am using pyOCD (0.8.0) with a FRDM-K64F and CLion (2018.1) under macOS 10.13.3 for debugging.

I start the GDB Server via
pyocd-gdbserver -t k64f -o
and then start a remote GDB Session in CLion.
It stops at program entry and I can step through with (gdb) si
But when entering (gdb) continue I get the following error:
Remote failure reply: E01 in my GDB remote session.

In the terminal where the pyocd-gdbserver runs, is the following exception:
(It is always a ERROR:root:Unhandled exception in handleMsgwhich results in a TransferFaultError but it also occurs in different places.)

ERROR:root:Unhandled exception in handleMsg: 
Traceback (most recent call last):
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/gdbserver/gdbserver.py", line 413, in handleMsg
    return self.stopReasonQuery(), 0
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/gdbserver/gdbserver.py", line 540, in stopReasonQuery
    return self.createRSPPacket(self.target.getTResponse())
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/target/coresight_target.py", line 198, in getTResponse
    return self.selected_core.getTResponse(forceSignal)
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/cortex_m.py", line 871, in getTResponse
    response = 'T' + conversion.byteToHex2(self.getSignalValue())
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/cortex_m.py", line 885, in getSignalValue
    fault = self.readCoreRegister('xpsr') & 0xff
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/cortex_m.py", line 597, in readCoreRegister
    regValue = self.readCoreRegisterRaw(regIndex)
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/cortex_m.py", line 623, in readCoreRegisterRaw
    vals = self.readCoreRegistersRaw([reg])
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/cortex_m.py", line 666, in readCoreRegistersRaw
    dhcsr_val = dhcsr_cb()
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/cortex_m.py", line 405, in readMemoryCb
    return self.bp_manager.filter_memory(addr, transfer_size, result())
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/ap.py", line 160, in readMemCb
    res = result_cb()
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/coresight/dap.py", line 280, in readAPCb
    result = result_cb()
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 565, in read_reg_cb
    res = transfer.get_result()
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 116, in get_result
    self.daplink.flush()
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 500, in flush
    self._read_packet()
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 651, in _read_packet
    decoded_data = cmd.decode_data(raw_data)
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 333, in decode_data
    data = self._decode_transfer_data(data)
  File "/Users/stefan/Development/pyocd/lib/python2.7/site-packages/pyOCD/pyDAPAccess/dap_access_cmsis_dap.py", line 276, in _decode_transfer_data
    raise DAPAccessIntf.TransferFaultError()
TransferFaultError

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with pyOCD 0.8.0, an FRDM-K64F, and the continue command, then trace the reported path through gdbserver.py, cortex_m.py, and dap_access_cmsis_dap.py. Determine where the TransferFaultError originates and define a reliable outcome for the GDB remote session when it occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.