📄 install.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>SCU Robotic Systems Laboratory - Installing Procyon AVRlib</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<!--#config timefmt="%a %b %d, %Y" -->
<h1>Installing Procyon ARMlib</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>
<center>Written by Pascal Stang | Updated:
<!--#echo var="LAST_MODIFIED" -->
</center>
<hr>
<h3><a name="1"></a>1. Overview</h3>
<blockquote>
<p>Procyon ARMlib is an open-source collection of C-language function libraries
for ARM processors. The goal of ARMlib 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, ARMlib is a bunch of functions that do things commonly needed in
embedded systems. Despite the learning curve of getting started, for most
projects, using ARMlib will shorten the time spent programming and/or improve
the quality or functionality of the final product.</p>
<p>For a partial list of currently available function libraries within ARMlib
see the <a href="index.html">ARMlib Main Page</a>.</p>
</blockquote>
<h3><a name="2"></a>2. Downloading</h3>
<blockquote>
<p>ARMlib is currently available only as a complete zip file. You can get it
from the <a href="index.html">ARMlib Main Page</a>.</p>
<p><strong><font color="#FF0000">Downloading the complete <a href="armlib.zip">avrlib.zip</a>
file is highly recommended as documentation and code examples are included
in the zip.</font></strong></p>
</blockquote>
<h3><a name="3"></a>3. Installing</h3>
<blockquote>
<p><strong><font color="#FF0000">This installation for ARMlib assumes you have
already installed a GCC C/C++ compiler for ARM and successfully tested it.</font></strong></p>
<p>You can install ARMlib anywhere you like, however, it's suggested that you
install it in a directory alongside your own ARM code projects. Create or
choose a top-level directory to hold both ARMlib 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\arm <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>armlib.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 armlib.zip but you may want to keep it for later re-installs
or as a backup.</p>
<p>You should now have an <strong>armlib</strong> directory where you installed
ARMlib. 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\arm\avrlib <font color="#0000FF"><-- ARMlib header and code files</font>
c:\Code\arm\avrlib\conf <font color="#0000FF"><-- ARMlib template configuration files</font>
c:\Code\arm\avrlib\docs <font color="#0000FF"><-- ARMlib documentation</font>
c:\Code\arm\avrlib\examples <font color="#0000FF"><-- ARMlib example applications</font>
c:\Code\arm\avrlib\make <font color="#0000FF"><-- ARMlib makefile include (armproj_make file in here)</font></pre>
<p>Finally, you need to create an environment variable <strong>ARMLIB</strong>
which points to the directory where you "installed" or unzipped
the ARMlib files so the compiler can find them. An example might be:</p>
<pre>ARMLIB = c:/code/arm/armlib <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>ARMlib 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 ARMlib is properly
installed:<br>
<font color="#FF0000"><strong>(This assumes you have previously installed
and tested the GCC ARM 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 ARMlib. For example:<br>
<strong>cd c:\Code\arm\armlib</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 ARMlib
program:
<pre>
C:\Code\ARM\LPC2100\armlib\examples\rprintf>make
arm-elf-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:\code\arm\lpc2100/armlib -Wa
,-ahlms=rprintftest.lst -mcpu=arm7tdmi -I. rprintftest.c -o rprintftest.o
arm-elf-gcc -x assembler-with-cpp -c -Wa, -gstabs -mcpu=arm7tdmi -I. c:\c
ode\arm\lpc2100/armlib/boot/boot.s -o c:\code\arm\lpc2100/armlib/boot/boot.o
arm-elf-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:\code\arm\lpc2100/armlib -Wa
,-ahlms=c:\code\arm\lpc2100/armlib/processor.lst -mcpu=arm7tdmi -I. c:\code\arm\
lpc2100/armlib/processor.c -o c:\code\arm\lpc2100/armlib/processor.o
arm-elf-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:\code\arm\lpc2100/armlib -Wa
,-ahlms=c:\code\arm\lpc2100/armlib/timer.lst -mcpu=arm7tdmi -I. c:\code\arm\lpc2
100/armlib/timer.c -o c:\code\arm\lpc2100/armlib/timer.o
arm-elf-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:\code\arm\lpc2100/armlib -Wa
,-ahlms=c:\code\arm\lpc2100/armlib/uart.lst -mcpu=arm7tdmi -I. c:\code\arm\lpc21
00/armlib/uart.c -o c:\code\arm\lpc2100/armlib/uart.o
arm-elf-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:\code\arm\lpc2100/armlib -Wa
,-ahlms=c:\code\arm\lpc2100/armlib/rprintf.lst -mcpu=arm7tdmi -I. c:\code\arm\lp
c2100/armlib/rprintf.c -o c:\code\arm\lpc2100/armlib/rprintf.o
arm-elf-gcc -c -g -Os -Wall -Wstrict-prototypes -Ic:\code\arm\lpc2100/armlib -Wa
,-ahlms=c:\code\arm\lpc2100/armlib/vt100.lst -mcpu=arm7tdmi -I. c:\code\arm\lpc2
100/armlib/vt100.c -o c:\code\arm\lpc2100/armlib/vt100.o
arm-elf-gcc c:\code\arm\lpc2100/armlib/boot/boot.o rprintftest.o c:\code\arm\lpc
2100/armlib/processor.o c:\code\arm\lpc2100/armlib/timer.o c:\code\arm\lpc2100/a
rmlib/uart.o c:\code\arm\lpc2100/armlib/rprintf.o c:\code\arm\lpc2100/armlib/vt1
00.o -Tc:\code\arm\lpc2100/armlib/boot/lpc2106-rom.ld -lm -nostartfiles -Wl,-M
ap=rprintftest.map,--cref,-nostdlib -o rprintftest.elf
arm-elf-objcopy -O binary rprintftest.elf rprintftest.bin
arm-elf-objcopy -O ihex rprintftest.elf rprintftest.hex
arm-elf-size rprintftest.elf
text data bss dec hex filename
4552 20 80 4652 122c rprintftest.elf
Errors: none
rm c:\code\arm\lpc2100/armlib/vt100.o c:\code\arm\lpc2100/armlib/uart.o c:\code\
arm\lpc2100/armlib/rprintf.o c:\code\arm\lpc2100/armlib/boot/boot.o c:\code\arm\
lpc2100/armlib/processor.o c:\code\arm\lpc2100/armlib/timer.o
C:\Code\ARM\LPC2100\armlib\examples\rprintf>
</pre>
</li>
<strong>ARMlib is ready to use!</strong>
</ul>
</blockquote>
<hr>
<center>Written by Pascal Stang | Updated:
<!--#echo var="LAST_MODIFIED" -->
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -