From d1010fd46fed6e6d7ebea07d127e98378c352db3 Mon Sep 17 00:00:00 2001 From: Jan Egil Ruud Date: Tue, 20 Dec 2022 11:59:00 +0100 Subject: [PATCH] #1052 Add JTAG support for PICkit4 and Snap. --- src/avrdude.conf.in | 26 ++++++++++++++++++++++++++ src/jtag3.c | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/avrdude.conf.in b/src/avrdude.conf.in index 11da317f..031b14f4 100644 --- a/src/avrdude.conf.in +++ b/src/avrdude.conf.in @@ -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 | PM_AVR32JTAG; + 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 | PM_AVR32JTAG; + connection_type = usb; + usbpid = 0x2180, 0x217f, 0x2181; +; + #------------------------------------------------------------ # snap_updi #------------------------------------------------------------ diff --git a/src/jtag3.c b/src/jtag3.c index 7e660b92..b8dc9301 100644 --- a/src/jtag3.c +++ b/src/jtag3.c @@ -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;