Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# Installing ARMlib Manually

## Sections

1. Overview
2. Downloading
3. Installing
4. Testing

This guide applies only to manually "installing" the ARMlib zip file. If you are using a windows machine, you may use the ARMlib win32 installer program. These steps are done automatically by the installer.

### 1. Overview

> 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.

> 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.

> For a partial list of currently available function libraries within ARMlib see the ARMlib Main Page.

### 2. Downloading

> ARMlib is currently available only as a complete zip file. You can get it from the ARMlib Main Page.

> Future ARMlib releases will also eventually be available as a win32 self-installer.

### 3. Installing

> This installation for ARMlib assumes you have already installed a GCC C/C++ compiler for ARM and successfully tested it.

> 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:

>     c:\Code\arm                          (GOOD)
>     c:\My Code                           (NOT RECOMMENDED - HAS SPACES IN PATH)

> From the download step you should have an armlib.zip 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.

> You should now have an armlib 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:

>     c:\Code\arm\armlib                   <-- ARMlib general header and code files
>     c:\Code\arm\armlib\arch              <-- ARMlib processor architecture support
>     c:\Code\arm\armlib\arch\at91         <-- ARMlib AT91 processor support
>     c:\Code\arm\armlib\arch\lpc2000      <-- ARMlib LPC2000 processor support
>     c:\Code\arm\armlib\arch\aduc7000     <-- ARMlib ADuC7000 processor support
>     c:\Code\arm\armlib\conf              <-- ARMlib template configuration files
>     c:\Code\arm\armlib\docs              <-- ARMlib documentation
>     c:\Code\arm\armlib\examples          <-- ARMlib example applications
>     c:\Code\arm\armlib\make              <-- ARMlib makefile include (armproj_make file in here)
>     c:\Code\arm\armlib\net               <-- ARMlib network support

> Finally, you need to create an environment variable ARMLIB which points to the directory where you "installed" or unzipped the ARMlib files so the compiler can find them. An example might be:

>     ARMLIB = c:/code/arm/armlib         <-- change to actual ARMlib install directory

> 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.

> ARMlib installation is complete!

### 4. Testing

> There are a few simple steps you can take to verify that ARMlib is properly installed:
> (This assumes you have previously installed and tested the GCC ARM compiler)

> - Open a Command Prompt (find it in your Start Menu or select Run, and run cmd.exe)
> - Change directories to the location where you installed ARMlib. For example:
>   cd c:\Code\arm\armlib
> - Go into the examples directory. cd examples
> - Pick an example to try compiling such as rprintf and change to that directory. cd rprintf
> - Type make clean at the prompt
> - Type make
> - If your output looked something like this then you just compiled your first ARMlib program:

>       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>

> ARMlib is ready to use!

Written by Pascal Stang | Updated: