Skip to content
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

Improve messaging around locked UPDI parts #1907

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1623,27 +1623,16 @@ int main(int argc, char *argv[]) {
if(rc != LIBAVRDUDE_SUCCESS) {
if(rc == LIBAVRDUDE_SOFTFAIL && is_updi(p) && attempt < 1) {
attempt++;
if(pgm->read_sib) {
// Read SIB and compare FamilyID
char sib[AVR_SIBLEN + 1];

pgm->read_sib(pgm, p, sib);
pmsg_notice("System Information Block: %s\n", sib);
if(strncmp(p->family_id, sib, AVR_FAMILYIDLEN)) {
pmsg_warning("received FamilyID: \"%.*s\"\n", AVR_FAMILYIDLEN, sib);
imsg_warning("expected FamilyID: \"%s\"\n", p->family_id);
} else
pmsg_notice("received FamilyID: \"%.*s\"\n", AVR_FAMILYIDLEN, sib);
}
if(erase) {
erase = 0;
if(uflags & UF_NOWRITE) {
pmsg_warning("conflicting -e and -n options specified, NOT erasing chip\n");
} else {
pmsg_notice("trying to unlock the chip\n");
pmsg_info("unlocking the chip");
exitrc = avr_unlock(pgm, p);
if(exitrc)
goto main_exit;
msg_info(" and trying again\n");
goto sig_again;
}
}
Expand Down
Loading