-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of pyocd to flash from powershell seems to emit an error #1129
Comments
Interesting, Since I'm going to heavily use it in the following days, I'll report here if it happens with any regularity. |
Very interesting… thanks for the report. I don't use Windows much, and never PowerShell, so never would have seen this. Any ideas on what could be different between PS and cmd.exe? Is there a way to enable crash reports with logs and stack traces in Windows? Anyway, if it's reproducible, maybe I can run Python under Visual Studio to see if it's crashing. |
Well, it never happened again, so I cannot really help. Some background update we were unlucky to catch? Really have no idea, though.
You should give it a go, at least in Windows. |
@newbrain Thanks for trying to reproduce it. And yeah, linker scripts are hard! I've been pretty curious about PowerShell, it does seem quite capable. And being available for Linux and Mac is nice and impressive. @thedjnK Do you happen to know what version of PowerShell was being used when the error occurred? |
Hello. I have the same error. Powershell crashes every time when flashing or erasing process is finished. |
@flit Only just noticed the query, it was whatever version was built into windows 10 at the time |
I have the same problem. Powershell crashes every time pyOCD interracts with my debugger.
|
I'm experiencing this same problem. it's ok with cmd prompt. but somehow it kills PowerShell with weirdly delayed activation. now, here are hints I've found. just
but PS Version: 5.1.19041.1320 |
There are more to this.
and then PowerShell will get killed all the same. WHY!? by the way, executing a sequence of commands like |
Turned out testing with PowerShell 7.2 which is available at MicrosoftStore gives seemingly useful information.
|
@elfmimi Thanks for trying to understand this! I don't use either Windows or PowerShell regularly (except for testing), so I have limited knowledge to try and fix it. Fwiw, I tried installing PowerShell 7.2 on macOS 11.6.1, but (of course) The exception log above is both interesting and strange. How does pyocd affect reading a key after it exits? You didn't have to type a key before PowerShell crashed, did you? The one that's really weird is |
I've made some progress. I was poking around the source code and noticed that pyocd-pemicro is related in someway. To achieve that in moderate manner , one needs to follow these steps.
This is not recommended but if you are using pyocd package installed by pip command, here is how to tweak it. |
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.
The text was updated successfully, but these errors were encountered: