avrdude crashes when eeprom is read

Bug #1400185 reported by psl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
avrdude (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 14.04.1 i386
avrdudude 6.0.1-1

I try to read EEPROM from Arduino board (ATmega328p) with USBtiny ISP programmer.

FIRST
It crashed regularly. There is a report that free() detected memory allocation problem. EEPROM is empty, all 0xff; this can be important to replicate this crash.

# avrdude -c usbtiny -p m328p -U eeprom:r:xx.bin:r

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

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

Reading | ################################################## | 100% 17.15s

avrdude: writing output file "xx.bin"

avrdude: safemode: Fuses OK (H:05, E:DA, L:FF)

avrdude done. Thank you.

*** Error in `avrdude': free(): invalid next size (normal): 0x093d5360 ***
Aborted (core dumped)

SECOND
When I write data to EEROM, it can be all 0xff, I read back different data and verification fails. It is good that it is detected but 100% of EEPROM is read to find that the first byte doesn't match. This can be improved, USBtiny is slow...

THIRD
Write data to EEPROM doesn't work, see previous point.
# avrdude -c usbtiny -p m328p -U eeprom:w:xx.bin:r

I tried USBasp programmer to the the same with Arduino and it works good so my troubles are related to USBtiny programmer. I cannot say if problem is in avrdude or in firmware of USBtiny programmer.

Revision history for this message
Greg Beam (ki7mt) wrote :

While this is Electronics, but does it belong to the ubuntu-hams-devel group? It looks like a direct import, as the maintainer is from Debian.

Revision history for this message
psl (slansky) wrote :

The original post was with USBtiny with firmware 1.04. I upgraded USBtiny to 1.07 and I still can observe this problem.

To find USBtiny firmware version:

$ sudo lsusb -v | grep -A2 0x1781
  idVendor 0x1781 Multiple Vendors
  idProduct 0x0c9f USBtiny
  bcdDevice 1.07

And I want to add another bug with avrdude (or USBasp). I see it when I work with AT90S2313, it is legacy chip that was replaced with ATtiny2313. I can read flash only once, when I try to read it for second time, I get an error. I have to replug my USBasp programmer and I can read flash again. It is 100% repeatable pattern.

Read flash of AT90S2313, first time, we can read it:

$ sudo avrdude -c usbasp -p at90s2313 -U flash:r:xx.bin:r -F -B5

avrdude: set SCK frequency to 187500 Hz
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

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

Reading | ################################################## | 100% 8.19s

avrdude: writing output file "xx.bin"

avrdude done. Thank you.

Try again, and we have an error, target doesn't answer:

$ sudo avrdude -c usbasp -p at90s2313 -U flash:r:xx.bin:r -F -B5

avrdude: set SCK frequency to 187500 Hz
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x588460
avrdude: Expected signature for AT90S2313 is 1E 91 01

avrdude done. Thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.