| 1 |
(This is the device descriptor format for the mkI protocol. The mkII |
| 2 |
format is described as part of Appnote AVR067.) |
| 3 |
|
| 4 |
This email documents the structure of the device description array. I also |
| 5 |
posted this to the avarice users mailing list: |
| 6 |
|
| 7 |
http://sourceforge.net/mailarchive/forum.php?thread_id=2685519&forum_id=4568 |
| 8 |
|
| 9 |
------- |
| 10 |
|
| 11 |
This should allow us to add support for the mega64. |
| 12 |
|
| 13 |
Ted Roth |
| 14 |
|
| 15 |
---------- Forwarded message ---------- |
| 16 |
Date: Mon, 30 Jun 2003 13:22:59 +0200 |
| 17 |
From: avr@at... |
| 18 |
To: Theodore A. Roth <troth@op...>, avr@at... |
| 19 |
Subject: RE: jtagice info request |
| 20 |
|
| 21 |
Dear customer, |
| 22 |
|
| 23 |
Find below the device specific data for ATmega64. Note that the last line of |
| 24 |
the definition contains some varables that are expanded into 2- and 4-byte |
| 25 |
values when transmitting them. It is the 'expanded' values that are listed |
| 26 |
in the app note. You can figure everything out from the definition and the |
| 27 |
command handler below. It should also give you some insight in what the |
| 28 |
various data really is. Get back to me if you still have questions. We'll |
| 29 |
get this into the appnote as soon as possible, of cource. |
| 30 |
|
| 31 |
Please keep the complete mail correspondence in your replies. |
| 32 |
|
| 33 |
Best Regards |
| 34 |
Morten Reintz |
| 35 |
Atmel AVR tech support |
| 36 |
|
| 37 |
-------------------------------------------- |
| 38 |
AVR support mail mailto:avr@at... |
| 39 |
Atmel AVR page http://www.atmel.com/products/avr/ |
| 40 |
Info and software http://www.avrfreaks.net |
| 41 |
Discussion forum http://www.avrfreaks.net/phorum/ |
| 42 |
Distributors http://www.atmel.com/dyn/general/contact.asp |
| 43 |
|
| 44 |
|
| 45 |
-- Device specific data for ATmega64 -- |
| 46 |
|
| 47 |
|
| 48 |
{0xCF,0x2F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}, |
| 49 |
{0xCF,0x27,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE}, |
| 50 |
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
| 51 |
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, |
| 52 |
|
| 53 |
{0x3E,0xB5,0x1F,0x37,0xFF,0x1F,0x21,0x2F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 54 |
0x00,0x00,0x00,0x00,0x00}, |
| 55 |
|
| 56 |
{0x3E,0xB5,0x0F,0x27,0xFF,0x1F,0x21,0x27,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 57 |
0x00,0x00,0x00,0x00,0x00}, |
| 58 |
|
| 59 |
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 60 |
0x00,0x00,0x00,0x00,0x00}, |
| 61 |
|
| 62 |
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 63 |
0x00,0x00,0x00,0x00,0x00}, |
| 64 |
|
| 65 |
0x22, 0x68, 0x00, 256, 8, 0x7E00, 0x9D, |
| 66 |
|
| 67 |
|
| 68 |
-- Definition of device specific data -- |
| 69 |
|
| 70 |
// Bit 0 in byte 0 is I/O location 0, bit 7 in byte 7 is I/O location 63 |
| 71 |
UCHAR ucRead[8]; // IO read access |
| 72 |
UCHAR ucWrite[8]; // IO write access |
| 73 |
UCHAR ucReadShadow[8]; // IO shadow read access |
| 74 |
UCHAR ucWriteShadow[8]; // IO shadow write access |
| 75 |
|
| 76 |
// Bit 0 in byte 0 is extended I/O location 96, bit 7 in byte 19 is extended |
| 77 |
// I/O location 255 |
| 78 |
UCHAR ucExtRead[20]; // Extexded IO read access |
| 79 |
UCHAR ucExtWrite[20]; // Extendec IO write access |
| 80 |
UCHAR ucExtReadShadow[20]; // Extended IO shadow read access |
| 81 |
UCHAR ucExtWriteShadow[20]; // Extended IO shadow write access |
| 82 |
|
| 83 |
// Register loactions etc. |
| 84 |
UCHAR ucIDRAddress; // IDR address in I/O space |
| 85 |
UCHAR ucSPMCRAddress; // SPMCR Register address in SRAM space |
| 86 |
UCHAR ucRAMPZAddress; // RAMPZ Register address in I/O space |
| 87 |
ULONG ulFlashPageSize; // Device Flash Page Size in bytes |
| 88 |
ULONG ulEepromPageSize; // Device Eeprom Page Size in bytes |
| 89 |
ULONG ulBootAddress; // Device Boot Loader Start Address (word |
| 90 |
// address) |
| 91 |
UCHAR ucUpperExtIOLoc; // Topmost (last) extended I/O location, 0 |
| 92 |
// if no ext I/O |
| 93 |
|
| 94 |
-- Set device descriptor handler ('pD' is pointer to struct containing data |
| 95 |
above, 'buf' is emitted on the COM port byte by byte) -- |
| 96 |
|
| 97 |
memcpy(buf, pD->ucRead, 8); |
| 98 |
memcpy(buf+8, pD->ucReadShadow, 8); |
| 99 |
memcpy(buf+16, pD->ucWrite, 8); |
| 100 |
memcpy(buf+24, pD->ucWriteShadow, 8); |
| 101 |
|
| 102 |
memcpy(buf+32, pD->ucExtRead, 20); |
| 103 |
memcpy(buf+52, pD->ucExtReadShadow, 20); |
| 104 |
memcpy(buf+72, pD->ucExtWrite, 20); |
| 105 |
memcpy(buf+92, pD->ucExtWriteShadow, 20); |
| 106 |
|
| 107 |
buf[112] = pD->ucIDRAddress; |
| 108 |
buf[113] = pD->ucSPMCRAddress; |
| 109 |
buf[114] = pD->ucRAMPZAddress; |
| 110 |
|
| 111 |
buf[115] = (UCHAR)((pD->ulFlashPageSize >> 0) & 0xFF); |
| 112 |
buf[116] = (UCHAR)((pD->ulFlashPageSize >> 8) & 0xFF); |
| 113 |
|
| 114 |
buf[117] = (UCHAR)(pD->ulEepromPageSize); |
| 115 |
|
| 116 |
buf[118] = (UCHAR)((pD->ulBootAddress >> 0) & 0xFF); |
| 117 |
buf[119] = (UCHAR)((pD->ulBootAddress >> 8) & 0xFF); |
| 118 |
buf[120] = (UCHAR)((pD->ulBootAddress >> 16) & 0xFF); |
| 119 |
buf[121] = (UCHAR)((pD->ulBootAddress >> 24) & 0xFF); |
| 120 |
|
| 121 |
buf[122] = pD->ucUpperExtIOLoc; |
| 122 |
|
| 123 |
|
| 124 |
> -----Original Message----- |
| 125 |
> From: Theodore A. Roth [mailto:troth@op...] |
| 126 |
> Sent: 26. juni 2003 18:29 |
| 127 |
> To: avr@at... |
| 128 |
> Cc: avarice-user@li... |
| 129 |
> Subject: jtagice info request |
| 130 |
> |
| 131 |
> |
| 132 |
> Hi, |
| 133 |
> |
| 134 |
> I help maintain an open source called avarice |
| 135 |
> (http://sourceforge.net/projects/avarice) which is a program for |
| 136 |
> interfacing the jtagice box with the Gnu Debugger |
| 137 |
> (http://sources.redhat.com/gdb/). |
| 138 |
> |
| 139 |
> The avr060 app note has not been updated in quite a while and new |
| 140 |
> devices have begun shipping which we would like to support but are not |
| 141 |
> discussed in the current app note. |
| 142 |
> |
| 143 |
> Could you please send us the current device description information |
| 144 |
> for all devices the jtagice supports? |
| 145 |
> |
| 146 |
> It would also be much more useful to us to have the structure |
| 147 |
> definition for the device descriptions in addition to the list of |
| 148 |
> numbers. |
| 149 |
> |
| 150 |
> Thank you for your time. |
| 151 |
> |
| 152 |
> Ted Roth |
| 153 |
> |
| 154 |
> |
| 155 |
|