STLink Error (9): Get IDCODE Error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
I am using a NUCLEO-L476RG board, and I have removed the CN2 jumpers, which would use the ST-Link instead of the Nucleo. When I run a flashing command with the following command line:
pyocd flash mbed_blinky.bin --target stm32l476rg
I get the following error:
0001855:ERROR:__main__:uncaught exception: STLink error (9): Get IDCODE error
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pyocd\__main__.py", line 329, in run
self._COMMANDS[self._args.cmd](self)
File "c:\python27\lib\site-packages\pyocd\__main__.py", line 448, in do_flash
**convert_session_options(self._args.options))
File "c:\python27\lib\site-packages\pyocd\core\helpers.py", line 199, in session_with_chosen_probe
session.open()
File "c:\python27\lib\site-packages\pyocd\core\session.py", line 300, in open
self._board.init()
File "c:\python27\lib\site-packages\pyocd\board\board.py", line 70, in init
self.target.init()
File "c:\python27\lib\site-packages\pyocd\core\coresight_target.py", line 152, in init
seq.invoke()
File "c:\python27\lib\site-packages\pyocd\utility\sequencer.py", line 189, in invoke
resultSequence = call()
File "c:\python27\lib\site-packages\pyocd\coresight\dap.py", line 100, in init
self.link.connect()
File "c:\python27\lib\site-packages\pyocd\probe\stlink_probe.py", line 114, in connect
self._link.enter_debug(STLink.Protocol.SWD)
File "c:\python27\lib\site-packages\pyocd\probe\stlink\stlink.py", line 215, in enter_debug
self._check_status(response)
File "c:\python27\lib\site-packages\pyocd\probe\stlink\stlink.py", line 253, in _check_status
raise exceptions.ProbeError(error_message)
ProbeError: STLink error (9): Get IDCODE error
I have updated the ST-Link firmware to the latest one (V2J34M25), yet I get this issue. Anyone with similar issues and have solved it?
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 the command pyocd flash mbed_blinky.bin --target stm32l476rg with the NUCLEO-L476RG and removed CN2 jumpers. Trace the failure through pyocd/probe/stlink/stlink.py, stlink_probe.py, and coresight/dap.py, then determine whether the ST-Link connection can obtain the target IDCODE; done means the cause is identified and the flashing command succeeds or the limitation is documented.
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