(avrdude) fuses auslesen

Gast #362771
Lesenswert?

AVRDUDE can be used effectively via the command line to read or write
all chip memory types (eeprom, flash, fuse bits, lock bits, signature
bytes) or via an interactive (terminal) mode.

Sollte also gehen, nur die Frage: wie.

probier ich gleich mal aus
Gast #362775
Lesenswert?

-o filename
Specifies the name of the output file to write, and causes the
respective memory area to be read from the MCU. Can be specified as ‘-’
to write to stdout.


also -o -
probier ich gleich mal aus
Gast #362779
Lesenswert?

hier nochmal eine Ausgabe von avrdude
1
me@system:~$ avrdude -p t13 -c avrispv2 -P /dev/ttyUSB0 -v -U
2
lfuse:r:-:i
3

4
avrdude: Version 5.0
5
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
6

7
         System wide configuration file is "/etc/avrdude.conf"
8
         User configuration file is "/home/me/.avrduderc"
9
         User configuration file does not exist or is not a regular
10
file, skipping
11

12
         Using Port            : /dev/ttyUSB0
13
         Using Programmer      : avrispv2
14
         AVR Part              : ATtiny13
15
         Chip Erase delay      : 4000 us
16
         PAGEL                 : P00
17
         BS2                   : P00
18
         RESET disposition     : dedicated
19
         RETRY pulse           : SCK
20
         serial program mode   : yes
21
         parallel program mode : yes
22
         Timeout               : 200
23
         StabDelay             : 100
24
         CmdexeDelay           : 25
25
         SyncLoops             : 32
26
         ByteDelay             : 0
27
         PollIndex             : 3
28
         PollValue             : 0x53
29
         Memory Detail         :
30

31
                                  Block Poll               Page        
32
              Polled
33
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages
34
MinW  MaxW   ReadBack
35
           ----------- ---- ----- ----- ---- ------ ------ ---- ------
36
----- ----- ---------
37
           eeprom        65     5     4    0 no         64    0      0 
38
4000  4000 0xff 0xff
39
           flash         65     6    32    0 yes      1024   32     32 
40
4500  4500 0xff 0xff
41
           signature      0     0     0    0 no          3    0      0 
42
   0     0 0x00 0x00
43
           lock           0     0     0    0 no          1    0      0 
44
4500  4500 0x00 0x00
45
           calibration    0     0     0    0 no          1    0      0 
46
   0     0 0x00 0x00
47
           lfuse          0     0     0    0 no          1    0      0 
48
4500  4500 0x00 0x00
49
           hfuse          0     0     0    0 no          1    0      0 
50
4500  4500 0x00 0x00
51

52
         Programmer Type : STK500V2
53
         Description     : Atmel AVR ISP V2
54
         Hardware Version: 15
55
         Firmware Version: 2.4
56
         Topcard         : Unknown
57
         Vtarget         : 0.0 V
58
         Varef           : 5.0 V
59
         Oscillator      : 3.686 MHz
60
         SCK period      : 0.1 us
61

62
avrdude: AVR device initialized and ready to accept instructions
63

64
Reading | ################################################## | 100%
65
0.02s
66

67
avrdude: Device signature = 0x1e9007
68
avrdude: safemode: lfuse reads as 75
69
avrdude: safemode: hfuse reads as FD
70
avrdude: reading lfuse memory:
71

72
Reading | ################################################## | 100%
73
0.01s
74

75
avrdude: writing output file "<stdout>"
76
:01000000758A
77
:00000001FF
78

79
avrdude: safemode: lfuse reads as 75
80
avrdude: safemode: hfuse reads as FD
81
avrdude: safemode: Fuses OK
82

83
avrdude done.  Thank you.

aber wie wird - zu <stdout> ?
ist das dokumentiert oder vorhersehbares verhalten?
Gast #362782
Lesenswert?

Steht im avrdude.pdf, Zitat habe ich doch oben (13:34) angegeben,
allerdings ohne Quellenangabe, aber Autor: inoffizieller WM-Rahul
Datum: 15.08.2006 13:17 hat ja schon den Tip mit dem PDF gegeben.

Was willst Du dann machen, die Bedeutung der einzelnen Bits anzeigen?
sollte mit einem kleinen Pipe-C-Programm leicht zu bewerkstelligen
sein.
cc heißt doch der Linux-Compiler, oder gibt es auch den gcc?

andere Möglichkeit: sed oder sonstige Script-Zeug.

Was mir aufgefallen ist, im -v (verbose-Mode) zeigt er sowieso die
Fuses an, kannst ja das direkt auswerten?
avrdude: Device signature = 0x1e9007
avrdude: safemode: lfuse reads as 75
avrdude: safemode: hfuse reads as FD
Gast #362783
Lesenswert?

oh, verzeihung. habe ich dann bei dir und im manual überlesen. d.h. in
der avrdude.info (5.1) steht es anscheinend gar nicht drin..

naja, ich fange gerade mit dem arbeiten unter linux an. momentan sind
die fuses zwar noch so, wie ich sie haben möchte, aber beim nächsten
controller möchte ich das ganze ohne avr-studio machen.

daß er beides ausgibt, habe ich auch gesehen - wie man damit umgeht,
ist die andere frage. ich dachte, da man im nächsten schritt die werte
binär braucht, gibt es vielleicht ein bordmittel zur umrechnung.

ich habe http://www.mikrocontroller.net/articles/AVR_und_Linux
angelegt, um die informationen einigermaßen sinnvoll zusammenzuführen.

aber vielleicht übersehe ich, daß es bereits ein frontend gibt!?

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren