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

📄 install.html

📁 avr cpu 库源代码 对avr单片机编程很有帮助
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Procyon AVRlib: Installing AVRlib Manually</title><link href="dox.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><div class="nav"><a class="el" href="main.html">Procyon AVRlib</a></div><h1><a class="anchor" name="install">Installing AVRlib Manually</a></h1> <h2>Sections</h2><ol>  <li><a href="#1">Overview</a></li>  <li><a href="#2">Downloading</a></li>  <li><a href="#3">Installing</a></li>  <li><a href="#4">Testing</a></li></ol><br><p><strong><font color="#FF0000">This guide applies only to manually "installing" the AVRlib zip file.If you are using a windows machine, you may use the AVRlib win32 installer program.These steps are done automatically by the installer.</font></strong></p><hr><h3><a name="1"></a>1. Overview</h3><blockquote>   <p>Procyon AVRlib is an open-source collection of C-language function libraries     for the Atmel AVR series processors. The goal of AVRlib is to provide the     programmer with a code base which performs the most often needed tasks in     embedded system programming. Hopefully, this will allow the programmer to     focus on high-level operation of their code rather than get bogged down in     the details of low-level code.</p>  <p>In short, AVRlib is a bunch of functions that do things commonly needed in     embedded systems. Despite the learning curve of getting started, for most     projects, using AVRlib will shorten the time spent programming and/or improve     the quality or functionality of the final product.</p>  <p>AVRlib functions are available for a wide variety of tasks and purposes.     In general, AVRlib tries to address the following kinds of needs:</p><ul>  <li>Functions which control or interface to AVR processor hardware (like timers,     uarts, the a2d converter, etc)</li>  <li>Functions which interface to or drive devices often used in embedded systems     (like LCDs, hard disks, gps units, etc)</li>  <li>Functions which create higher-level functionality from processor resources     (like pulse generation, software uarts, software i2c bus, etc)</li></ul>  <p>For a partial list of currently available function libraries see the <a href="index.html">AVRlib     Main Page</a>.</p></blockquote><h3><a name="2"></a>2. Downloading</h3><blockquote>   <p>AVRlib is currently available as a win32 self-installer, or a zip file.     Both are available from the <a href="index.html">AVRlib Main Page</a>.</p></blockquote><h3><a name="3"></a>3. Installing</h3><blockquote>   <p><strong><font color="#FF0000">This installation for AVRlib assumes you have     already installed the AVR-GCC or WinAVR compiler and successfully tested it.</font></strong></p>  <p>You can install AVRlib anywhere you like, however, it's suggested that you     install it in a directory alongside your own AVR code projects. Create or     choose a top-level directory to hold both AVRlib and the project folders which     you will create to hold the code for each individual project you work on.     The directory you choose should not contain spaces in its name or path. Some     examples are: </p><pre>c:\Code\AVR                          <font color="#009900">(GOOD)</font>c:\My Code                           <font color="#FF0000">(NOT RECOMMENDED - HAS SPACES IN PATH)</font></pre>  <p>From the download step you should have an <strong>avrlib.zip</strong> file.     Unzip this file into the code directory you chose above. Be sure to preserve     the internal directory structure of the zip file when you unzip it. Afterward,     you can delete avrlib.zip but you may want to keep it for later re-installs     or as a backup.</p>  <p>You should now have an <strong>avrlib</strong> directory where you installed     AVRlib. If you have some time, get familiar with what's inside some of the     directories. Your directories should look something like this:</p>  <pre>c:\Code\AVR\avrlib                   <font color="#0000FF"><-- AVRlib header and code files</font>c:\Code\AVR\avrlib\conf              <font color="#0000FF"><-- AVRlib template configuration files</font>c:\Code\AVR\avrlib\docs              <font color="#0000FF"><-- AVRlib documentation</font>c:\Code\AVR\avrlib\examples          <font color="#0000FF"><-- AVRlib example applications</font>c:\Code\AVR\avrlib\make              <font color="#0000FF"><-- AVRlib makefile include (avrproj_make file in here)</font></pre>  <p>Finally, you need to create an environment variable <strong>AVRLIB</strong>     which points to the directory where you &quot;installed&quot; or unzipped     the AVRlib files so the compiler can find them. An example might be:</p>  <pre>AVRLIB = c:/code/avr/avrlib         <font color="#0000FF"><-- change to actual AVRlib install directory</font></pre>  <p>If you are unsure how to set environment variables on your system, look at     the WinAVR/AVR-GCC installation guide elsewhere on this site or consult the     web.</p>  <p>AVRlib installation is complete!</p>  </blockquote><h3><a name="4"></a>4. Testing</h3><blockquote>   <p>There are a few simple steps you can take to verify that AVRlib is properly     installed:<br>    <font color="#FF0000"><strong>(This assumes you have previously installed     and tested the AVR-GCC or WinAVR compiler)</strong></font></p>  <ul>    <li>Open a Command Prompt (find it in your <strong>Start Menu</strong> or       select <strong>Run</strong>, and run <strong>cmd.exe</strong>) </li>    <li>Change directories to the location where you installed AVRlib. For example:<br>      <strong>cd c:\Code\AVR\AVRlib</strong></li>    <li>Go into the examples directory. <strong>cd examples</strong></li>    <li>Pick an example to try compiling such as rprintf and change to that directory.       <strong>cd rprintf</strong></li>    <li>Type <strong>make clean</strong> at the prompt</li>    <li>Type <strong>make</strong></li>    <li>If your output looked like this then you just compiled your first AVRlib       program:       <pre>C:\Code\AVR\avrlib\examples\rprintf>makeavr-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:/code/avr/avrlib -Wa,-ahlms=rprintftest.lst -mmcu=atmega323 -I. rprintftest.c -o rprintftest.oavr-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:/code/avr/avrlib -Wa,-ahlms=c:/code/avr/avrlib/buffer.lst -mmcu=atmega323 -I. c:/code/avr/avrlib/buffer.c -o c:/code/avr/avrlib/buffer.oavr-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:/code/avr/avrlib -Wa,-ahlms=c:/code/avr/avrlib/uart.lst -mmcu=atmega323 -I. c:/code/avr/avrlib/uart.c -o c:/code/avr/avrlib/uart.oavr-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:/code/avr/avrlib -Wa,-ahlms=c:/code/avr/avrlib/rprintf.lst -mmcu=atmega323 -I. c:/code/avr/avrlib/rprintf.c -o c:/code/avr/avrlib/rprintf.oavr-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:/code/avr/avrlib -Wa,-ahlms=c:/code/avr/avrlib/timer.lst -mmcu=atmega323 -I. c:/code/avr/avrlib/timer.c -o c:/code/avr/avrlib/timer.oavr-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:/code/avr/avrlib -Wa,-ahlms=c:/code/avr/avrlib/vt100.lst -mmcu=atmega323 -I. c:/code/avr/avrlib/vt100.c -o c:/code/avr/avrlib/vt100.oavr-gcc  c:/code/avr/avrlib/buffer.o c:/code/avr/avrlib/uart.o c:/code/avr/avrlib/rprintf.o c:/code/avr/avrlib/timer.o c:/code/avr/avrlib/vt100.o rprintftest.o  -Wl,-Map=rprintftest.map,--cref -mmcu=atmega323 -o rprintftest.elfavr-objcopy -O ihex      -R .eeprom rprintftest.elf rprintftest.hexavr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 -O ihex   rprintftest.elf rprintftest.eepavr-size rprintftest.elf   text    data     bss     dec     hex filename   9596       0     192    9788    263c rprintftest.elfErrors: nonerm c:/code/avr/avrlib/vt100.o c:/code/avr/avrlib/rprintf.o c:/code/avr/avrlib/uart.o c:/code/avr/avrlib/timer.o c:/code/avr/avrlib/buffer.oC:\Code\AVR\avrlib\examples\rprintf></pre>    </li>    <strong>AVRlib is ready to use!</strong>   </ul></blockquote><hr><center>Written by Pascal Stang | Updated:   <!--#echo var="LAST_MODIFIED" --></center></body></html> <hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>

⌨️ 快捷键说明

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