Regression erasing and programming NXP Kinetis targets
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- python
- Domain
- embedded-iot, tooling
Research direction
Start by reproducing the reported pyocd list and pyocd flash commands with the Dip Dap and FRDM-K22F setup. Read the traceback entry points in cmsis_dap_probe.py, dap_access_cmsis_dap.py, and dap.py, focusing on the No ACK received path. Done means identifying and documenting a reproducible cause or actionable fix for connecting to the Kinetis target.
Written by the indexing model from the issue text.
Description
I have a Dip Dap and I'm trying to use it to program the bootloader of a FRDM-K22F as described here.
I have connected the SWD IO, CLK and 3.3V/GND to the board, and install libusb-1.0. However some weird things happen. When I run pyocd list it says:
> pyocd list
# Probe Unique ID
---------------------------------------------------------------------------------
0 Seeed Tiny BLE [nrf51] 9012000004a22ae300000000000000000000000097969902
That is definitely wrong, but maybe it doesn't matter.
Then when I try to flash it:
>pyocd flash "Downloads\0244_k20dx_bl_0x8000.bin" -t k20d50m
0001876:CRITICAL:__main__:No ACK received
Traceback (most recent call last):
File "c:\python38\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 312, in read_dp
result = self._link.read_reg(reg_id, now=now)
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 899, in read_reg
return read_reg_cb()
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 893, in read_reg_cb
res = transfer.get_result()
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 147, in get_result
self.daplink.flush()
File "c:\python38\lib\site-packages\pyocd\utility\concurrency.py", line 28, in _locking
return func(self, *args, **kwargs)
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 713, in flush
self._read_packet()
File "c:\python38\lib\site-packages\pyocd\utility\concurrency.py", line 28, in _locking
return func(self, *args, **kwargs)
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 978, in _read_packet
decoded_data = cmd.decode_data(raw_data)
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 453, in decode_data
data = self._decode_transfer_block_data(data)
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 422, in _decode_transfer_block_data
self._check_response(data[3])
File "c:\python38\lib\site-packages\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 345, in _check_response
raise DAPAccessIntf.TransferError("No ACK received")
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: No ACK received
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\python38\lib\site-packages\pyocd\__main__.py", line 402, in run
self._COMMANDS[self._args.cmd](self)
File "c:\python38\lib\site-packages\pyocd\__main__.py", line 572, in do_flash
with session:
File "c:\python38\lib\site-packages\pyocd\core\session.py", line 339, in __enter__
self.open()
File "c:\python38\lib\site-packages\pyocd\core\session.py", line 457, in open
self._board.init()
File "c:\python38\lib\site-packages\pyocd\board\board.py", line 85, in init
self.target.init()
File "c:\python38\lib\site-packages\pyocd\core\soc_target.py", line 117, in init
seq.invoke()
File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 213, in invoke
resultSequence.invoke()
File "c:\python38\lib\site-packages\pyocd\utility\sequencer.py", line 208, in invoke
resultSequence = call()
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 376, in _connect
connector.connect(self._protocol)
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 166, in connect
self._connect_dp(protocol)
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 206, in _connect_dp
self._idr = self.read_idr()
File "c:\python38\lib\site-packages\pyocd\coresight\dap.py", line 233, in read_idr
dpidr = self._probe.read_dp(DP_IDR, now=True)
File "c:\python38\lib\site-packages\pyocd\probe\cmsis_dap_probe.py", line 315, in read_dp
six.raise_from(self._convert_exception(error), error)
File "<string>", line 3, in raise_from
pyocd.core.exceptions.TransferError: No ACK received
Any idea why this is?
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyocd/pyOCD
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100