pyocd / pyOCD

Open source Python library for programming and debugging Arm Cortex-M microcontrollers
https://pyocd.io
Apache License 2.0
1.11k stars 477 forks source link

HIDError #1003

Closed LONGZR007 closed 3 years ago

LONGZR007 commented 3 years ago

I got the following error when using API. This problem has been bothering me for a long time. Could you please help me see the reason?I packaged it as an exe and that's the same problem: Traceback (most recent call last): File "G:\GitHub\others-github\DMCUProg\dap_test.py", line 64, in test.on_btnWrite_clicked() File "G:\GitHub\others-github\DMCUProg\dap_test.py", line 21, in on_btnWrite_clicked self.cpu = self.openDAP() File "G:\GitHub\others-github\DMCUProg\dap_test.py", line 51, in openDAP self.daplink.open() File "G:\GitHub\others-github\DMCUProg\pyocd\probe\cmsis_dap_probe.py", line 137, in open self._link.open() File "G:\GitHub\others-github\DMCUProg\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 569, in open self._packet_count = self._protocol.dap_info(self.ID.MAX_PACKET_COUNT) File "G:\GitHub\others-github\DMCUProg\pyocd\probe\pydapaccess\cmsis_dap_core.py", line 125, in dap_info self.interface.write(cmd) File "G:\GitHub\others-github\DMCUProg\pyocd\probe\pydapaccess\interface\pywinusb_backend.py", line 149, in write self.report.send([0] + data) File "C:\Python39\lib\site-packages\pywinusb\hid\core.py", line 1474, in send raise HIDError("Report size has to be %d elements (bytes)" \ pywinusb.hid.helpers.HIDError: Report size has to be 1025 elements (bytes)

flit commented 3 years ago

@LONGZR007 Did you figure out the problem?

LONGZR007 commented 3 years ago

@flit Yes, I saw on #686 that you answered this question for others, thank you