Hi Joerg & mailling list!
Thanks for your hints, I just tried them and with the config file
snippet in [1] (see below) I managed to read the signature, the fuses
and the lockbits via avrdude! I also verfied every reading using AVR
Studio - all of them are okay. Unfortunately, reading the eeprom as well
as the flash isn't working. In both cases, avrdude just hangs with this
error message:
---------------------------------%<---------------------------------
avrdude: reading flash memory:
Reading | | 0%
0.00savrdude: jtagmkII_paged_load(.., flash, 128, 40960)
avrdude: jtagmkII_paged_load(): Sending read memory command: 0x82 (1
bytes msg)
avrdude: jtagmkII_paged_load(): Sending read memory command: 0x82 (1
bytes msg)
[last line repeated endlessly]
---------------------------------%<---------------------------------
Funny thing is: When I comment the "page_size" as well as the
"num_pages" parameters from the eeprom section I can successfuly read
the eeprom. Appyling the same "trick" to the flash section is not
working (avrdude then complains about "Floating point exception"). Seems
that we're almost there but I need a little more help. Any ideas?
Kind regards
Andreas
[1]: Partly working config file snippet for ATmega406
---------------------------------%<---------------------------------
#------------------------------------------------------------
# ATmega406
#------------------------------------------------------------
part
id = "m406";
desc = "ATMEGA406";
has_jtag = yes;
signature = 0x1e 0x95 0x07;
# STK500 parameters (parallel programming IO lines)
pagel = 0xa7;
bs2 = 0xa0;
serial = no;
parallel = yes;
# STK500v2 HV programming parameters, from XML
pp_controlstack = 0x0e, 0x1e, 0x0f, 0x1f, 0x2e, 0x3e, 0x2f, 0x3f,
0x4e, 0x5e, 0x4f, 0x5f, 0x6e, 0x7e, 0x6f, 0x7f,
0x66, 0x76, 0x67, 0x77, 0x6a, 0x7a, 0x6b, 0x7b,
0xbe, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;
# JTAG ICE mkII parameters, also from XML files
allowfullpagebitstream = no;
enablepageprogramming = yes;
idr = 0x51;
rampz = 0x00;
spmcr = 0x57;
eecr = 0x3f;
memory "eeprom"
paged = no;
size = 512;
page_size = 4;
num_pages = 128;
;
memory "flash"
paged = no;
size = 40960;
page_size = 128;
num_pages = 320;
;
memory "hfuse"
size = 1;
;
memory "lfuse"
size = 1;
;
memory "lockbits"
size = 1;
;
memory "signature"
size = 3;
;
---------------------------------%<---------------------------------
On 08/24/2011 09:57 PM, Joerg Wunsch wrote:
>
hubert-b@... wrote:
>
>> I'm trying to add support for ATmega406 to the avrdude.conf but
>> apparently, this MCU does not support the "SPI Serial Instruction
>> Programming Set", so I don't know what to enter in the "pgm_enable",
>> "chip_erase", "read", "write", "loadpage", etc. sections.
>
> I think you could simply omit those in that case. The JTAG ICE code
> will never reference them anyway.
>
>> Can someone assist me on that? I already have the "JTAG Instruction
>> Programming Set" of the ATmega406, but those instructions are split
>> into a TDI and a TDO part.
>
> AVRDUDE doesn't talk JTAG by itself, it always relies on tools like
> the JTAGICEmkII or AVR Dragon for that. Thus, the low-level JTAG
> instructions are not needed here. (The communication with the ICE or
> Dragon is described in appnote AVR067, this is what AVRDUDE uses.)
>
_______________________________________________
AVR-chat mailing list
AVR-chat@...
https://lists.nongnu.org/mailman/listinfo/avr-chat