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

📄 avrdude.1

📁 这是一个非常有价值的参考代码
💻 1
📖 第 1 页 / 共 2 页
字号:
.\".\" avrdude - A Downloader/Uploader for AVR device programmers.\" Copyright (C) 2001, 2002, 2003, 2005  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.50 2005/09/21 02:00:58 bdean Exp $.\".Dd DATE September 18, 2005.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 b Ar baudrate.Op Fl B Ar bitclock.Op Fl c Ar programmer-id.Op Fl C Ar config-file.Op Fl D.Op Fl e.Oo Fl E Ar exitspec Ns.Op \&, Ns Ar exitspec.Oc.Op Fl F.Op Fl n.Op Fl P Ar port.Op Fl q.Op Fl s.Op Fl t.Op Fl u.Op Fl U Ar memtype:op:filename:filefmt.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,Atmel's JTAG ICE mkII,programmers complying to AppNote AVR910 and AVR109 (including the Butterfly),as well as a simple hard-wiredprogrammer connected directly to a.Xr ppi 4or.Xr parport 4parallel port, or to a standard serial 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..PpA number of equally simple bit-bang programming adapters that connectto a serial port are supported as well, among them the popularPonyprog serial adapter, and the DASA and DASA3 adapters that used tobe supported by uisp(1).Note that these adapters are meant to be attached to a physical serialport.Connecting to a serial port emulated on top of USB is likely to notwork at all, or to work abysmally slow..PpAtmel's STK500 programmer is also supported and connects to a serialport.Both, firmware versions 1.x and 2.x can be handled, but require adifferent programmer type specification (by now)..PpThe simple serial programmer described in Atmel's application noteAVR910, and the bootloader described in Atmel's application noteAVR109 (which is also used by the AVR Butterfly evaluation board), aresupported on a serial port..PpAtmel's JTAG ICE mkII is supported as well to up- or download memoryareas from/to an AVR target (no support for on-chip debugging)..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.On the STK500 programmer, several operational parameters (target supplyvoltage, target Aref voltage, master clock) can be examined and changedfrom within terminal mode as well..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\fPc128	AT90CAN128pwm2	AT90PWM2pwm3	AT90PWM31200	AT90S12002313	AT90S23132333	AT90S23332343	AT90S2343 (*)4414	AT90S44144433	AT90S44334434	AT90S44348515	AT90S85158535	AT90S8535m103	ATmega103m128	ATmega128m16	ATmega16m161	ATmega161m162	ATmega162m163	ATmega163m164	ATmega164m169	ATmega169m32	ATmega32m324	ATmega324m329	ATmega329m3290	ATmega3290m48	ATmega48m64	ATmega64m644	ATmega644m649	ATmega649m6490	ATmega6490m8	ATmega8m8515	ATmega8515m8535	ATmega8535m88	ATmega88t12	ATtiny12t13	ATtiny13t15	ATtiny15t2313	ATtiny2313t25	ATtiny25t26	ATtiny26t45	ATtiny45t85	ATtiny85.TE.Bl -tag -width "(*) ".It "(*)"The AT90S2323 and ATtiny22 use the same algorithm..El.It Fl b Ar baudrateOverride the RS-232 connection baud rate specified in the respectiveprogrammer's entry of the configuration file..It Fl B Ar bitclockSpecify the bit clock period for the JTAG interface (JTAG ICE only).The value is a floating-point number in microseconds.The default value of the JTAG ICE results in about 1 microsecond bitclock period, suitable for target MCUs running at 4 MHz clock andabove.Unlike certain parameters in the STK500, the JTAG ICE resets all itsparameters to default values when the programming software signsoff from the ICE, so for MCUs running at lower clock speeds, thisparameter must be specified on the command-line..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 DDisable auto erase for flash.  When the.Fl Uoption with flash memory is specified,.Nmwill perform a chip erase before starting any of the programmingoperations, since it generally is a mistake to program the flashwithout performing an erase first.  This option disables that..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 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 nNo-write - disables actually writing data to the MCU (useful for debugging.Nm avrdude)..It Fl P Ar portUse.Ar portto identify the device to which the programmer is attached.  By

⌨️ 快捷键说明

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