Version 4 (modified by C Rempel, on 06/15/12 at 22:16:52) (diff) |
---|
RTEMS Add-On Packages
The RTEMS Addon Packages is an infrastucture complete with examples of how to add libraries to RTEMS to make more complex applications.
Getting the RTEMS Addon Package
To get the RTEMS addon packages:
$ git clone git://git.rtems.org/rtems-addon-packages.git \
rtems-addon-packages
Adding Libraries to RTEMS
Setting up the Environment
First, set your RTEMS_MAKEFILE_PATH
$ export RTEMS_MAKEFILE_PATH=/opt/rtems-4.11/i386-rtems4.11/pc386
Another (recommended choice) would be to add
export RTEMS_MAKEFILE_PATH=/opt/rtems-4.11/i386-rtems4.11/pc386
to your ~/.bashrc
Second, to ensure i386-rtems4.11-gcc, will work, add your install point to your PATH.
$ export PATH=$PATH:/opt/rtems-4.11
Using Makefile.avl
Navigate to the RTEMS Addon Packages
$ cd ~/rtems-addon-packages
Navigate to the AVL library
$ cd avl-1.4.0
Make the AVL library
$ make -f ../RTEMS_Makefiles/Makefile.avl
Writing Your Own Makefile.<<library>>
Makefile.<<library>> is a shell script to configure a package.
Look at rtems-addon-packages/RTEMS_Makefiles/Makefile.ncurses
$ cat ~/rtems-addon-packages/RTEMS_Makefiles/Makefile.ncurses
The first four lines are comments that describe the package.
# # Declare supported terminal types. # This value can be augmented/overridden by the site-configuration file #
The next line sets some environmental variables:
TERMINALS=xterm,vt100,linux,ansi
The next paragraph explains the dependencies:
# # The following will work only if you have the latest ncurses version # of infocmp installed before trying to build for an RTEMS target. # The cf_cv_type_of_bool hack works around a bug when configuring # for a cross-target. #
all: is simply the makefile rule for all
Note: Cached variables help with cross-compiling by providing values that can't be determined by configure.
Makefile.ncurses use some some cached variables.
cf_cv_type_of_bool=char
Set the C++ compiler to the C compiler. CXX="$(CC)"
Select the TERM environmental variable to xterm TERM=xterm
make -f ../RTEMS_Makefiles/Makefile.avl
The RTEMS Addon Packages come with the following additions: Name: avl-1.4.0 Site: http://savannah.gnu.org/projects/avl Description: GNU libavl is a library in ANSI/ISO C for the manipulation of binary trees and balanced binary trees.
Name: gsl-1.9 Site: http://www.gnu.org/software/gsl/ Description: The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers.
Name: libtecla-1.6.1 Site: http://www.astro.caltech.edu/~mcs/tecla/index.html Description: The tecla library provides UNIX and LINUX programs with interactive command line editing facilities, similar to those of the UNIX tcsh shell.
Name: ncurses-5.9 Site: http://www.gnu.org/software/ncurses/ Description: The Ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, and more.
Name: adline-6.2 Site: http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.
To The current maintainer of the RTEMS Addon Packages is: Mark Johannes.