Forum: Mikrocontroller und Digitale Elektronik avrdude + jtagice-ii + linux + isp: laaaaangsaaaaam.


von E. H. (emax)


Lesenswert?

Das Thema gibt's zwar hie und da im Web, und auch hier sind ähnliche 
Beiträge zu finden, aber eine Lösung habe ich nicht entdeckt:

Die Programmierung eines AT90S8535 (AVR-CTRL) unter linux (Ubuntu 10.04) 
mit avrdude und jtagice-mkII ist so langsam, dass es m.E. nicht normal 
sein kann. Der Gesamtvorgang inklusive verify dauert für lausige 5700 
Byte sagenhafte 20 Minuten. Dabei ist es egal, ob ich raw oder ihex 
schreibe.

An welchen Knöpfen muss ich drehen, um das schneller zu bekommen?

Den -vv output hab ich mal angehängt.
1
$ avrdude -B10 -D  -p 8535  -P usb -c jtag2isp  -U flash:w:main-1.5rc1.hex:r -vv
2
3
avrdude: Version 5.10, compiled on Mar 23 2010 at 15:03:00
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/ed/.avrduderc"
9
         User configuration file does not exist or is not a regular file, skipping
10
11
         Using Port                    : usb
12
         Using Programmer              : jtag2isp
13
         Setting bit clk period        : 10.0
14
avrdude: stk500v2_jtagmkII_open()
15
avrdude: usbdev_open(): Found JTAGICE mkII, serno: 0900000068CB
16
avrdude: usbdev_open(): using read endpoint 0x82
17
avrdude: jtagmkII_getsync(): Sending sign-on command: 0x86 (28 bytes msg)
18
JTAG ICE mkII sign-on message:
19
Communications protocol version: 1
20
M_MCU:
21
  boot-loader FW version:        255
22
  firmware version:              6.07
23
  hardware version:              0
24
S_MCU:
25
  boot-loader FW version:        255
26
  firmware version:              6.07
27
  hardware version:              1
28
Serial number:                   09:00:00:00:68:cb
29
Device ID:                       JTAGICEmkII
30
avrdude: jtagmkII_setparm()
31
avrdude: jtagmkII_setparm(): Sending set parameter command (parm 0x03, 1 bytes): 0x80 (1 bytes msg)
32
avrdude: jtagmkII_getsync(): Sending get sync command: 0x80 (1 bytes msg)
33
         AVR Part                      : AT90S8535
34
         Chip Erase delay              : 20000 us
35
         PAGEL                         : P00
36
         BS2                           : P00
37
         RESET disposition             : dedicated
38
         RETRY pulse                   : SCK
39
         serial program mode           : yes
40
         parallel program mode         : yes
41
         Timeout                       : 200
42
         StabDelay                     : 100
43
         CmdexeDelay                   : 25
44
         SyncLoops                     : 32
45
         ByteDelay                     : 0
46
         PollIndex                     : 3
47
         PollValue                     : 0x53
48
         Memory Detail                 :
49
50
                                  Block Poll               Page                       Polled
51
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
52
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
53
           eeprom         4    12   128    0 no        512    0      0  9000 20000 0x00 0xff
54
           flash          4    12   128    0 no       8192    0      0  9000 20000 0xff 0xff
55
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
56
           fuse           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
57
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
58
59
         Programmer Type : JTAGMKII_ISP
60
         Description     : Atmel JTAG ICE mkII in ISP mode
61
avrdude: jtagmkII_getparm()
62
avrdude: jtagmkII_getparm(): Sending get parameter command (parm 0x06): 0x81 (3 bytes msg)
63
         Vtarget         : 4.2 V
64
         SCK period      : 10.37 us
65
66
avrdude: AVR device initialized and ready to accept instructions
67
68
Reading | ################################################## | 100% 0.15s
69
avrdude: Device signature = 0x1e9303
70
avrdude: safemode: fuse reads as 1
71
avrdude: reading input file "main-1.5rc1.hex"
72
avrdude: writing flash (5758 bytes):
73
74
Writing | ################################################## | 100% 872.76s
75
76
avrdude: 5758 bytes of flash written
77
avrdude: verifying flash memory against main-1.5rc1.hex:
78
avrdude: load data flash data from input file main-1.5rc1.hex:
79
avrdude: input file main-1.5rc1.hex contains 5758 bytes
80
avrdude: reading on-chip flash data:
81
82
Reading | ################################################## | 100% 292.14s
83
84
avrdude: verifying ...
85
avrdude: 5758 bytes of flash verified
86
87
avrdude: safemode: fuse reads as 1
88
avrdude: safemode: Fuses OK
89
avrdude: stk500v2_jtagmkII_close()
90
avrdude: jtagmkII_close()
91
avrdude: jtagmkII_close(): Sending sign-off command: 0x80 (1 bytes msg)
92
93
avrdude done.  Thank you.
94
95
ed@summini:~/Projekte/Embedded/AVR/AVR-CTRL/t$ avrdude -D  -p 8535  -P usb -c jtag2isp  -e
96
97
avrdude: AVR device initialized and ready to accept instructions
98
99
Reading | ################################################## | 100% 0.15s
100
101
avrdude: Device signature = 0x1e9303
102
avrdude: erasing chip
103
104
avrdude: safemode: Fuses OK
105
106
avrdude done.  Thank you.

von E. H. (emax)


Lesenswert?

Ähm, die letzten sieben Textzeilen aus aus der obigen Ausgabe gehören 
nicht dazu, zu viel kopiert.

von E. H. (emax)


Lesenswert?

Hat denn niemand sonst das Problem ?

von Klaus W. (mfgkw)


Lesenswert?

Ich nicht, weil ich eine echte serielle Schnittstelle habe.
Du hast einen USB-seriell-Wandler in der Kette?

von Stefan B. (stefan) Benutzerseite


Lesenswert?

Wie schnell läuft dein AT90S8535?

Wenn >= 4 MHz, kann die -B10 Bremse raus. Der Defaultwert ist 1 µs, d.h. 
-B10 bremst um den Faktor 10!

http://www.nongnu.org/avrdude/user-manual/avrdude.html

von E. H. (emax)


Lesenswert?

Klaus Wachtler schrieb:
> Du hast einen USB-seriell-Wandler in der Kette?

Nein, zumindest nicht wissentlich. Der JTAGICE-mkII ist über den 
"nativen" ATEML-USB angeschlossen.

von E. H. (emax)


Lesenswert?

> Wie schnell läuft dein AT90S8535?

Das Board ist mit einem 8MHz Quarz bestückt, das ist also die 
Geschwindigkeit, mit der es im Normalbetrieb arbeitet. Ich weiß aber 
nicht, ob im ISP-Modus irgendeine interne Clock geschaltet wird.

> Wenn >= 4 MHz, kann die -B10 Bremse raus. Der Defaultwert ist 1 µs, d.h.
> -B10 bremst um den Faktor 10!

Ich muss zugeben, dass ich mir dieses Flag probehalber in irgendeinem 
Thread abgeschaut habe. Jetzt weiß ich wenigstens, was es macht. :~| 
Aber ich hatte das auch ohne ausprobiert, die Änderung war marginal, 
vielleicht 10%.

von E. H. (emax)


Lesenswert?

> ATEML-USB

Das soll natürlich "ATMEL USB" heißen.

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.