HIDError: Report size has to be 1025 elements (bytes)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
Hi, when I run "pyocd gdbserver" command, I get this error.
0000253:INFO:board:Target type is cortex_m
0000253:WARNING:board:Generic 'cortex_m' target type is selected; is this intentional? You will be able to debug but not program flash. To set the target type use the '--target' argument or 'target_override' option. Use 'pyocd list --targets' to see available targets types.
0000269:CRITICAL:main:uncaught exception: Report size has to be 1025 elements (bytes)
Traceback (most recent call last):
File "build\bdist.win32\egg\pyocd_main_.py", line 338, in run
self.COMMANDSself._args.cmd
File "build\bdist.win32\egg\pyocd_main.py", line 566, in do_gdbserver
with session:
File "build\bdist.win32\egg\pyocd\core\session.py", line 287, in enter
self.open()
File "build\bdist.win32\egg\pyocd\core\session.py", line 363, in open
self._probe.open()
File "build\bdist.win32\egg\pyocd\probe\cmsis_dap_probe.py", line 141, in open
self._link.open()
File "build\bdist.win32\egg\pyocd\probe\pydapaccess\dap_access_cmsis_dap.py", line 552, in open
self._packet_count = self._protocol.dap_info(self.ID.MAX_PACKET_COUNT)
File "build\bdist.win32\egg\pyocd\probe\pydapaccess\cmsis_dap_core.py", line 126, in dap_info
self.interface.write(cmd)
File "build\bdist.win32\egg\pyocd\probe\pydapaccess\interface\pywinusb_backend.py", line 144, in write
self.report.send([0] + data)
File "build\bdist.win-amd64\egg\pywinusb\hid\core.py", line 1475, in send
% self.__raw_report_size)
HIDError: Report size has to be 1025 elements (bytes)
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.
Research direction
Start by reproducing pyocd gdbserver and trace the failure through pyocd/probe/pydapaccess/interface/pywinusb_backend.py, cmsis_dap_core.py, and the pywinusb send call shown in the traceback. Determine why the report length differs from the expected 1025 bytes; done means the command opens the probe without this HIDError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100