Added bare bsp from Chris Johns <cjohns@plessey.com.au>.

This commit is contained in:
Joel Sherrill
1998-05-21 18:26:58 +00:00
parent 90cf4cc734
commit bd5e4f3baf
12 changed files with 604 additions and 111 deletions
+14 -3
View File
@@ -15,6 +15,17 @@ include $(RTEMS_ROOT)/make/directory.cfg
# We only build it if HAS_MP was defined
MP_DRIVERS_yes_V = shmdr
MP_DRIVERS = $(MP_DRIVERS_$(HAS_MP)_V)
# Descend into the $(RTEMS_CPU) directory if it exists
SUB_DIRS=$(MP_DRIVERS) $(wildcard $(RTEMS_CPU))
SUB_DIRS=$(MP_DRIVERS)
# If we are building a "real" BSP, then we need to descend into the
# appropriate CPU specific directory. The bare BSP is a special
# case which can be built for any CPU and it resides at the same
# level as the CPUs. If we are building the bare BSP, then descend
# into that directory.
ifeq ($(RTEMS_BSP),bare)
SUB_DIRS += bare
else
SUB_DIRS += $(wildcard $(RTEMS_CPU))
endif
+20
View File
@@ -0,0 +1,20 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/directory.cfg
SRCS=README
all: $(SRCS)
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
SUB_DIRS=include wrapup
+85
View File
@@ -0,0 +1,85 @@
#
# $Id$
#
#
# Please send any comments, improvements, or bug reports to:
# Chris Johns
# Objective Design Systems
# 35 Cairo Street
# Cammeray
# Sydney, NSW 2062
# ccj@acm.org
#
#
# This board support package is not a board support package at all, but
# a means to build the RTEMS kernel without using a specific BSP.
#
# You should be able to build to build this BSP for any cpu type.
#
# You must provide the standard BSP type functions and support yourself
# externally to RTEMS.
#
# This BSP is intended to be used by people who fit one or more of the
# categories below :
#
# 1) using custom hardware of little use or interest to others. If you
# intend to use hardware available to others, please create a BSP
# and send to OARCorp.
#
# 2) production code cannot depend on software which can change. BSP code
# can change with-out notice, while RTEMS has very tightly defined
# interfaces which do not change.
#
# 3) the need to extend or change an existing BSP in ways which are not
# of interest to others or the BSP maintainer.
#
# I fit all the above.
#
BSP NAME: bare
BOARD: not applicable
BUS: not applicable
CPU FAMILY: all
COPROCESSORS: not applicable
MODE: not applicable
DEBUG MONITOR: not applicable
PERIPHERALS
===========
not applicable
DRIVER INFORMATION
==================
not applicable
STDIO
=====
not applicable
NOTES
=====
Board description
-----------------
not applicable
Host System
-----------
Linux (RedHat 4.0/5.0)
egcs-1.0.2
binutils-2.8.1, with rtems patches
newlib-1.8.0, with rtems patches
Verification
-------------------------------
Single processor tests: not applicable
Multi-processort tests: not applicable
Timing tests:
not applicable
Porting
-------
not applicable
+23
View File
@@ -0,0 +1,23 @@
%rename cpp old_cpp
%rename lib old_lib
%rename endfile old_endfile
%rename startfile old_startfile
%rename link old_link
*cpp:
%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
*lib:
%{!qrtems: %(old_lib)} %{qrtems: --start-group \
%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
-lc -lgcc --end-group \
%{!qnolinkcmds: -T linkcmds%s}}
*startfile:
%{!qrtems: %(old_startfile)} %{qrtems: \
%{!qrtems_debug: start.o%s} \
%{qrtems_debug: start_g.o%s}}
*link:
%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
+33
View File
@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
H_FILES = $(srcdir)/bsp.h
#
# Equate files are for including from assembly preprocessed by
# gm4 or gasp. No examples are provided except for those for
# other CPUs. The best way to generate them would be to
# provide a program which generates the constants used based
# on the C equivalents.
#
EQ_FILES =
SRCS=$(H_FILES) $(EQ_FILES)
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 $(H_FILES) $(PROJECT_INCLUDE)
$(INSTALL) -m 444 $(EQ_FILES) $(PROJECT_INCLUDE)
+92
View File
@@ -0,0 +1,92 @@
/* bsp.h
*
* This include file contains all board IO definitions.
*
* BARE : Allows you to build RTEMS with-out any BSP specific stuff
*
* COPYRIGHT (c) 1989-1998.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __BARE_BSP_h
#define __BARE_BSP_h
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems.h>
#include <console.h>
#include <clockdrv.h>
/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
* application.
*
*/
#define MAX_LONG_TEST_DURATION 300 /* 5 minutes = 300 seconds */
#define MAX_SHORT_TEST_DURATION 3 /* 3 seconds */
/*
* Stuff for Time Test 27
*/
#define MUST_WAIT_FOR_INTERRUPT 0
#define Install_tm27_vector( handler )
#define Cause_tm27_intr()
#define Clear_tm27_intr()
#define Lower_tm27_intr()
/*
* Simple spin delay in microsecond units for device drivers.
* This is very dependent on the clock speed of the target.
*/
#define delay( microseconds ) \
{ \
}
/* miscellaneous stuff assumed to exist */
extern rtems_configuration_table BSP_Configuration;
/*
* Device Driver Table Entries
*/
/*
* NOTE: Use the standard Console driver entry
*/
/*
* NOTE: Use the standard Clock driver entry
*/
/*
* How many libio files we want
*/
#define BSP_LIBIO_MAX_FDS 20
/* functions */
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */
+49
View File
@@ -0,0 +1,49 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
BSP_PIECES=
GENERIC_PIECES=
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS=$(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/$(piece).rel) \
$(foreach piece, $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).rel)
LIB=$(ARCH)/libbsp.a
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
include $(RTEMS_ROOT)/make/lib.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS +=
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
$(LIB): ${OBJS}
$(make-library)
all: ${ARCH} $(SRCS) $(LIB)
$(INSTALL_VARIANT) -m 644 $(LIB) ${PROJECT_RELEASE}/lib
Vendored
+171 -97
View File
File diff suppressed because it is too large Load Diff
+57 -11
View File
@@ -64,6 +64,22 @@ AC_ARG_ENABLE(libcdir, \
[ RTEMS_LIBC_DIR="${enableval}" ; \
test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
AC_ARG_ENABLE(cpu-cflags,
[ --enable-cpu-cflags specify a particular cpu cflag],
[case "${enableval}" in
no) CPU_CFLAGS="" ;;
*) CPU_CFLAGS="${enableval}" ;;
esac],
[CPU_CFLAGS=""])
AC_ARG_ENABLE(cpu-model,
[ --enable-cpu-model specify a particular cpu model],
[case "${enableval}" in
no) RTEMS_CPU_MODEL="" ;;
*) RTEMS_CPU_MODEL="${enableval}" ;;
esac],
[CPU_CFLAGS=""])
RTEMS_PREFIX=${target_cpu}-${target_vendor}
dnl BEGIN configure.host.in
@@ -123,6 +139,9 @@ RTEMS_HOST=$host_os
case "${target}" in
# hpux unix port should go here
hppa1.1-*-rtems*)
target_cpu=hppa1_1
;;
i[[3456]]86-go32-rtems*)
target_cpu=i386
rtems_bsp="go32 go32_p5"
@@ -139,6 +158,9 @@ case "${target}" in
target_cpu=no_cpu
RTEMS_HAS_POSIX_API=no
;;
powerpc-*rtems*)
target_cpu=ppc
;;
sparc-sun-solaris*) # unix "simulator" port
target_cpu=unix
RTEMS_HOST=Solaris
@@ -239,6 +261,9 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
esac;
done
rtems_bsp="$rtems_bsp bare"
makefiles="$makefiles c/src/lib/libbsp/bare/Makefile"
AC_MSG_RESULT([$rtems_bsp done])
fi
@@ -260,17 +285,36 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then
esac
# Is there code where there should be for this BSP?
if test -d "$srcdir/c/src/lib/libbsp/$target_cpu/$bspdir"; then
RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
# make sure the Makefiles in a bsp directory are only done once
echo $bspdirs | grep $bspdir >/dev/null 2>&1
if test $? -ne 0 ; then
bspdirs="$bspdirs $bspdir"
RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$target_cpu/$bspdir)
fi
else
AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for $i])
fi
# The bare bsp is a special case as it is not under the target_cpu path
case $i in
bare)
if test -d "$srcdir/c/src/lib/libbsp/$bspdir"; then
RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
# make sure the Makefiles in a bsp directory are only done once
echo $bspdirs | grep $bspdir >/dev/null 2>&1
if test $? -ne 0 ; then
bspdirs="$bspdirs $bspdir"
RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$bspdir)
fi
else
AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for $i])
fi
;;
*)
if test -d "$srcdir/c/src/lib/libbsp/$target_cpu/$bspdir"; then
RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
# make sure the Makefiles in a bsp directory are only done once
echo $bspdirs | grep $bspdir >/dev/null 2>&1
if test $? -ne 0 ; then
bspdirs="$bspdirs $bspdir"
RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$target_cpu/$bspdir)
fi
else
AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for $i])
fi
;;
esac
done
fi
@@ -369,6 +413,8 @@ AC_SUBST(RTEMS_USE_MACROS)
AC_SUBST(RTEMS_HAS_CPLUSPLUS)
AC_SUBST(RTEMS_USE_GCC272)
AC_SUBST(RTEMS_LIBC_DIR)
AC_SUBST(CPU_CFLAGS)
AC_SUBST(RTEMS_CPU_MODEL)
AC_SUBST(PROJECT_ROOT)
AC_SUBST(program_prefix)
+51
View File
@@ -0,0 +1,51 @@
#
# Config file for the "bare" BSP
#
# $Id$
#
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=bare
RTEMS_BSP=bare
TARGET_ARCH=o-$(RTEMS_BSP_FAMILY)-$(RTEMS_CPU_MODEL)
include $(RTEMS_ROOT)/make/custom/default.cfg
## Target compiler config file, if any
CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# This section makes the target dependent options file.
# NDEBUG (C library)
# if defined asserts do not generate code. This is commonly used
# as a command line option.
#
# RTEMS_TEST_NO_PAUSE (RTEMS tests)
# do not pause between screens of output in the rtems tests
#
# RTEMS_DEBUG (RTEMS)
# If defined, debug checks in RTEMS and support library code are enabled.
#
define make-target-options
@echo "/* #define NDEBUG 1 */ " >>$@
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
endef
# The following are definitions of make-exe which will work using ld as
# is currently required. It is expected that as of gcc 2.8, the end user
# will be able to override parts of the compilers specs and link using gcc.
define make-exe
echo "Cannot do a link with the bare bsp."
echo "#!/bin/sh" > $(basename $@).exe
echo "echo \"Cannot do a link with the bare bsp.\"" >> $(basename $@).exe
endef
# Miscellaneous additions go here
+5
View File
@@ -174,5 +174,10 @@ endif
@echo >>$@
@echo "#endif" >>$@
ifeq ($(RTEMS_BSP),bare)
$(ARCH)/bsp_specs.tmp: FORCE
cp $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_BSP_FAMILY)/bsp_specs $@
else
$(ARCH)/bsp_specs.tmp: FORCE
cp $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/bsp_specs $@
endif
+4
View File
@@ -51,6 +51,10 @@ RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
RTEMS_CPU = @target_cpu@
RTEMS_CPU_MODEL = @RTEMS_CPU_MODEL@
CPU_CFLAGS = @CPU_CFLAGS@
INSTALL=$(PROJECT_ROOT)/$(RTEMS_BSP)/build-tools/install-if-change
XCFLAGS=$(CFLAGS_FOR_TARGET)