mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2026-08-18 04:30:39 +00:00
Merge pull request #1216 from MCUdude/slow-clock-error
Print meaningful error when a too slow ISP clock is detected
This commit is contained in:
@@ -795,6 +795,11 @@ retry:
|
||||
// attempt to read the status back
|
||||
status = stk500v2_recv(pgm,buf,maxlen);
|
||||
|
||||
DEBUG("STK500V2: stk500v2_command() received content: [ ");
|
||||
for (size_t i=0; i<len; i++)
|
||||
DEBUG("0x%02x ",buf[i]);
|
||||
DEBUG("], length %d\n", (int) len);
|
||||
|
||||
// if we got a successful readback, return
|
||||
if (status > 0) {
|
||||
DEBUG(" = %d\n",status);
|
||||
@@ -858,6 +863,9 @@ retry:
|
||||
return status;
|
||||
} else if (buf[1] == STATUS_CMD_FAILED) {
|
||||
pmsg_error("command failed\n");
|
||||
} else if (buf[1] == STATUS_CLOCK_ERROR) {
|
||||
pmsg_error("target clock speed error\n");
|
||||
return -2;
|
||||
} else if (buf[1] == STATUS_CMD_UNKNOWN) {
|
||||
pmsg_error("unknown command\n");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user