You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the controller resets externally for some reason while writing the code, AVRdude gets stuck in an infinite loop avrdude: stk500_recv(): programmer is not responding #7704
I know this is an avrdude issue, but i have detected the same issue with the AVRdude bundled with the Arduino IDE 1.8.4 on MacOs
To replicate the same, you will need an Arduino, and a compiled hex file with relatively large size (2 to 4kb should be perfect).
Exact conditions for error
Use the following code to start upload to the Arduino
./avrdude -c arduino -p m328p -P /dev/cu.usbmodem1411 -U flash:w:<some_code>.hex
Keep your hand ready on the reset button of the Arduino.
As soon as avrdude goes into write mode press the reset button.
Do not release the button until avrdude starts giving the error
avrdude: stk500_recv(): programmer is not responding
Leave the reset button.
The code gets stuck in the same loop and keeps printing the error message every 1 second.
I know I can fix this for myself by resetting the board again at the right time, but then again, I feel that the code should be able to handle this and at the least exit so that it does not claim system resources.