Forum: Mikrocontroller und Digitale Elektronik AVRDUDE kann Datei nicht erstellen


von Marek N. (Gast)


Lesenswert?

Guten Abend,

ich plage mich derzeit ein bisschen mit dem Programm AVRDUDE unter 
Windows XP rum.
Als Programmier-Adapter verwende ich einen selbstgebauten AVR-Doper, der 
aber soweit zu funktionieren scheint.

Mein Problem ist, ich kann mit AVRDUDE keinen Dump vom Controller 
erstellen. Auch nicht von einem leeren.

Die Kommunikation mit dem Controller scheint soweit zu klappen, da ich 
ja die Signature und Fuse-Bits auslesen kann, aber der Dude meint immer, 
dass ein ungültiges Dateiformat vorliegt.

Irgendwelche Ideen?

Beste Grüße, Marek

Anbei mal die Ausgabe

Lesen:
1
D:\Programme\avrdude>avrdude -c stk500v2 -p m8 -P avrdoper -v -U flash:r:lese.hex
2
3
avrdude: Version 5.5, compiled on Nov  8 2007 at 16:08:45
4
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
5
6
         System wide configuration file is "D:\Programme\avrdude\avrdude.conf"
7
8
         Using Port            : avrdoper
9
         Using Programmer      : stk500v2
10
         AVR Part              : ATMEGA8
11
         Chip Erase delay      : 10000 us
12
         PAGEL                 : PD7
13
         BS2                   : PC2
14
         RESET disposition     : dedicated
15
         RETRY pulse           : SCK
16
         serial program mode   : yes
17
         parallel program mode : yes
18
         Timeout               : 200
19
         StabDelay             : 100
20
         CmdexeDelay           : 25
21
         SyncLoops             : 32
22
         ByteDelay             : 0
23
         PollIndex             : 3
24
         PollValue             : 0x53
25
         Memory Detail         :
26
27
                                  Block Poll               Page                       Polled
28
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
29
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
30
           eeprom         4    20   128    0 no        512    0      0  9000  9000 0xff 0xff
31
           flash         33    10    64    0 yes      8192   64    128  4500  4500 0xff 0x00
32
           lfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
33
           hfuse          0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
34
           lock           0     0     0    0 no          1    0      0  2000  2000 0x00 0x00
35
           calibration    0     0     0    0 no          4    0      0     0     0 0x00 0x00
36
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
37
38
         Programmer Type : STK500V2
39
         Description     : Atmel STK500 Version 2.x firmware
40
         Programmer Model: STK500
41
         Hardware Version: 1
42
         Firmware Version: 2.04
43
         Topcard         : STK501
44
         Vtarget         : 0.0 V
45
         Varef           : 0.0 V
46
         Oscillator      : 1.229 MHz
47
         SCK period      : 2.2 us
48
49
avrdude: AVR device initialized and ready to accept instructions
50
51
Reading | ################################################## | 100% 0.05s
52
53
avrdude: Device signature = 0x1e9307
54
avrdude: safemode: lfuse reads as E1
55
avrdude: safemode: hfuse reads as D9
56
avrdude: reading flash memory:
57
58
Reading | ################################################## | 100% 40.67s
59
60
avrdude: writing output file "lese.hex"
61
avrdude: output file lese.hex auto detected as invalid format
62
avrdude: invalid output file format: -1
63
avrdude: write to file 'lese.hex' failed
64
65
avrdude: safemode: lfuse reads as E1
66
avrdude: safemode: hfuse reads as D9
67
avrdude: safemode: Fuses OK
68
69
avrdude done.  Thank you.
70
71
72
D:\Programme\avrdude>

von Alexander S. (knut740)


Lesenswert?

Marek N. schrieb:
> avrdude -c stk500v2 -p m8 -P avrdoper -v -U flash:r:lese.hex

Probiere mal

avrdude -c stk500v2 -p m8 -P avrdoper -v -U flash:r:lese.hex:h

also mit der Formatangabe :h (oder d, b) am Schluß

mfg

von Marek N. (Gast)


Lesenswert?

Hi und vielen Dank,

der Parameter "h" hilft tatsächlich! Erstaunlich, dass ich ihn zum 
beschreiben nicht unbedingt brauchte.
Oki, dann kann ich mal weitermuddeln.

Beste Grüße, Marek

von Randy (Gast)


Lesenswert?

> Erstaunlich, dass ich ihn zum
> beschreiben nicht unbedingt brauchte.

Da steckt durchaus Logik drin, beim schreiben kann der Dude ja sehen in 
welchem Format die Daten kommen. Beim lesen muß er aber wissen welches 
Format gewünscht wird.

von Mike (Gast)


Lesenswert?

Danke Alexander!

von Oliver J. (skriptkiddy)


Lesenswert?

Marek N. schrieb:
> der Parameter "h" hilft tatsächlich!
Damit erzeugst du aber kein Intel-Hexfile.

avrdude Manpages:
1
i    Intel Hex
2
3
s    Motorola S-record
4
5
r    raw binary; little-endian byte order, in the case of
6
                        the flash ROM data
7
8
m    immediate; actual byte values specified on the command
9
     line, separated by commas or spaces.  This is good for
10
     programming fuse bytes without having to create a sin‐
11
     gle-byte file or enter terminal mode.
12
13
a    auto detect; valid for input only, and only if the
14
     input is not provided at stdin.
15
16
d    decimal; this and the following formats are only valid
17
     on output.  They generate one line of output for the
18
     respective memory section, forming a comma-separated
19
     list of the values.  This can be particularly useful
20
     for subsequent processing, like for fuse bit settings.
21
22
h    hexadecimal; each value will get the string 0x
23
     prepended.
24
25
o    octal; each value will get a 0 prepended unless it is
26
     less than 8 in which case it gets no prefix.
27
28
b    binary; each value will get the string 0b prepended.

Gruß Oliver

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.