Forum: Mikrocontroller und Digitale Elektronik ATTiny 13 Software mittels Avrdude und usbasp kopieren?


von Kurti (Gast)


Lesenswert?

Hallo,

Nach intensiver Suche finde ich keine Lösung für folgendes problem:

Es gibt einen Roboter "Kurt" welcher mittels eines Attiny13 gesteuert 
wird.
http://www.sachsendreier.com/msw/projekte_und_experimente/roboter_kurt/

Die Sofwtare welche bereits auf einem Attiny 13 Programmiert ist, soll 
durch AVRDUDE mittels eines usbasp auf einen 2. Attiny13 dupliziert 
werden.

Leider funktioniert dass nicht wie vorgesehen:
Ich lese dass Flash folgendermaßen:
1
D:\Kurt>avrdude -B 4 -p t13 -c usbasp -U flash:r:kurt.hex:h
2
3
avrdude: set SCK frequency to 187500 Hz
4
avrdude: AVR device initialized and ready to accept instructions
5
6
Reading | ################################################## | 100% 0.02s
7
8
avrdude: Device signature = 0x1e9007
9
avrdude: reading flash memory:
10
11
Reading | ################################################## | 100% 0.63s
12
13
avrdude: writing output file "kurt.hex"
14
15
avrdude: safemode: Fuses OK
16
17
avrdude done.  Thank you.
Dies scheint zu funktionieren, es wird eine hex-Datei erstellt (2KB).

Hier dass schreiben:
1
D:\Wuerfel_ATTINY>avrdude -B 4 -p t13 -c usbasp -U flash:w:kurt.hex
2
3
avrdude: set SCK frequency to 187500 Hz
4
avrdude: AVR device initialized and ready to accept instructions
5
6
Reading | ################################################## | 100% 0.02s
7
8
avrdude: Device signature = 0x1e9007
9
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be perform
10
ed
11
         To disable this feature, specify the -D option.
12
avrdude: erasing chip
13
avrdude: set SCK frequency to 187500 Hz
14
avrdude: reading input file "kurt.hex"
15
avrdude: input file kurt.hex auto detected as invalid format
16
avrdude: invalid input file format: -1
17
avrdude: read from file 'kurt.hex' failed
18
19
avrdude: safemode: Fuses OK
20
21
avrdude done.  Thank you.

Was könnte der Grund für das invalid format sein?

von Kurti (Gast)


Lesenswert?

Lesen und flashen geschieht im selben verzeichniss.

Die Fuses sind bei beiden Controllern auf 0x6A / 0xff gesetzt.

von da1l6 (Gast)


Lesenswert?

Statt:
1
-U flash:r:kurt.hex:h

Versuch beim lesen mal mal
1
-U flash:r:kurt.hex:i
"i" für Intel Hex

und beim Schreiben auch.


Ansonsten kann es natürlich sein, das der Chip Auslese-geschützt ist, 
das sieht man wenn man ins Hex File guckt.

da1l6

von Kurti (Gast)


Lesenswert?

da1l6 schrieb:
> Statt:-U flash:r:kurt.hex:h
> Versuch beim lesen mal mal-U flash:r:kurt.hex:i"i" für Intel Hex
>
> und beim Schreiben auch.
>
> Ansonsten kann es natürlich sein, das der Chip Auslese-geschützt ist,
> das sieht man wenn man ins Hex File guckt.
>
> da1l6

Danke, es lag an dem "i", nun funktioniert es.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.