avrdude-doc-5.10.pdf

(225 KB) Pobierz
379843628 UNPDF
AVRDUDE
Aprogramfordownload/uploadingAVRmicrocontrollerlashandeeprom.
ForAVRDUDE,Version5.10,19January2010.
byBrianS.Dean
 
SendcommentsonAVRDUDEto avrdude-dev@nongnu.org .
Copyrightc2003,2005BrianS.Dean
Copyrightc2006-2008J¨orgWunsch
Permissionisgrantedtomakeanddistributeverbatimcopiesofthismanualprovidedthe
copyrightnoticeandthispermissionnoticearepreservedonallcopies.
Permissionisgrantedtocopyanddistributemodiiedversionsofthismanualunderthecon-
ditionsforverbatimcopying,providedthattheentireresultingderivedworkisdistributed
underthetermsofapermissionnoticeidenticaltothisone.
Permissionisgrantedtocopyanddistributetranslationsofthismanualintoanotherlan-
guage,undertheaboveconditionsformodiiedversions,exceptthatthispermissionnotice
maybestatedinatranslationapprovedbytheFreeSoftwareFoundation.
i
TableofContents
1Introduction ..................................... 1
1.1HistoryandCredits ............................................ 2
2CommandLineOptions ........................ 3
2.1OptionDescriptions ............................................ 3
2.2Programmersacceptingextendedparameters .................. 13
2.3ExampleCommandLineInvocations .......................... 15
3TerminalModeOperation .................... 19
3.1TerminalModeCommands .................................... 19
3.2TerminalModeExamples ..................................... 20
4ConigurationFile ............................. 23
4.1AVRDUDEDefaults .......................................... 23
4.2ProgrammerDeinitions ....................................... 23
4.3PartDeinitions ............................................... 23
4.3.1InstructionFormat ....................................... 24
4.4OtherNotes .................................................. 25
5ProgrammerSpeciicInformation ............ 26
5.1AtmelSTK600 ................................................ 26
AppendixAPlatformDependentInformation
................................................ 29
A.1Unix ......................................................... 29
A.1.1UnixInstallation ........................................ 29
A.1.1.1FreeBSDInstallation ................................ 29
A.1.1.2LinuxInstallation ................................... 29
A.1.2UnixConigurationFiles ................................. 30
A.1.2.1FreeBSDConigurationFiles ........................ 30
A.1.2.2LinuxConigurationFiles ........................... 30
A.1.3UnixPortNames ........................................ 30
A.1.4UnixDocumentation ..................................... 30
A.2Windows ..................................................... 30
A.2.1Installation .............................................. 30
A.2.2ConigurationFiles ...................................... 31
A.2.2.1Conigurationilenames ............................ 31
A.2.2.2HowAVRDUDEindstheconigurationiles. ........ 31
A.2.3PortNames ............................................. 31
A.2.3.1SerialPorts ......................................... 31
A.2.3.2ParallelPorts ....................................... 31
ii
A.2.4Usingtheparallelport ................................... 32
A.2.4.1WindowsNT/2K/XP ............................... 32
A.2.4.2Windows95/98 ..................................... 32
A.2.5Documentation .......................................... 32
A.2.6Credits. ................................................. 32
AppendixBTroubleshooting .................. 33
Chapter1:Introduction 1
1Introduction
AVRDUDE-AVRDownloaderUploader-isaprogramfordownloadinganduploading
theon-chipmemoriesofAtmel’sAVRmicrocontrollers.ItcanprogramtheFlashand
EEPROM,andwheresupportedbytheserialprogrammingprotocol,itcanprogramfuse
andlockbits.AVRDUDEalsosuppliesadirectinstructionmodeallowingonetoissueany
programminginstructiontotheAVRchipregardlessofwhetherAVRDUDEimplements
thatspeciicfeatureofaparticularchip.
AVRDUDEcanbeusedefectivelyviathecommandlinetoreadorwriteallchipmemory
types(eeprom,lash,fusebits,lockbits,signaturebytes)orviaaninteractive(terminal)
mode.UsingAVRDUDEfromthecommandlineworkswellforprogrammingtheentire
memoryofthechipfromthecontentsofaile,whileinteractivemodeisusefulforexploring
memorycontents,modifyingindividualbytesofeeprom,programmingfuse/lockbits,etc.
AVRDUDEsupportsthefollowingbasicprogrammertypes:Atmel’sSTK500,Atmel’s
AVRISPandAVRISPmkIIdevices,Atmel’sSTK600,Atmel’sJTAGICE(bothmkIand
mkII,thelatteralsoinISPmode),appnoteavr910,appnoteavr109(includingtheAVR
Butterly),serialbit-bangadapters,andthePPI(parallelportinterface).PPIrepresentsa
classofsimpleprogrammerswheretheprogramminglinesaredirectlyconnectedtothePC
parallelport.SeveralpinconigurationsexistforseveralvariationsofthePPIprogrammers,
andAVRDUDEcanbebeconiguredtoworkwiththembyeitherspecifyingtheappropriate
programmeronthecommandlineorbycreatinganewentryinitsconigurationile.All
that’susuallyrequiredforanewentryistotellAVRDUDEwhichpinstouseforeach
programmingfunction.
Anumberofequallysimplebit-bangprogrammingadaptersthatconnecttoaserialport
aresupportedaswell,amongthemthepopularPonyprogserialadapter,andtheDASA
andDASA3adaptersthatusedtobesupportedbyuisp(1).Notethattheseadaptersare
meanttobeattachedtoaphysicalserialport.Connectingtoaserialportemulatedontop
ofUSBislikelytonotworkatall,ortoworkabysmallyslow.
TheSTK500,JTAGICE,avr910,andavr109/butterlyusetheserialporttocommuni-
catewiththePC.TheSTK600,JTAGICEmkII,AVRISPmkII,USBasp,andUSBtinyISP
programmerscommunicatethroughtheUSB,using libusb asaplatformabstractionlayer.
TheSTK500,STK600,JTAGICE,andavr910containon-boardlogictocontrolthepro-
grammingofthetargetdevice.Theavr109bootloaderimplementsaprotocolsimilarto
avr910,butisactuallyimplementedinthebootareaofthetarget’slashROM,asop-
posedtobeinganexternaldevice.Thefundamentaldiferencebetweenthetwotypeslies
intheprotocolusedtocontroltheprogrammer.Theavr910protocolisverysimplisticand
caneasilybeusedasthebasisforasimple,homemadeprogrammersincetheirmwareis
availableonline.Ontheotherhand,theSTK500protocolismorerobustandcomplicated
andtheirmwareisnotopenlyavailable.TheJTAGICEalsousesaserialcommunication
protocolwhichissimilartotheSTK500irmwareversion2one.However,astheJTAG
ICEisintendedtoallowon-chipdebuggingaswellasmemoryprogramming,theprotocol
ismoresophisticated.(TheJTAGICEmkIIprotocolcanalsoberunontopofUSB.)Only
thememoryprogrammingfunctionalityoftheJTAGICEissupportedbyAVRDUDE.For
theJTAGICEmkII,JTAG,debugWireandISPmodearesupported,providedithasa
irmwarerevisionofatleast4.14(decimal).SeebelowforthelimitationsofdebugWire.
Zgłoś jeśli naruszono regulamin