-
Notifications
You must be signed in to change notification settings - Fork 137
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
Detect PICkit4 and SNAP in PIC mode #1138
Conversation
a3c16d4
to
ca84733
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool PR, thanks for this.
One comment: I am not keen on the open device function to comment failure with the notice2 level in some instances and error in others. IMO this should be either warnings/errors throughout or nothing/notice2 shifting the responsibility to the caller for communication.
Note: there is a pre-existing case (line 97) with return -1 and no message. Whilst looking at this we should probably deal with this case in the same way, too.
Sure! It's just that we don't really need to see that message when not in verbose mode. but
I'll look into it. And I'll see if I can replace tabs with spaces in a separate commit. The formatting in usb_hidapi.c is a bit all over the place. |
ca84733
to
1444695
Compare
Tested with a PICkit 4 borrowed from local Microchip office.
|
Cool! The PR works as it should then 👍 |
Yes it works perfectly. |
This PR makes it possible for Avrdude to detect a PICkit4 or SNAP programmer in PIC programming mode, and prints a reasonable error that this (currently) has to be changed over to AVR mode using either MPLAB X or Microchip Studio.
Hopefully, @janegilruud will have time to look into #1027 someday, which is the ultimate solution to the entire "PIC programming mode problem". However, this PR makes it obvious to the USER why their brand new PICkit4/SNAP doesn't work as expected.
Avrdude output:
#1027 related
Resolves #1135