Distinguish different JTAG programming modes
This commit is contained in:
parent
07f1f60020
commit
4070ca9012
|
@ -56,7 +56,10 @@
|
||||||
# # - PM_HVSP: High Voltage Serial Programming (some classic parts)
|
# # - PM_HVSP: High Voltage Serial Programming (some classic parts)
|
||||||
# # - PM_HVPP: High Voltage Parallel Programming (most non-HVSP classic parts)
|
# # - PM_HVPP: High Voltage Parallel Programming (most non-HVSP classic parts)
|
||||||
# # - PM_debugWIRE: Simpler alternative to JTAG (a subset of HVPP/HVSP parts)
|
# # - PM_debugWIRE: Simpler alternative to JTAG (a subset of HVPP/HVSP parts)
|
||||||
# # - PM_JTAG: Joint Test Action Group standard (some classic parts, some xmega)
|
# # - PM_JTAG: Joint Test Action Group standard (some classic parts)
|
||||||
|
# # - PM_JTAGmkI: Subset of PM_JTAG, older parts, Atmel ICE mkI
|
||||||
|
# # - PM_XMEGAJTAG: JTAG, some XMEGA parts
|
||||||
|
# # - PM_AVR32JTAG: JTAG for 32-bit AVRs
|
||||||
# # - PM_aWire: AVR32 parts
|
# # - PM_aWire: AVR32 parts
|
||||||
# #
|
# #
|
||||||
# # (2) Not all programmer types can process a list of PIDs
|
# # (2) Not all programmer types can process a list of PIDs
|
||||||
|
@ -1667,7 +1670,7 @@ programmer
|
||||||
id = "jtagmkI";
|
id = "jtagmkI";
|
||||||
desc = "Atmel JTAG ICE (mkI)";
|
desc = "Atmel JTAG ICE (mkI)";
|
||||||
type = "jtagmki";
|
type = "jtagmki";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAGmkI;
|
||||||
connection_type = serial;
|
connection_type = serial;
|
||||||
baudrate = 115200; # default is 115200
|
baudrate = 115200; # default is 115200
|
||||||
;
|
;
|
||||||
|
@ -1706,7 +1709,7 @@ programmer
|
||||||
id = "jtagmkII";
|
id = "jtagmkII";
|
||||||
desc = "Atmel JTAG ICE mkII";
|
desc = "Atmel JTAG ICE mkII";
|
||||||
type = "jtagmkii";
|
type = "jtagmkii";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
baudrate = 19200; # default is 19200
|
baudrate = 19200; # default is 19200
|
||||||
;
|
;
|
||||||
|
@ -1795,7 +1798,7 @@ programmer
|
||||||
|
|
||||||
programmer
|
programmer
|
||||||
id = "jtag2avr32";
|
id = "jtag2avr32";
|
||||||
desc = "Atmel JTAG ICE mkII im AVR32 mode";
|
desc = "Atmel JTAG ICE mkII in AVR32 mode";
|
||||||
type = "jtagmkii_avr32";
|
type = "jtagmkii_avr32";
|
||||||
prog_modes = PM_aWire;
|
prog_modes = PM_aWire;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
|
@ -1827,7 +1830,7 @@ programmer
|
||||||
id = "dragon_jtag";
|
id = "dragon_jtag";
|
||||||
desc = "Atmel AVR Dragon in JTAG mode";
|
desc = "Atmel AVR Dragon in JTAG mode";
|
||||||
type = "dragon_jtag";
|
type = "dragon_jtag";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
baudrate = 115200;
|
baudrate = 115200;
|
||||||
;
|
;
|
||||||
|
@ -1915,7 +1918,7 @@ programmer
|
||||||
id = "jtag3";
|
id = "jtag3";
|
||||||
desc = "Atmel AVR JTAGICE3 in JTAG mode";
|
desc = "Atmel AVR JTAGICE3 in JTAG mode";
|
||||||
type = "jtagice3";
|
type = "jtagice3";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
usbpid = 0x2110, 0x2140;
|
usbpid = 0x2110, 0x2140;
|
||||||
;
|
;
|
||||||
|
@ -1981,7 +1984,7 @@ programmer
|
||||||
id = "xplainedpro";
|
id = "xplainedpro";
|
||||||
desc = "Atmel AVR XplainedPro in JTAG mode";
|
desc = "Atmel AVR XplainedPro in JTAG mode";
|
||||||
type = "jtagice3";
|
type = "jtagice3";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
usbpid = 0x2111;
|
usbpid = 0x2111;
|
||||||
;
|
;
|
||||||
|
@ -2048,7 +2051,7 @@ programmer
|
||||||
id = "atmelice";
|
id = "atmelice";
|
||||||
desc = "Atmel-ICE (ARM/AVR) in JTAG mode";
|
desc = "Atmel-ICE (ARM/AVR) in JTAG mode";
|
||||||
type = "jtagice3";
|
type = "jtagice3";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
usbpid = 0x2141;
|
usbpid = 0x2141;
|
||||||
;
|
;
|
||||||
|
@ -2114,7 +2117,7 @@ programmer
|
||||||
id = "powerdebugger";
|
id = "powerdebugger";
|
||||||
desc = "Atmel PowerDebugger (ARM/AVR) in JTAG mode";
|
desc = "Atmel PowerDebugger (ARM/AVR) in JTAG mode";
|
||||||
type = "jtagice3";
|
type = "jtagice3";
|
||||||
prog_modes = PM_JTAG;
|
prog_modes = PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG;
|
||||||
connection_type = usb;
|
connection_type = usb;
|
||||||
usbpid = 0x2144;
|
usbpid = 0x2144;
|
||||||
;
|
;
|
||||||
|
@ -3652,7 +3655,7 @@ part
|
||||||
part
|
part
|
||||||
desc = "ATmega64";
|
desc = "ATmega64";
|
||||||
id = "m64";
|
id = "m64";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 72;
|
mcuid = 72;
|
||||||
n_interrupts = 35;
|
n_interrupts = 35;
|
||||||
stk500_devcode = 0xa0;
|
stk500_devcode = 0xa0;
|
||||||
|
@ -3771,6 +3774,7 @@ part
|
||||||
part parent "m64"
|
part parent "m64"
|
||||||
desc = "ATmega64A";
|
desc = "ATmega64A";
|
||||||
id = "m64a";
|
id = "m64a";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 73;
|
mcuid = 73;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -3781,7 +3785,7 @@ part parent "m64"
|
||||||
part
|
part
|
||||||
desc = "ATmega128";
|
desc = "ATmega128";
|
||||||
id = "m128";
|
id = "m128";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 85;
|
mcuid = 85;
|
||||||
n_interrupts = 35;
|
n_interrupts = 35;
|
||||||
stk500_devcode = 0xb2;
|
stk500_devcode = 0xb2;
|
||||||
|
@ -3901,6 +3905,7 @@ part
|
||||||
part parent "m128"
|
part parent "m128"
|
||||||
desc = "ATmega128A";
|
desc = "ATmega128A";
|
||||||
id = "m128a";
|
id = "m128a";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 86;
|
mcuid = 86;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -3911,7 +3916,7 @@ part parent "m128"
|
||||||
part
|
part
|
||||||
desc = "AT90CAN128";
|
desc = "AT90CAN128";
|
||||||
id = "c128";
|
id = "c128";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 176;
|
mcuid = 176;
|
||||||
n_interrupts = 37;
|
n_interrupts = 37;
|
||||||
stk500_devcode = 0xb3;
|
stk500_devcode = 0xb3;
|
||||||
|
@ -4280,7 +4285,7 @@ part
|
||||||
part
|
part
|
||||||
desc = "ATmega16";
|
desc = "ATmega16";
|
||||||
id = "m16";
|
id = "m16";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 49;
|
mcuid = 49;
|
||||||
n_interrupts = 21;
|
n_interrupts = 21;
|
||||||
stk500_devcode = 0x82;
|
stk500_devcode = 0x82;
|
||||||
|
@ -4395,6 +4400,7 @@ part
|
||||||
part parent "m16"
|
part parent "m16"
|
||||||
desc = "ATmega16A";
|
desc = "ATmega16A";
|
||||||
id = "m16a";
|
id = "m16a";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 50;
|
mcuid = 50;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -4892,7 +4898,7 @@ part parent "m1284"
|
||||||
part
|
part
|
||||||
desc = "ATmega162";
|
desc = "ATmega162";
|
||||||
id = "m162";
|
id = "m162";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 90;
|
mcuid = 90;
|
||||||
n_interrupts = 28;
|
n_interrupts = 28;
|
||||||
stk500_devcode = 0x83;
|
stk500_devcode = 0x83;
|
||||||
|
@ -5117,7 +5123,7 @@ part
|
||||||
part
|
part
|
||||||
desc = "ATmega169";
|
desc = "ATmega169";
|
||||||
id = "m169";
|
id = "m169";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 104;
|
mcuid = 104;
|
||||||
n_interrupts = 23;
|
n_interrupts = 23;
|
||||||
stk500_devcode = 0x85;
|
stk500_devcode = 0x85;
|
||||||
|
@ -5238,6 +5244,7 @@ part
|
||||||
part parent "m169"
|
part parent "m169"
|
||||||
desc = "ATmega169A";
|
desc = "ATmega169A";
|
||||||
id = "m169a";
|
id = "m169a";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 105;
|
mcuid = 105;
|
||||||
signature = 0x1e 0x94 0x11;
|
signature = 0x1e 0x94 0x11;
|
||||||
reset = io;
|
reset = io;
|
||||||
|
@ -5250,6 +5257,7 @@ part parent "m169"
|
||||||
part parent "m169"
|
part parent "m169"
|
||||||
desc = "ATmega169P";
|
desc = "ATmega169P";
|
||||||
id = "m169p";
|
id = "m169p";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 106;
|
mcuid = 106;
|
||||||
reset = io;
|
reset = io;
|
||||||
;
|
;
|
||||||
|
@ -5261,6 +5269,7 @@ part parent "m169"
|
||||||
part parent "m169"
|
part parent "m169"
|
||||||
desc = "ATmega169PA";
|
desc = "ATmega169PA";
|
||||||
id = "m169pa";
|
id = "m169pa";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 107;
|
mcuid = 107;
|
||||||
reset = io;
|
reset = io;
|
||||||
;
|
;
|
||||||
|
@ -5655,7 +5664,7 @@ part parent "m649"
|
||||||
part
|
part
|
||||||
desc = "ATmega32";
|
desc = "ATmega32";
|
||||||
id = "m32";
|
id = "m32";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 58;
|
mcuid = 58;
|
||||||
n_interrupts = 21;
|
n_interrupts = 21;
|
||||||
stk500_devcode = 0x91;
|
stk500_devcode = 0x91;
|
||||||
|
@ -5859,6 +5868,7 @@ part
|
||||||
part parent "m32"
|
part parent "m32"
|
||||||
desc = "ATmega32A";
|
desc = "ATmega32A";
|
||||||
id = "m32a";
|
id = "m32a";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 59;
|
mcuid = 59;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -11240,7 +11250,7 @@ part
|
||||||
part
|
part
|
||||||
desc = "ATmega165";
|
desc = "ATmega165";
|
||||||
id = "m165";
|
id = "m165";
|
||||||
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG | PM_JTAGmkI;
|
||||||
mcuid = 95;
|
mcuid = 95;
|
||||||
n_interrupts = 22;
|
n_interrupts = 22;
|
||||||
# stk500_devcode = 0x??;
|
# stk500_devcode = 0x??;
|
||||||
|
@ -11362,6 +11372,7 @@ part
|
||||||
part parent "m165"
|
part parent "m165"
|
||||||
desc = "ATmega165A";
|
desc = "ATmega165A";
|
||||||
id = "m165a";
|
id = "m165a";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 96;
|
mcuid = 96;
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -11372,6 +11383,7 @@ part parent "m165"
|
||||||
part parent "m165"
|
part parent "m165"
|
||||||
desc = "ATmega165P";
|
desc = "ATmega165P";
|
||||||
id = "m165p";
|
id = "m165p";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 97;
|
mcuid = 97;
|
||||||
signature = 0x1e 0x94 0x07;
|
signature = 0x1e 0x94 0x07;
|
||||||
;
|
;
|
||||||
|
@ -11383,6 +11395,7 @@ part parent "m165"
|
||||||
part parent "m165"
|
part parent "m165"
|
||||||
desc = "ATmega165PA";
|
desc = "ATmega165PA";
|
||||||
id = "m165pa";
|
id = "m165pa";
|
||||||
|
prog_modes = PM_SPM | PM_ISP | PM_HVPP | PM_JTAG;
|
||||||
mcuid = 98;
|
mcuid = 98;
|
||||||
signature = 0x1e 0x94 0x07;
|
signature = 0x1e 0x94 0x07;
|
||||||
;
|
;
|
||||||
|
@ -12115,7 +12128,7 @@ part parent "x64a4u"
|
||||||
part parent "x64a4u"
|
part parent "x64a4u"
|
||||||
desc = "ATxmega64A1";
|
desc = "ATxmega64A1";
|
||||||
id = "x64a1";
|
id = "x64a1";
|
||||||
prog_modes = PM_SPM | PM_PDI | PM_JTAG;
|
prog_modes = PM_SPM | PM_PDI | PM_XMEGAJTAG;
|
||||||
mcuid = 243;
|
mcuid = 243;
|
||||||
n_interrupts = 125;
|
n_interrupts = 125;
|
||||||
signature = 0x1e 0x96 0x4e;
|
signature = 0x1e 0x96 0x4e;
|
||||||
|
@ -12289,7 +12302,7 @@ part parent "x128c3"
|
||||||
part parent "x128c3"
|
part parent "x128c3"
|
||||||
desc = "ATxmega128A1";
|
desc = "ATxmega128A1";
|
||||||
id = "x128a1";
|
id = "x128a1";
|
||||||
prog_modes = PM_SPM | PM_PDI | PM_JTAG;
|
prog_modes = PM_SPM | PM_PDI | PM_XMEGAJTAG;
|
||||||
mcuid = 254;
|
mcuid = 254;
|
||||||
n_interrupts = 125;
|
n_interrupts = 125;
|
||||||
signature = 0x1e 0x97 0x4c;
|
signature = 0x1e 0x97 0x4c;
|
||||||
|
@ -12355,7 +12368,7 @@ part parent "x128a1"
|
||||||
part parent ".xmega"
|
part parent ".xmega"
|
||||||
desc = "ATxmega128A4";
|
desc = "ATxmega128A4";
|
||||||
id = "x128a4";
|
id = "x128a4";
|
||||||
prog_modes = PM_SPM | PM_PDI | PM_JTAG;
|
prog_modes = PM_SPM | PM_PDI | PM_XMEGAJTAG;
|
||||||
mcuid = 263;
|
mcuid = 263;
|
||||||
signature = 0x1e 0x97 0x46;
|
signature = 0x1e 0x97 0x46;
|
||||||
|
|
||||||
|
@ -12469,7 +12482,7 @@ part parent ".xmega"
|
||||||
part parent ".xmega"
|
part parent ".xmega"
|
||||||
desc = "ATxmega128B1";
|
desc = "ATxmega128B1";
|
||||||
id = "x128b1";
|
id = "x128b1";
|
||||||
prog_modes = PM_SPM | PM_PDI | PM_JTAG;
|
prog_modes = PM_SPM | PM_PDI | PM_XMEGAJTAG;
|
||||||
mcuid = 257;
|
mcuid = 257;
|
||||||
n_interrupts = 81;
|
n_interrupts = 81;
|
||||||
signature = 0x1e 0x97 0x4d;
|
signature = 0x1e 0x97 0x4d;
|
||||||
|
@ -12610,7 +12623,7 @@ part parent "x192c3"
|
||||||
part parent "x192c3"
|
part parent "x192c3"
|
||||||
desc = "ATxmega192A1";
|
desc = "ATxmega192A1";
|
||||||
id = "x192a1";
|
id = "x192a1";
|
||||||
prog_modes = PM_SPM | PM_PDI | PM_JTAG;
|
prog_modes = PM_SPM | PM_PDI | PM_XMEGAJTAG;
|
||||||
mcuid = 266;
|
mcuid = 266;
|
||||||
signature = 0x1e 0x97 0x4e;
|
signature = 0x1e 0x97 0x4e;
|
||||||
|
|
||||||
|
@ -12718,7 +12731,7 @@ part parent "x256c3"
|
||||||
part parent "x256c3"
|
part parent "x256c3"
|
||||||
desc = "ATxmega256A1";
|
desc = "ATxmega256A1";
|
||||||
id = "x256a1";
|
id = "x256a1";
|
||||||
prog_modes = PM_SPM | PM_PDI | PM_JTAG;
|
prog_modes = PM_SPM | PM_PDI | PM_XMEGAJTAG;
|
||||||
mcuid = 271;
|
mcuid = 271;
|
||||||
|
|
||||||
memory "fuse0"
|
memory "fuse0"
|
||||||
|
@ -13011,7 +13024,7 @@ part parent ".xmega"
|
||||||
part
|
part
|
||||||
desc = "AT32UC3A0512";
|
desc = "AT32UC3A0512";
|
||||||
id = "uc3a0512";
|
id = "uc3a0512";
|
||||||
prog_modes = PM_JTAG | PM_aWire;
|
prog_modes = PM_AVR32JTAG | PM_aWire;
|
||||||
signature = 0xed 0xc0 0x3f;
|
signature = 0xed 0xc0 0x3f;
|
||||||
|
|
||||||
memory "flash"
|
memory "flash"
|
||||||
|
|
|
@ -267,6 +267,9 @@ TOKEN *new_constant(const char *con) {
|
||||||
!strcmp("PM_HVPP", con)? PM_HVPP:
|
!strcmp("PM_HVPP", con)? PM_HVPP:
|
||||||
!strcmp("PM_debugWIRE", con)? PM_debugWIRE:
|
!strcmp("PM_debugWIRE", con)? PM_debugWIRE:
|
||||||
!strcmp("PM_JTAG", con)? PM_JTAG:
|
!strcmp("PM_JTAG", con)? PM_JTAG:
|
||||||
|
!strcmp("PM_JTAGmkI", con)? PM_JTAGmkI:
|
||||||
|
!strcmp("PM_XMEGAJTAG", con)? PM_XMEGAJTAG:
|
||||||
|
!strcmp("PM_AVR32JTAG", con)? PM_AVR32JTAG:
|
||||||
!strcmp("PM_aWire", con)? PM_aWire:
|
!strcmp("PM_aWire", con)? PM_aWire:
|
||||||
(assigned = 0);
|
(assigned = 0);
|
||||||
|
|
||||||
|
|
|
@ -1122,7 +1122,7 @@ part_parm :
|
||||||
if ($3->primary == K_YES)
|
if ($3->primary == K_YES)
|
||||||
current_part->prog_modes |= PM_JTAG;
|
current_part->prog_modes |= PM_JTAG;
|
||||||
else if ($3->primary == K_NO)
|
else if ($3->primary == K_NO)
|
||||||
current_part->prog_modes &= ~PM_JTAG;
|
current_part->prog_modes &= ~(PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG);
|
||||||
free_token($3);
|
free_token($3);
|
||||||
} |
|
} |
|
||||||
|
|
||||||
|
|
|
@ -232,6 +232,12 @@ static char *prog_modes_str(int pm) {
|
||||||
strcat(type, " | PM_debugWIRE");
|
strcat(type, " | PM_debugWIRE");
|
||||||
if(pm & PM_JTAG)
|
if(pm & PM_JTAG)
|
||||||
strcat(type, " | PM_JTAG");
|
strcat(type, " | PM_JTAG");
|
||||||
|
if(pm & PM_JTAGmkI)
|
||||||
|
strcat(type, " | PM_JTAGmkI");
|
||||||
|
if(pm & PM_XMEGAJTAG)
|
||||||
|
strcat(type, " | PM_XMEGAJTAG");
|
||||||
|
if(pm & PM_AVR32JTAG)
|
||||||
|
strcat(type, " | PM_AVR32JTAG");
|
||||||
if(pm & PM_aWire)
|
if(pm & PM_aWire)
|
||||||
strcat(type, " | PM_aWire");
|
strcat(type, " | PM_aWire");
|
||||||
|
|
||||||
|
|
|
@ -1076,7 +1076,7 @@ static int jtag3_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||||
conn = PARM3_CONN_UPDI;
|
conn = PARM3_CONN_UPDI;
|
||||||
} else {
|
} else {
|
||||||
ifname = "JTAG";
|
ifname = "JTAG";
|
||||||
if (p->prog_modes & PM_JTAG)
|
if (p->prog_modes & (PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG))
|
||||||
conn = PARM3_CONN_JTAG;
|
conn = PARM3_CONN_JTAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1376,7 +1376,7 @@ static int jtag3_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (use_ext_reset > 1) {
|
if (use_ext_reset > 1) {
|
||||||
if(strcmp(pgm->type, "JTAGICE3") == 0 && (p->prog_modes & PM_JTAG))
|
if(strcmp(pgm->type, "JTAGICE3") == 0 && (p->prog_modes & (PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG)))
|
||||||
avrdude_message(MSG_INFO, "%s: JTAGEN fuse disabled?\n", progname);
|
avrdude_message(MSG_INFO, "%s: JTAGEN fuse disabled?\n", progname);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -523,11 +523,14 @@ static int jtagmkI_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||||
unsigned char cmd[1], resp[5];
|
unsigned char cmd[1], resp[5];
|
||||||
unsigned char b;
|
unsigned char b;
|
||||||
|
|
||||||
if (!(p->prog_modes & PM_JTAG)) {
|
if (!(p->prog_modes & (PM_JTAGmkI | PM_JTAG))) {
|
||||||
avrdude_message(MSG_INFO, "%s: jtagmkI_initialize(): part %s has no JTAG interface\n",
|
avrdude_message(MSG_INFO, "%s: jtagmkI_initialize(): part %s has no JTAG interface\n",
|
||||||
progname, p->desc);
|
progname, p->desc);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
if (!(p->prog_modes & PM_JTAGmkI))
|
||||||
|
avrdude_message(MSG_INFO, "%s: jtagmkI_initialize(): warning part %s has JTAG interface, but may be too new\n",
|
||||||
|
progname, p->desc);
|
||||||
|
|
||||||
jtagmkI_drain(pgm, 0);
|
jtagmkI_drain(pgm, 0);
|
||||||
|
|
||||||
|
|
|
@ -1308,7 +1308,7 @@ static int jtagmkII_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||||
ok = 1;
|
ok = 1;
|
||||||
} else {
|
} else {
|
||||||
ifname = "JTAG";
|
ifname = "JTAG";
|
||||||
if (p->prog_modes & PM_JTAG)
|
if (p->prog_modes & (PM_JTAG | PM_JTAGmkI | PM_XMEGAJTAG | PM_AVR32JTAG))
|
||||||
ok = 1;
|
ok = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ prog_modes|mcuid|n_interrupts|n_page_erase { /* Components for assignment */
|
||||||
return TKN_COMPONENT;
|
return TKN_COMPONENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
PM_SPM|PM_TPI|PM_ISP|PM_PDI|PM_UPDI|PM_HVSP|PM_HVPP|PM_debugWIRE|PM_JTAG|PM_aWire { /* Constants */
|
PM_(SPM|TPI|ISP|PDI|UPDI|HVSP|HVPP|debugWIRE|JTAG|JTAGmkI|XMEGAJTAG|AVR32JTAG|aWire) { /* Constants */
|
||||||
yylval = new_constant(yytext);
|
yylval = new_constant(yytext);
|
||||||
return TKN_NUMBER;
|
return TKN_NUMBER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,8 +201,11 @@ typedef struct opcode {
|
||||||
#define PM_HVSP 32 // High Voltage Serial Programming (some classic parts)
|
#define PM_HVSP 32 // High Voltage Serial Programming (some classic parts)
|
||||||
#define PM_HVPP 64 // High Voltage Parallel Programming (most non-HVSP classic parts)
|
#define PM_HVPP 64 // High Voltage Parallel Programming (most non-HVSP classic parts)
|
||||||
#define PM_debugWIRE 128 // Simpler alternative to JTAG (a subset of HVPP/HVSP parts)
|
#define PM_debugWIRE 128 // Simpler alternative to JTAG (a subset of HVPP/HVSP parts)
|
||||||
#define PM_JTAG 256 // Joint Test Action Group standard (some classic parts, some xmega)
|
#define PM_JTAG 256 // Joint Test Action Group standard (some classic parts)
|
||||||
#define PM_aWire 512 // AVR32 parts
|
#define PM_JTAGmkI 512 // Subset of PM_JTAG, older parts, Atmel ICE mkI
|
||||||
|
#define PM_XMEGAJTAG 1024 // JTAG, some XMEGA parts
|
||||||
|
#define PM_AVR32JTAG 2048 // JTAG for 32-bit AVRs
|
||||||
|
#define PM_aWire 4096 // For 32-bit AVRs
|
||||||
|
|
||||||
#define HV_UPDI_VARIANT_0 0 /* Shared UPDI/GPIO/RESET pin, HV on UPDI pin (tinyAVR0/1/2)*/
|
#define HV_UPDI_VARIANT_0 0 /* Shared UPDI/GPIO/RESET pin, HV on UPDI pin (tinyAVR0/1/2)*/
|
||||||
#define HV_UPDI_VARIANT_1 1 /* Dedicated UPDI pin, no HV (megaAVR0/AVR-Dx) */
|
#define HV_UPDI_VARIANT_1 1 /* Dedicated UPDI pin, no HV (megaAVR0/AVR-Dx) */
|
||||||
|
|
10
src/main.c
10
src/main.c
|
@ -138,6 +138,10 @@ static void usage(void)
|
||||||
static char *via_prog_modes(int pm) {
|
static char *via_prog_modes(int pm) {
|
||||||
static char type[1024];
|
static char type[1024];
|
||||||
|
|
||||||
|
// Suppress PM_JTAGmkI if also PM_JTAG is given
|
||||||
|
if((pm & PM_JTAG) && (pm & PM_JTAGmkI))
|
||||||
|
pm &= ~PM_JTAGmkI;
|
||||||
|
|
||||||
strcpy(type, "?");
|
strcpy(type, "?");
|
||||||
if(pm & PM_SPM)
|
if(pm & PM_SPM)
|
||||||
strcat(type, ", bootloader");
|
strcat(type, ", bootloader");
|
||||||
|
@ -157,6 +161,12 @@ static char *via_prog_modes(int pm) {
|
||||||
strcat(type, ", debugWIRE");
|
strcat(type, ", debugWIRE");
|
||||||
if(pm & PM_JTAG)
|
if(pm & PM_JTAG)
|
||||||
strcat(type, ", JTAG");
|
strcat(type, ", JTAG");
|
||||||
|
if(pm & PM_JTAGmkI)
|
||||||
|
strcat(type, ", JTAGmkI");
|
||||||
|
if(pm & PM_XMEGAJTAG)
|
||||||
|
strcat(type, ", XMEGAJTAG");
|
||||||
|
if(pm & PM_AVR32JTAG)
|
||||||
|
strcat(type, ", AVR32JTAG");
|
||||||
if(pm & PM_aWire)
|
if(pm & PM_aWire)
|
||||||
strcat(type, ", aWire");
|
strcat(type, ", aWire");
|
||||||
|
|
||||||
|
|
|
@ -1316,7 +1316,7 @@ static int stk500v2_jtag3_initialize(const PROGRAMMER *pgm, const AVRPART *p) {
|
||||||
LNODEID ln;
|
LNODEID ln;
|
||||||
AVRMEM * m;
|
AVRMEM * m;
|
||||||
|
|
||||||
// FIXME: condition below looks fishy, suspect the code wants !(p->prog_modes & (PM_debugWIRE | PM_JTAG))
|
// FIXME: condition below looks fishy, suspect the code wants !(p->prog_modes & (PM_debugWIRE | PM_JTAG | PM_JTAGmkI /* | PM_XMEGAJTAG | PM_AVR32JTAG */))
|
||||||
if (p->prog_modes & (PM_PDI | PM_TPI)) {
|
if (p->prog_modes & (PM_PDI | PM_TPI)) {
|
||||||
avrdude_message(MSG_INFO, "%s: jtag3_initialize(): part %s has no ISP interface\n",
|
avrdude_message(MSG_INFO, "%s: jtag3_initialize(): part %s has no ISP interface\n",
|
||||||
progname, p->desc);
|
progname, p->desc);
|
||||||
|
|
Loading…
Reference in New Issue