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

Detect PICkit4 and SNAP in PIC mode #1137

Closed
wants to merge 10 commits into from

Conversation

MCUdude
Copy link
Collaborator

@MCUdude MCUdude commented Oct 19, 2022

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:

$ ./avrdude -csnap_updi -patmega4808

avrdude warning: MPLAB SNAP in PIC mode detected!
        Use MPLAB X or Microchip Studio to switch to AVR mode

avrdude error: unable to open programmer snap_updi on port usb

avrdude done.  Thank you.

#1027 related

Resolves #1135

@mcuee mcuee added the enhancement New feature or request label Oct 20, 2022
stefanrueger and others added 10 commits October 20, 2022 08:02
* Change avrdude_message(MSG_XYZ, ...) to msg_xyz(...)
* Define and use pmsg_xyz(...) instead of msg_xyz("%s: ...", progname, ...)
* Review and change avrdude_message() levels
   - Introduce new levels warning, error and ext_error
   - Distribute info level to info, warning, error, ext_error
   - Assign levels (more) consistently
   - Unify grammar, punctuation and style of messages
* Use imsg_xyz() to print indented messages
* Show function name in errors and warnings on -v
* Reduce effective verbosity level by number of -q above one
@MCUdude
Copy link
Collaborator Author

MCUdude commented Oct 20, 2022

I totally screwed up some rebasing, and I can't fire out how to fix it. I'm opening a new PR

@MCUdude MCUdude closed this Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To supress the warning for Microchip SNAP
4 participants