This change actually dates back to July 29: add preliminary support

for Xmega programming using the JTAG ICE mkII in JTAG mode.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@780 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
joerg_wunsch 2008-10-31 21:16:46 +00:00
parent a37bbfab57
commit 50ef8a71b3
4 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2008-07-29 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* jtagmkII.c: Implement Xmega JTAG support.
* jtagmkII_private.h: Add EMULATOR_MODE_JTAG_XMEGA.
2008-07-29 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* main.c: Remember whether the device initialization worked, and

3
NEWS
View File

@ -32,6 +32,9 @@ Current:
device initialization failed, so the user can modify programmer
parameters (like Vtarget).
* Add preliminary support for ATxmega128A1 for the JTAG ICE mkII using
JTAG.
Version 5.5:
* Add support for the USBtinyISP programmer (patch #6233)

View File

@ -261,6 +261,7 @@ static void jtagmkII_prmsg(PROGRAMMER * pgm, unsigned char * data, size_t len)
case EMULATOR_MODE_JTAG: fprintf(stderr, ": JTAG"); break;
case EMULATOR_MODE_HV: fprintf(stderr, ": HVSP/PP"); break;
case EMULATOR_MODE_SPI: fprintf(stderr, ": SPI"); break;
case EMULATOR_MODE_JTAG_XMEGA: fprintf(stderr, ": JTAG/Xmega"); break;
}
putc('\n', stderr);
break;
@ -876,6 +877,8 @@ static void jtagmkII_set_devdescr(PROGRAMMER * pgm, AVRPART * p)
sendbuf.dd.ucEepromPageSize = PDATA(pgm)->eeprom_pagesize = m->page_size;
}
}
sendbuf.dd.ucCacheType =
(p->flags & AVRPART_HAS_PDI)? 0x02 /* ATxmega */: 0x00;
if (verbose >= 2)
fprintf(stderr, "%s: jtagmkII_set_devdescr(): "
@ -1143,6 +1146,13 @@ static int jtagmkII_initialize(PROGRAMMER * pgm, AVRPART * p)
* Must set the device descriptor before entering programming mode.
*/
jtagmkII_set_devdescr(pgm, p);
/*
* If this is an ATxmega device, change the emulator mode from JTAG
* to JTAG_XMEGA.
*/
if (!(pgm->flag & PGM_FL_IS_DW) &&
(p->flags & AVRPART_HAS_PDI))
jtagmkII_getsync(pgm, EMULATOR_MODE_JTAG_XMEGA);
free(PDATA(pgm)->flash_pagecache);
free(PDATA(pgm)->eeprom_pagecache);

View File

@ -179,6 +179,7 @@
# define EMULATOR_MODE_JTAG 0x01
# define EMULATOR_MODE_HV 0x02 /* HVSP or PP mode of AVR Dragon */
# define EMULATOR_MODE_SPI 0x03
# define EMULATOR_MODE_JTAG_XMEGA 0x05
#define PAR_IREG 0x04
#define PAR_BAUD_RATE 0x05
# define PAR_BAUD_2400 0x01