EEPROM programming from extracted ELF data.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

EEPROM programming from extracted ELF data.

Erik Christiansen-2
I'm back to fiddling with AVRs again, after a long absence, and have
this eeprom addressing error from avrdude:

avrdude: reading input file "obj/eeprom.srec"
avrdude: input file obj/eeprom.srec auto detected as Motorola S-Record
avrdude: ERROR: address 0x810008 out of range at line 2 of obj/eeprom.srec
avrdude: read from file 'obj/eeprom.srec' failed

That's in response to this make target:

$ make load
avrdude -P /dev/ttyUSB0 -p t2313 -c stk500 -e -U flash:w:obj/flash.srec \
                                              -U eeprom:w:obj/eeprom.srec

and the flash & eeprom programming files are created with:

avr-objcopy -O srec obj/dimmer.elf -S -R .eeprom --gap-fill=0xff obj/flash.srec
avr-objcopy -O srec obj/dimmer.elf -S -j .eeprom --gap-fill=0xff obj/eeprom.srec

The EEPROM data file is:

$ more obj/eeprom.srec

And avr-objdump -h shows:

Idx Name          Size      VMA       LMA       File off  Algn
  2 .eeprom       00000008  00810000  00810000  000005d8  2**0
                  CONTENTS, ALLOC, LOAD, DATA

So the question in my mind is: Given the appended ninth byte (6A) in
obj/eeprom.srec has to be just an srec line checksum, why is avrdude
objecting? As avr-objdump confirms, my .eeprom segment data comprises
only bytes 0 to 7, i.e. 8 bytes. And avr-objdump concurs:

Disassembly of section .eeprom:

00810000 <__eeprom_end-0x8>:
  810000:   07 ff          sbrs  r16, 7
  810002:   ff 07          cpc   r31, r31
  810004:   ff ff          .word 0xffff   ; ????
  810006:   ff ff          .word 0xffff   ; ????


AVR-chat mailing list
[hidden email]