pyocd / pyocd/pyOCD

Use of pyocd to flash from powershell seems to emit an error

Open
#1,129 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

under-investigation
Dominant language
Python
Stars
1.5k
Forks
560
Avg merge
1h 41m
Merged PRs (30d)
3

Description

We have had a report from someone internally using pyocd on a windows 10 system with a DAPLINK programmer trying to program an nRF52840 module whereby after it has finished, they get the error "An error has occurred that was not properly handled. Additional information is shown below. The windows powershell process will exit

[process exited with code 2]"

Upon trying to reproduce the issue on my windows 10 machine using pyocd 0.29.x I could not reproduce it, I upgraded to the latest, 0.30.3, and when flashing using powershell it seems to go OK then for me, about 2 seconds later, the powershell window closed by itself (this is a prompt I opened in a directory, not using a dedicated command just to run the pyocd command). Using command prompt inside a powershell window does not cause any issues or errors or windows closing on either of these machines so it seems to be an issue using it directly with powershell.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the report. Start by reproducing the pyocd flashing command directly in Windows PowerShell with the stated Windows 10, DAPLINK, and nRF52840 setup, comparing pyocd 0.29.x and 0.30.3. Done means flashing completes without an error, exit code 2, or the PowerShell window closing unexpectedly.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, python
Domain
cli, embedded-iot, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.