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

📄 avrdude.texi

📁 AVR的USB文件
💻 TEXI
📖 第 1 页 / 共 3 页
字号:
%% -*-texinfo-*-\input texinfo@c $Id: avrdude.texi,v 1.7 2003/03/11 00:00:30 arcanum Exp $@setfilename avrdude.info@settitle AVRDUDE@include version.texi@c@c These are set in version.texi which is automatically generated by automake.@c@c @set UPDATED 26 Febuary 2003@c @set EDITION 3.2.0@c @set VERSION 3.2.0@c This is a dir.info fragment to support semi-automated addition of@c manuals to an info tree.@dircategory AVR Programming & development tools.@direntry* AvrDude: (avrdude).            AVR program downloader/uploader.@end direntry@ifinfoThis file documents the avrdude program.For avrdude version @value{VERSION}, @value{UPDATED}.Copyright @copyright{} 2003 Brian DeanPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.@ignorePermission is granted to process this file through TeX and print theresults, provided the printed document carries copying permissionnotice identical to this one except for the removal of this paragraph(this paragraph not being relevant to the printed manual).@end ignorePermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby the Free Software Foundation.@end ifinfo@titlepage@title AVRDUDE@subtitle A program for download/uploading AVR microcontroller flash and eeprom.@subtitle For AVRDUDE, Version @value{VERSION}, @value{UPDATED}.@author by Brian S. Dean@page@hfill (Send bugs and comments on AVRDUDE to @w{@email{avrdude-dev@@nongnu.org}}.)@vfillCopyright @copyright{} 2003 Brian S. Dean@sp 2Permission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby the Free Software Foundation.@end titlepage@contents@c@c Top Node@c@node Top, Introduction, (dir), (dir)@comment  node-name,  next,  previous,  up@ifinfoThis file documents the avrdude program for downloading/uploadingprograms to Atmel AVR microcontrollers.For avrdude version @value{VERSION}, @value{UPDATED}.@end ifinfo@menu* Introduction::                * Command Line Options::        * Terminal Mode Operation::     * Configuration File::          * Platform Dependent Information::  @end menu@c@c Node@c@node Introduction, Command Line Options, Top, Top@comment  node-name,  next,  previous,  up@chapter Introduction@cindex introductionAVRDUDE - AVR Downloader Uploader - is a program for downloading anduploading the on-chip memories of Atmel's AVR microcontrollers. It canprogram the Flash and EEPROM, and where supported by the serialprogramming protocol, it can program fuse and lock bits. AVRDUDE alsosupplies a direct instruction mode allowing one to issue any programminginstruction to the AVR chip regardless of whether AVRDUDE implementsthat specific feature of a particular chip.AVRDUDE can be used effectively via the command line to read or writeall chip memory types (eeprom, flash, fuse bits, lock bits, signaturebytes) or via an interactive (terminal) mode. Using AVRDUDE from thecommand line works well for programming the entire memory of the chipfrom the contents of a file, while interactive mode is useful forexploring memory contents, modifing individual bytes of eeprom,programming fuse/lock bits, etc.AVRDUDE supports two basic programmer types: Atmel's STK500 and the PPI(parallel port interface). PPI represents a class of simple programmerswhere the programming lines are directly connected to the PC parallelport, while the STK500 uses the serial port to communicate with the PCand contains on-board logic to control the programming of the targetdevice. Several pin configurations exist for several variations of thePPI programmers, and AVRDUDE can be be configured to work with them byeither specifying the appropriate programmer on the command line or bycreating a new entry in its configuration file. All that's usuallyrequired for a new entry is to tell AVRDUDE which pins to use for eachprogramming function.@menu* History::                     @end menu@c@c Node@c@node History,  , Introduction, Introduction@section HistoryAVRDUDE was written by Brian S. Dean under the name of AVRPROG to run onthe FreeBSD Operating System.  Brian renamed the software to be calledAVRDUDE when interest grew in a Windows port of the software so that thename did not conflict with AVRPROG.EXE which is the name of Atmel'sWindows programming software.The AVRDUDE source now resides in the public CVS repository onsavannah.gnu.org (@url{http://savannah.gnu.org/projects/avrdude/}),where it continues to be enhanced and ported to other systems.  Inaddition to FreeBSD, AVRDUDE now runs on Linux and Windows.  Thedevelopers behind the porting effort primarily were Ted Roth, EricWeddington, and Joerg Wunsch.And in the spirit of many open source projects, this manual also drawson the work of others.  The initial revision was composed of parts ofthe original Unix manual page written by Joerg Wunsch, the original website documentation by Brian Dean, and from the comments describing thefields in the AVRDUDE configuration file by Brian Dean.  The texiformatting was modeled after that of the Simulavr documentation by TedRoth.@c@c Node@c@node Command Line Options, Terminal Mode Operation, Introduction, Top@chapter Command Line Options@cindex options@menu* Option Descriptions::         * Example Command Line Invocations::  @end menu@c@c Node@c@node Option Descriptions, Example Command Line Invocations, Command Line Options, Command Line Options@section Option Descriptions@noindentAVRDUDE is a command line tool, used as follows:@exampleavrdude -p partno @var{options} @dots{}@end example@noindentCommand line options are used to control AVRDUDE's behaviour.  Thefollowing options are recognized:@table @code@item -p @var{partno}This is the only mandatory option and it tells AVRDUDE what type of part(MCU) that is connected to the programmer.  The @var{partno} parameteris the part's id listed in the configuration file.  Specify -p ? to list all parts in the configuration file.  If a part is unknownto AVRDUDE, it means that there is no config file entry for that part,but it can be added to the configuration file if you have the Atmeldatasheet so that you can enter the programming specifications.Currently, the following MCU types are understood:@table @code@itemx t15ATtiny15@itemx 1200AT90S1200@itemx 2313AT90S2313@itemx 2333AT90S2333@itemx 2343AT90S2343 (*)@itemx 4414AT90S4414@itemx 4433AT90S4433@itemx 4434AT90S4434@itemx 8515AT90S8515@itemx 8535AT90S8535@itemx m163ATMEGA163@itemx m169ATMEGA169@itemx m128ATMEGA128@itemx m103ATMEGA103@itemx m16ATMEGA16@itemx m8ATMEGA8@end table(*)   The AT90S2323 uses the same algorithm.@item -c @var{programmer-id}Specify the programmer to be used.  AVRDUDE knows about several commonprogrammers.  Use this option to specify which one to use.  The@var{programmer-id} parameter is the programmer's id listed in theconfiguration file.  Specify -c ? to list all programmers in the configuration file.  If you have a programmer that is unknown toAVRDUDE, and the programmer is controlled via the PC parallel port,there's a good chance that it can be easily added to the configurationfile without any code changes to AVRDUDE.  Simply copy an existing entryand change the pin definitions to match that of the unknown programmer.@item -C @var{config-file}Use the specified config file for configuration data.  This filecontains all programmer and part definitions that AVRDUDE knows about.If you have a programmer or part that AVRDUDE does not know about, youcan add it to the config file (be sure and submit a patch back to theauthor so that it can be incorporated for the next version).  If notspecified, AVRDUDE reads the configuration file from/usr/local/etc/avrdude.conf (FreeBSD and Linux). See Appendix A forthe method of searching for the configuration file for Windows.@item -eCauses a chip erase to be executed.  This will reset the contents of theflash ROM and EEPROM to the value `0xff', and is basically aprerequisite command before the flash ROM can be reprogrammed again.The only exception would be if the new contents would exclusively causebits to be pro- grammed from the value `1' to `0'.  Note that in orderto reprogram EERPOM cells, no explicit prior chip erase is requiredsince the MCU provides an auto-erase cycle in that case beforeprogramming the cell.@item -E @var{exitspec}[,@dots{}]By default, AVRDUDE leaves the parallel port in the same state at exitas it has been found at startup.  This option modifies the state of the`/RESET' and `Vcc' lines the par- allel port is left at, according tothe exitspec arguments provided, as follows:@table @code@itemx resetThe `/RESET' signal will be left activated at pro- gram exit, that is itwill be held low, in order to keep the MCU in reset state afterwards.Note in particular that the programming algorithm for the AT90S1200device mandates that the `/RESET' signal is active before powering upthe MCU, so in case an external power supply is used for this MCU type,a previous invocation of AVRDUDE with this option specified is one ofthe possible ways to guarantee this condition.@itemx noresetThe `/RESET' line will be deactivated at program exit, thus allowing theMCU target program to run while the programming hardware remainsconnected.@itemx vcc This option will leave those parallel port pins active (i. e. high) thatcan be used to supply `Vcc' power to the MCU.@itemx novccThis option will pull the `Vcc' pins of the paral- lel port down atprogram exit.@end tableMultiple @var{exitspec} arguments can be separated with commas.@item -f @var{format}This option specifies the file format for the input or out- put files tobe processed.  Format can be one of:@table @code@itemx iIntel Hex@itemx sMotorola S-record@itemx rraw binary; little-endian byte order, in the case of the flash ROM data@itemx aauto detect; valid for input only, and only if the input is not providedat stdin.@end tableThe default is to use auto detection for input files, and raw binaryformat for output files.@item -FNormally, AVRDUDE tries to verify that the device signature read fromthe part is reasonable before continuing.  Since it can happen from timeto time that a device has a broken (erased or overwritten) devicesignature but is otherwise operating normally, this options is providedto override the check.@item -i @var{filename}Specifies the input file to be programmed into the MCU.  Can bespecified as `-' to use stdin as the input.@item -m @var{memtype}Specifies which program area of the MCU to read or write; allowablevalues depend on the MCU being programmed, but most support at least@code{eeprom} for the EEPROM, and @code{flash} for the flash ROM.  Usethe @option{-v} option on the command line or the @code{part} command fromterminal mode to display all the memory types supported by a particulardevice.  The default is @code{flash}.@item -nNo-write - disables actually writing data to the MCU (useful fordebugging AVRDUDE).@item -o @var{filename}Specifies the name of the output file to write, and causes therespective memory area to be read from the MCU.  Can be specified as `-'to write to stdout.@item -P @var{port}Use port to identify the device to which the programmer is attached.  Bydefault the @code{/dev/ppi0} port is used, but if the programmer typenormally connects to the serial port, the @code{/dev/cuaa0} port is thedefault.  If you need to use a different parallel or serial port, usethis option to spec- ify the alternate port name.@item -tTells AVRDUDE to enter the interactive ``terminal'' mode instead of up-or downloading files.  See below for a detailed description of theterminal mode.@item -vEnable verbose output.@item -VDisable automatic verify check when uploading data.@item -yTells AVRDUDE to use the last four bytes of the connected parts' EEPROMmemory to track the number of times the device has been erased.  Whenthis option is used and the @option{-e} flag is specified to generate achip erase, the previous counter will be saved before the chip erase, itis then incremented, and written back after the erase cycle com- pletes.Presumably, the device would only be erased just before beingprogrammed, and thus, this can be utilized to give an indication of howmany erase-rewrite cycles the part has undergone.  Since the FLASHmemory can only endure a finite number of erase-rewrite cycles, one canuse this option to track when a part is nearing the limit.  The typ-ical limit for Atmel AVR FLASH is 1000 cycles.  Of course, if theapplication needs the last four bytes of EEPROM mem- ory, this optionshould not be used.@item -Y @var{cycles}Instructs AVRDUDE to initialize the erase-rewrite cycle counter residingat the last four bytes of EEPROM memory to the specified value.  If theapplication needs the last four bytes of EEPROM memory, this optionshould not be used.@end table@c@c Node@c@node Example Command Line Invocations,  , Option Descriptions, Command Line Options@section Example Command Line Invocations@noindentDownload the file @code{m128diag.hex} to the ATmega128 chip using theSTK500 programmer connected to the default serial port:@example@cartouche% avrdude -p m128 -c stk500 -y -e -i m128diag.hexavrdude: AVR device initialized and ready to accept instructionsavrdude: Device signature = 0x1e9702

⌨️ 快捷键说明

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