Aaargh! Error reading using AVRDUDE and STK500v2

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I use:

/usr/bin/avrdude -C /etc/avrdude.conf -p m8535 -P /dev/ttyUSB0 -c stk500v2 -B 17.361 -U flash:r:/home/main/test.hex:a

to read the flash from ATMega8535

AVRDUDE reads it right, but I get an error:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.33s

avrdude: Device signature = 0x1e9308
avrdude: reading flash memory:

Reading | ################################################## | 100% 114.58s

avrdude: writing output file "/home/main/test.hex"
avrdude: output file /home/main/test.hex auto detected as invalid format
avrdude: invalid output file format: -1
avrdude: write to file '/home/main/test.hex' failed

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

I try to read EEPROM with:

/usr/bin/avrdude -C /etc/avrdude.conf -p m8535 -P /dev/ttyUSB0 -c stk500v2 -B 17.361 -U eeprom:r:/home/main/test-eeprom.hex:a

But I get:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.34s

avrdude: Device signature = 0x1e9308
avrdude: reading eeprom memory:

Reading | ################################################## | 100% 57.34s

avrdude: writing output file "/home/main/test-eeprom.hex"
avrdude: error opening /home/main/test-eeprom.hex: No such file or directory
avrdude: output file /home/main/test-eeprom.hex auto detected as invalid format
avrdude: invalid output file format: -1
avrdude: write to file '/home/main/test-eeprom.hex' failed

avrdude done.  Thank you.

/etc/avrdude.conf attached.
Any clue?

Attachment(s): 

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would guess that "/home/main" directory either is non-existent or you do not have permission.

I also suspect you want a regular Intel hex file.

/usr/bin/avrdude -C /etc/avrdude.conf -p m8535 -P /dev/ttyUSB0 -c stk500v2 -U eeprom:r:/home/main/test-eeprom.hex:i 

I do not know whether you need the -B option.

David.

p.s. I do not use avrdude.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That works, thanks!
I use the -B option in order to lower the speed, because with the high speed AVRDUDE can't communicate to the programmer.

Anyway, got it sorted. :)

-Angel Angelov
"Humans are stupid."
I'm probably working on a scratch-build rocket or on a PCB