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

#1052 Add JTAG support for PICkit4 and Snap. #1233

Merged
merged 3 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion src/avrdude.1
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ The Atmel DFU bootloader is supported in both, FLIP protocol version 1
(AT90USB* and ATmega*U* devices), as well as version 2 (Xmega devices).
See below for some hints about FLIP version 1 protocol behaviour.
.Pp
The MPLAB(R) PICkit 4 and MPLAB(R) SNAP, are supported in ISP, PDI and UPDI mode.
The MPLAB(R) PICkit 4 and MPLAB(R) SNAP, are supported in JTAG, TPI, ISP,
PDI and UPDI mode.
The Curiosity Nano board is supported in UPDI mode. It is dubbed
.Dq PICkit on Board ,
thus the name
Expand Down
26 changes: 26 additions & 0 deletions src/avrdude.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -2302,6 +2302,19 @@ programmer
usbpid = 0x2144;
;

#------------------------------------------------------------
# pickit4
#------------------------------------------------------------

programmer
id = "pickit4";
desc = "MPLAB(R) PICkit 4 in JTAG mode";
type = "jtagice3";
prog_modes = PM_JTAG | PM_XMEGAJTAG;
connection_type = usb;
usbpid = 0x2177, 0x2178, 0x2179;
;

#------------------------------------------------------------
# pickit4_updi
#------------------------------------------------------------
Expand Down Expand Up @@ -2355,6 +2368,19 @@ programmer
usbpid = 0x2177, 0x2178, 0x2179;
;

#------------------------------------------------------------
# snap
#------------------------------------------------------------

programmer
id = "snap";
desc = "MPLAB(R) Snap in JTAG mode";
type = "jtagice3";
prog_modes = PM_JTAG | PM_XMEGAJTAG;
connection_type = usb;
usbpid = 0x2180, 0x217f, 0x2181;
;

#------------------------------------------------------------
# snap_updi
#------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/doc/avrdude.texi
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ The Atmel DFU bootloader is supported in both, FLIP protocol version 1
(AT90USB* and ATmega*U* devices), as well as version 2 (Xmega devices).
See below for some hints about FLIP version 1 protocol behaviour.

The MPLAB(R) PICkit 4 and MPLAB(R) SNAP are supported in ISP, PDI and UPDI mode.
The MPLAB(R) PICkit 4 and MPLAB(R) SNAP are supported in JTAG, TPI, ISP, PDI and UPDI mode.
The Curiosity Nano board is supported in UPDI mode. It is dubbed ``PICkit on
Board'', thus the name @code{pkobn_updi}.

Expand Down
3 changes: 2 additions & 1 deletion src/jtag3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,8 @@ static int jtag3_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
}
}

//md.sram_offset[2] = p->sram; // do we need it?
u16_to_b2(md.sram_offset, 0x100); // do we need it? YES, but it won't be used

if (p->ocdrev == -1) {
int ocdrev;

Expand Down