Skip to content

Commit

Permalink
Always print error if part and programmer doesn't have a common progr…
Browse files Browse the repository at this point in the history
…amming interface (#1563)

* Harmonize WIN32 implementation of serial time-outs with Posix

This is from @mariusgreuel in Issue #1249.
#1249

> The WIN32 time-out is specified as ReadTotalTimeoutConstant + buflen * ReadTotalTimeoutMultiplier, which makes it potentially much longer than the Posix one (i.e. at least double). ReadIntervalTimeout is also set to timeout, which essentially renders the interval timeout ineffective, so IMHO, we should explicitly disable that feature.

* Update NEWS

* Always print error if part and programmer doesn't have a common programming interface
even though the user uses -F. It won't exit though.

* Don't mention -F in error message if -F is already used

---------

Co-authored-by: mcuee <xiaofanc@gmail.com>
Co-authored-by: Stefan Rueger <stefan.rueger@urclocks.com>
  • Loading branch information
3 people committed Nov 13, 2023
1 parent fb55022 commit 71bf4f7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1128,10 +1128,12 @@ int main(int argc, char * argv [])
exit(1);
}

if(!ovsigck && partdesc && (p = locate_part(part_list, partdesc)) && !(p->prog_modes & pgm->prog_modes)) {
pmsg_error("programmer %s cannot program part %s as they\n", pgmid, p->desc);
imsg_error("lack a common programming mode; use -F to override this check\n");
exit(1);
if(partdesc && (p = locate_part(part_list, partdesc)) && !(p->prog_modes & pgm->prog_modes)) {
pmsg_error("-c %s cannot program %s for lack of a common programming mode\n", pgmid, p->desc);
if(!ovsigck) {
imsg_error("use -F to override this check\n");
exit(1);
}
}

if (pgm->initpgm) {
Expand Down

0 comments on commit 71bf4f7

Please sign in to comment.