Commit 1b75f162 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Working communication between links 1 and 2 of a GR740 board using RTEMS5.1

parent e4f9ba64
bin.*
objs.*
deps.*
src/version.h
# Configuration section
#
# Use environment variables if found, otherwise fallback to sane defaults
# If not explicitely selected (with 'make FPU=1'), compile for FPU emulation
ifeq ($(FPU),)
FPU=1
endif
# To be able to properly handle any combination of (FPU, LEON, release)
# options, create a SUFFIX (see below) to differentiate output folders
ifeq ($(FPU),1)
FPU_SUFFIX=FPU
else
FPU_SUFFIX=NONFPU
endif
# Build up our settings from our inputs and our environment
LEON ?= gr740
CROSS_PREFIX ?= sparc-rtems5
RTEMS ?= /opt/rtems-5.1-2018.03.06
RTEMS_MAKEFILE_PATH = ${RTEMS}/${CROSS_PREFIX}/${LEON}
RTEMS_LIB=${RTEMS_MAKEFILE_PATH}/lib
# If not selected, compile debug version of binary (no optimizations)
#ifeq ($(CFG),)
CFG=debug
#endif
# The directories containing the source files, separated by ':'
#
# DEAR USER, YOU MUST EDIT THIS AND ADD YOUR SOURCE FOLDERS
VPATH=src
# Your source files: regardless of where they reside in the source tree,
# VPATH will locate them...
#
# DEAR USER, YOU MUST EDIT THIS
SRC= spwrouter_custom_config.c test.c grspw_pkt_lib.c
SUFFIX=$(CFG).$(FPU_SUFFIX).$(LEON)
# Build a Dependency list and an Object list, by replacing the .c
# extension to .d for dependency files, and .o for object files.
DEP = $(patsubst %.c, deps.$(SUFFIX)/%.d, ${SRC})
OBJ = $(patsubst %.c, objs.$(SUFFIX)/%.o, ${SRC})
# Your final binary
#
# DEAR USER, YOU MUST EDIT THIS
TARGET=fputest
# What compiler to use for generating dependencies:
# it will be invoked with -MM -MP
CC = ${RTEMS}/bin/${CROSS_PREFIX}-gcc
CDEP = ${CC}
# What include flags to pass to the compiler
INCLUDEFLAGS= -I src
# Compilation flags (common)
COMMON += -B${RTEMS_LIB} -specs bsp_specs -qrtems \
-mcpu=leon3 -DBSP_${LEON} \
-ffunction-sections -fdata-sections -Wall \
-Wmissing-prototypes -Wimplicit-function-declaration \
-Wstrict-prototypes -Wnested-externs
# Separate compile options per configuration
ifeq ($(CFG),debug)
CFLAGS += ${COMMON} -g -Wall -D_DEBUG ${INCLUDEFLAGS}
else
CFLAGS += ${COMMON} -g -O2 -Wall ${INCLUDEFLAGS}
endif
# Should we generate native FPU instructions for the SRC or not?
ifeq ($(FPU),0)
CFLAGS += -msoft-float
LDFLAGS += -msoft-float
endif
# A common link flag for all configurations
LDFLAGS += ${COMMON} -Wl,--gc-sections
all: inform bin.$(SUFFIX)/${TARGET}
inform:
ifneq ($(CFG),release)
ifneq ($(CFG),debug)
@echo " "
@echo "Invalid or missing configuration (CFG) "$(CFG)" specified."
@echo " "
@echo "You must specify a configuration when running make, e.g."
@echo " "
@echo " make CFG=debug LEON=leon3 FPU=1 V=1"
@echo " "
@echo "- Possible choices for CFG are 'release' and 'debug'"
@echo "- Possible choices for LEON are 'leon2' and 'leon3' (default)"
@echo "- Possible choices for FPU are '1' (native) and '0' (emulated) (default)"
@echo "- Possible choices for V are '1' (show commands) and '0' (silent) (default)"
@echo " "
@exit 1
endif
endif
bin.$(SUFFIX)/${TARGET}: ${OBJ} | inform
@mkdir -p $(dir $@)
ifeq ($(V),1)
$(CC) -g -o $@ $^ ${LDFLAGS}
else
@echo [LD] $@
@$(CC) -g -o $@ $^ ${LDFLAGS}
endif
ifeq ($(CFG),release)
@${RTEMS}/bin/${CROSS_PREFIX}-objcopy --only-keep-debug $@ ${@}.debug
@${RTEMS}/bin/${CROSS_PREFIX}-strip $@
endif
@echo Built with RTEMS at ${RTEMS_LIB} for ${LEON}.
objs.$(SUFFIX)/%.o: %.c | src/version.h
@mkdir -p $(dir $@)
ifeq ($(V),1)
$(CC) -c $(CFLAGS) -o $@ $<
else
@echo [CC] $@
@$(CC) -c $(CFLAGS) -o $@ $<
endif
deps.$(SUFFIX)/%.d: %.c
@mkdir -p $(dir $@)
@echo Generating dependencies for $<
@set -e ; $(CDEP) -MM -MP $(INCLUDEFLAGS) $< > $@.$$$$; \
sed 's,\($*\)\.o[ :]*,objs.$(SUFFIX)\/\1.o $@ : ,g' < $@.$$$$ > $@; \
rm -f $@.$$$$
src/version.h: $(patsubst %, src/%, ${SRC}) Makefile
@/bin/echo -en '#ifndef __VERSION_H__\n' > $@
@/bin/echo -en "#define __VERSION_H__\n" >> $@
@/bin/echo -en 'const char version[] = "1.' >> $@
@git log --oneline | wc -l | tr -d '\n' >> $@
@/bin/echo -n " (" >> $@
@git log --oneline | head -1 | cut -d\ -f1 | tr -d '\n' >> $@
@/bin/echo ')";' >> $@
@/bin/echo -en "#endif\n" >> $@
clean:
@rm -rf deps.* objs.* bin.*
# Unless "make clean" is called, include the dependency files
# which are auto-generated. Don't fail if they are missing
# (-include), since they will be missing in the first invocation!
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(CFG),)
-include ${DEP}
endif
endif
Introduction
============
This folder contains the OAR RTEMS scaffold. The Makefile and example
source code demonstrates how to:
* support both debug and release compilations
* support compilation for native and emulated FPU usage
* support targetting Leon2 and Leon3 CPUs
* enable/disable showing compilation commands
* perform memory, FPU and integer testing of any Leon-based board
Building RTEMS via the RSB
--------------------------
The contrib folder includes a script that you can use to compile RTEMS4.12
with the Leon2 and Leon3 BSPs from the OAR repository. Note that
[as discussed in the RTEMS mailing list](https://lists.rtems.org/pipermail/users/2016-February/029782.html),
you will need to compile your BSP for native or emulated FPU, based
on what your desired target is (i.e. edit the leon2.cfg/leon3.cfg
files to remove `-msoft-float` or not). The Makefile mirrors this
need, by pointing to different paths (see FPU_SUFFIX variable),
depending on whether you build with FPU=1 or not.
Executive summary: if you want to build native-FPU-using binaries,
you'll need to edit leon2.cfg/leon3.cfg and remove the `-msoft-float`
before building the BSPs (that is, right after the clone from
the RTEMS git repository - in line 87 of the script).
Application sources
-------------------
The sources of your project must be set inside the Makefile, in the SRC
variable. The VPATH can be used to automatically locate them in
your source tree:
VPATH=src:Library/foo:Library/bar:...
SRC= \
init.c \
tasking.c \
gnc.c \
compute_pi.c
# Compilation options
There are 4 orthogonal compilation options that you can control:
- debug/release compilation (`CFG`)
- emulated/native FPU compilation (`FPU`)
- Leon2/Leon3 target (`LEON`)
- show/hide compilation commands (`V`)
## Debug/Release mode
Using the `CFG` Makefile parameter, you can select debug or release
compilation:
$ make CFG=debug
...
$ ls -l bin.debug.NONFPU.leon3/
-rwxr-xr-x 1 user user 645273 Mar 16 17:43 fputest
$ make CFG=release
...
$ ls -l bin.release.NONFPU.leon3/
-rwxr-xr-x 1 root root 47860 Mar 16 17:48 fputest
-rwxr-xr-x 1 root root 585178 Mar 16 17:48 fputest.debug
Notice that:
- In release compilation, the process creates a small binary
(containing only the executable code) and separately, the debug information -
for loading from inside GDB via the `file` command.
- Notice also that the output folder tells you this build did not use
native FPU, and targeted Leon3 (the defaults). To compile for
native FPU or a different Leon target, use the next two options.
## Native or emulated FPU compilation for the source files
To use native FPU compilation for the source files, use the `FPU`
Makefile parameter:
$ make CFG=debug FPU=1
To use emulation (default, if `FPU` option is not provided), pass `FPU=0`:
$ make CFG=debug FPU=0
...or just don't mention `FPU` at all:
$ make CFG=debug
The `FPU` and `CFG` options are completely independent ; you can e.g.
compile a debug version that uses native FPU, and a release one that uses
emulation. Just keep in mind that currently, 4.12
[does not allow you to use the same BSP](https://lists.rtems.org/pipermail/users/2016-February/029782.html),
for both native and emulated FPU usage ; you'll have to build separate
BSPs by tweaking the `leon2.cfg`/`leon3.cfg` files when you build RTEMS.
## Select Leon target
Use the `LEON` Makefile parameter to decide which target to build for
(currently, only `leon2` and `leon3` are supported):
$ make CFG=debug FPU=1 LEON=leon3
## Verbosity
Messages shown during compilation follow the semantics of the Linux kernel
compilation process, emitting short messages by default (CC for compilation,
LD for linking). The compilation is also incremental, taking into account
the modification timestamps of the files and their dependencies:
$ touch src/task1.c
$ make
[CC] objs.debug.NONFPU.leon3/task1.o
[LD] bin.debug.NONFPU.leon3/fputest
If you want to see the complete commands used, pass `V=1`:
$ touch src/task1.c
$ make CFG=debug FPU=0 V=1
/opt/rtems-4.12-2016.06.13.NONFPU/bin/sparc-rtems4.12-gcc -c \
-B/opt/rtems-4.12-2016.06.13.NONFPU/sparc-rtems4.12/leon3/lib \
-specs bsp_specs -qrtems -mcpu=cypress -DBSP_leon3 -ffunction-sections \
-fdata-sections -Wall -Wmissing-prototypes \
-Wimplicit-function-declaration -Wstrict-prototypes -Wnested-externs \
-g -Wall -D_DEBUG -I src -msoft-float \
-o objs.debug.NONFPU.leon3/task1.o src/task1.c
/opt/rtems-4.12-2016.06.13.NONFPU/bin/sparc-rtems4.12-gcc -g \
-o bin.debug.NONFPU.leon3/fputest objs.debug.NONFPU.leon3/init.o \
objs.debug.NONFPU.leon3/task1.o objs.debug.NONFPU.leon3/task2.o \
objs.debug.NONFPU.leon3/common.o -msoft-float \
-B/opt/rtems-4.12-2016.06.13.NONFPU/sparc-rtems4.12/leon3/lib \
-specs bsp_specs -qrtems -mcpu=cypress -DBSP_leon3 \
-ffunction-sections -fdata-sections -Wall -Wmissing-prototypes \
-Wimplicit-function-declaration -Wstrict-prototypes \
-Wnested-externs -Wl,--gc-sections
Built with RTEMS at /opt/rtems-4.12-2016.06.13.NONFPU/sparc-rtems4.12/leon3/lib for leon3.
# Support
For any questions/feedback, raise tickets in the repository and/or contact
me directly:
Thanassis Tsiodras
Real-time Embedded Software Engineer
System, Software and Technology Department
Address:
ESTEC/Office EF216
Keplerlaan 1, PO Box 299
NL-2200 AG Noordwi
E-mail:
Athanasios.Tsiodras@esa.int
Phone:
+31 71 565 5332
#!/usr/bin/expect -f
set timeout 30
spawn /home/assert/bin.local/leon3-gdb.sh ./bin.release.FPU.leon3/fputest
expect "(gdb) "
send "c\r"
expect "500000"
send \003
send "quit"
send_user "\n"
#!/bin/bash
export RTEMS=/opt/rtems-4.11-2016.04.01.FPU.SMP
make CFG=release LEON=leon3 FPU=1
time expect -f ./benchmark.expect
#!/bin/bash
#
# This script builds the RTEMS/SPARC cross-compiler and the
# Leon2/Leon3/NGMP BSPs.
#
# To have a reproducible setup, it would be prudent if you
# executed this script under a Debian stretch chroot,
# bootstrapped via the following:
#
# mkdir /opt/stretch-chroot
# debootstrap stretch /opt/stretch-chroot
# mount -t proc none /opt/stretch-chroot/proc/
# mount -t sysfs none /opt/stretch-chroot/sys/
# mount -o bind /dev /opt/stretch-chroot/dev/
# mount -o bind /dev/pts /opt/stretch-chroot/dev/pts/
# chroot /opt/stretch-chroot
# apt-get update
# apt-get install flex bison make texinfo binutils gcc g++ gdb unzip git python2.7-dev pax libncurses5-dev
#
# Then chroot inside it and run this script:
#
# chroot /opt/stretch-chroot
# /path/to/build.rtems.4.12.sh
# Stop on any error
set -e
# DATE=$(date +"%Y.%m.%d")
DATE=2017.07.17
mkdir -p $HOME/rtems.build.logs
BUILD_LOG=$HOME/rtems.build.logs/${DATE}.log
[ -f ${BUILD_LOG} ] && {
echo "There's already a build log:"
echo " " ${BUILD_LOG}
echo Remove it to continue.
exit 1
}
# Record the output in $BUILD_LOG (see matching brace)
{
# Begin by checking out the RTEMS Source Builder
RSBPARENT=$HOME/development/rtems/src
mkdir -p $RSBPARENT
RSB=$RSBPARENT/rtems-source-builder-${DATE}
RTPREFIX=/opt/rtems-4.12-${DATE}
# rm -rf ${RTPREFIX}
# [ ! -d $RSB ] && {
# cd $RSBPARENT
# git clone https://github.com/RTEMS/rtems-source-builder.git rtems-source-builder-${DATE}
# }
cd $RSB
#git checkout -f e2952bb185c1f40027caa76cfd9e4a45b17a8886
# What tag/branch to work on? By default this will be in the master branch,
# but you can switch - to e.g. 4.11.2:
#
# git checkout -f 4.11.2
# Verify that we have all we need to build
source-builder/sb-check
cd rtems
# Your network firewall may or may not be an issue at this point:
# Many of the source tarballs needed by the RSB are fetched over
# PASV-enabled FTP servers.
#
# If your network is like the one in ESA/ESTEC and this is forbidden,
# you'll have to fetch these tarballs and hardlink to them each time
# (so no FTP action is triggered by the RTEMS RSB builder).
# The sed invocation below also replaces ftp: with http:
# (since this needs no PASV port meddling - which some firewalls object to)
#
# This is the way I do it - adapt it according to your needs:
#
# [ ! -d sources ] && {
# mkdir -p sources
# cd sources
# cp -al ~/development/rtems/pkg_sources_cache/* .
# cd ..
# for i in config/tools/*cfg ; do
# cat "$i" | sed 's,ftp://ftp.gnu.org,http://ftp.gnu.org,;s,ftp://gcc.gnu.org,http://gcc.gnu.org,;' > "$i".new && mv "$i".new "$i"
# done
# }
# Build the cross compiling toolchain
# (we're in the master branch, which is currently the "unofficial" 4.12)
# ../source-builder/sb-set-builder --with-ada --log=stage1.log --prefix=${RTPREFIX} 4.12/rtems-sparc
# Add the cross compiler to the PATH and checkout RTEMS
export PATH=${RTPREFIX}/bin:$PATH
cd ..
cd rtems-git
git checkout -f 96ce1ec743a1fcf27593ee72cf1695d9eb0290de
cd ..
# Build RTEMS
cd rtems-git
./bootstrap
cd ..
rm -rf build.${DATE}
mkdir build.${DATE}
cd build.${DATE}
../rtems-git/configure \
--target=sparc-rtems4.12 --prefix=${RTPREFIX} \
--enable-rtemsbsp="leon2 gr712rc gr740" --enable-posix --enable-ada \
--enable-tests --enable-smp --enable-cxx --enable-networking
make all
make install
} |& tee ${BUILD_LOG}
#!/bin/bash
#
# This script builds the RTEMS/SPARC cross-compiler and the
# LEON2/GR712/GR740 BSPs.
#
# The call to sb-check below will stop the build if your environment
# is missing the necessary dependencies. Note that in addition to these,
# the build depends on GCC7 AND GNAT7 - otherwise the creation of the
# toolchain will fail.
#
# If you want to get a pre-made toolchain that was built by this script,
# you can download it in standalone form from:
#
# http://download.tuxfamily.org/taste/RTEMS/rtems-4.12-2017.07.17.tar.bz2
#
# This compiler is also automatically installed in the TASTE VM
# (available from https://taste.tuxfamily.org/ - navigate to the Download
# Area, and get the .ova file - which you then import in VirtualBox).
# Upon entering the VM, call Update-TASTE (as indicated in the help
# screen shown upon boot) and the RTEMS toolchain will be installed.
# Stop on any error
set -e
DATE=$(date +"%Y.%m.%d")
mkdir -p $HOME/rtems.build.logs
BUILD_LOG=$HOME/rtems.build.logs/${DATE}.log
[ -f ${BUILD_LOG} ] && {
echo "There's already a build log:"
echo " " ${BUILD_LOG}
echo Remove it to continue.
exit 1
}
# Record the output in $BUILD_LOG (see matching brace)
{
# Begin by checking out the RTEMS Source Builder
RSBPARENT=$HOME/development/rtems/src
mkdir -p $RSBPARENT
RSB=$RSBPARENT/rtems-source-builder-${DATE}
RTPREFIX=/opt/rtems-4.12-${DATE}
rm -rf ${RTPREFIX}
[ ! -d $RSB ] && {
cd $RSBPARENT
git clone https://github.com/RTEMS/rtems-source-builder.git rtems-source-builder-${DATE}
}
cd $RSB
# What tag/branch to work on? By default this will be in the master branch,
# but you can switch - to e.g. 4.11.2:
#
# git checkout -f 4.11.2
#
# RSB commit ID recommended by Embedded Brains for using RTEMS/SMP:
git checkout -f e2952bb185c1f40027caa76cfd9e4a45b17a8886
# Verify that we have all we need to build
source-builder/sb-check
cd rtems
# Your network firewall may or may not be an issue at this point:
# Many of the source tarballs needed by the RSB are fetched over
# PASV-enabled FTP servers.
#
# If your network is like the one in ESA/ESTEC and this is forbidden,
# you'll have to fetch these tarballs and hardlink to them each time
# (so no FTP action is triggered by the RTEMS RSB builder).
# The sed invocation below also replaces ftp: with http:
# (since this needs no PASV port meddling - which some firewalls object to)
#
# This is the way I do it - adapt it according to your needs:
#
# [ ! -d sources ] && {
# mkdir -p sources
# cd sources
# cp -al ~/development/rtems/pkg_sources_cache/* .
# cd ..
# for i in config/tools/*cfg ; do
# cat "$i" | sed 's,ftp://ftp.gnu.org,http://ftp.gnu.org,;s,ftp://gcc.gnu.org,http://gcc.gnu.org,;' > "$i".new && mv "$i".new "$i"
# done
# }
# Build the cross compiling toolchain
# (we're in the master branch, which is currently the "unofficial" 4.12)
../source-builder/sb-set-builder --with-ada --log=stage1.log --prefix=${RTPREFIX} 4.12/rtems-sparc
# Add the cross compiler to the PATH and checkout RTEMS
export PATH=${RTPREFIX}/bin:$PATH
cd ..
[ ! -d rtems-git ] && {
git clone https://github.com/RTEMS/rtems.git rtems-git
cd rtems-git
# RTEMS commit ID recommended by Embedded Brains for using RTEMS/SMP
git checkout -f 96ce1ec743a1fcf27593ee72cf1695d9eb0290de
cd ..
}
# Build RTEMS
cd rtems-git
./bootstrap
cd ..
rm -rf build.${DATE}
mkdir build.${DATE}
cd build.${DATE}
../rtems-git/configure \
--target=sparc-rtems4.12 --prefix=${RTPREFIX} \
--enable-rtemsbsp="leon2 leon3 ngmp" --enable-posix --enable-ada \
--enable-smp --enable-cxx --enable-networking
make all
make install
} |& tee ${BUILD_LOG}
#!/bin/bash
#
# This script builds the RTEMS/SPARC cross-compiler and the
# Leon2/Leon3/NGMP BSPs.
#
# To have a reproducible setup, it would be prudent if you
# executed this script under a Debian stretch chroot,
# bootstrapped via the following:
#
# mkdir /opt/stretch-chroot
# debootstrap stretch /opt/stretch-chroot
# mount -t proc none /opt/stretch-chroot/proc/
# mount -t sysfs none /opt/stretch-chroot/sys/
# mount -o bind /dev /opt/stretch-chroot/dev/
# mount -o bind /dev/pts /opt/stretch-chroot/dev/pts/
# chroot /opt/stretch-chroot
# apt-get update
# apt-get install flex bison make texinfo binutils gcc g++ gdb unzip git python2.7-dev pax libncurses5-dev
#
# Then chroot inside it and run this script:
#
# chroot /opt/stretch-chroot
# /path/to/build.rtems.MORA.sh
# Stop on any error
set -e
DATE=$(date +"%Y.%m.%d")
mkdir -p $HOME/rtems.build.logs
BUILD_LOG=$HOME/rtems.build.logs/${DATE}.log
[ -f ${BUILD_LOG} ] && {
echo "There's already a build log:"
echo " " ${BUILD_LOG}
echo Remove it to continue.
exit 1
}
# Record the output in $BUILD_LOG (see matching brace)
{
# Begin by checking out the RTEMS Source Builder
RSBPARENT=$HOME/development/rtems/src
mkdir -p $RSBPARENT
RSB=$RSBPARENT/rtems-source-builder-${DATE}
RTPREFIX=/opt/rtems-5.1-${DATE}
# rm -rf ${RTPREFIX}
[ ! -d $RSB ] && {
cd $RSBPARENT
git clone https://github.com/RTEMS/rtems-source-builder.git rtems-source-builder-${DATE}
}
cd $RSB
git checkout -f 703532cb04c6990fb21e97cb7347a16e9df11108
# Verify that we have all we need to build
source-builder/sb-check
cd rtems
# Your network firewall may or may not be an issue at this point:
# Many of the source tarballs needed by the RSB are fetched over
# PASV-enabled FTP servers.
#
# If your network is like the one in ESA/ESTEC and this is forbidden,
# you'll have to fetch these tarballs and hardlink to them each time
# (so no FTP action is triggered by the RTEMS RSB builder).
# The sed invocation below also replaces ftp: with http:
# (since this needs no PASV port meddling - which some firewalls object to)
#
# This is the way I do it - adapt it according to your needs:
#
[ ! -d sources ] && mkdir -p sources
cd sources
cp -al ~/development/rtems/pkg_sources_cache/* .
cd ..
for i in config/tools/*cfg ; do
cat "$i" | sed 's,ftp://ftp.gnu.org,http://ftp.gnu.org,;s,ftp://gcc.gnu.org,http://gcc.gnu.org,;' > "$i".new && mv "$i".new "$i"
done
# Build the cross compiling toolchain
# (we're in the master branch, which is currently the "unofficial" 5.1)
../source-builder/sb-set-builder --with-ada --log=stage1.log --prefix=${RTPREFIX} 5/rtems-sparc
# Add the cross compiler to the PATH and checkout RTEMS
export PATH=${RTPREFIX}/bin:$PATH
cd ..
if [ ! -d rtems-git ] ; then
git clone https://github.com/RTEMS/rtems.git rtems-git
cd rtems-git
git checkout -f 337a1869092779be0afca381dba674d3de4d7c9b
cd ..
fi
# Build RTEMS
cd rtems-git
./bootstrap
cd ..
rm -rf build.${DATE}
mkdir build.${DATE}
cd build.${DATE}
../rtems-git/configure \
--target=sparc-rtems5 --prefix=${RTPREFIX} \
--enable-rtemsbsp="gr712rc gr740" --enable-posix --enable-ada \
--enable-tests --enable-cxx --enable-networking --enable-smp
make all
make install
} |& tee ${BUILD_LOG}
/* Configuration file for LEON2, GRLIB-LEON2 and LEON3 systems
*
* Defines driver resources in separate files,
* - LEON3 - leon3_drv_config.c
* - LEON2 - leon2_drv_config.c
* - LEON2-GRLIB - leon2_grlib_drv_config.c
*
* Initializes,
* - Driver manager
* - Networking if ENABLE_NETWORK is set
*
*/
/* Define for GRLIB LEON2 systems, when a AMBA PnP bus is available */
/*#define LEON2_GRLIB*/
/* Configure Network if enabled */
#ifdef ENABLE_NETWORK
#include <bsp/network_interface_add.h>
#include "networkconfig.h"
#else
#undef ENABLE_NETWORK_SMC_LEON2
#undef ENABLE_NETWORK_SMC_LEON3
#endif
/* Include the Driver resource configuration for the different systems */
#if defined(LEON3)
/* GRLIB-LEON3 */
#include "config_leon3_drvmgr.c"
#elif defined(LEON2)
#ifdef LEON2_GRLIB
/* GRLIB-LEON2 */
#include "config_leon2_grlib_drvmgr.c"
#else
/* Standard LEON2 */
#include "config_leon2_drvmgr.c"
#endif
#endif
/* Include PCI Bus configuration only if PCI bus available
*/
#ifdef RTEMS_PCI_CONFIG_LIB
#include "config_pci.c"
#endif
/* Include the GR-RASTA-IO configuration only if the GR-RASTA-IO driver is
* included.
*/
#ifdef CONFIGURE_DRIVER_PCI_GR_RASTA_IO
#include "config_gr_rasta_io.c"
#endif
/* Include the GR-CPCI-LEON4-N2X PCI Peripheral configuration only if the