📄 avrdude.texi
字号:
@end exampleIf you wish to install from a pre-built package instead of the source,you can use the following instead:@example% su - root# pkg_add -r avrdude@end exampleOf course, you must be connected to the Internet for these methods towork, since that is where the source as well as the pre-built package isobtained.@c@c Node@c@node Linux Installation, , FreeBSD Installation, Unix Installation@subsubsection Linux Installation@noindentOn rpm based linux systems (such as RedHat, SUSE, Mandrake, etc), youcan build and install the rpm binaries directly from the tarball:@example$ su - root# rpmbuild -tb avrdude-@value{VERSION}.tar.gz# rpm -Uvh /usr/src/redhat/RPMS/i386/avrdude-@value{VERSION}-1.i386.rpm@end exampleNote that the path to the resulting rpm package, differs from systemto system. The above example is specific to RedHat.@c@c Node@c@node Unix Configuration Files, Unix Port Names, Unix Installation, Unix@subsection Unix Configuration Files@noindentWhen AVRDUDE is build using the default @option{--prefix} configureoption, the default configuration file for a Unix system is located at@code{/usr/local/etc/avrdude.conf}. This can be overridden by using the@option{-C} command line option. Additionally, the user's home directoryis searched for a file named @code{.avrduderc}, and if found, is used toaugment the system default configuration file.@menu* FreeBSD Configuration Files:: * Linux Configuration Files:: @end menu@c@c Node@c@node FreeBSD Configuration Files, Linux Configuration Files, Unix Configuration Files, Unix Configuration Files@subsubsection FreeBSD Configuration Files@noindentWhen AVRDUDE is installed using the FreeBSD ports system, the systemconfiguration file is always @code{/usr/local/etc/avrdude.conf}.@c@c Node@c@node Linux Configuration Files, , FreeBSD Configuration Files, Unix Configuration Files@subsubsection Linux Configuration Files@noindentWhen AVRDUDE is installed using from an rpm package, the systemconfiguration file will be always be @code{/etc/avrdude.conf}.@c@c Node@c@node Unix Port Names, Unix Documentation, Unix Configuration Files, Unix@subsection Unix Port Names@noindentThe parallel and serial port device file names are system specific.The following table lists the default names for a given system.@multitable @columnfractions .30 .30 .30@item @strong{System} @tab @strong{Default Parallel Port} @tab @strong{Default Serial Port}@item FreeBSD @tab @code{/dev/ppi0} @tab @code{/dev/cuaa0}@item Linux @tab @code{/dev/parport0} @tab @code{/dev/ttyS0}@end multitableOn FreeBSD systems, AVRDUDE uses the ppi(4) interface foraccessing the parallel port and the sio(4) driver for serial portaccess.On Linux systems, AVRDUDE uses the ppdev interface foraccessing the parallel port and the tty driver for serial portaccess.@c@c Node@c@node Unix Documentation, , Unix Port Names, Unix@subsection Unix Documentation@noindentAVRDUDE installs a manual page as well as info, HTML and PDFdocumentation. The manual page is installed in@code{/usr/local/man/man1} area, while the HTML and PDF documentationis installed in @code{/usr/local/share/doc/avrdude} directory. Theinfo manual is installed in @code{/usr/local/info/avrdude.info}.Note that these locations can be altered by various configure optionssuch as @option{--prefix}.@c@c Node@c@node Windows, , Unix, Platform Dependent Information@section Windows@menu* Windows Installation:: * Windows Configuration Files:: * Windows Port Names:: * Using the parallel port:: * Documentation:: * Credits.:: @end menu@c@c Node@c@node Windows Installation, Windows Configuration Files, Windows, Windows@subsection Installation@noindentA Windows executable of avrdude is included in WinAVR which can be found at@url{http://sourceforge.net/projects/winavr}. WinAVR is a suite of executable, open source software development tools for the AVR for the Windows platform.To build avrdude from the source You must have Cygwin (@url{http://www.cygwin.com/}).To build and install from the source tarball for Windows (using Cygwin):@example$ set PREFIX=<your install directory path>$ export PREFIX$ gunzip -c avrdude-@value{VERSION}.tar.gz | tar xf -$ cd avrdude-@value{VERSION}$ ./configure LDFLAGS="-static" --prefix=$PREFIX --datadir=$PREFIX --sysconfdir=$PREFIX/bin --enable-versioned-doc=no$ make$ make install@end example@c@c Node@c@node Windows Configuration Files, Windows Port Names, Windows Installation, Windows@subsection Configuration Files@menu* Configuration file names:: * How AVRDUDE finds the configuration files.:: @end menu@c@c Node@c@node Configuration file names, How AVRDUDE finds the configuration files., Windows Configuration Files, Windows Configuration Files@subsubsection Configuration file names@noindentAVRDUDE on Windows looks for a system configuration file name of@code{avrdude.conf} and looks for a user override configuration file of@code{avrdude.rc}.@c@c Node@c@node How AVRDUDE finds the configuration files., , Configuration file names, Windows Configuration Files@subsubsection How AVRDUDE finds the configuration files. @noindentAVRDUDE on Windows has a different way of searching for the system anduser configuration files. Below is the search method for locating theconfiguration files:@enumerate@itemThe directory from which the application loaded.@itemThe current directory.@itemThe Windows system directory. On Windows NT, the name of this directoryis @code{SYSTEM32}.@itemWindows NT: The 16-bit Windows system directory. The name of thisdirectory is @code{SYSTEM}.@itemThe Windows directory.@itemThe directories that are listed in the PATH environment variable.@end enumerate@c@c Node@c@node Windows Port Names, Using the parallel port, Windows Configuration Files, Windows@subsection Port Names@menu* Serial Ports:: * Parallel Ports:: @end menu@c@c Node@c@node Serial Ports, Parallel Ports, Windows Port Names, Windows Port Names@subsubsection Serial Ports @noindentWhen you select a serial port (i.e. when using an STK500) use theWindows serial port device names such as: com1, com2, etc. @c@c Node@c@node Parallel Ports, , Serial Ports, Windows Port Names@subsubsection Parallel Ports@noindentAVRDUDE will only accept 3 Windows parallel port names: lpt1, lpt2, orlpt3. Each of these names corresponds to a fixed parallel port baseaddress:@table @code@item lpt10x378@item lpt20x278@item lpt30x3BC@end tableOn your desktop PC, lpt1 will be the most common choice. If you areusing a laptop, you might have to use lpt3 instead of lpt1. Select thename of the port the corresponds to the base address of the parallelport that you want.@c@c Node@c @node Using the parallel port, Documentation, Windows Port Names, Windows@subsection Using the parallel port@menu* Windows NT/2K/XP:: * Windows 95/98:: @end menu@c@c Node@c@node Windows NT/2K/XP, Windows 95/98, Using the parallel port, Using the parallel port@subsubsection Windows NT/2K/XP@noindentOn Windows NT, 2000, and XP user applications cannot directly access theparallel port. However, kernel mode drivers can access the parallel port.giveio.sys is a driver that can allow user applications to set the stateof the parallel port pins.Before using AVRDUDE, the giveio.sys driver must be loaded. Theaccompanying command-line program, loaddrv.exe, can do just that.To make things even easier there are 3 batch files that are alsoincluded:@enumerate@item install_giveio.batInstall and start the giveio driver.@item status_giveio.batCheck on the status of the giveio driver.@item remove_giveio.batStop and remove the giveio driver from memory.@end enumerateThese 3 batch files calls the loaddrv program with various options toinstall, start, stop, and remove the driver.When you first execute install_giveio.bat, loaddrv.exe and giveio.sysmust be in the current directory. When install_giveio.bat is executed itwill copy giveio.sys from your current directory to your Windowsdirectory. It will then load the driver from the Windows directory. Thismeans that after the first time install_giveio is executed, you should be able to subsequently execute the batch file from any directory and haveit successfully start the driver.Note that you must have administrator privilege to load the giveio driver.@c@c Node@c@node Windows 95/98, , Windows NT/2K/XP, Using the parallel port@subsubsection Windows 95/98@noindentOn Windows 95 and 98 the giveio.sys driver is not needed.@c@c Node@c@node Documentation, Credits., Using the parallel port, Windows@subsection Documentation@noindentAVRDUDE installs a manual page as well as info, HTML and PDFdocumentation. The manual page is installed in@code{/usr/local/man/man1} area, while the HTML and PDF documentationis installed in @code{/usr/local/share/doc/avrdude} directory. Theinfo manual is installed in @code{/usr/local/info/avrdude.info}.Note that these locations can be altered by various configure optionssuch as @option{--prefix} and @option{--datadir}.@c@c Node@c@node Credits., , Documentation, Windows@subsection Credits.@noindentThanks to:@itemize @bullet@itemDale Roberts for the giveio driver.@itemPaula Tomlinson for the loaddrv sources.@itemChris Liechti <cliechti@@gmx.net> for modifying loaddrv to be commandline driven and for writing the batch files.@end itemize@c@c Node@c@node Troubleshooting, ,Platform Dependent Information ,Top@appendix Troubleshooting@noindentIn general, please report any bugs encountered via@url{http://savannah.nongnu.org/bugs/?group=avrdude}.@itemize @bullet@itemProblem: I'm using a serial programmer under Windows and get the followingerror:@code{avrdude: serial_open(): can't set attributes for device "com1"},Solution: This problem seems to appear with certain versions of Cygwin. Specifying@code{"/dev/com1"} instead of @code{"com1"} should help.@itemProblem: I'm using linux and my AVR910 programmer is really slow.Solution (short): @code{setserial @var{port} low_latency}Solution (long):There are two problems here. First, the system may wait some time before itpasses data from the serial port to the program. Under Linux the followingcommand works around this (you may need root privileges for this).@code{setserial @var{port} low_latency}Secondly, the serial interface chip may delay the interrupt for some time.This behaviour can be changed by setting the FIFO-threshold to one. Under Linux thiscan only be done by changing the kernel source in @code{drivers/char/serial.c}.Search the file for @code{UART_FCR_TRIGGER_8} and replace it with @code{UART_FCR_TRIGGER_1}. Note that overall performance might suffer if thereis high throughput on serial lines. Also note that you are modifying the kernel atyour own risk.@itemProblem: I'm not using linux and my AVR910 programmer is really slow.Solutions: The reasons for this are the same as above.If you know how to work around this on your OS, please let us know.@itemProblem: I cannot modify the fuse bits on my AVR!Solution: You probably forgot to specify the -u option, which allows you to modify fuse bits.This is done to prevent corrupt data from changing the fuse bits without you knowing about it, andcurrently also prevents the user from changing the fuse bits by accident. This patch was added inresponse to a number of occasions when an AVR had stopped responding because the fuse bits got changedby an error caused by the programmer. Programmer of course meaning both the physical device, and theperson sitting at the keyboard.@itemProblem: AVRDUDE says my device is not supported when using the AVR109 boot loaderSolution: Currently, AVRDUDE uses the AVR910 device codes given in the@code{avrdude.conf} file, and matches them against the list of supporteddevices reported by the programmer. Unfortunately, there are no devicecodes at all for some of the newer AVR devices, and even worse, thedevice codes listed in @code{preprocessor.xls} of appnote AVR109 do notmatch those once specified in AVR910.Use the -F option to force AVRDUDE to continue anyway.@itemProblem: Updating the flash ROM from terminal mode does not work with theJTAG ICE mkII.Solution: None at this time. Currently, the JTAG ICE mkII code cannotwrite to the flash ROM one byte at a time.@end itemize@bye
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -