Hey, Ich habe ein kleines Problem beim Programmieren von meinem kleinen ATmega88. Ich nutze dazu ein Programmierboard namens MySmartUSB. Wenn ich nun versuche das Gerät anzusprechen kommt folgendes. # avrdude -P /dev/micro/mySmartUSB -p m88 -c avr910 avrdude: ser_open(): can't set attributes for device "/dev/micro/mySmartUSB": Inappropriate ioctl for device # ls -l /dev/micro/mySmartUSB crw-rw-r-- 1 root uucp 189, 130 31. Mär 20:34 /dev/micro/mySmartUSB Das Device gibt es auch. Nun hab ich mal angefangen zu suchen. Dabei bin ich auf folgendes gestoßen. Der Eintrag der avrdude.conf für den ATmega88 sieht folgendermaßen aus. #------------------------------------------------------------ # ATmega88 #------------------------------------------------------------ part id = "m88"; desc = "ATMEGA88"; [...] stk500_devcode = 0x73; # avr910_devcode = 0x; Das MySmartUSB-Board wird mittels avr910 angesprochen. Jedoch gibt es dort keinen devcode. Hat jemand ne Ahnung, wo ich den Devcode her bekomme? Bzw wie ich den selbst ermitteln kann? mfg sep
Dummerweise wird, soweit ich weiß, die Software für AN910 nicht mehr gepflegt. Es ist dann klar, dass der atmega88 da nicht mehr auftaucht. Bei einem 910-progger von Klaus Leidinger steht als "device code not official 0x33" Das file ist bei mir als avr910_213_v38b.asm abgelegt, vielleicht findest Du es bei Leidingers homepage wieder. Ich drück die Daumen.
Mit der avrdude Version >= 5.6 kannst du mit -x devcode=0x76 den Devicecode des Mega 8 übergeben, damit sollte es funktionieren. Grüße, Klaus
Hier der Link zur detaillierteren Beschreibung http://www.klaus-leidinger.de/mp/Mikrocontroller/AVR-Prog/AVR-Programmer.html#updates
Danke. Also ich habe nun erstmal avrdude-5.10 installiert und dann mal mit -x devcode ein bisschen rum gespielt. Auf der Seite von Klaus Ledinger habe ich auch schon ein bisschen was gefunden und ausprobiert. Auch den Devicecode 0x33 leider ohne Erfolg. Devcode 0x76 brachte auch nicht den Erfolg. Leider. Ich habe mittels einer UDEV-Regel den Deviceknoten gesetzt. Die Regel sieht wie folgt aus. # cat ~/50-mySmart.rules SUBSYSTEM=="usb", ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", ATTR{bcdDevice}=="0211", NAME="micro/mySmartUSB", GROUP="uucp", MODE="0760" Kann das sonst auch damit zusammenhängen?
Also, udevregel natürlich nicht im Home-Verzeichnis, sondern in /etc/udev/rules.d/50-mySmart.rules
sep schrieb: > Auch den Devicecode 0x33 leider ohne Erfolg. Devcode 0x76 brachte auch > nicht den Erfolg. 0x33 funktioniert nur mit der Firmware von meiner Seite, wenn 0x76 nicht geht, dann ist das beim myAVR Programmer anders implementiert als bei avr910. Probiere bitte mal avrdude -P /dev/micro/mySmartUSB -p m88 -c avr910 -v -v ( 2x -v !) Dann sollte eine Liste kommen: "Programmer supports the following devices" Da siehst Du die dem Programmer bekannten Devicecodes und die von avrdude dazu gelisteten Devices. HTH, Klaus
Also, das ist mir nun echt peinlich. Man sollte auch schon den Treiber für cp210x im kernel aktivieren. Denn das ist der USB to Serial Converter, welcher auf dem MySmartUSB verbaut ist. Dann funktioniert auc der avr910_devcode = 0x33 Danke für eure Hilfe und Sry für den Aufwand.
sep schrieb: > Dann funktioniert auc der avr910_devcode = 0x33 Das ist ja interessant. Wenn der in MyAVR anthalten ist, kannst Du auch die avrdude.conf entsprechend modifizieren, dann brauchst Du -x devode nicht mehr. Kannst Du mal die vorhandene deviceliste hier posten? ( -v -v ) Danke, Klaus
Ich geb dir mal die komplette Ausgabe. Komisch nur, die Option -F brauche ich weil er mir ansonsten eine Warnung gibt, da die Signatur nicht stimmt. Bekomm ich das noch ein bisschen eleganter hin? Und in meiner avrdude.conf ist schon avr910_devcode = 0x33 beim m88 enthalten.
1 | $ avrdude -p m88 -c avr910 -P /dev/micro/mySmartUSB -v -v -F |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | Using Port : /dev/ttyUSB0 |
12 | Using Programmer : avr910 |
13 | avr910_devcode (avrdude.conf) : 0x33 |
14 | AVR Part : ATMEGA88 |
15 | Chip Erase delay : 9000 us |
16 | PAGEL : PD7 |
17 | BS2 : PC2 |
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 Polled |
32 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
33 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
34 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
35 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
36 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
37 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
38 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
39 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
40 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
41 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
42 | |
43 | Programmer Type : avr910 |
44 | Description : Atmel Low Cost Serial Programmer |
45 | |
46 | Found programmer: Id = "AVR ISP"; type = S |
47 | Software Version = 2.5; Hardware Version = 2.0 |
48 | Programmer supports auto addr increment. |
49 | Programmer supports buffered memory access with buffersize = 8 bytes. |
50 | |
51 | Programmer supports the following devices: |
52 | Device code: 0x01 = (unknown) |
53 | Device code: 0x02 = (unknown) |
54 | Device code: 0x03 = (unknown) |
55 | Device code: 0x04 = (unknown) |
56 | Device code: 0x05 = (unknown) |
57 | Device code: 0x06 = (unknown) |
58 | Device code: 0x07 = (unknown) |
59 | Device code: 0x08 = (unknown) |
60 | Device code: 0x09 = (unknown) |
61 | Device code: 0x0a = (unknown) |
62 | Device code: 0x0b = (unknown) |
63 | Device code: 0x0c = (unknown) |
64 | Device code: 0x0d = (unknown) |
65 | Device code: 0x0e = (unknown) |
66 | Device code: 0x0f = (unknown) |
67 | Device code: 0x10 = (unknown) |
68 | Device code: 0x11 = (unknown) |
69 | Device code: 0x12 = (unknown) |
70 | Device code: 0x13 = AT90S1200 |
71 | Device code: 0x14 = (unknown) |
72 | Device code: 0x15 = (unknown) |
73 | Device code: 0x16 = (unknown) |
74 | Device code: 0x17 = (unknown) |
75 | Device code: 0x18 = (unknown) |
76 | Device code: 0x19 = (unknown) |
77 | Device code: 0x1a = (unknown) |
78 | Device code: 0x1b = (unknown) |
79 | Device code: 0x1c = (unknown) |
80 | Device code: 0x1d = (unknown) |
81 | Device code: 0x1e = (unknown) |
82 | Device code: 0x1f = (unknown) |
83 | Device code: 0x20 = ATtiny84 |
84 | Device code: 0x21 = (unknown) |
85 | Device code: 0x22 = (unknown) |
86 | Device code: 0x23 = (unknown) |
87 | Device code: 0x24 = (unknown) |
88 | Device code: 0x25 = (unknown) |
89 | Device code: 0x26 = (unknown) |
90 | Device code: 0x27 = (unknown) |
91 | Device code: 0x28 = AT90S4414 |
92 | Device code: 0x29 = (unknown) |
93 | Device code: 0x2a = (unknown) |
94 | Device code: 0x2b = (unknown) |
95 | Device code: 0x2c = (unknown) |
96 | Device code: 0x2d = (unknown) |
97 | Device code: 0x2e = (unknown) |
98 | Device code: 0x2f = (unknown) |
99 | Device code: 0x30 = AT90S4433 |
100 | Device code: 0x31 = (unknown) |
101 | Device code: 0x32 = (unknown) |
102 | Device code: 0x33 = ATMEGA88 |
103 | Device code: 0x34 = AT90S2333 |
104 | Device code: 0x35 = (unknown) |
105 | Device code: 0x36 = (unknown) |
106 | Device code: 0x37 = (unknown) |
107 | Device code: 0x38 = AT90S8515 |
108 | Device code: 0x39 = (unknown) |
109 | Device code: 0x3a = ATMEGA8515 |
110 | Device code: 0x3b = (unknown) |
111 | Device code: 0x3c = (unknown) |
112 | Device code: 0x3d = (unknown) |
113 | Device code: 0x3e = (unknown) |
114 | Device code: 0x3f = (unknown) |
115 | Device code: 0x40 = (unknown) |
116 | Device code: 0x41 = ATMEGA103 |
117 | Device code: 0x42 = (unknown) |
118 | Device code: 0x43 = ATMEGA128 |
119 | Device code: 0x44 = (unknown) |
120 | Device code: 0x45 = ATMEGA64 |
121 | Device code: 0x46 = (unknown) |
122 | Device code: 0x47 = (unknown) |
123 | Device code: 0x48 = (unknown) |
124 | Device code: 0x49 = (unknown) |
125 | Device code: 0x4a = (unknown) |
126 | Device code: 0x4b = (unknown) |
127 | Device code: 0x4c = AT90S2343 |
128 | Device code: 0x4d = (unknown) |
129 | Device code: 0x4e = (unknown) |
130 | Device code: 0x4f = (unknown) |
131 | Device code: 0x50 = (unknown) |
132 | Device code: 0x51 = (unknown) |
133 | Device code: 0x52 = (unknown) |
134 | Device code: 0x53 = (unknown) |
135 | Device code: 0x54 = (unknown) |
136 | Device code: 0x55 = ATtiny12 |
137 | Device code: 0x56 = ATtiny15 |
138 | Device code: 0x57 = (unknown) |
139 | Device code: 0x58 = (unknown) |
140 | Device code: 0x59 = (unknown) |
141 | Device code: 0x5a = (unknown) |
142 | Device code: 0x5b = (unknown) |
143 | Device code: 0x5c = (unknown) |
144 | Device code: 0x5d = (unknown) |
145 | Device code: 0x5e = ATtiny2313 |
146 | Device code: 0x5f = (unknown) |
147 | Device code: 0x60 = ATMEGA161 |
148 | Device code: 0x61 = (unknown) |
149 | Device code: 0x62 = (unknown) |
150 | Device code: 0x63 = ATMEGA162 |
151 | Device code: 0x64 = ATMEGA163 |
152 | Device code: 0x65 = (unknown) |
153 | Device code: 0x66 = (unknown) |
154 | Device code: 0x67 = (unknown) |
155 | Device code: 0x68 = AT90S8535 |
156 | Device code: 0x69 = ATMEGA8535 |
157 | Device code: 0x6a = (unknown) |
158 | Device code: 0x6b = (unknown) |
159 | Device code: 0x6c = AT90S4434 |
160 | Device code: 0x6d = (unknown) |
161 | Device code: 0x6e = (unknown) |
162 | Device code: 0x6f = (unknown) |
163 | Device code: 0x70 = (unknown) |
164 | Device code: 0x71 = (unknown) |
165 | Device code: 0x72 = ATMEGA32 |
166 | Device code: 0x73 = (unknown) |
167 | Device code: 0x74 = ATMEGA6450 |
168 | Device code: 0x75 = ATMEGA6490 |
169 | Device code: 0x76 = ATMEGA8 |
170 | Device code: 0x77 = (unknown) |
171 | Device code: 0x78 = ATMEGA169 |
172 | Device code: 0x79 = (unknown) |
173 | Device code: 0x7a = (unknown) |
174 | Device code: 0x7b = (unknown) |
175 | Device code: 0x7c = (unknown) |
176 | Device code: 0x7d = (unknown) |
177 | Device code: 0x7e = (unknown) |
178 | Device code: 0x7f = (unknown) |
179 | |
180 | avrdude: avr910_devcode selected: 0x01 |
181 | avrdude: AVR device initialized and ready to accept instructions |
182 | |
183 | Reading | ################################################## | 100% 0.11s |
184 | |
185 | avrdude: Device signature = 0x000000 |
186 | avrdude: Yikes! Invalid device signature. |
187 | avrdude: Expected signature for ATMEGA88 is 1E 93 0A |
188 | |
189 | avrdude: safemode: Fuses OK |
190 | |
191 | avrdude done. Thank you. |
Aha, da haben die Jungs einfach nur alle Hexcodes zurückgegeben. Die Ausgabe sieht aber aus, als ob die Signatur nicht gelesen werden kann, außerdem wird als Devicecode 0x01 angezeigt. Sieht so aus, als ob er MyAVR ein etwas anderes Protokoll benutzt als das standart avr910. Funktioniert denn das brennen/auslesen? Gib bitte noch mal den Befehl mit 4x -v an, dann kommen noch mehr Infos, und poste die mal (den Teil mit den Hexcodes kannst Du dann rauslassen damit es kürzer wird.
hallo, das ist mir auch schon aufgefallen dass der MK2 von myAVR auf anfrage mit dude alle device-codes als bekannt ausspuckt... auf anfrage bei denen kam heraus dass die in der firmware die signaturen direkt auswerten und auf den 910er device-code eigentlich nur protokollhalber antworten... ursache sei wohl dass diese devicecodes nicht mehr wirklich offiziell gepflegt würden... problem dabei ist nur dass die die alten AT90Sxxx Siganturen von abgekündigten MCUs in den aktuellen Firmwarevarianten des MK2 nicht mehr enthalten sind so muss man für eine alte MCU aus den Tiefen der Bastelkiste auch mal ne ältere MK2-Firmware in den Programmer schießen ;-) also ich mach mit meinem MK2-Board viel mit dem m48 bis m328 und der flasht und fuset problemlos... und besser ist auch dem MK2 als 911er anzusprechen dann macht er im blockmode auch recht flott los Grüße Rene
@Rene, ja, wegen der unsupporteten Devicecodes haben wir -x devcode=0xnn in avrdude eingebaut ;-) den Blockmode macht er auch als avr910 (ab avrdude 5.6) ich vermute aber, das das setzen des Devicecode eventuell nicht vom Programmer unterstützr wird. avrdude wertet leider die Signatur nicht aus. Mal sehen was das Protokoll sagt, da sollte man es erkennen können.
1 | $ avrdude -p m88 -c avr910 -P /dev/micro/mySmartUSB -v -v -v -v |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | Using Port : /dev/micro/mySmartUSB |
12 | Using Programmer : avr910 |
13 | avr910_devcode (avrdude.conf) : 0x33 |
14 | AVR Part : ATMEGA88 |
15 | Chip Erase delay : 9000 us |
16 | PAGEL : PD7 |
17 | BS2 : PC2 |
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 Polled |
32 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
33 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
34 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
35 | Block Poll Page Polled |
36 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
37 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
38 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
39 | Block Poll Page Polled |
40 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
41 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
42 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
43 | Block Poll Page Polled |
44 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
45 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
46 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
47 | Block Poll Page Polled |
48 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
49 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
50 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
51 | Block Poll Page Polled |
52 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
53 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
54 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
55 | Block Poll Page Polled |
56 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
57 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
58 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
59 | Block Poll Page Polled |
60 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
61 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
62 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
63 | |
64 | Programmer Type : avr910 |
65 | Description : Atmel Low Cost Serial Programmer |
66 | |
67 | avrdude: Send: S [53] |
68 | avrdude: Recv: A [41] V [56] R [52] [20] I [49] S [53] P [50] |
69 | avrdude: Send: V [56] |
70 | avrdude: Recv: 2 [32] 5 [35] |
71 | avrdude: Send: v [76] |
72 | avrdude: Recv: 2 [32] 0 [30] |
73 | avrdude: Send: p [70] |
74 | avrdude: Recv: S [53] |
75 | Found programmer: Id = "AVR ISP"; type = S |
76 | Software Version = 2.5; Hardware Version = 2.0 |
77 | avrdude: Send: a [61] |
78 | avrdude: Recv: Y [59] |
79 | Programmer supports auto addr increment. |
80 | avrdude: Send: b [62] |
81 | avrdude: Recv: Y [59] |
82 | avrdude: Recv: . [00] |
83 | avrdude: Recv: . [08] |
84 | Programmer supports buffered memory access with buffersize = 8 bytes. |
85 | avrdude: Send: t [74] |
86 | |
87 | Programmer supports the following devices: |
88 | |
89 | [...] |
90 | |
91 | avrdude: Send: T [54] 3 [33] |
92 | avrdude: Recv: . [0d] |
93 | avrdude: avr910_devcode selected: 0x33 |
94 | avrdude: Send: P [50] |
95 | avrdude: Recv: . [0d] |
96 | avrdude: AVR device initialized and ready to accept instructions |
97 | |
98 | Reading | | 0% 0.00savrdude: Send: s [73] |
99 | avrdude: Recv: . [00] . [00] . [00] |
100 | Reading | ################################################## | 100% 0.11s |
101 | |
102 | avrdude: Device signature = 0x000000 |
103 | avrdude: Yikes! Invalid device signature. |
104 | Double check connections and try again, or use -F to override |
105 | this check. |
106 | |
107 | avrdude: Send: L [4c] |
108 | avrdude: Recv: . [0d] |
109 | |
110 | avrdude done. Thank you. |
Dort erst einmal die Ausgabe von AVRDude. Das auslesen werd ich mal gleich probieren... Das macht er anscheinend. Ich sitz nun leider nicht vor dem Gerät, sondern bin per Remote dabei. Also kann ich das nicht zu 100% sagen. Aber avrdude läuft problemlos.
1 | $ avrdude -pm88 -c avr910 -P /dev/micro/mySmartUSB -F -V -Uflash:w:/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex:a |
2 | |
3 | Found programmer: Id = "AVR ISP"; type = S |
4 | Software Version = 2.5; Hardware Version = 2.0 |
5 | Programmer supports auto addr increment. |
6 | Programmer supports buffered memory access with buffersize = 8 bytes. |
7 | |
8 | [...] |
9 | |
10 | avrdude: AVR device initialized and ready to accept instructions |
11 | |
12 | Reading | ################################################## | 100% 0.11s |
13 | |
14 | avrdude: Device signature = 0x000000 |
15 | avrdude: Yikes! Invalid device signature. |
16 | avrdude: Expected signature for ATMEGA88 is 1E 93 0A |
17 | avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed |
18 | To disable this feature, specify the -D option. |
19 | avrdude: erasing chip |
20 | avrdude: reading input file "/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex" |
21 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
22 | avrdude: writing flash (910 bytes): |
23 | |
24 | Writing | ################################################## | 100% 20.95s |
25 | |
26 | avrdude: 910 bytes of flash written |
27 | |
28 | avrdude done. Thank you. |
29 | |
30 | avrdude finished |
seltsam, beim ersten Versuch oben kam die Meldung: > avrdude: avr910_devcode selected: 0x01 obwohl die Parameter richtig erkannt waren: > Using Port : /dev/micro/mySmartUSB > Using Programmer : avr910 > avr910_devcode (avrdude.conf) : 0x33 > AVR Part : ATMEGA88 Beim zweiten mal war alles so wie erwartet: > avrdude: Send: T [54] 3 [33] #Devicecode wird wie erwartet gesetzt > avrdude: Recv: . [0d] > avrdude: avr910_devcode selected: 0x33 Du schaltest beim brennenn das verification ab: > avrdude -pm88 -c avr910 -P /dev/micro/mySmartUSB -F -V -Uflash:w:.... lass mal das -V weg, ich vermute das gibt eine Fehlermeldung. Ich bin der Meinung, das die ISP Verbindung zum Mega88 nicht klappt, deshalb kann er die Signatur nicht lesen. Welcher Takt ist demm am Mega88 ? Eventuell ist er auch verfust...
>Komisch nur, die Option -F >brauche ich weil er mir ansonsten eine Warnung gibt, da die Signatur >nicht stimmt. Logo, durch -F wird alles besser. Denkste. -F ist so ziemlich das dümmste und gefährlichste was man an Parametern angeben kann. Versuch bloß nicht damit die Fuses oder das Flash zu brennen.
mal ganz abgesehen davon ob der MK2 alle dude-optionen 1:1 unterstützt ist es schon interessant zu schauen was sagt denn das progTool vom Hersteller? wenn das dran kommt kann man zumindest davon ausgehen, dass die ISP-Verbindung zum m88 steht. @Klaus L. wie es scheint arbeitest du mit an dude... habt ihr nicht mal überlegt den mk2 direkt in dude als programmer mit aufzunehmen? soweit ich das bisjetzt gelesen habe ist deren eigenes protokoll ja offengelegt... die BASCOM-jungs haben soweit ich das in der letzten Version richtig gesehen habe den MK2 inzwischen als direkt Unterstützung in der Programmerliste ;-) Grüße R.
@Rene: so wie das für mich bis jetzt aussieht unterstützt der MK2 ja ganz originl das AVR910 Protokoll, inklusive Blockmode und setzen des Devicecodes. das wollte ich ja mit den ausführlichen Protokollen seh. Bei avrdude ist es wohl so wie bei den meisten OpenSource Projekten, wer ein Interesse an einer bestimmten Funktion hat baut die halt ein. Ich habe vor einiger Zeit den Blockmode von avr109 bzw. Butterfly in das AVR910 Protokoll wieder zurück implementiert (der war da schon mal drin, ist aber in einer Version mal rausgeflogen, weil in AVR910 nicht beschrieben) Außerdem eben den devcode=nn mit Jörg W., weil die AVR910 Programmer nicht auszurotten sind, und weil es unterschiedliche Devicecodes für die neueren Controller gibt ;-) So wie ich das bis jetzt sehe braucht es keine Änderung für den MK2. Mal sehen ob sep noch weitere Infos postet. Grüße, Klaus
Hey, Sry ich war nun am Wochenende weg gewesen und war abgeschnitten. ^^ Nun hab ich die Option -V einfach nochmal weg gelassen. -F war gesetzt. Folgendes als Output.
1 | $ avrdude -pm88 -cavr910 -P/dev/micro/mySmartUSB -F -D -Uflash:w:/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex:a -v -v |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | Using Port : /dev/micro/mySmartUSB |
12 | Using Programmer : avr910 |
13 | avr910_devcode (avrdude.conf) : 0x33 |
14 | AVR Part : ATMEGA88 |
15 | Chip Erase delay : 9000 us |
16 | PAGEL : PD7 |
17 | BS2 : PC2 |
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 Polled |
32 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
33 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
34 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
35 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
36 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
37 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
38 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
39 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
40 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
41 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
42 | |
43 | Programmer Type : avr910 |
44 | Description : Atmel Low Cost Serial Programmer |
45 | |
46 | Found programmer: Id = "AVR ISP"; type = S |
47 | Software Version = 2.5; Hardware Version = 2.0 |
48 | Programmer supports auto addr increment. |
49 | Programmer supports buffered memory access with buffersize = 8 bytes. |
50 | |
51 | Programmer supports the following devices: |
52 | […] |
53 | |
54 | avrdude: avr910_devcode selected: 0x01 |
55 | avrdude: AVR device initialized and ready to accept instructions |
56 | |
57 | Reading | ################################################## | 100% 0.11s |
58 | |
59 | avrdude: Device signature = 0x000000 |
60 | avrdude: Yikes! Invalid device signature. |
61 | avrdude: Expected signature for ATMEGA88 is 1E 93 0A |
62 | avrdude: safemode: lfuse reads as 0 |
63 | avrdude: safemode: hfuse reads as 0 |
64 | avrdude: safemode: efuse reads as 0 |
65 | avrdude: reading input file "/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex" |
66 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
67 | avrdude: writing flash (910 bytes): |
68 | |
69 | Writing | ################################################## | 100% 20.94s |
70 | |
71 | |
72 | |
73 | avrdude: 910 bytes of flash written |
74 | avrdude: verifying flash memory against /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
75 | avrdude: load data flash data from input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
76 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
77 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex contains 910 bytes |
78 | avrdude: reading on-chip flash data: |
79 | |
80 | Reading | ################################################## | 100% 16.44s |
81 | |
82 | |
83 | |
84 | avrdude: verifying ... |
85 | avrdude: verification error, first mismatch at byte 0x0000 |
86 | 0x19 != 0x00 |
87 | avrdude: verification error; content mismatch |
88 | |
89 | avrdude: safemode: lfuse reads as 0 |
90 | avrdude: safemode: hfuse reads as 0 |
91 | avrdude: safemode: efuse reads as 0 |
92 | avrdude: safemode: Fuses OK |
93 | |
94 | avrdude done. Thank you. |
Als devcode wird wieder 0x01 genutzt. Weiterhin scheint nichts auf dem µC zu sein. Komisch. So wie es scheint, werden die Fuses ebenso nicht ordentlich ausgelesen. Hier mal die lange Ausgabe.
1 | $ avrdude -pm88 -cavr910 -P/dev/micro/mySmartUSB -F -D -Uefuse:r:-:i -v -v -v -v |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | Using Port : /dev/micro/mySmartUSB |
12 | Using Programmer : avr910 |
13 | avr910_devcode (avrdude.conf) : 0x33 |
14 | AVR Part : ATMEGA88 |
15 | Chip Erase delay : 9000 us |
16 | PAGEL : PD7 |
17 | BS2 : PC2 |
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 Polled |
32 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
33 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
34 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
35 | Block Poll Page Polled |
36 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
37 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
38 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
39 | Block Poll Page Polled |
40 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
41 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
42 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
43 | Block Poll Page Polled |
44 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
45 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
46 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
47 | Block Poll Page Polled |
48 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
49 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
50 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
51 | Block Poll Page Polled |
52 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
53 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
54 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
55 | Block Poll Page Polled |
56 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
57 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
58 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
59 | Block Poll Page Polled |
60 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
61 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
62 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
63 | |
64 | Programmer Type : avr910 |
65 | Description : Atmel Low Cost Serial Programmer |
66 | |
67 | avrdude: Send: S [53] |
68 | avrdude: Recv: A [41] V [56] R [52] [20] I [49] S [53] P [50] |
69 | avrdude: Send: V [56] |
70 | avrdude: Recv: 2 [32] 5 [35] |
71 | avrdude: Send: v [76] |
72 | avrdude: Recv: 2 [32] 0 [30] |
73 | avrdude: Send: p [70] |
74 | avrdude: Recv: S [53] |
75 | Found programmer: Id = "AVR ISP"; type = S |
76 | Software Version = 2.5; Hardware Version = 2.0 |
77 | avrdude: Send: a [61] |
78 | avrdude: Recv: Y [59] |
79 | Programmer supports auto addr increment. |
80 | avrdude: Send: b [62] |
81 | avrdude: Recv: Y [59] |
82 | avrdude: Recv: . [00] |
83 | avrdude: Recv: . [08] |
84 | Programmer supports buffered memory access with buffersize = 8 bytes. |
85 | avrdude: Send: t [74] |
86 | |
87 | Programmer supports the following devices: |
88 | […] |
89 | |
90 | avrdude: Send: T [54] . [01] |
91 | avrdude: Recv: . [0d] |
92 | avrdude: avr910_devcode selected: 0x01 |
93 | avrdude: Send: P [50] |
94 | avrdude: Recv: . [0d] |
95 | avrdude: AVR device initialized and ready to accept instructions |
96 | |
97 | Reading | | 0% 0.00savrdude: Send: s [73] |
98 | avrdude: Recv: . [00] . [00] . [00] |
99 | Reading | ################################################## | 100% 0.11s |
100 | |
101 | avrdude: Device signature = 0x000000 |
102 | avrdude: Yikes! Invalid device signature. |
103 | avrdude: Expected signature for ATMEGA88 is 1E 93 0A |
104 | avrdude: Send: . [2e] P [50] . [00] . [00] . [00] |
105 | avrdude: Recv: . [00] . [0d] |
106 | avrdude: safemode read 1, lfuse value: 0 |
107 | avrdude: Send: . [2e] P [50] . [00] . [00] . [00] |
108 | avrdude: Recv: . [00] . [0d] |
109 | avrdude: safemode read 2, lfuse value: 0 |
110 | avrdude: Send: . [2e] P [50] . [00] . [00] . [00] |
111 | avrdude: Recv: . [00] . [0d] |
112 | avrdude: safemode read 3, lfuse value: 0 |
113 | avrdude: safemode: lfuse reads as 0 |
114 | avrdude: Send: . [2e] X [58] . [08] . [00] . [00] |
115 | avrdude: Recv: . [00] . [0d] |
116 | avrdude: safemode read 1, hfuse value: 0 |
117 | avrdude: Send: . [2e] X [58] . [08] . [00] . [00] |
118 | avrdude: Recv: . [00] . [0d] |
119 | avrdude: safemode read 2, hfuse value: 0 |
120 | avrdude: Send: . [2e] X [58] . [08] . [00] . [00] |
121 | avrdude: Recv: . [00] . [0d] |
122 | avrdude: safemode read 3, hfuse value: 0 |
123 | avrdude: safemode: hfuse reads as 0 |
124 | avrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
125 | avrdude: Recv: . [00] . [0d] |
126 | avrdude: safemode read 1, efuse value: 0 |
127 | avrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
128 | avrdude: Recv: . [00] . [0d] |
129 | avrdude: safemode read 2, efuse value: 0 |
130 | avrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
131 | avrdude: Recv: . [00] . [0d] |
132 | avrdude: safemode read 3, efuse value: 0 |
133 | avrdude: safemode: efuse reads as 0 |
134 | avrdude: Send: A [41] . [01] . [fc] |
135 | avrdude: Recv: . [0d] |
136 | avrdude: Send: d [64] |
137 | avrdude: Recv: . [00] |
138 | avrdude: Send: A [41] . [01] . [fd] |
139 | avrdude: Recv: . [0d] |
140 | avrdude: Send: d [64] |
141 | avrdude: Recv: . [00] |
142 | avrdude: Send: A [41] . [01] . [fe] |
143 | avrdude: Recv: . [0d] |
144 | avrdude: Send: d [64] |
145 | avrdude: Recv: . [00] |
146 | avrdude: Send: A [41] . [01] . [ff] |
147 | avrdude: Recv: . [0d] |
148 | avrdude: Send: d [64] |
149 | avrdude: Recv: . [00] |
150 | avrdude: reading efuse memory: |
151 | |
152 | Reading | | 0% 0.00savrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
153 | avrdude: Recv: . [00] . [0d] |
154 | Reading | ################################################## | 100% 0.02s |
155 | |
156 | avrdude: writing output file "<stdout>" |
157 | :0100000000FF |
158 | :00000001FF |
159 | |
160 | avrdude: Send: . [2e] P [50] . [00] . [00] . [00] |
161 | avrdude: Recv: . [00] . [0d] |
162 | avrdude: safemode read 1, lfuse value: 0 |
163 | avrdude: Send: . [2e] P [50] . [00] . [00] . [00] |
164 | avrdude: Recv: . [00] . [0d] |
165 | avrdude: safemode read 2, lfuse value: 0 |
166 | avrdude: Send: . [2e] P [50] . [00] . [00] . [00] |
167 | avrdude: Recv: . [00] . [0d] |
168 | avrdude: safemode read 3, lfuse value: 0 |
169 | avrdude: safemode: lfuse reads as 0 |
170 | avrdude: Send: . [2e] X [58] . [08] . [00] . [00] |
171 | avrdude: Recv: . [00] . [0d] |
172 | avrdude: safemode read 1, hfuse value: 0 |
173 | avrdude: Send: . [2e] X [58] . [08] . [00] . [00] |
174 | avrdude: Recv: . [00] . [0d] |
175 | avrdude: safemode read 2, hfuse value: 0 |
176 | avrdude: Send: . [2e] X [58] . [08] . [00] . [00] |
177 | avrdude: Recv: . [00] . [0d] |
178 | avrdude: safemode read 3, hfuse value: 0 |
179 | avrdude: safemode: hfuse reads as 0 |
180 | avrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
181 | avrdude: Recv: . [00] . [0d] |
182 | avrdude: safemode read 1, efuse value: 0 |
183 | avrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
184 | avrdude: Recv: . [00] . [0d] |
185 | avrdude: safemode read 2, efuse value: 0 |
186 | avrdude: Send: . [2e] P [50] . [08] . [00] . [00] |
187 | avrdude: Recv: . [00] . [0d] |
188 | avrdude: safemode read 3, efuse value: 0 |
189 | avrdude: safemode: efuse reads as 0 |
190 | avrdude: safemode: Fuses OK |
191 | avrdude: Send: L [4c] |
192 | avrdude: Recv: . [0d] |
193 | |
194 | avrdude done. Thank you. |
Hi, na ja, er kann die Signatur nicht lesen, dann klappt es auch mit den fuses nicht. Das mit dem devcode 01 ist seltsam, hat aber mit dem eigentlichen Problem vermutlich nichts zu tun. (probiere es doch mal mit -x devcode=0x33 nur interessehalber) Die kommunikation Programmer zu Mega88 klappt nicht. Da solltest Du mit suchen anfangen. Hast Du eine andere Zielschaltung zum ausprobieren? Klaus
Mit -x devcode=0x33 ist die Ausgabe wie folgt.
1 | $ avrdude -pm88 -cbutterfly -P /dev/micro/mySmartUSB -F -D -Uflash:w:/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex:a -v -v -x devcode=0x33 |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | avrdude: WARNING: Programmer doesn't support extended parameters, -x option(s) ignored |
12 | Using Port : /dev/micro/mySmartUSB |
13 | Using Programmer : butterfly |
14 | avr910_devcode (avrdude.conf) : 0x33 |
15 | AVR Part : ATMEGA88 |
16 | Chip Erase delay : 9000 us |
17 | PAGEL : PD7 |
18 | BS2 : PC2 |
19 | RESET disposition : dedicated |
20 | RETRY pulse : SCK |
21 | serial program mode : yes |
22 | parallel program mode : yes |
23 | Timeout : 200 |
24 | StabDelay : 100 |
25 | CmdexeDelay : 25 |
26 | SyncLoops : 32 |
27 | ByteDelay : 0 |
28 | PollIndex : 3 |
29 | PollValue : 0x53 |
30 | Memory Detail : |
31 | |
32 | Block Poll Page Polled |
33 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
34 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
35 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
36 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
37 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
38 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
39 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
40 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
41 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
42 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
43 | |
44 | Programmer Type : avr910 |
45 | Description : Atmel Butterfly Development Board |
46 | |
47 | Connecting to programmer: . |
48 | Found programmer: Id = "AVR ISP"; type = S |
49 | Software Version = 2.5; Hardware Version = 2.0 |
50 | Programmer supports auto addr increment. |
51 | Programmer supports buffered memory access with buffersize=8 bytes. |
52 | |
53 | Programmer supports the following devices: |
54 | […] |
55 | |
56 | avrdude: devcode selected: 0x01 |
57 | avrdude: AVR device initialized and ready to accept instructions |
58 | |
59 | Reading | ################################################## | 100% 0.11s |
60 | |
61 | avrdude: Device signature = 0x000000 |
62 | avrdude: Yikes! Invalid device signature. |
63 | avrdude: Expected signature for ATMEGA88 is 1E 93 0A |
64 | avrdude: safemode: lfuse reads as 0 |
65 | avrdude: safemode: hfuse reads as 0 |
66 | avrdude: safemode: efuse reads as 0 |
67 | avrdude: reading input file "/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex" |
68 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
69 | avrdude: writing flash (910 bytes): |
70 | |
71 | Writing | ################################################## | 100% 20.95s |
72 | |
73 | |
74 | |
75 | avrdude: 910 bytes of flash written |
76 | avrdude: verifying flash memory against /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
77 | avrdude: load data flash data from input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
78 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
79 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex contains 910 bytes |
80 | avrdude: reading on-chip flash data: |
81 | |
82 | Reading | ################################################## | 100% 16.40s |
83 | |
84 | |
85 | |
86 | avrdude: verifying ... |
87 | avrdude: verification error, first mismatch at byte 0x0000 |
88 | 0x19 != 0x00 |
89 | avrdude: verification error; content mismatch |
90 | |
91 | avrdude: safemode: lfuse reads as 0 |
92 | avrdude: safemode: hfuse reads as 0 |
93 | avrdude: safemode: efuse reads as 0 |
94 | avrdude: safemode: Fuses OK |
95 | |
96 | avrdude done. Thank you. |
Dort nimmt er auch wieder den devcode 0x01. Das einzige was ich nun nochmal probieren kann ist einen anderen atmega88 einzubaun, oder nen älteren atmega8. Ich hab auch noch nen jtag ice mk2 hier. Den muss ich aber erst mal ordentlich zum laufen bringen.
Hm, sry. Die Ausgabe war eben gerade mit -cbutterfly. Nun nochmal die richtige und dort int dann auch wieder arr910_devcode=0x33 ausgewählt. Also hier die Ausgabe nochmal.
1 | $ avrdude -pm88 -cavr910 -P /dev/micro/mySmartUSB -F -D -Uflash:w:/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex:a -v -v -x devcode=0x33 |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | avrdude: avr910_parseextparms(): devcode overwritten as 0x33 |
12 | Using Port : /dev/micro/mySmartUSB |
13 | Using Programmer : avr910 |
14 | avr910_devcode (avrdude.conf) : 0x33 |
15 | AVR Part : ATMEGA88 |
16 | Chip Erase delay : 9000 us |
17 | PAGEL : PD7 |
18 | BS2 : PC2 |
19 | RESET disposition : dedicated |
20 | RETRY pulse : SCK |
21 | serial program mode : yes |
22 | parallel program mode : yes |
23 | Timeout : 200 |
24 | StabDelay : 100 |
25 | CmdexeDelay : 25 |
26 | SyncLoops : 32 |
27 | ByteDelay : 0 |
28 | PollIndex : 3 |
29 | PollValue : 0x53 |
30 | Memory Detail : |
31 | |
32 | Block Poll Page Polled |
33 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
34 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
35 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
36 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
37 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
38 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
39 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
40 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
41 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
42 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
43 | |
44 | Programmer Type : avr910 |
45 | Description : Atmel Low Cost Serial Programmer |
46 | |
47 | Found programmer: Id = "AVR ISP"; type = S |
48 | Software Version = 2.5; Hardware Version = 2.0 |
49 | Programmer supports auto addr increment. |
50 | Programmer supports buffered memory access with buffersize = 8 bytes. |
51 | avrdude: avr910_devcode selected: 0x33 |
52 | avrdude: AVR device initialized and ready to accept instructions |
53 | |
54 | Reading | ################################################## | 100% 0.11s |
55 | |
56 | avrdude: Device signature = 0x000000 |
57 | avrdude: Yikes! Invalid device signature. |
58 | avrdude: Expected signature for ATMEGA88 is 1E 93 0A |
59 | avrdude: safemode: lfuse reads as 0 |
60 | avrdude: safemode: hfuse reads as 0 |
61 | avrdude: safemode: efuse reads as 0 |
62 | avrdude: reading input file "/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex" |
63 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
64 | avrdude: writing flash (910 bytes): |
65 | |
66 | Writing | ################################################## | 100% 20.96s |
67 | |
68 | |
69 | |
70 | avrdude: 910 bytes of flash written |
71 | avrdude: verifying flash memory against /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
72 | avrdude: load data flash data from input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
73 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
74 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex contains 910 bytes |
75 | avrdude: reading on-chip flash data: |
76 | |
77 | Reading | ################################################## | 100% 16.85s |
78 | |
79 | |
80 | |
81 | avrdude: verifying ... |
82 | avrdude: verification error, first mismatch at byte 0x0000 |
83 | 0x19 != 0x00 |
84 | avrdude: verification error; content mismatch |
85 | |
86 | avrdude: safemode: lfuse reads as 0 |
87 | avrdude: safemode: hfuse reads as 0 |
88 | avrdude: safemode: efuse reads as 0 |
89 | avrdude: safemode: Fuses OK |
90 | |
91 | avrdude done. Thank you. |
Hey, ich habe nun nochmal einen anderen ATmega88 auf meinen Programmer gesteckt. Und siehe da es funktioniert. Hier mal die Ausgabe.
1 | $ avrdude -pm88 -cavr910 -P /dev/micro/mySmartUSB -D -Uflash:w:/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex:a -v -v -x devcode=0x33 |
2 | |
3 | avrdude: Version 5.10, compiled on Mar 31 2011 at 21:40:08 |
4 | Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ |
5 | Copyright (c) 2007-2009 Joerg Wunsch |
6 | |
7 | System wide configuration file is "/etc/avrdude.conf" |
8 | User configuration file is "/home/sep/.avrduderc" |
9 | User configuration file does not exist or is not a regular file, skipping |
10 | |
11 | avrdude: avr910_parseextparms(): devcode overwritten as 0x33 |
12 | Using Port : /dev/micro/mySmartUSB |
13 | Using Programmer : avr910 |
14 | avr910_devcode (avrdude.conf) : 0x33 |
15 | AVR Part : ATMEGA88 |
16 | Chip Erase delay : 9000 us |
17 | PAGEL : PD7 |
18 | BS2 : PC2 |
19 | RESET disposition : dedicated |
20 | RETRY pulse : SCK |
21 | serial program mode : yes |
22 | parallel program mode : yes |
23 | Timeout : 200 |
24 | StabDelay : 100 |
25 | CmdexeDelay : 25 |
26 | SyncLoops : 32 |
27 | ByteDelay : 0 |
28 | PollIndex : 3 |
29 | PollValue : 0x53 |
30 | Memory Detail : |
31 | |
32 | Block Poll Page Polled |
33 | Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack |
34 | ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- |
35 | eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff |
36 | flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff |
37 | lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
38 | hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
39 | efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
40 | lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00 |
41 | calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 |
42 | signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 |
43 | |
44 | Programmer Type : avr910 |
45 | Description : Atmel Low Cost Serial Programmer |
46 | |
47 | Found programmer: Id = "AVR ISP"; type = S |
48 | Software Version = 2.5; Hardware Version = 2.0 |
49 | Programmer supports auto addr increment. |
50 | Programmer supports buffered memory access with buffersize = 512 bytes. |
51 | avrdude: avr910_devcode selected: 0x33 |
52 | avrdude: AVR device initialized and ready to accept instructions |
53 | |
54 | Reading | ################################################## | 100% 0.06s |
55 | |
56 | avrdude: Device signature = 0x1e930a |
57 | avrdude: safemode: lfuse reads as 62 |
58 | avrdude: safemode: hfuse reads as DF |
59 | avrdude: safemode: efuse reads as 1 |
60 | avrdude: reading input file "/home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex" |
61 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
62 | avrdude: writing flash (910 bytes): |
63 | |
64 | Writing | ################################################## | 100% 1.01s |
65 | |
66 | |
67 | |
68 | avrdude: 910 bytes of flash written |
69 | avrdude: verifying flash memory against /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
70 | avrdude: load data flash data from input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex: |
71 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex auto detected as Intel Hex |
72 | avrdude: input file /home/sep/workspace/projekte/kolbentanksteuerung/Release/Kolbentanksteuerung.hex contains 910 bytes |
73 | avrdude: reading on-chip flash data: |
74 | |
75 | Reading | ################################################## | 100% 0.50s |
76 | |
77 | |
78 | |
79 | avrdude: verifying ... |
80 | avrdude: 910 bytes of flash verified |
81 | |
82 | avrdude: safemode: lfuse reads as 62 |
83 | avrdude: safemode: hfuse reads as DF |
84 | avrdude: safemode: efuse reads as 1 |
85 | avrdude: safemode: Fuses OK |
86 | |
87 | avrdude done. Thank you. |
Komisch ist nur eine Sache noch. Einmal ein Auszug aus der /etc/avrdude.conf
1 | part |
2 | id = "m88"; |
3 | desc = "ATMEGA88"; |
4 | has_debugwire = yes; |
5 | flash_instr = 0xB6, 0x01, 0x11; |
6 | eeprom_instr = 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00, |
7 | 0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, |
8 | 0x99, 0xF9, 0xBB, 0xAF; |
9 | stk500_devcode = 0x73; |
10 | avr910_devcode = 0x33; |
11 | signature = 0x1e 0x93 0x0a; |
Der devcode für den avr910 ist angegeben. Wenn ich das Gerät nun programmieren will, nimmt er jedoch immer devcode 0x01. Es sei denn ich gebe es mit -x devcode an. Dann nimmt er auch den 0x33. Aber ansonsten lag es wohl an dem µC. Ich werd mal schaun, ob ich den noch irgendwie zurück gesetzt bekomme.
Hi, probiere mal einen Takt an XTAL1 anzulegen, vielleicht hast Du Glück http://www.klaus-leidinger.de/mp/Mikrocontroller/meinetools.html#Preserver Das mit dem Devicecode sieht aus, als ob avrdude den ersten empfangenen Code von der supportliste übergibt. Das macht eigentlich nur der avr109 Modus, da der von einem bootloader mit genau einem supportrten Device ausgeht. Die avrdude.conf wird ja korrekt ausgelesen. Ich probiere es bei mir mal aus und schaue in den avrdude source.
Das mit dem Takt an XTAL1 hab ich schon ausprobiert. Ohne Erfolg. Ich hab mich dann mal belesen wegen dem debugWIRE. Das brachte dann auch den Erfolg. Denn dort wird irgendwie der SPI Modus via dem Programmer abgeschaltet. Ich hab denn über das JTAG ICE mkII und über AVRStudio 4 den debugWIRE-Modus abschalten können. Danach konnte ich dann den µC wieder ansprechen und die Signatur war auch wieder ordentlich. Aber nun nochmal dazu ne Frage. Gibt es eine Möglichkeit den debugWIRE-Modus via avarice oder über avrdude zu deaktivieren?
sep schrieb: > Gibt es eine Möglichkeit den > debugWIRE-Modus via avarice oder über avrdude zu deaktivieren? Die DW-Enable-Fuse kann nur über den Debugger wieder deaktiviert werden. Die Kommunikation dazu erfolgt ja seriell über den Resetpin, da kommt ISP nicht ran. Also per ISP Debug aktivieren, per Debugger wieder deaktivieren. ...
Hannes Lux schrieb: > Die DW-Enable-Fuse kann nur über den Debugger wieder deaktiviert werden. Ist das denn machbar? Als Debugger nutze ich avr-gdb. Als Frontend die Eclipse IDE. Wo jetzt eigentlich alles so funktioniert, wie ich mir das vorgestellt habe. Bis auf Debugwire disable. Wie ich das hier gelesen habe, so hab ich das auch mal probiert. http://www.mikrocontroller.net/articles/DebugWIRE#An-_und_Abschalten_von_Debug-Wire Also folgendermaßen
1 | $ avarice --mkII --jtag usb -P atmega88 --reset-srst --debugwire |
2 | AVaRICE version 2.10, Apr 4 2011 18:54:53 |
3 | |
4 | JTAG config starting. |
5 | Found a device: JTAGICEmkII |
6 | Serial number: 07:00:00:00:46:96 |
7 | Reported debugWire device ID: 0x930A |
8 | Configured for device ID: 0x930A atmega88 -- Matched with atmega88 |
9 | JTAG config complete. |
10 | $ avrdude -cavr910 -pm88 -P/dev/micro/mySmartUSB -Uhfuse:w:0xdf:m |
11 | […] |
12 | avrdude: Device signature = 0x000000 |
13 | avrdude: Yikes! Invalid device signature. |
14 | Double check connections and try again, or use -F to override |
15 | this check. |
16 | |
17 | |
18 | avrdude done. Thank you. |
19 | |
20 | $ avarice --mkII --jtag usb -P atmega88 --reset-srst --write-fuses 01DFF7 --debugwire |
21 | AVaRICE version 2.10, Apr 4 2011 18:54:53 |
22 | |
23 | JTAG config starting. |
24 | Found a device: JTAGICEmkII |
25 | Serial number: 07:00:00:00:46:96 |
26 | Reported debugWire device ID: 0x930A |
27 | Configured for device ID: 0x930A atmega88 -- Matched with atmega88 |
28 | JTAG config complete. |
29 | |
30 | Writing Fuse Bytes: |
31 | Extended Fuse byte -> 0x01 |
32 | High Fuse byte -> 0xdf |
33 | Low Fuse byte -> 0xf7 |
34 | Failed to read target memory space |
Also, weder mit avrdude noch mit avarice funktioniert das. Oder ist das nicht der richtige "Restet Enabled" Befehl?
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
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.