⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avrdude.1

📁 AVR的USB文件
💻 1
字号:
.\".\" avrdude - A Downloader/Uploader for AVR device programmers.\" Copyright (C) 2001, 2002, 2003  Joerg Wunsch.\".\" This program is free software; you can redistribute it and/or modify.\" it under the terms of the GNU General Public License as published by.\" the Free Software Foundation; either version 2 of the License, or.\" (at your option) any later version..\".\" This program is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the.\" GNU General Public License for more details..\".\" You should have received a copy of the GNU General Public License.\" along with this program; if not, write to the Free Software.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.\".\".\" $Id: avrdude.1,v 1.27 2003/03/10 21:51:55 bdean Exp $.\".Dd DATE January 11, 2002.Os.Dt AVRDUDE 1.Sh NAME.Nm avrdude.Nd driver program for ``simple'' Atmel AVR MCU programmer.Sh SYNOPSIS.Nm.Fl p Ar partno.Op Fl c Ar programmer-id.Op Fl C Ar config-file.Op Fl e.Oo Fl E Ar exitspec Ns.Op \&, Ns Ar exitspec.Oc.Op Fl f Ar format.Op Fl F.Op Fl i Ar filename.Op Fl m Ar memtype.Op Fl o Ar filename.Op Fl n.Op Fl P Ar port.Op Fl t.Op Fl v.Op Fl V.Op Fl y.Op Fl Y.Sh DESCRIPTION.Nm Avrdudeis a program for downloading code and data to Atmel AVRmicrocontrollers..Nm Avrdudesupports Atmel's STK500 programmer as well as a simple hard-wiredprogrammer connected directly to a.Xr ppi 4parallel port.  In the simplest case, the hardware consists just of acable connecting the respective AVR signal lines to the parallel port..PpThe MCU is programmed in.Em serial programming mode ,so, for the.Xr ppi 4based programmer, the MCU signals.Ql /RESET ,.Ql SCK ,.Ql MISOand.Ql MOSIneed to be connected to the parallel port.  Optionally, some otherwiseunused output pins of the parallel port can be used to supply powerfor the MCU part, so it is also possible to construct a passivestandalone programming device.  Some status LEDs indicating thecurrent operating state of the programmer can be connected, and asignal is available to control a buffer/driver IC 74LS367 (or74HCT367).  The latter can be useful to decouple the parallel portfrom the MCU when in-system programming is used..PpSee the file.Pa ${PREFIX}/share/doc/avrdude/avrdude.pdffor a schematic of the.Xr ppi 4based programming hardware..PpAtmel's STK500 programmer is also supported and connects to a serialport..PpInput files can be provided, and output files can be written indifferent file formats, such as raw binary files containing the datato download to the chip, Intel hex format, or Motorola S-recordformat.  There are a number of tools available to produce those files,like.Xr asl 1as a standalone assembler, or.Xr avr-objcopy 1for the final stage of the GNU toolchain for the AVR microcontroller..Pp.Nm Avrdudecan program the EEPROM and flash ROM memory cells of supported AVRparts.  Where supported by the serial instruction set, fuse bits andlock bits can be programmed as well.  These are implemented within.Nmas seperate memory types and can be programmed using data from a file(see the.Fl moption) or from terminal mode (see the.Ar dumpand.Ar writecommands).  It is also possible to read the chip (provided it has notbeen code-protected previously, of course) and store the data in afile.  Finally, a ``terminal'' mode is available that allows one tointeractively communicate with the MCU, and to display or programindividual memory cells..Ss OptionsIn order to control all the different operation modi, a number of optionsneed to be specified to.Nm avrdude ..Bl -tag -offset indent -width indent.It Fl p Ar partnoThis is the only option that is mandatory for every invocation of.Nm avrdude .It specifies the type of the MCU connected to the programmer.  These are read from the config file.  If.Nm avrdudedoes not know about a part that you have, simply add it to the configfile (be sure and submit a patch back to the author so that it can beincorporated for the next version).  See the sample config file forthe format.  Currently, the following MCU types are understood:.Pp.TSll.\fBOption tag\fP	\fBOfficial part name\fPt15	ATtiny151200	AT90S12002313	AT90S23132333	AT90S23332343	AT90S2343 (*)4414	AT90S44144433	AT90S44334434	AT90S44348515	AT90S85158535	AT90S8535m163	ATMEGA163m169	ATMEGA169m128	ATMEGA128m103	ATMEGA103m16	ATMEGA16m8	ATMEGA8.TE.Bl -tag -width "(*) ".It "(*)"The AT90S2323 uses the same algorithm..El.It Fl c Ar programmer-idUse the pin configuration specified by the argument.  Pinconfigurations are read from the config file (see the.Fl Coption).  New pin configurations can be easily added or modifiedthrough the use of a config file to make.Nm avrdudework with different programmers as long as the programmer supports theAtmel AVR serial program method.  You can use the 'default_programmer'keyword in your.Pa ${HOME}/.avrdudercfile to assign a default programmer to keep from having to specifythis option on every invocation..It Fl C Ar config-fileUse the specified config file to load configuration data.  This filecontains all programmer and part definitions that.Nm avrdudeknows about.  If you have a programmer or part that.Nm avrdudedoes not know about, you can add it to the config file (be sure andsubmit a patch back to the author so that it can be incorporated forthe next version).  See the config file, located at.Pa ${PREFIX}/etc/avrdude.conf ,which contains a description of the format..It Fl eCauses a chip erase to be executed.  This will reset the contents of theflash ROM and EEPROM to the value.Ql 0xff ,and is basically a prerequisite command before the flash ROM can bereprogrammed again.  The only exception would be if the newcontents would exclusively cause bits to be programmed from the value.Ql 1to.Ql 0 .Note that in order to reprogram EERPOM cells, no explicit prior chiperase is required since the MCU provides an auto-erase cycle in thatcase before programming the cell..It Xo Fl E Ar exitspec Ns.Op \&, Ns Ar exitspec.XcBy default,.Nmleaves the parallel port in the same state at exit as it has beenfound at startup.  This option modifies the state of the.Ql /RESETand.Ql Vcclines the parallel port is left at, according to the.Ar exitspecarguments provided, as follows:.Bl -tag -width noreset.It Ar resetThe.Ql /RESETsignal will be left activated at program exit, that is it will be held.Em low ,in order to keep the MCU in reset state afterwards.  Note in particularthat the programming algorithm for the AT90S1200 device mandates thatthe.Ql /RESETsignal is active.Em beforepowering up the MCU, so in case an external power supply is used for thisMCU type, a previous invocation of.Nmwith this option specified is one of the possible ways to guarantee thiscondition..It Ar noresetThe.Ql /RESETline will be deactivated at program exit, thus allowing the MCU targetprogram to run while the programming hardware remains connected..It Ar vccThis option will leave those parallel port pins active.Pq \&i. \&e. Em highthat can be used to supply.Ql Vccpower to the MCU..It Ar novccThis option will pull the.Ql Vccpins of the parallel port down at program exit..El.PpMultiple.Ar exitspecarguments can be separated with commas..It Fl f Ar formatThis option specifies the file format for the input or output filesto be processed..Ar Formatcan be one of:.Bl -tag -width sss.It Ar iIntel Hex.It Ar sMotorola S-record.It Ar rraw binary; little-endian byte order, in the case of the flash ROM data.It Ar aauto detect; valid for input only, and only if the input is notprovided at.Em stdin ..El.PpThe default is to use auto detection for input files, and raw binaryformat for output files..It Fl FNormally,.Nmtries to verify that the device signature read from the part isreasonable before continuing.  Since it can happen from time to timethat a device has a broken (erased or overwritten) device signaturebut is otherwise operating normally, this options is provided tooverride the check..It Fl i Ar filenameSpecifies the input file to be programmed into the MCU.  Can be specifiedas.Ql \&-to use.Em stdinas the input..It Fl m Ar memtypeSpecifies which program area of the MCU to read or write; allowablevalues depend on the MCU being programmed, but most support at least.Em eepromfor the EEPROM, and.Em flashfor the flash ROM.  Use the.Fl voption on the command line or the.Ar partcommand from terminal mode to display all the memory types supportedby a particular device.  The default is.Em flash ..It Fl nNo-write - disables actually writing data to the MCU (useful for debugging.Nm avrdude)..It Fl o Ar filenameSpecifies the name of the output file to write, and causes the respectivememory area to be read from the MCU.  Can be specified as.Ql \&-to write to.Em stdout ..It Fl P Ar portUse.Ar portto identify the device to which the programmer is attached.  Bydefault the.Pa /dev/ppi0port is used, but if the programmer type normally connects to theserial port, the.Pa /dev/cuaa0port is the default.  If you need to use a different parallel orserial port, use this option to specify the alternate port name..It Fl tTells.Nmto enter the interactive ``terminal'' mode instead of up- or downloadingfiles.  See below for a detailed description of the terminal mode..It Fl vEnable verbose output..It Fl VDisable automatic verify check when uploading data..It Fl yTells.Nmto use the last four bytes of the connected parts' EEPROM memory totrack the number of times the device has been erased.  When thisoption is used and the.Fl eflag is specified to generate a chip erase, the previous counter willbe saved before the chip erase, it is then incremented, and writtenback after the erase cycle completes.  Presumably, the device wouldonly be erased just before being programmed, and thus, this can beutilized to give an indication of how many erase-rewrite cycles thepart has undergone.  Since the FLASH memory can only endure a finitenumber of erase-rewrite cycles, one can use this option to track whena part is nearing the limit.  The typical limit for Atmel AVR FLASH is1000 cycles.  Of course, if the application needs the last four bytesof EEPROM memory, this option should not be used..It Fl Y Ar cyclesInstructs.Nmto initialize the erase-rewrite cycle counter residing at the last fourbytes of EEPROM memory to the specified value.  If the applicationneeds the last four bytes of EEPROM memory, this option should not beused..El.Ss Terminal modeIn this mode,.Nmonly initializes communication with the MCU, and then awaits usercommands on standard input.  Commands and parameters may beabbreviated to the shortest unambiguous form.  Terminal mode providesa command history using.Xr readline 3 ,so previously entered command lines can be recalled and edited.  Thefollowing commands are currently implemented:.Bl -tag -offset indent -width indent.It Ar dump memtype addr nbytesRead.Ar nbytesbytes from the specified memory area, and display them in the usualhexadecimal and ASCII form..It Ar dumpContinue dumping the memory contents for another.Ar nbyteswhere the previous.Ar dumpcommand left off..It Ar write memtype addr byte1 ... byteNManually program the respective memory cells, starting at address.Ar addr ,using the values.Ar byte1through.Ar byteN .This feature is not implemented for bank-addressed memories such asthe flash memory of ATMega devices..It Ar erasePerform a chip erase..It Ar send b1 b2 b3 b4Send raw instruction codes to the AVR device.  If you need access to afeature of an AVR part that is not directly supported by.Nm ,this command allows you to use it, even though.Nmdoes not implement the command..It Ar sigDisplay the device signature bytes..It Ar partDisplay the current part settings..It Ar \&?.It Ar helpGive a short on-line summary of the available commands..It Ar quitLeave terminal mode and thus.Nm avrdude ..El.Ss Default Parallel port pin connections(these can be changed, see the.Fl coption).TSll.\fBPin number\fP	\fBFunction\fP2-5	Vcc (optional power supply to MCU)7	/RESET (to MCU)8	SCK (to MCU)9	MOSI (to MCU)10	MISO (from MCU)18-25	GND.TE.Sh FILES.Bl -tag -offset indent -width /dev/ppi0XXX.It Pa /dev/ppi0default device to be used for communication with the programminghardware.It Pa ${PREFIX}/etc/avrdude.confprogrammer and parts configuration file.It Pa ${HOME}/.avrdudercprogrammer and parts configuration file (per-user overrides).It Pa ~/.inputrcInitialization file for the.Xr readline 3library.It Pa ${PREFIX}/share/doc/avrdude/avrdude.pdfSchematic of programming hardware.El.\" .Sh EXAMPLES.\" .Sh DIAGNOSTICS.Sh SEE ALSO.Xr avr-objcopy 1 ,.Xr ppi 4 ,.Xr readline 3.PpThe AVR microcontroller product description can be found at.Pp.Dl "http://www.atmel.com/products/AVR/".\" .Sh HISTORY.Sh AUTHORS.Nm Avrdudewas written by Brian S. Dean <bsd@bsdhome.com>..PpThis man page by.ie t J\(:org Wunsch..el Joerg Wunsch..Sh BUGSPlease report bugs to avrdude-dev@nongnu.org.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -