robust ctrl+c interrupt handling #19338
Replies: 5 comments 7 replies
-
|
I am strictly a command-line man, so my comments apply to using It's also worth noting that a soft reset is not the same as a hard reset: some resources are not tidied up unless you trap the Reading comments in here, most of these problems are caused by IDE's. |
Beta Was this translation helpful? Give feedback.
-
|
@peterhinch thanks for your comment - I'm assuming your not using mac os platform and direct usb A to usb micro cable ? here is the upload script (AI generated) I use that also pulls current commit id from github for versioning etc. works like 70% of the time, sometimes at first, sometimes 3rd retry and sometimes faill completely... curiously if I switch usb ports in between uploads it helps with reliability |
Beta Was this translation helpful? Give feedback.
-
On host computer do you mean the Unix port? If so there are some known limitations there with how/when stdin is read/checked for the interrupt character. On device, the complications / unreliability I've run into usually depend on what I'm doing in the application being run. |
Beta Was this translation helpful? Give feedback.
-
|
On a separate note there's also some issues with mpremote putting some boards into raw repl mode due often to delays in responding to ctrl-c or reboots, fwiw I'm slowly drafting improvements to this here: andrewleech#48 |
Beta Was this translation helpful? Give feedback.
-
Linux with that cable. Judging by the above I must be leading a charmed life, but then I haven't been scripting |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
From my experience (using Pico Pi with MicroPico VSCode extension and mpremote CLI on Mac OS) interrupting the code that already runs on microcontroller so one could regain control over the board is super finicky.
I have constant situations in which I have to plug/unplug the board several times before I can stop the code and run / upload something on the board.
Is there any bullet proof, or at least super-reliable way to make Ctrl+C interrupt handled more reliably - both on microcontroller (Pico Pi) and host computer side ?
Beta Was this translation helpful? Give feedback.
All reactions