Merge pull request #1233 from janegilruud/fix-pickit4-snap-jtag

#1052 Add JTAG support for PICkit4 and Snap.
This commit is contained in:
Stefan Rueger 2022-12-21 19:12:33 +00:00 committed by GitHub
commit 217adc543b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 31 additions and 3 deletions

View File

@ -231,7 +231,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

View File

@ -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
#------------------------------------------------------------
@ -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
#------------------------------------------------------------

View File

@ -316,7 +316,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}.

View File

@ -1283,7 +1283,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;