Skip to content

Commit

Permalink
Add PICkit4 and MPLAB SNAP programmers
Browse files Browse the repository at this point in the history
  • Loading branch information
MCUdude committed Jan 5, 2021
1 parent f427069 commit 51ed51c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 38 deletions.
89 changes: 51 additions & 38 deletions avr/avrdude.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
# vfyled = <num> ; # pin number
# usbvid = <hexnum>; # USB VID (Vendor ID)
# usbpid = <hexnum> [, <hexnum> ...] # USB PID (Product ID) (1)
# usbdev = <interface>; # USB interface or other device info
# usbdev = <interface>; # USB interface or other device info
# usbvendor = <vendorname>; # USB Vendor Name
# usbproduct = <productname>; # USB Product Name
# usbsn = <serialno>; # USB Serial Number
Expand Down Expand Up @@ -147,9 +147,9 @@
# complain.
#
# Parts can also inherit parameters from previously defined parts
# using the following syntax. In this case specified integer and
# string values override parameter values from the parent part. New
# memory definitions are added to the definitions inherited from the
# using the following syntax. In this case specified integer and
# string values override parameter values from the parent part. New
# memory definitions are added to the definitions inherited from the
# parent.
#
# part parent <id> # quoted string
Expand All @@ -158,7 +158,7 @@
# ;
#
# NOTES:
# * 'devicecode' is the device code used by the STK500 (see codes
# * 'devicecode' is the device code used by the STK500 (see codes
# listed below)
# * Not all memory types will implement all instructions.
# * AVR Fuse bits and Lock bits are implemented as a type of memory.
Expand Down Expand Up @@ -372,7 +372,7 @@ programmer
# http://dangerousprototypes.com/docs/FT2232_breakout_board
# http://www.ftdichip.com/Products/Modules/DLPModules.htm,DLP-2232*,DLP-USB1232H
# http://flashrom.org/FT2232SPI_Programmer
#
#
# The drivers will look for a specific device and use the first one found.
# If you have mulitple devices, then look for unique information (like SN)
# And fill that in here.
Expand Down Expand Up @@ -414,21 +414,21 @@ programmer
type = "avrftdi";
connection_type = usb;
usbvid = 0x0403;
# Note: This PID is reserved for generic H devices and
# Note: This PID is reserved for generic H devices and
# should be programmed into the EEPROM
# usbpid = 0x8A48;
usbpid = 0x6010;
usbdev = "A";
usbvendor = "";
usbproduct = "";
usbsn = "";
#ISP-signals
#ISP-signals
reset = 3;
sck = 0;
mosi = 1;
miso = 2;
buff = ~4;
#LED SIGNALs
#LED SIGNALs
errled = ~ 11;
rdyled = ~ 14;
pgmled = ~ 13;
Expand Down Expand Up @@ -526,8 +526,8 @@ programmer


# On the adapter you can read "O-Link". On the PCB is printed "OpenJTAG v3.1"
# You can find it as "OpenJTAG ARM JTAG USB" in the internet.
# (But there are also several projects called Open JTAG, eg.
# You can find it as "OpenJTAG ARM JTAG USB" in the internet.
# (But there are also several projects called Open JTAG, eg.
# http://www.openjtag.org, which are completely different.)
# http://www.100ask.net/shop/english.html (website seems to be outdated)
# http://item.taobao.com/item.htm?id=1559277013
Expand Down Expand Up @@ -805,7 +805,7 @@ programmer
# TTL-232R TXD 4 Orange -> ICPS RESET (pin 5)
# TTL-232R RXD 5 Yellow -> ICPS SCK (pin 3)
# TTL-232R RTS 6 Green -> ICPS MISO (pin 1)
# Except for VCC and GND, you can connect arbitual pairs as long as
# Except for VCC and GND, you can connect arbitual pairs as long as
# the following table is adjusted.
programmer
id = "ttl232r";
Expand Down Expand Up @@ -903,7 +903,7 @@ programmer
type = "butterfly";
connection_type = serial;
;

# suggested in http://forum.mikrokopter.de/topic-post48317.html
programmer
id = "mkbutterfly";
Expand Down Expand Up @@ -1063,7 +1063,6 @@ programmer
connection_type = usb;
;


programmer
id = "xplainedpro";
desc = "Atmel AVR XplainedPro in JTAG mode";
Expand All @@ -1072,7 +1071,6 @@ programmer
usbpid = 0x2111;
;


programmer
id = "atmelice_pdi";
desc = "Atmel-ICE (ARM/AVR) in PDI mode";
Expand All @@ -1097,6 +1095,21 @@ programmer
usbpid = 0x2141;
;

programmer
id = "pickit4_isp";
desc = "MPLAB(R) PICkit 4 in ISP mode";
type = "jtagice3_isp";
connection_type = usb;
usbpid = 0x2177;
;

programmer
id = "snap_isp";
desc = "MPLAB(R) SNAP in ISP mode";
type = "jtagice3_isp";
connection_type = usb;
usbpid = 0x217F, 0x2180, 0x2181;
;

programmer
id = "pavr";
Expand Down Expand Up @@ -1133,7 +1146,7 @@ programmer
programmer parent "stk200"
id = "pony-stk200";
desc = "Pony Prog STK200";
pgmled = 8;
pgmled = 8;
;

programmer
Expand Down Expand Up @@ -1218,7 +1231,7 @@ programmer
# From the contributor of the "xil" jtag cable:
# The "vcc" definition isn't really vcc (the cable gets its power from
# the programming circuit) but is necessary to switch one of the
# buffer lines (trying to add it to the "buff" lines doesn't work in
# buffer lines (trying to add it to the "buff" lines doesn't work in
# avrdude versions before 5.5j).
# With this, TMS connects to RESET, TDI to MOSI, TDO to MISO and TCK
# to SCK (plus vcc/gnd of course)
Expand Down Expand Up @@ -1314,7 +1327,7 @@ programmer parent "pony-stk200"
# miso = ?;
#;

# some ultra cheap programmers use bitbanging on the
# some ultra cheap programmers use bitbanging on the
# serialport.
#
# PC - DB9 - Pins for RS232:
Expand Down Expand Up @@ -1466,7 +1479,7 @@ part

write = " 1 1 0 0 0 0 0 0",
" 0 0 x x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";

mode = 0x04;
Expand Down Expand Up @@ -1535,10 +1548,10 @@ part
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;

memory "efuse"
size = 0;
;
;

memory "lock"
size = 1;
Expand Down Expand Up @@ -1638,7 +1651,7 @@ part

write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" a7 a6 a5 a4 a3 a2 a1 a0",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";

loadpage_lo = " 1 1 0 0 0 0 0 1",
Expand Down Expand Up @@ -1850,7 +1863,7 @@ part

write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" a7 a6 a5 a4 a3 a2 a1 a0",
" i i i i i i i i";

loadpage_lo = " 1 1 0 0 0 0 0 1",
Expand Down Expand Up @@ -2059,7 +2072,7 @@ part
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";

write = " 1 1 0 0 0 0 0 0",
" 0 0 0 x x x x a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
Expand Down Expand Up @@ -2094,22 +2107,22 @@ part
" 0 0 0 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";

read_hi = " 0 0 1 0 1 0 0 0",
" 0 0 0 a12 a11 a10 a9 a8",
" a7 a6 a5 a4 a3 a2 a1 a0",
" o o o o o o o o";

loadpage_lo = " 0 1 0 0 0 0 0 0",
" 0 0 0 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";

loadpage_hi = " 0 1 0 0 1 0 0 0",
" 0 0 0 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";

writepage = " 0 1 0 0 1 1 0 0",
" 0 0 0 a12 a11 a10 a9 a8",
" a7 a6 x x x x x x",
Expand All @@ -2121,57 +2134,57 @@ part
readsize = 256;

;

memory "lfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";

write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
;

memory "hfuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";

write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
;

memory "efuse"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";

write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x i i i";
;

memory "lock"
size = 1;
min_write_delay = 4500;
max_write_delay = 4500;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";

write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;

memory "calibration"
size = 1;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;

memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x",
Expand Down
14 changes: 14 additions & 0 deletions avr/programmers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,17 @@ atmel_ice.protocol=atmelice_isp
atmel_ice.program.protocol=atmelice_isp
atmel_ice.program.tool=avrdude
atmel_ice.program.extra_params=-Pusb

pickit4_isp.name=PICkit4 (ISP mode) (MiniCore)
pickit4_isp.communication=usb
pickit4_isp.protocol=pickit4_isp
pickit4_isp.program.protocol=pickit4_isp
pickit4_isp.program.tool=avrdude
pickit4_isp.program.extra_params=-Pusb

snap_isp.name=MPLAB SNAP (ISP mode) (MiniCore)
snap_isp.communication=usb
snap_isp.protocol=snap_isp
snap_isp.program.protocol=snap_isp
snap_isp.program.tool=avrdude
snap_isp.program.extra_params=-Pusb

0 comments on commit 51ed51c

Please sign in to comment.