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

Always print error if part and programmer doesn't have a common programming interface #1563

Merged
merged 5 commits into from
Nov 13, 2023

Conversation

MCUdude
Copy link
Collaborator

@MCUdude MCUdude commented Nov 9, 2023

See #1561 for details. OP used -F and didn't get a warning that the part and programmer doesn't share a common programming interface.

@@ -1110,10 +1110,11 @@ int main(int argc, char * argv [])
exit(1);
}

if(!ovsigck && partdesc && (p = locate_part(part_list, partdesc)) && !(p->prog_modes & pgm->prog_modes)) {
if(partdesc && (p = locate_part(part_list, partdesc)) && !(p->prog_modes & pgm->prog_modes)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we print use -F to override this check when -F was specified?

@mcuee mcuee added the bug Something isn't working label Nov 11, 2023
@stefanrueger
Copy link
Collaborator

I'd suggest something like

diff --git a/src/main.c b/src/main.c
index 2d0b3fa6..19b41413 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1110,10 +1110,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) {

mcuee and others added 4 commits November 11, 2023 19:09
This is from @mariusgreuel in Issue avrdudes#1249.
avrdudes#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.
…amming interface

even though the user uses -F. It won't exit though.
@stefanrueger stefanrueger merged commit 71bf4f7 into avrdudes:main Nov 13, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants