Avrdude

Aus TippvomTibb
Zur Navigation springen Zur Suche springen

avdude 6.3 ünterstützt das Schreiben und Lesen von derzeit 158 Mikrocontrollern.

avrdude -p ?

Valid parts are:

 uc3a0512 = AT32UC3A0512
 c128     = AT90CAN128
 c32      = AT90CAN32
 c64      = AT90CAN64
 pwm2     = AT90PWM2
 pwm216   = AT90PWM216
 pwm2b    = AT90PWM2B
 pwm3     = AT90PWM3
 pwm316   = AT90PWM316
 pwm3b    = AT90PWM3B
 1200     = AT90S1200
 2313     = AT90S2313
 2333     = AT90S2333
 2343     = AT90S2343
 4414     = AT90S4414
 4433     = AT90S4433
 4434     = AT90S4434
 8515     = AT90S8515
 8535     = AT90S8535
 usb1286  = AT90USB1286
 usb1287  = AT90USB1287
 usb162   = AT90USB162
 usb646   = AT90USB646
 usb647   = AT90USB647
 usb82    = AT90USB82
 m103     = ATmega103
 m128     = ATmega128
 m1280    = ATmega1280
 m1281    = ATmega1281
 m1284    = ATmega1284
 m1284p   = ATmega1284P
 m1284rfr2 = ATmega1284RFR2
 m128rfa1 = ATmega128RFA1
 m128rfr2 = ATmega128RFR2
 m16      = ATmega16
 m161     = ATmega161
 m162     = ATmega162
 m163     = ATmega163
 m164p    = ATmega164P
 m168     = ATmega168
 m168p    = ATmega168P
 m168pb   = ATmega168PB
 m169     = ATmega169
 m16u2    = ATmega16U2
 m2560    = ATmega2560
 m2561    = ATmega2561
 m2564rfr2 = ATmega2564RFR2
 m256rfr2 = ATmega256RFR2
 m32      = ATmega32
 m324p    = ATmega324P
 m324pa   = ATmega324PA
 m325     = ATmega325
 m3250    = ATmega3250
 m328     = ATmega328
 m328p    = ATmega328P
 m329     = ATmega329
 m3290    = ATmega3290
 m3290p   = ATmega3290P
 m329p    = ATmega329P
 m32m1    = ATmega32M1
 m32u2    = ATmega32U2
 m32u4    = ATmega32U4
 m406     = ATMEGA406
 m48      = ATmega48
 m48p     = ATmega48P
 m48pb    = ATmega48PB
 m64      = ATmega64
 m640     = ATmega640
 m644     = ATmega644
 m644p    = ATmega644P
 m644rfr2 = ATmega644RFR2
 m645     = ATmega645
 m6450    = ATmega6450
 m649     = ATmega649
 m6490    = ATmega6490
 m64rfr2  = ATmega64RFR2
 m8       = ATmega8
 m8515    = ATmega8515
 m8535    = ATmega8535
 m88      = ATmega88
 m88p     = ATmega88P
 m88pb    = ATmega88PB
 m8u2     = ATmega8U2
 t10      = ATtiny10
 t11      = ATtiny11
 t12      = ATtiny12
 t13      = ATtiny13
 t15      = ATtiny15
 t1634    = ATtiny1634
 t20      = ATtiny20
 t2313    = ATtiny2313
 t24      = ATtiny24
 t25      = ATtiny25
 t26      = ATtiny26
 t261     = ATtiny261
 t28      = ATtiny28
 t4       = ATtiny4
 t40      = ATtiny40
 t4313    = ATtiny4313
 t43u     = ATtiny43u
 t44      = ATtiny44
 t45      = ATtiny45
 t461     = ATtiny461
 t5       = ATtiny5
 t84      = ATtiny84
 t85      = ATtiny85
 t861     = ATtiny861
 t88      = ATtiny88
 t9       = ATtiny9
 x128a1   = ATxmega128A1
 x128a1d  = ATxmega128A1revD
 x128a1u  = ATxmega128A1U
 x128a3   = ATxmega128A3
 x128a3u  = ATxmega128A3U
 x128a4   = ATxmega128A4
 x128a4u  = ATxmega128A4U
 x128b1   = ATxmega128B1
 x128b3   = ATxmega128B3
 x128c3   = ATxmega128C3
 x128d3   = ATxmega128D3
 x128d4   = ATxmega128D4
 x16a4    = ATxmega16A4
 x16a4u   = ATxmega16A4U
 x16c4    = ATxmega16C4
 x16d4    = ATxmega16D4
 x16e5    = ATxmega16E5
 x192a1   = ATxmega192A1
 x192a3   = ATxmega192A3
 x192a3u  = ATxmega192A3U
 x192c3   = ATxmega192C3
 x192d3   = ATxmega192D3
 x256a1   = ATxmega256A1
 x256a3   = ATxmega256A3
 x256a3b  = ATxmega256A3B
 x256a3bu = ATxmega256A3BU
 x256a3u  = ATxmega256A3U
 x256c3   = ATxmega256C3
 x256d3   = ATxmega256D3
 x32a4    = ATxmega32A4
 x32a4u   = ATxmega32A4U
 x32c4    = ATxmega32C4
 x32d4    = ATxmega32D4
 x32e5    = ATxmega32E5
 x384c3   = ATxmega384C3
 x384d3   = ATxmega384D3
 x64a1    = ATxmega64A1
 x64a1u   = ATxmega64A1U
 x64a3    = ATxmega64A3
 x64a3u   = ATxmega64A3U
 x64a4    = ATxmega64A4
 x64a4u   = ATxmega64A4U
 x64b1    = ATxmega64B1
 x64b3    = ATxmega64B3
 x64c3    = ATxmega64C3
 x64d3    = ATxmega64D3
 x64d4    = ATxmega64D4
 x8e5     = ATxmega8E5
 ucr2     = deprecated, use 'uc3a0512'


Ruft man avrdude explizit mit dem Config-File (z. B. -C /etc/avrdude.conf) auf, erhält man zusätzlich auch noch die Zeilennummer mit den Konfigurationdaten des gewünschten Prozessors (Mikrocontroller).

avrdude -p ?

Valid parts are:

 uc3a0512 = AT32UC3A0512       [/etc/avrdude.conf:14574]
 c128     = AT90CAN128         [/etc/avrdude.conf:3539]
 c32      = AT90CAN32          [/etc/avrdude.conf:3923]
 c64      = AT90CAN64          [/etc/avrdude.conf:3731]
 pwm2     = AT90PWM2           [/etc/avrdude.conf:9084]
 pwm216   = AT90PWM216         [/etc/avrdude.conf:9357]
 pwm2b    = AT90PWM2B          [/etc/avrdude.conf:9277]
 pwm3     = AT90PWM3           [/etc/avrdude.conf:9267]
 pwm316   = AT90PWM316         [/etc/avrdude.conf:9304]
 pwm3b    = AT90PWM3B          [/etc/avrdude.conf:9291]
 1200     = AT90S1200          [/etc/avrdude.conf:2000]
 2313     = AT90S2313          [/etc/avrdude.conf:2229]
 2333     = AT90S2333          [/etc/avrdude.conf:2342]
 2343     = AT90S2343          [/etc/avrdude.conf:2470]
 4414     = AT90S4414          [/etc/avrdude.conf:2116]
 4433     = AT90S4433          [/etc/avrdude.conf:2594]
 4434     = AT90S4434          [/etc/avrdude.conf:2718]
 8515     = AT90S8515          [/etc/avrdude.conf:2801]
 8535     = AT90S8535          [/etc/avrdude.conf:2915]
 usb1286  = AT90USB1286        [/etc/avrdude.conf:11882]
 usb1287  = AT90USB1287        [/etc/avrdude.conf:12073]
 usb162   = AT90USB162         [/etc/avrdude.conf:12086]
 usb646   = AT90USB646         [/etc/avrdude.conf:11678]
 usb647   = AT90USB647         [/etc/avrdude.conf:11869]
 usb82    = AT90USB82          [/etc/avrdude.conf:12273]
 m103     = ATmega103          [/etc/avrdude.conf:3036]
 m128     = ATmega128          [/etc/avrdude.conf:3359]
 m1280    = ATmega1280         [/etc/avrdude.conf:10109]
 m1281    = ATmega1281         [/etc/avrdude.conf:10299]
 m1284    = ATmega1284         [/etc/avrdude.conf:4735]
 m1284p   = ATmega1284P        [/etc/avrdude.conf:4929]
 m1284rfr2 = ATmega1284RFR2     [/etc/avrdude.conf:10734]
 m128rfa1 = ATmega128RFA1      [/etc/avrdude.conf:10519]
 m128rfr2 = ATmega128RFR2      [/etc/avrdude.conf:10622]
 m16      = ATmega16           [/etc/avrdude.conf:4116]
 m161     = ATmega161          [/etc/avrdude.conf:6261]
 m162     = ATmega162          [/etc/avrdude.conf:5121]
 m163     = ATmega163          [/etc/avrdude.conf:5319]
 m164p    = ATmega164P         [/etc/avrdude.conf:4295]
 m168     = ATmega168          [/etc/avrdude.conf:8091]
 m168p    = ATmega168P         [/etc/avrdude.conf:8280]
 m168pb   = ATmega168PB        [/etc/avrdude.conf:8292]
 m169     = ATmega169          [/etc/avrdude.conf:5477]
 m16u2    = ATmega16U2         [/etc/avrdude.conf:12650]
 m2560    = ATmega2560         [/etc/avrdude.conf:10312]
 m2561    = ATmega2561         [/etc/avrdude.conf:10506]
 m2564rfr2 = ATmega2564RFR2     [/etc/avrdude.conf:10724]
 m256rfr2 = ATmega256RFR2      [/etc/avrdude.conf:10573]
 m32      = ATmega32           [/etc/avrdude.conf:6084]
 m324p    = ATmega324P         [/etc/avrdude.conf:4319]
 m324pa   = ATmega324PA        [/etc/avrdude.conf:4511]
 m325     = ATmega325          [/etc/avrdude.conf:13020]
 m3250    = ATmega3250         [/etc/avrdude.conf:13401]
 m328     = ATmega328          [/etc/avrdude.conf:8493]
 m328p    = ATmega328P         [/etc/avrdude.conf:8678]
 m329     = ATmega329          [/etc/avrdude.conf:5659]
 m3290    = ATmega3290         [/etc/avrdude.conf:5858]
 m3290p   = ATmega3290P        [/etc/avrdude.conf:5872]
 m329p    = ATmega329P         [/etc/avrdude.conf:5844]
 m32m1    = ATmega32M1         [/etc/avrdude.conf:8690]
 m32u2    = ATmega32U2         [/etc/avrdude.conf:12462]
 m32u4    = ATmega32U4         [/etc/avrdude.conf:11487]
 m406     = ATMEGA406          [/etc/avrdude.conf:14912]
 m48      = ATmega48           [/etc/avrdude.conf:7667]
 m48p     = ATmega48P          [/etc/avrdude.conf:7854]
 m48pb    = ATmega48PB         [/etc/avrdude.conf:7866]
 m64      = ATmega64           [/etc/avrdude.conf:3176]
 m640     = ATmega640          [/etc/avrdude.conf:9919]
 m644     = ATmega644          [/etc/avrdude.conf:4527]
 m644p    = ATmega644P         [/etc/avrdude.conf:4718]
 m644rfr2 = ATmega644RFR2      [/etc/avrdude.conf:10744]
 m645     = ATmega645          [/etc/avrdude.conf:13211]
 m6450    = ATmega6450         [/etc/avrdude.conf:13413]
 m649     = ATmega649          [/etc/avrdude.conf:5885]
 m6490    = ATmega6490         [/etc/avrdude.conf:6071]
 m64rfr2  = ATmega64RFR2       [/etc/avrdude.conf:10635]
 m8       = ATmega8            [/etc/avrdude.conf:6401]
 m8515    = ATmega8515         [/etc/avrdude.conf:6562]
 m8535    = ATmega8535         [/etc/avrdude.conf:6720]
 m88      = ATmega88           [/etc/avrdude.conf:7879]
 m88p     = ATmega88P          [/etc/avrdude.conf:8066]
 m88pb    = ATmega88PB         [/etc/avrdude.conf:8078]
 m8u2     = ATmega8U2          [/etc/avrdude.conf:12838]
 t10      = ATtiny10           [/etc/avrdude.conf:14867]
 t11      = ATtiny11           [/etc/avrdude.conf:1495]
 t12      = ATtiny12           [/etc/avrdude.conf:1559]
 t13      = ATtiny13           [/etc/avrdude.conf:1692]
 t15      = ATtiny15           [/etc/avrdude.conf:1867]
 t1634    = ATtiny1634         [/etc/avrdude.conf:14600]
 t20      = ATtiny20           [/etc/avrdude.conf:14877]
 t2313    = ATtiny2313         [/etc/avrdude.conf:8711]
 t24      = ATtiny24           [/etc/avrdude.conf:10755]
 t25      = ATtiny25           [/etc/avrdude.conf:9367]
 t26      = ATtiny26           [/etc/avrdude.conf:6878]
 t261     = ATtiny261          [/etc/avrdude.conf:7035]
 t28      = ATtiny28           [/etc/avrdude.conf:7609]
 t4       = ATtiny4            [/etc/avrdude.conf:14823]
 t40      = ATtiny40           [/etc/avrdude.conf:14894]
 t4313    = ATtiny4313         [/etc/avrdude.conf:8900]
 t43u     = ATtiny43u          [/etc/avrdude.conf:11308]
 t44      = ATtiny44           [/etc/avrdude.conf:10939]
 t45      = ATtiny45           [/etc/avrdude.conf:9551]
 t461     = ATtiny461          [/etc/avrdude.conf:7226]
 t5       = ATtiny5            [/etc/avrdude.conf:14840]
 t84      = ATtiny84           [/etc/avrdude.conf:11123]
 t85      = ATtiny85           [/etc/avrdude.conf:9734]
 t861     = ATtiny861          [/etc/avrdude.conf:7417]
 t88      = ATtiny88           [/etc/avrdude.conf:8305]
 t9       = ATtiny9            [/etc/avrdude.conf:14850]
 x128a1   = ATxmega128A1       [/etc/avrdude.conf:13894]
 x128a1d  = ATxmega128A1revD   [/etc/avrdude.conf:13910]
 x128a1u  = ATxmega128A1U      [/etc/avrdude.conf:13920]
 x128a3   = ATxmega128A3       [/etc/avrdude.conf:13931]
 x128a3u  = ATxmega128A3U      [/etc/avrdude.conf:13941]
 x128a4   = ATxmega128A4       [/etc/avrdude.conf:13952]
 x128a4u  = ATxmega128A4U      [/etc/avrdude.conf:14010]
 x128b1   = ATxmega128B1       [/etc/avrdude.conf:14063]
 x128b3   = ATxmega128B3       [/etc/avrdude.conf:14122]
 x128c3   = ATxmega128C3       [/etc/avrdude.conf:13821]
 x128d3   = ATxmega128D3       [/etc/avrdude.conf:13874]
 x128d4   = ATxmega128D4       [/etc/avrdude.conf:13884]
 x16a4    = ATxmega16A4        [/etc/avrdude.conf:13552]
 x16a4u   = ATxmega16A4U       [/etc/avrdude.conf:13479]
 x16c4    = ATxmega16C4        [/etc/avrdude.conf:13532]
 x16d4    = ATxmega16D4        [/etc/avrdude.conf:13542]
 x16e5    = ATxmega16E5        [/etc/avrdude.conf:14469]
 x192a1   = ATxmega192A1       [/etc/avrdude.conf:14196]
 x192a3   = ATxmega192A3       [/etc/avrdude.conf:14212]
 x192a3u  = ATxmega192A3U      [/etc/avrdude.conf:14222]
 x192c3   = ATxmega192C3       [/etc/avrdude.conf:14133]
 x192d3   = ATxmega192D3       [/etc/avrdude.conf:14186]
 x256a1   = ATxmega256A1       [/etc/avrdude.conf:14296]
 x256a3   = ATxmega256A3       [/etc/avrdude.conf:14312]
 x256a3b  = ATxmega256A3B      [/etc/avrdude.conf:14333]
 x256a3bu = ATxmega256A3BU     [/etc/avrdude.conf:14343]
 x256a3u  = ATxmega256A3U      [/etc/avrdude.conf:14322]
 x256c3   = ATxmega256C3       [/etc/avrdude.conf:14233]
 x256d3   = ATxmega256D3       [/etc/avrdude.conf:14286]
 x32a4    = ATxmega32A4        [/etc/avrdude.conf:13641]
 x32a4u   = ATxmega32A4U       [/etc/avrdude.conf:13568]
 x32c4    = ATxmega32C4        [/etc/avrdude.conf:13621]
 x32d4    = ATxmega32D4        [/etc/avrdude.conf:13631]
 x32e5    = ATxmega32E5        [/etc/avrdude.conf:14521]
 x384c3   = ATxmega384C3       [/etc/avrdude.conf:14354]
 x384d3   = ATxmega384D3       [/etc/avrdude.conf:14407]
 x64a1    = ATxmega64A1        [/etc/avrdude.conf:13741]
 x64a1u   = ATxmega64A1U       [/etc/avrdude.conf:13757]
 x64a3    = ATxmega64A3        [/etc/avrdude.conf:13768]
 x64a3u   = ATxmega64A3U       [/etc/avrdude.conf:13778]
 x64a4    = ATxmega64A4        [/etc/avrdude.conf:13789]
 x64a4u   = ATxmega64A4U       [/etc/avrdude.conf:13657]
 x64b1    = ATxmega64B1        [/etc/avrdude.conf:13799]
 x64b3    = ATxmega64B3        [/etc/avrdude.conf:13810]
 x64c3    = ATxmega64C3        [/etc/avrdude.conf:13710]
 x64d3    = ATxmega64D3        [/etc/avrdude.conf:13721]
 x64d4    = ATxmega64D4        [/etc/avrdude.conf:13731]
 x8e5     = ATxmega8E5         [/etc/avrdude.conf:14417]
 ucr2     = deprecated, use 'uc3a0512' [/etc/avrdude.conf:14590]

Example ATmega328(P)

Das heißt z. B. für den ATmega328 (in meiner avrdude.conf Zeile 8493) und für den ATmega 328P (Zeile 8678)

avrdude.conf Zeile 8493 bis 8684
  1. ------------------------------------------------------------
  2. ATmega328
  3. ------------------------------------------------------------

part

   id			= "m328";
   desc		= "ATmega328";
   has_debugwire	= yes;
   flash_instr		= 0xB6, 0x01, 0x11;
   eeprom_instr	= 0xBD, 0xF2, 0xBD, 0xE1, 0xBB, 0xCF, 0xB4, 0x00,

0xBE, 0x01, 0xB6, 0x01, 0xBC, 0x00, 0xBB, 0xBF, 0x99, 0xF9, 0xBB, 0xAF;

   stk500_devcode	= 0x86;
   # avr910_devcode	= 0x;
   signature		= 0x1e 0x95 0x14;
   pagel		= 0xd7;
   bs2			= 0xc2;
   chip_erase_delay	= 9000;
   pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",

"x x x x x x x x x x x x x x x x";

   chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",

"x x x x x x x x x x x x x x x x";

   timeout	= 200;
   stabdelay	= 100;
   cmdexedelay	= 25;
   synchloops	= 32;
   bytedelay	= 0;
   pollindex	= 3;
   pollvalue	= 0x53;
   predelay	= 1;
   postdelay	= 1;
   pollmethod	= 1;
   pp_controlstack =

0x0E, 0x1E, 0x0F, 0x1F, 0x2E, 0x3E, 0x2F, 0x3F, 0x4E, 0x5E, 0x4F, 0x5F, 0x6E, 0x7E, 0x6F, 0x7F, 0x66, 0x76, 0x67, 0x77, 0x6A, 0x7A, 0x6B, 0x7B, 0xBE, 0xFD, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00;

   hventerstabdelay	= 100;
   progmodedelay	= 0;
   latchcycles		= 5;
   togglevtg		= 1;
   poweroffdelay	= 15;
   resetdelayms	= 1;
   resetdelayus	= 0;
   hvleavestabdelay	= 15;
   resetdelay		= 15;
   chiperasepulsewidth	= 0;
   chiperasepolltimeout = 10;
   programfusepulsewidth = 0;
   programfusepolltimeout = 5;
   programlockpulsewidth = 0;
   programlockpolltimeout = 5;
   ocdrev              = 1;
   memory "eeprom"

paged = no; page_size = 4; size = 1024; min_write_delay = 3600; max_write_delay = 3600; readback_p1 = 0xff; readback_p2 = 0xff; read = " 1 0 1 0 0 0 0 0", " 0 0 0 x x x a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " o o o o o o o o";

write = " 1 1 0 0 0 0 0 0", " 0 0 0 x x x a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " i i i i i i i i";

loadpage_lo = " 1 1 0 0 0 0 0 1", " 0 0 0 0 0 0 0 0", " 0 0 0 0 0 0 a1 a0", " i i i i i i i i";

writepage = " 1 1 0 0 0 0 1 0", " 0 0 x x x x a9 a8", " a7 a6 a5 a4 a3 a2 0 0", " x x x x x x x x";

mode = 0x41; delay = 20; blocksize = 4; readsize = 256;

   ;
   memory "flash"

paged = yes; size = 32768; page_size = 128; num_pages = 256; min_write_delay = 4500; max_write_delay = 4500; readback_p1 = 0xff; readback_p2 = 0xff; read_lo = " 0 0 1 0 0 0 0 0", " 0 0 a13 a12 a11 a10 a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " o o o o o o o o";

read_hi = " 0 0 1 0 1 0 0 0", " 0 0 a13 a12 a11 a10 a9 a8", " a7 a6 a5 a4 a3 a2 a1 a0", " o o o o o o o o";

loadpage_lo = " 0 1 0 0 0 0 0 0", " 0 0 0 x x x x x", " x x a5 a4 a3 a2 a1 a0", " i i i i i i i i";

loadpage_hi = " 0 1 0 0 1 0 0 0", " 0 0 0 x x x x x", " x x a5 a4 a3 a2 a1 a0", " i i i i i i i i";

writepage = " 0 1 0 0 1 1 0 0", " 0 0 a13 a12 a11 a10 a9 a8", " a7 a6 x x x x x x", " x x x x x x x x";

mode = 0x41; delay = 6; blocksize = 128; readsize = 256;

   ;
   memory "lfuse"

size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0", "x x x x x x x x o o o o o o o o";

write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0", "x x x x x x x x i i i i i i i i";

   ;
   memory "hfuse"

size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0", "x x x x x x x x o o o o o o o o";

write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0", "x x x x x x x x i i i i i i i i";

   ;
   memory "efuse"

size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0", "x x x x x x x x o o o o o o o o";

write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0", "x x x x x x x x x x x x x i i i";

   ;
   memory "lock"

size = 1; min_write_delay = 4500; max_write_delay = 4500; read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0", "x x x x x x x x x x o o o o o o";

write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x", "x x x x x x x x 1 1 i i i i i i";

   ;
   memory "calibration"

size = 1; read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x", "0 0 0 0 0 0 0 0 o o o o o o o o";

   ;
   memory "signature"

size = 3; read = "0 0 1 1 0 0 0 0 0 0 0 x x x x x", "x x x x x x a1 a0 o o o o o o o o";

   ;

part parent "m328"

   id			= "m328p";
   desc		= "ATmega328P";
   signature		= 0x1e 0x95 0x0F;
   ocdrev              = 1;

Hier kann schön erkennen, dass der ATmega328P seine Parameter vom ATmega328 erbt. Nur die Signatur hat sich geändert. Die OCDREV (On-Chip-Debugging Revision) ist bei beiden gleich, hätte hier eigentlich gar nicht ne gesetzt werden müssen.

Wenn man avrdude mit dem falschen Prozessor (-p) aufruft kommt z. B. eine solche Meldung:

>avrdude -c usbtiny -p m328

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: Expected signature for ATmega328 is 1E 95 14
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

Wie man aus dem Configfile (s.o.) auslesen kann, lässt sich für <memtype> der -U Option eines der folgenden einsetzen:

  • eeprom
  • flash
  • lfuse
  • hfuse
  • efuse
  • lock
  • calibration
  • signature

Der ATmega328 hat 32 KB (eigentlich KiB) Flashmemory und 1 KiB EEPROMmemory was sich leicht mit avrdude überprüfen lässt.

worker:~ # avrdude -c usbtiny -p m328p -U eeprom:r:test.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading eeprom memory:

Reading | ################################################## | 100% 39.02s

avrdude: writing output file "test.hex"

avrdude: safemode: Fuses OK (E:FD, H:DA, L:FF)

avrdude done.  Thank you.

Teminal Mode

worker:~ # avrdude -t -c usbtiny -p m328p

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude> help
>>> help 
Valid commands:

  dump   : dump memory  : dump <memtype> <addr> <N-Bytes>
  read   : alias for dump
  write  : write memory : write <memtype> <addr> <b1> <b2> ... <bN>
  erase  : perform a chip erase
  sig    : display device signature bytes
  part   : display the current part information
  send   : send a raw command : send <b1> <b2> <b3> <b4>
  parms  : display adjustable parameters (STK500 only)
  vtarg  : set <V[target]> (STK500 only)
  varef  : set <V[aref]> (STK500 only)
  fosc   : set <oscillator frequency> (STK500 only)
  sck    : set <SCK period> (STK500 only)
  spi    : enter direct SPI mode
  pgm    : return to programming mode
  verbose : change verbosity
  help   : help
  ?      : help
  quit   : quit

Use the 'part' command to display valid memory types for use with the
'dump' and 'write' commands.

avrdude>
avrdude> part

>>> part

AVR Part : ATmega328P

Chip Erase delay : 9000 us

PAGEL : PD7

BS2 : PC2

RESET disposition : dedicated

RETRY pulse : SCK

serial program mode : yes

parallel program mode : yes

Timeout : 200

StabDelay : 100

CmdexeDelay : 25

SyncLoops : 32

ByteDelay : 0

PollIndex : 3

PollValue : 0x53

Memory Detail :

                        Block Poll               Page                       Polled
 Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
 ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
 eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
 flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
 lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
 hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
 efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
 lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
 calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
 signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

avrdude>

Examples:

dump eeprom 0 1024
dump flash 0 4096

Literatur

Avrdude Manual Version 5.1, 13 January 2006 by Brian S. Dean

Online Manual V5.10

Arduino as an ISP-Programmer


Kommentar hinzufügen
TippvomTibb freut sich über alle Kommentare. Sofern du nicht anonym bleiben möchtest, registriere dich bitte oder melde dich an.