Hi!
This actually worked! I just performed a quick test and it seems that I
can now read and write the flash for the ATmega406 using a AVR DRAGON in
JTAG mode. Thanks a lot :-)
I attached the working snipped, please include it in future avrdude
versions as it might be helpful to others.
Again thanks a lot and have a nice weekend!
HubertB
On 10/28/2011 03:15 PM, Joerg Wunsch wrote:
As [email protected] wrote:
I added the blocksize parameter to both the eeprom as well as the flash
section. Unfortunately reading the flash with -vvvv still reports
"block_size at addr 0 is 0".
This is all quite twisted. :-/
The block_size it refers to is actually the page size, however, in the
"paged_load" method, this is overridden by the "readsize" parameter.
(I changed a lot in that area recently, not sure whether that still
applies to the SVN version.)
So, please also add a "readsize" parameter. It can even be larger
than the page size, but must not exceed 256 (due to limitations of the
JTAG ICE protocol).
[...]
#------------------------------------------------------------
# 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;
# Commenting "page_size" and "num_pages" enables eeprom reading!
memory "eeprom"
paged = no;
size = 512;
page_size = 4;
blocksize = 4;
readsize = 4;
num_pages = 128;
;
memory "flash"
paged = yes;
size = 40960;
page_size = 128;
blocksize = 128;
readsize = 128;
num_pages = 320;
;
memory "hfuse"
size = 1;
;
memory "lfuse"
size = 1;
;
memory "lockbits"
size = 1;
;
memory "signature"
size = 3;
;
;
[...]
_______________________________________________
AVR-chat mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-chat