wagiminator / ch552-picodap Goto Github PK
View Code? Open in Web Editor NEWCMSIS-DAP compliant SWD Programmer
Home Page: https://oshwlab.com/wagiminator/ch552-swd-programmer
License: Other
CMSIS-DAP compliant SWD Programmer
Home Page: https://oshwlab.com/wagiminator/ch552-swd-programmer
License: Other
When using nerdralph's version with an STM32F103c8 target and pyocd, everything works:
$ pyocd list
# Probe/Board Unique ID Target
------------------------------------------------
0 WCH CH55x CMSIS-DAP NR n/a
$ pyocd erase --chip -t stm32f103c8; pyocd load -t stm32f103c8 ./miniblink.bin
0000991 I Erasing chip... [eraser]
0001217 I Chip erase complete [eraser]
0000945 I Loading /home/bdroy/STM32-base/libopencm3-examples/examples/stm32/f1/stm32-maple/miniblink/miniblink.bin [load_cmd]
[==================================================] 100%
0001482 I Erased 1024 bytes (1 sector), programmed 1024 bytes (1 page), skipped 0 bytes (0 pages) at 1.86 kB/s [loader]
however, using your branch, I get timeout errors:
$ pyocd list
# Probe/Board Unique ID Target
----------------------------------------------------------
0 wagiminator picoDAP CMSIS-DAP CH55x n/a
$ pyocd erase --chip -t stm32f103c8; pyocd load -t stm32f103c8 ./miniblink.bin
0001003 I Erasing chip... [eraser]
Exception in thread Thread-2 (rx_task):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 151, in rx_task
read_data = self.ep_in.read(self.ep_in.wMaxPacketSize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/core.py", line 1029, in read
ret = fn(
^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/backend/libusb1.py", line 864, in intr_read
return self.__read(self.lib.libusb_interrupt_transfer,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/backend/libusb1.py", line 954, in __read
_check(retval)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/backend/libusb1.py", line 602, in _check
raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out
0011150 E Error during board uninit: [session]
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1157, in _read_packet
decoded_data = cmd.decode_data(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 478, in decode_data
data = self._decode_transfer_block_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 444, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError(f'DAP_TRANSFER_BLOCK response error: response is for command {data[0]:02x}')
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: DAP_TRANSFER_BLOCK response error: response is for command 05
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 154, in get_result
self.daplink._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1160, in _read_packet
self._abort_all_transfers(exception)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1284, in _abort_all_transfers
self._interface.read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/subcommands/erase_cmd.py", line 97, in invoke
eraser.erase(addresses)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/eraser.py", line 79, in erase
self._chip_erase()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/eraser.py", line 99, in _chip_erase
region.flash.init(region.flash.Operation.ERASE)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 252, in init
result = self._call_function_and_wait(self.flash_algo['pc_init'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 653, in _call_function_and_wait
self._call_function(pc, r0, r1, r2, r3, init)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 555, in _call_function
self.target.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/soc_target.py", line 245, in write_core_registers_raw
self.selected_core_or_raise.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1186, in write_core_registers_raw
self._base_write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1199, in _base_write_core_registers_raw
if not self.is_halted():
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 952, in is_halted
return self.get_state() == Target.State.HALTED
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 157, in get_result
self.daplink.flush()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 881, in flush
self._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1155, in _read_packet
raw_data = self._interface.read()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/session.py", line 547, in close
self._board.uninit()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/board/board.py", line 151, in uninit
self.target.disconnect(resume)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/coresight_target.py", line 119, in disconnect
core.disconnect(resume)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 368, in disconnect
self.resume()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 957, in resume
state = self.get_state()
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
0011157 E Probe error during disconnect: [session]
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1157, in _read_packet
decoded_data = cmd.decode_data(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 478, in decode_data
data = self._decode_transfer_block_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 444, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError(f'DAP_TRANSFER_BLOCK response error: response is for command {data[0]:02x}')
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: DAP_TRANSFER_BLOCK response error: response is for command 05
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 154, in get_result
self.daplink._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1160, in _read_packet
self._abort_all_transfers(exception)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1284, in _abort_all_transfers
self._interface.read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/subcommands/erase_cmd.py", line 97, in invoke
eraser.erase(addresses)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/eraser.py", line 79, in erase
self._chip_erase()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/eraser.py", line 99, in _chip_erase
region.flash.init(region.flash.Operation.ERASE)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 252, in init
result = self._call_function_and_wait(self.flash_algo['pc_init'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 653, in _call_function_and_wait
self._call_function(pc, r0, r1, r2, r3, init)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 555, in _call_function
self.target.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/soc_target.py", line 245, in write_core_registers_raw
self.selected_core_or_raise.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1186, in write_core_registers_raw
self._base_write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1199, in _base_write_core_registers_raw
if not self.is_halted():
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 952, in is_halted
return self.get_state() == Target.State.HALTED
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 376, in disconnect
self._link.disconnect()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 953, in disconnect
self._protocol.disconnect()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/cmsis_dap_core.py", line 249, in disconnect
resp = self.interface.read()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/session.py", line 554, in close
self._probe.disconnect()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 379, in disconnect
raise self._convert_exception(exc) from exc
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
0011165 C Device CH55x read thread exited [__main__]
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1157, in _read_packet
decoded_data = cmd.decode_data(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 478, in decode_data
data = self._decode_transfer_block_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 444, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError(f'DAP_TRANSFER_BLOCK response error: response is for command {data[0]:02x}')
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: DAP_TRANSFER_BLOCK response error: response is for command 05
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 154, in get_result
self.daplink._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1160, in _read_packet
self._abort_all_transfers(exception)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1284, in _abort_all_transfers
self._interface.read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/__main__.py", line 161, in run
status = cmd.invoke()
^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/subcommands/erase_cmd.py", line 97, in invoke
eraser.erase(addresses)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/eraser.py", line 79, in erase
self._chip_erase()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/eraser.py", line 99, in _chip_erase
region.flash.init(region.flash.Operation.ERASE)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 252, in init
result = self._call_function_and_wait(self.flash_algo['pc_init'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 653, in _call_function_and_wait
self._call_function(pc, r0, r1, r2, r3, init)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 555, in _call_function
self.target.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/soc_target.py", line 245, in write_core_registers_raw
self.selected_core_or_raise.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1186, in write_core_registers_raw
self._base_write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1199, in _base_write_core_registers_raw
if not self.is_halted():
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 952, in is_halted
return self.get_state() == Target.State.HALTED
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
0000972 I Loading /home/bdroy/STM32-base/libopencm3-examples/examples/stm32/f1/stm32-maple/miniblink/miniblink.bin [load_cmd]
Exception in thread Thread-2 (rx_task):
Traceback (most recent call last):
File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
self.run()
File "/usr/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 151, in rx_task
read_data = self.ep_in.read(self.ep_in.wMaxPacketSize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/core.py", line 423, in read
return self.device.read(self, size_or_buffer, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/core.py", line 1029, in read
ret = fn(
^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/backend/libusb1.py", line 864, in intr_read
return self.__read(self.lib.libusb_interrupt_transfer,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/backend/libusb1.py", line 954, in __read
_check(retval)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/usb/backend/libusb1.py", line 602, in _check
raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out
0011119 E Error during board uninit: [session]
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1157, in _read_packet
decoded_data = cmd.decode_data(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 478, in decode_data
data = self._decode_transfer_block_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 444, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError(f'DAP_TRANSFER_BLOCK response error: response is for command {data[0]:02x}')
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: DAP_TRANSFER_BLOCK response error: response is for command 05
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 154, in get_result
self.daplink._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1160, in _read_packet
self._abort_all_transfers(exception)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1284, in _abort_all_transfers
self._interface.read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 221, in read
raise DAPAccessIntf.DeviceError(f"Timeout reading from device {self.serial_number}")
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Timeout reading from device CH55x
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/subcommands/load_cmd.py", line 128, in invoke
programmer.program(filename,
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/file_programmer.py", line 175, in program
self._loader.commit()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/loader.py", line 295, in commit
perf = builder.program(chip_erase=chipErase,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 492, in program
sector_erase_count, page_program_time = self._compute_sector_erase_pages_and_weight(fast_verify)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 673, in _compute_sector_erase_pages_and_weight
self._analyze_pages_with_partial_read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 608, in _analyze_pages_with_partial_read
self._enable_read_access()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 259, in _enable_read_access
self.flash.init(self.flash.Operation.VERIFY)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 252, in init
result = self._call_function_and_wait(self.flash_algo['pc_init'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 653, in _call_function_and_wait
self._call_function(pc, r0, r1, r2, r3, init)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 555, in _call_function
self.target.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/soc_target.py", line 245, in write_core_registers_raw
self.selected_core_or_raise.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1186, in write_core_registers_raw
self._base_write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1199, in _base_write_core_registers_raw
if not self.is_halted():
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 952, in is_halted
return self.get_state() == Target.State.HALTED
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Timeout reading from device CH55x
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 157, in get_result
self.daplink.flush()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 881, in flush
self._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1155, in _read_packet
raw_data = self._interface.read()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/session.py", line 547, in close
self._board.uninit()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/board/board.py", line 151, in uninit
self.target.disconnect(resume)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/coresight_target.py", line 119, in disconnect
core.disconnect(resume)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 368, in disconnect
self.resume()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 957, in resume
state = self.get_state()
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
0011126 E Probe error during disconnect: [session]
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1157, in _read_packet
decoded_data = cmd.decode_data(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 478, in decode_data
data = self._decode_transfer_block_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 444, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError(f'DAP_TRANSFER_BLOCK response error: response is for command {data[0]:02x}')
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: DAP_TRANSFER_BLOCK response error: response is for command 05
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 154, in get_result
self.daplink._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1160, in _read_packet
self._abort_all_transfers(exception)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1284, in _abort_all_transfers
self._interface.read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 221, in read
raise DAPAccessIntf.DeviceError(f"Timeout reading from device {self.serial_number}")
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Timeout reading from device CH55x
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/subcommands/load_cmd.py", line 128, in invoke
programmer.program(filename,
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/file_programmer.py", line 175, in program
self._loader.commit()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/loader.py", line 295, in commit
perf = builder.program(chip_erase=chipErase,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 492, in program
sector_erase_count, page_program_time = self._compute_sector_erase_pages_and_weight(fast_verify)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 673, in _compute_sector_erase_pages_and_weight
self._analyze_pages_with_partial_read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 608, in _analyze_pages_with_partial_read
self._enable_read_access()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 259, in _enable_read_access
self.flash.init(self.flash.Operation.VERIFY)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 252, in init
result = self._call_function_and_wait(self.flash_algo['pc_init'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 653, in _call_function_and_wait
self._call_function(pc, r0, r1, r2, r3, init)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 555, in _call_function
self.target.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/soc_target.py", line 245, in write_core_registers_raw
self.selected_core_or_raise.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1186, in write_core_registers_raw
self._base_write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1199, in _base_write_core_registers_raw
if not self.is_halted():
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 952, in is_halted
return self.get_state() == Target.State.HALTED
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Timeout reading from device CH55x
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 376, in disconnect
self._link.disconnect()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 953, in disconnect
self._protocol.disconnect()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/cmsis_dap_core.py", line 249, in disconnect
resp = self.interface.read()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 224, in read
raise DAPAccessIntf.DeviceError("Device %s read thread exited" %
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Device CH55x read thread exited
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/session.py", line 554, in close
self._probe.disconnect()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 379, in disconnect
raise self._convert_exception(exc) from exc
pyocd.core.exceptions.ProbeError: Device CH55x read thread exited
0011134 C Timeout reading from device CH55x [__main__]
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1157, in _read_packet
decoded_data = cmd.decode_data(raw_data)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 478, in decode_data
data = self._decode_transfer_block_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 444, in _decode_transfer_block_data
raise DAPAccessIntf.TransferError(f'DAP_TRANSFER_BLOCK response error: response is for command {data[0]:02x}')
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.TransferError: DAP_TRANSFER_BLOCK response error: response is for command 05
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 595, in read_ap_result_callback
value = result()
^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1071, in read_reg_cb
res = transfer.get_result()
^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 154, in get_result
self.daplink._read_packet()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1160, in _read_packet
self._abort_all_transfers(exception)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/dap_access_cmsis_dap.py", line 1284, in _abort_all_transfers
self._interface.read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/pydapaccess/interface/pyusb_backend.py", line 221, in read
raise DAPAccessIntf.DeviceError(f"Timeout reading from device {self.serial_number}")
pyocd.probe.pydapaccess.dap_access_api.DAPAccessIntf.DeviceError: Timeout reading from device CH55x
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/__main__.py", line 161, in run
status = cmd.invoke()
^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/subcommands/load_cmd.py", line 128, in invoke
programmer.program(filename,
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/file_programmer.py", line 175, in program
self._loader.commit()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/loader.py", line 295, in commit
perf = builder.program(chip_erase=chipErase,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 492, in program
sector_erase_count, page_program_time = self._compute_sector_erase_pages_and_weight(fast_verify)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 673, in _compute_sector_erase_pages_and_weight
self._analyze_pages_with_partial_read()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 608, in _analyze_pages_with_partial_read
self._enable_read_access()
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/builder.py", line 259, in _enable_read_access
self.flash.init(self.flash.Operation.VERIFY)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 252, in init
result = self._call_function_and_wait(self.flash_algo['pc_init'],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 653, in _call_function_and_wait
self._call_function(pc, r0, r1, r2, r3, init)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/flash/flash.py", line 555, in _call_function
self.target.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/core/soc_target.py", line 245, in write_core_registers_raw
self.selected_core_or_raise.write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1186, in write_core_registers_raw
self._base_write_core_registers_raw(reg_list, data_list)
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 1199, in _base_write_core_registers_raw
if not self.is_halted():
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 952, in is_halted
return self.get_state() == Target.State.HALTED
^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 918, in get_state
dhcsr = self.read_memory(CortexM.DHCSR)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/cortex_m.py", line 481, in read_memory
result = self.ap.read_memory(addr, transfer_size, now)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/utility/concurrency.py", line 29, in _locking
return func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1084, in _read_memory
result = read_mem_cb()
^^^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/ap.py", line 1062, in read_mem_cb
res = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/coresight/dap.py", line 892, in read_ap_cb
result = result_cb()
^^^^^^^^^^^
File "/home/bdroy/.local/pipx/venvs/pyocd/lib/python3.11/site-packages/pyocd/probe/cmsis_dap_probe.py", line 600, in read_ap_result_callback
raise self._convert_exception(error) from error
pyocd.core.exceptions.ProbeError: Timeout reading from device CH55x
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.