This set of changes is the build of what was required to convert to

GNU autoconf.  This is the first large step in allowing an RTEMS
user to perform a one-tree build (per crossgcc FAQ) including RTEMS
in the build process.  With this change RTEMS is configured in
built in the same style as the GNU tools, yet retains the basic
structure of its traditional Makefiles (ala Tony Bennett).
Jiri Gaisler (jgais@wd.estec.esa.nl) deserves (and received)
a big thank you for doing this.

There are still issues to be resolved but as of this commit, all target
which can be built on a linux host have been using a modified version
of the source Jiri submitted.  This source was merged and most targets
built in the tree before this commit.

There are some issues which remain to be resolved but they are primarily
related to host OS dependencies, script issues, the use of gawk
for hack_specs, and the dependence on gcc snapshots.  These will
be resolved.
This commit is contained in:
Joel Sherrill
1997-04-01 23:07:52 +00:00
parent 467eae4da5
commit 254b445071
461 changed files with 27179 additions and 239 deletions

99
Makefile.in Normal file
View File

@@ -0,0 +1,99 @@
#
# top level directory for RTEMS build tree
#
# Modified by Jiri to implement autoconf and cygnus one-tree build
#
@SET_MAKE@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
target = @target@
manext = 1
mandir = @mandir@/man$(manext)
program_prefix = @program_prefix@
VPATH=@srcdir@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
LDFLAGS =
LIBS = @LIBS@
CC_FOR_BUILD = gcc
CC_FOR_TARGET = $(program_prefix)gcc
AS_FOR_TARGET = $(program_prefix)as
AR_FOR_TARGET = $(program_prefix)ar
NM_FOR_TARGET = $(program_prefix)nm
LD_FOR_TARGET = $(program_prefix)ld
OBJCOPY_FOR_TARGET = $(program_prefix)objcopy
SIZE_FOR_TARGET = $(program_prefix)size
AWK = @AWK@
RTEMS_ROOT = @RTEMS_ROOT@
RTEMS_HOST = @RTEMS_HOST@
PROJECT_ROOT = @PROJECT_ROOT@
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
ifeq ($(RTEMSBSP),)
RTEMS_BSP = @RTEMS_BSP@
else
RTEMS_BSP = $(RTEMSBSP)
endif
include $(RTEMS_ROOT)/make/main.cfg
MTARGETS = all $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_all) \
clean_wrapup distclean clean_dirs clean_tools install tests clean
.PHONY: clean_modules mlink
EXIT_CMD = exit 1
# Don't pass flags from previous make - especially NOT CFLAGS
override MAKEFLAGS=
$(MTARGETS): mlink
BASEDIR=`pwd`; \
for bsp in $(RTEMS_BSP) xxx; \
do if [ $$bsp != xxx ] ; then \
cd $$BASEDIR; \
cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \
RTEMS_CUSTOM=$(RTEMS_ROOT)/make/custom/$$bsp.cfg \
INSTALL=$(PROJECT_ROOT)/$$bsp/build-tools/install-if-change \
\"CC=$(CC_FOR_TARGET)\" \
\"XCFLAGS=$(CFLAGS_FOR_TARGET)\" \
\"CC_FOR_BUILD=$(CC_FOR_BUILD)\" \
\"AS=$(AS_FOR_TARGET)\" \
\"LD=$(LD_FOR_TARGET)\" \
\"NM=$(NM_FOR_TARGET)\" \
\"AR=$(AR_FOR_TARGET)\" \
\"SIZE=$(SIZE_FOR_TARGET)\" \
\"OBJCOPY=$(OBJCOPY_FOR_TARGET)\" \
\"RTEMS_ROOT=$(RTEMS_ROOT)\" \
\"RTEMS_HOST=$(RTEMS_HOST)\" \
\"PROJECT_HOME=$(PROJECT_ROOT)/$$bsp\" \
\"PROJECT_ROOT=$(PROJECT_ROOT)\" \
\"RTEMS_HAS_POSIX_API=$(RTEMS_HAS_POSIX_API)\" \
\"RTEMS_USE_MACROS=$(RTEMS_USE_MACROS)\" \
\"AWK=$(AWK)\" $@" ; \
eval $$cmd || $(EXIT_CMD); \
fi; done;
clean_modules:
rm -f src/Modules/rtems/.moduleavailcache
rm -f src/Modules/rtems/.moduleavailcachedir
mlink:
test -d make || ln -s $(RTEMS_ROOT)/make make

179
README.configure Normal file
View File

@@ -0,0 +1,179 @@
1. Autoconf support
===================
This version of RTEMS is configured with GNU autoconf. RTEMS can be
configured and built either standalone or together with the compiler
tools in the Cygnus one-tree structure. Using autoconf also means
that RTEMS now can be built in a separate build directory.
2. Installation
===============
2.1 Standalone build
To configure RTEMS for a specific target, run configure in the build
directory. In addition to the standard configure options, the following
RTEMS-specific option are supported:
--disable-rtems-inlines
--disable-posix
--disable-tests
--enable-rtemsbsp="bsp1 bsp2 ..."
By default, the RTEMS posix interface is built for targets that support
it. It can be disabled with the --disable-posix option. The --disable-tests
will not configure the RTEMS test suite. This is used only to speed-up
configuration in case building the tests are not necessary. By default,
all bsps for a target are built. There is two ways of changing this:
+ use the --enable-rtemsbsp otion which will set the specified
bsps as the default bsps, or
+ set the RTEMSBSP variable during make (see below).
The cross-compiler is set to $(target)-gcc by default. This can be
overriden by one of the following methods:
+ running make with CC_FOR_TARGET=compiler_to_use. The same applies to
all the target specific tools (AS, AR, NM, OBJCOPY, SIZE, LD), or
+ by using the --program-prefix option to configure to specify the
string which will prepended to the tool names. Be sure to include
a trailing "-". For example, to use a m68k-coff toolset, use the
--program-prefix=m68k-coff- option.
The --target= option configures RTEMS for a specific target architecture.
The following targets are supported:
(none) will build the host-based version on Linux,
Solaris and HPUX.
a29k-rtems only standalone, uses non-gnu compiler
i386-rtems
i960-rtems
hppa1_1-rtems
m68k-rtems
mips64orion-rtems
no_cpu-rtems
powerpc-rtems
sparc-rtems
To build, run make in the build directory. To specify which bsps to build,
add the RTEMSBSP="bsp1 bsp2 .." to the make command.
Installation is done under $(prefix)/$(target)/rtems.
As an example, to build and install the mvme136 and dmv152 bsps for m68k do:
(path_to_rtems_src)/configure --target=m68k-rtems
make RTEMSBSP="mvme136 dmv152"
make install RTEMSBSP="mvme136 dmv152"
The sample tests are built by 'make all', do a 'make test' to build the full
test suite.
2.2 Build with Cygnus one-tree release
To build and install RTEMS with the one-tree structure, just copy the rtems
directory to the tree. The one-tree configure.in and Makefile.in has to be
replaced with the RTEMS-aware versions. The build options are the same as
for the standalone build.
3. To use the installed RTEMS library
=====================================
To use the installed RTEMS bsps to build applications, the application
makefile has to include a bsp-specific makefile that will define the
RTEMS variables necessary to find include files and libraries. The
bsp-specific makefile is installed at
$(prefix)/$(target)/rtmes/$(RTEMS_BSP)/Makefile.inc
For the erc32 bsp installed at /usr/local/cross, the line would read:
include /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc
4. Supported target bsps
========================
The following bsps are supported:
host-based : posix (on linux, solaris and hpux)
a29k : portsw
i386 : force386 i386ex
i960 : cvme961
hppa1_1 : simhppa
m68k : efi332 gen68302 idp mvme147 mvme162 dmv152 efi68k gen68360
mvme136 mvme147s go32
no_cpu : no_bsp
mips64orion : p4600 p4650 (p4000 port with either R4600 or R4650)
powerpc : papyrus
sparc : erc32
5. Makefile structure
=====================
The makefiles have been re-organised. Most gnu-based bsps now use three
main makefiles:
+ custom/default.cfg,
+ custom/bsp.cfg and
+ ompilers/gcc-target-default.cfg.
Default.cfg sets the deafult values of certain common build options.
Bsp.cfg set bsp-specific build options and can also override the
default settings.
Gcc-target-default.cfg contains the common gcc definitions. Some targets
(a29k, no_cpu, and posix) still use the old structure.
6. Adding a bsp
===============
The top-level configure.in has to be modified if a new target is added
or if a new bsp is to be built by default. The additions required is
basically to add which makefiles are to be created by configure and
to add the target to the selection statement. To re-generate
configure, autoconf-2.12 is needed.
7. Tested configurations
========================
All gnu-based bsps have been built on Linux.
The native (posix) ports have been built and run on Linux ans Solaris.
The sparc port has been tested on SunOS and Linux.
The following configurations have NOT been tested:
+ Anything on Nextstep, HPUX and Irix.
+ The a29k port.
8. Pre-requisites
=================
Gawk version 2 or higher.
GNU make version 3.72 or higher.
Bash.
gcc version ???
TODO
====
The install-if-change script requires bash. On solaris systems, this should
be changed to ksh, since ksh is provided with solaris (bash not).
A fairly rescent version of gawk is needed to build RTEMS. This should be
changed so that a plain vanilla awk also works.
'make install' should only install necessary files, not the full
PROJECT_RELEASE directory as now.
Posix port on solaris-2.5 fails due to undefined built-in functions
(gcc-2.7.2, might be my installation).
Improve support for 'make CFLAGS=xxx'.

98
c/Makefile.in Normal file
View File

@@ -0,0 +1,98 @@
#
# $Id$
#
# top level directory for RTEMS build tree
# This Makefile is *not* a good example of a directory Makefile.
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
target = @target@
manext = 1
mandir = @mandir@/man$(manext)
program_prefix = @program_prefix@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
# dubious, but needed by rtems-glom ...
export PROJECT_HOME
SUB_DIRS=build-tools src
# directories to be created in install point
CREATE_DIRS = include include/sys \
include/rtems include/rtems/score include/rtems/rtems include/rtems/posix \
include/libc include/libc/sys \
lib \
bin \
samples tests \
build-tools update-tools
# Make all/install must include 'env'
all $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_all): env
# top level clean/clobber will delete the install points
clean_WRAPUP = $(MAKE) clean_wrapup
clobber_WRAPUP = $(MAKE) clean_wrapup
clean_wrapup: clean_tools clean_dirs clean_modules
.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
# XXX The link is temporary while switching to -specs options.
dirs:
-$(MKDIR) ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
-ln -s $(PROJECT_ROOT)/$(RTEMS_BSP)/include \
$(PROJECT_ROOT)/$(RTEMS_BSP)/lib/include
distclean: clobber
clean_dirs:
$(RM) -r $(PROJECT_RELEASE)
clean_tools:
cd build-tools; $(MAKE) clean
# NOTE: The wildcard on the install should pick up everything except
# the tests directory. This significantly minimizes the install size.
install: all
-$(MKDIR) $(prefix)/$(target)
-$(MKDIR) $(prefix)/$(target)/rtems
-$(MKDIR) $(prefix)/$(target)/rtems/make
-$(MKDIR) $(prefix)/$(target)/rtems/make/compilers
-$(MKDIR) $(prefix)/$(target)/rtems/make/custom
-$(MKDIR) $(prefix)/$(target)/rtems/make/os
-rm -rf $(prefix)/$(target)/rtems/$(RTEMS_BSP)
cd ../; tar cf - $(RTEMS_BSP)/[bilsu]* | \
(cd $(prefix)/$(target)/rtems; tar xpBf - )
cd $(srcdir); tar cf - make/compilers make/custom make/os \
make/leaf.cfg make/directory.cfg make/main.cfg | \
(cd $(prefix)/$(target)/rtems; tar xpBf - )
echo RTEMS_BSP = $(RTEMS_BSP) > \
$(prefix)/$(target)/rtems/$(RTEMS_BSP)/Makefile.inc
cat make/Templates/Makefile.inc >> \
$(prefix)/$(target)/rtems/$(RTEMS_BSP)/Makefile.inc
tests:
cd src/tests; $(MAKE) all
env: $(SRCS) dirs

13
c/build-tools/Makefile.in Normal file
View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
SUB_DIRS=os scripts src

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
SUB_DIRS=$(wildcard $(RTEMS_HOST))

View File

@@ -0,0 +1,39 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/build-tools
INSTALLED=$(DESTDIR)/ifc.exe \
$(DESTDIR)/cklength.exe \
$(DESTDIR)/fixtimer.exe
all: $(DESTDIR) $(PGMS) install
echo $(DESTDIR)
$(DESTDIR):
[ -d $@ ] || $(MKDIR) $@
install: $(INSTALLED)
# Install the programs
$(DESTDIR)/ifc.exe: ifc_exe.uue
uudecode <ifc_exe.uue
mv ifc.exe $(DESTDIR)/ifc.exe
$(DESTDIR)/cklength.exe: cklength.uue
uudecode <cklength.uue
mv cklength.exe $(DESTDIR)/cklength.exe
$(DESTDIR)/fixtimer.exe: fixtimer.uue
uudecode <fixtimer.uue
mv fixtimer.exe $(DESTDIR)/fixtimer.exe

View File

@@ -0,0 +1,34 @@
#
# $Id$
#
# RTEMS build tools
# NOTE: of course we can't use any of these tools
# in this Makefile. Most notably: install-if-change
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/build-tools
PGMS=hackspecs.awk install-if-change rcs-clean \
lock-directory unlock-directory rtems-glom
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
echo $(DESTDIR)
$(DESTDIR):
[ -d $@ ] || $(MKDIR) $@
install: $(INSTALLED)
# Install the program
$(DESTDIR)/%: %
$(make-script)

View File

@@ -0,0 +1,61 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
manext = 1
mandir = @mandir@/man$(manext)
VPATH=@srcdir@
# we use host compiler in this directory
USE_HOST_COMPILER=yes
# C source names, if any, go here -- minus the .c
C_PIECES=cklength eolstrip packhex unhex
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=$(ARCH)/%.o)
H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
PGMS=$(ARCH)/cklength $(ARCH)/eolstrip $(ARCH)/packhex $(ARCH)/unhex
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.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 += $(HOST_ARCH)
CLOBBER_ADDITIONS +=
all: $(ARCH) $(SRCS) $(PGMS)
$(INSTALL_VARIANT) -m 555 $(PGMS) ${PROJECT_RELEASE}/build-tools

View File

@@ -88,10 +88,10 @@ void error(int errn, ...);
#define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */
#define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */
#if (defined(sparc) && (sunos < 500))
#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */
#ifdef HAVE_STRTOUL
#define stol(p) strtoul(p, (char **) NULL, 0)
#else
#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */
#define stol(p) strtol(p, (char **) NULL, 0)
#endif
int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm);

View File

@@ -88,10 +88,10 @@ void error(int errn, ...);
#define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */
#define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */
#if (defined(sparc) && (sunos < 500))
#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */
#ifdef HAVE_STRTOUL
#define stol(p) strtoul(p, (char **) NULL, 0)
#else
#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */
#define stol(p) strtol(p, (char **) NULL, 0)
#endif
int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm);

15
c/src/Makefile.in Normal file
View File

@@ -0,0 +1,15 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=exec lib tests/tools tests/support tests/samples

17
c/src/exec/Makefile.in Normal file
View File

@@ -0,0 +1,17 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
POSIX_DIRS_yes_V=posix
POSIX_DIRS = $(POSIX_DIRS_$(HAS_POSIX_API)_V)
SUB_DIRS=score rtems $(POSIX_DIRS) sapi wrapup

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=base sys headers $(INLINE) optman src

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES= aio devctl intr limits mqueue pthread sched semaphore \
# signal time unistd
H_PIECES= pthread sched
# limits.h may have been moved into newlib -- check before removing it
# from the cvs tree
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= cond condmp config key mutex mutexmp posixapi \
priority psignal pthread pthreadmp seterr threadsup time
#H_PIECES= cancel cond condmp intr key mqueue mqueuemp mutex \
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
# time
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= cond condmp config key mutex mutexmp posixapi \
priority psignal pthread pthreadmp seterr threadsup time
#H_PIECES= cancel cond condmp intr key mqueue mqueuemp mutex \
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
# time
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES=utsname
H_PIECES=
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/sys

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES= aio devctl intr limits mqueue pthread sched semaphore \
# signal time unistd
H_PIECES= pthread sched
# limits.h may have been moved into newlib -- check before removing it
# from the cvs tree
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#I_PIECES= cond intr key mqueue mutex pthread priority semaphore
I_PIECES=cond key mutex pthread priority
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#I_PIECES= cond intr key mqueue mutex pthread priority semaphore
I_PIECES=cond key mutex pthread priority
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# Right now there are not macro implementation of the posix inline routines
# So it won't build
I_PIECES=
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
#$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# Right now there are not macro implementation of the posix inline routines
# So it won't build
I_PIECES=
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
#$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,46 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_FILES=
H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
PGMS=$(C_FILES:%.c=$(ARCH)/%.rel)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
ASM4FLAGS += -I $(PROJECT_RELEASE)/include/rtems
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 +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGMS)
#$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,50 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#C_PIECES= aio cancel cond devctl intr key mqueue mutex pthread \
# ptimer sched semaphore signal time types unistd utsname
C_PIECES= adasupp cond getpid key mutex pthread psignal sched time \
types unistd
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# 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 +=
all: ${ARCH} $(SRCS) ${OBJS}
# temporary so we can see how many things are left to implement
not:
grep -i NOT_IMPL $(C_FILES) | grep -v MP_NOT_IMPL
@echo
@echo
@echo
@echo `grep -i NOT_IMPL $(C_FILES) | grep -v MP_NOT_IMPL | wc -l ` places marked not implemented
@echo `wc -l $(C_FILES) | grep total` lines of C code to test

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES=utsname
H_PIECES=
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/sys

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=headers $(INLINE) optman src

View File

@@ -0,0 +1,37 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES=asr attr clock config dpmem event eventmp eventset \
intr message modes mp msgmp options part partmp \
ratemon region regionmp rtemsapi sem semmp signal signalmp status \
support taskmp tasks timer types
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = rtems
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/rtems
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,37 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES=asr attr clock config dpmem event eventmp eventset \
intr message modes mp msgmp options part partmp \
ratemon region regionmp rtemsapi sem semmp signal signalmp status \
support taskmp tasks timer types
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = rtems
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/rtems
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,49 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_FILES= no-dpmem.c no-event.c no-mp.c no-msg.c \
no-part.c no-region.c no-rtmon.c no-sem.c no-signal.c no-timer.c
S_FILES=
H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES)
PGMS=$(C_FILES:%.c=$(ARCH)/%.rel)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
ASM4FLAGS += -I $(PROJECT_RELEASE)/include/rtems
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 +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGMS)
$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,40 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_PIECES=clock dpmem event eventmp intr mp msg msgmp \
part partmp ratemon region regionmp sem semmp signal signalmp \
taskmp tasks timer
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# 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 +=
all: ${ARCH} $(SRCS) ${OBJS}

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=headers $(INLINE) optman src

View File

@@ -0,0 +1,34 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= config directives extension fatal init io mptables sptables
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = confdefs
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,135 @@
#
# $Id$
#
Configuring a System Using the Template in confdefs.h
=====================================================
The file confdefs.h is a Configuration Template file which can be
used to greatly simplify the creation and maintenance of RTEMS
Configuration Tables. The basic concepts are:
+ confdefs.h provides defaults for all configuration parameters
+ applications specify only those values they wish to override
+ confdefs.h can be the only file which knows the precise layout
of the RTEMS Configuration Tables.
The Configuration Template setup is used by all RTEMS tests to
simplify the maintenance of the tests.
Here is the section from the system.h file from test tm21 from
the Timing Test Suite:
/* configuration information */
#define CONFIGURE_TMTEST
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 102
#define CONFIGURE_MAXIMUM_TIMERS 100
#define CONFIGURE_MAXIMUM_SEMAPHORES 100
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
#define CONFIGURE_MAXIMUM_PARTITIONS 100
#define CONFIGURE_MAXIMUM_REGIONS 100
#define CONFIGURE_MAXIMUM_PORTS 100
#define CONFIGURE_MAXIMUM_PERIODS 100
#define CONFIGURE_TICKS_PER_TIMESLICE 0
#include <confdefs.h>
The above example overrides a number of the configuration parameters.
It informs the template that it is a member of the Timing Suite,
requires a console and timer driver, and that it needs 102 tasks,
100 timers, 100 semaphores, 100 message queues, 100 partitions,
100 regions, 100 ports, and 100 periods. By default, the test
would have gotten no drivers, 10 tasks, and no other RTEMS objects.
The following shows the configuration tables generated by the
template by default.
#include <bsp.h>
#define NULL_DRIVER_TABLE_ENTRY \
{ NULL, NULL, NULL, NULL, NULL, NULL }
rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
CONSOLE_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
CLOCK_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
STUB_DRIVER_TABLE_ENTRY,
#endif
NULL_DRIVER_TABLE_ENTRY,
};
rtems_initialization_tasks_table Initialization_tasks[] = {
{ rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
RTEMS_MINIMUM_STACK_SIZE, /* init task stack size */
1, /* init task priority */
RTEMS_DEFAULT_ATTRIBUTES, /* init task attributes */
Init, /* init task entry point */
RTEMS_NO_PREEMPT, /* init task initial mode */
0 /* init task argument list */
}
};
#ifdef CONFIGURE_MPTEST
/*
* NODE_NUMBER is assumed to be set on the compile line.
*/
rtems_multiprocessing_table Multiprocessing_configuration = {
NODE_NUMBER, /* local node number */
2, /* maximum # nodes in system */
32, /* maximum # global objects */
32, /* maximum # proxies */
&MPCI_table /* pointer to MPCI config table */
};
#endif
/*
* CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
* tasks in the system plus enough extra to get a whole 64K extra.
*
* The NULL address for the workspace area is assumed to be assigned
* at startup time by the BSP.
*/
rtems_configuration_table Configuration = {
NULL, /* executive RAM work area */
CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
10, /* maximum # tasks */
0, /* maximum # timers */
0, /* maximum # semaphores */
0, /* maximum # message queues */
0, /* maximum # messages */
0, /* maximum # partitions */
0, /* maximum # regions */
0, /* maximum # dp memory areas */
0, /* maximum # periods */
0, /* maximum # user extensions */
RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
50, /* # ticks in a timeslice */
sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
/* number of init tasks */
Initialization_tasks, /* init task(s) table */
sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
/* number of device drivers */
Device_drivers, /* pointer to driver address table */
NULL, /* pointer to initial extensions */
#ifdef CONFIGURE_MPTEST
&Multiprocessing_configuration
#else
NULL /* ptr to MP config table */
#endif
};

View File

@@ -0,0 +1,34 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= config directives extension fatal init io mptables sptables
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = confdefs
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,135 @@
#
# $Id$
#
Configuring a System Using the Template in confdefs.h
=====================================================
The file confdefs.h is a Configuration Template file which can be
used to greatly simplify the creation and maintenance of RTEMS
Configuration Tables. The basic concepts are:
+ confdefs.h provides defaults for all configuration parameters
+ applications specify only those values they wish to override
+ confdefs.h can be the only file which knows the precise layout
of the RTEMS Configuration Tables.
The Configuration Template setup is used by all RTEMS tests to
simplify the maintenance of the tests.
Here is the section from the system.h file from test tm21 from
the Timing Test Suite:
/* configuration information */
#define CONFIGURE_TMTEST
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 102
#define CONFIGURE_MAXIMUM_TIMERS 100
#define CONFIGURE_MAXIMUM_SEMAPHORES 100
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
#define CONFIGURE_MAXIMUM_PARTITIONS 100
#define CONFIGURE_MAXIMUM_REGIONS 100
#define CONFIGURE_MAXIMUM_PORTS 100
#define CONFIGURE_MAXIMUM_PERIODS 100
#define CONFIGURE_TICKS_PER_TIMESLICE 0
#include <confdefs.h>
The above example overrides a number of the configuration parameters.
It informs the template that it is a member of the Timing Suite,
requires a console and timer driver, and that it needs 102 tasks,
100 timers, 100 semaphores, 100 message queues, 100 partitions,
100 regions, 100 ports, and 100 periods. By default, the test
would have gotten no drivers, 10 tasks, and no other RTEMS objects.
The following shows the configuration tables generated by the
template by default.
#include <bsp.h>
#define NULL_DRIVER_TABLE_ENTRY \
{ NULL, NULL, NULL, NULL, NULL, NULL }
rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
CONSOLE_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
CLOCK_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
STUB_DRIVER_TABLE_ENTRY,
#endif
NULL_DRIVER_TABLE_ENTRY,
};
rtems_initialization_tasks_table Initialization_tasks[] = {
{ rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
RTEMS_MINIMUM_STACK_SIZE, /* init task stack size */
1, /* init task priority */
RTEMS_DEFAULT_ATTRIBUTES, /* init task attributes */
Init, /* init task entry point */
RTEMS_NO_PREEMPT, /* init task initial mode */
0 /* init task argument list */
}
};
#ifdef CONFIGURE_MPTEST
/*
* NODE_NUMBER is assumed to be set on the compile line.
*/
rtems_multiprocessing_table Multiprocessing_configuration = {
NODE_NUMBER, /* local node number */
2, /* maximum # nodes in system */
32, /* maximum # global objects */
32, /* maximum # proxies */
&MPCI_table /* pointer to MPCI config table */
};
#endif
/*
* CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
* tasks in the system plus enough extra to get a whole 64K extra.
*
* The NULL address for the workspace area is assumed to be assigned
* at startup time by the BSP.
*/
rtems_configuration_table Configuration = {
NULL, /* executive RAM work area */
CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
10, /* maximum # tasks */
0, /* maximum # timers */
0, /* maximum # semaphores */
0, /* maximum # message queues */
0, /* maximum # messages */
0, /* maximum # partitions */
0, /* maximum # regions */
0, /* maximum # dp memory areas */
0, /* maximum # periods */
0, /* maximum # user extensions */
RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
50, /* # ticks in a timeslice */
sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
/* number of init tasks */
Initialization_tasks, /* init task(s) table */
sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
/* number of device drivers */
Device_drivers, /* pointer to driver address table */
NULL, /* pointer to initial extensions */
#ifdef CONFIGURE_MPTEST
&Multiprocessing_configuration
#else
NULL /* ptr to MP config table */
#endif
};

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,46 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_FILES= no-ext.c no-io.c
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(S_O_FILES)
PGMS=$(C_FILES:%.c=$(ARCH)/%.rel)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
ASM4FLAGS += -I $(PROJECT_RELEASE)/include/rtems
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 +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGMS)
$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,38 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_PIECES= debug extension fatal init io posixapi rtemsapi
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# 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 +=
all: ${ARCH} $(SRCS) ${OBJS}

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=headers $(INLINE) tools cpu src

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=$(RTEMS_CPU)

View File

@@ -0,0 +1,88 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
# Normally cpu_asm and rtems are assembly files
C_PIECES=cpu rtems
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/a29ktypes.h
# H_FILES that get installed externally
# a29k.h is handled separately
EXTERNAL_H_FILES = $(srcdir)/asm.h $(srcdir)/amd.ah $(srcdir)/pswmacro.ah $(srcdir)/register.ah
# Assembly source names, if any, go here -- minus the .s
# Normally cpu_asm and rtems are assembly files
S_PIECES=cpu_asm sig
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
$(INSTALL_VARIANT) -m 444 $(RELS) ${PROJECT_RELEASE}/lib
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
preinstall: ${PROJECT_RELEASE}/include/rtems/score/a29k.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/a29k.h: a29k.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
< $< >$(ARCH)/a29k.h.tmp
$(INSTALL) -m 444 $(ARCH)/a29k.h.tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,83 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/hppa.h $(srcdir)/cpu_asm.h \
$(srcdir)/hppatypes.h
# H_FILES that get installed externally
EXTERNAL_H_FILES =
# Assembly source names, if any, go here -- minus the .s
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS := -I$(ARCH) $(CPPFLAGS)
CFLAGS += $(CFLAGS_OS_V)
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 +=
$(ARCH)/offsets.h: $(ARCH) cpu.h $(PROJECT_RELEASE)/bin/genoffsets
$(RM) $@
$(PROJECT_RELEASE)/bin/genoffsets > $@
$(CHMOD) -w $@
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} install-headers $(SRCS) $(ARCH)/offsets.h preinstall $(RELS)
preinstall:
$(INSTALL) -m 444 $(ARCH)/offsets.h ${PROJECT_RELEASE}/include/rtems/score
install-headers: $(ARCH) ${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -1,29 +1,29 @@
#
# TODO:
# Context_switch needs to only save callee save registers
# I think this means can skip: r1, r2, r19-29, r31
# Ref: p 3-2 of Procedure Calling Conventions Manual
# This should be #ifndef DEBUG so that debugger has
# accurate visibility into all registers
#
# This file contains the assembly code for the HPPA implementation
# of RTEMS.
#
# COPYRIGHT (c) 1994,95 by Division Incorporated
#
# To anyone who acknowledges that this file is provided "AS IS"
# without any express or implied warranty:
# permission to use, copy, modify, and distribute this file
# for any purpose is hereby granted without fee, provided that
# the above copyright notice and this notice appears in all
# copies, and that the name of Division Incorporated not be
# used in advertising or publicity pertaining to distribution
# of the software without specific, written prior permission.
# Division Incorporated makes no representations about the
# suitability of this software for any purpose.
#
# $Id$
#
/*
* TODO:
* Context_switch needs to only save callee save registers
* I think this means can skip: r1, r2, r19-29, r31
* Ref: p 3-2 of Procedure Calling Conventions Manual
* This should be #ifndef DEBUG so that debugger has
* accurate visibility into all registers
*
* This file contains the assembly code for the HPPA implementation
* of RTEMS.
*
* COPYRIGHT (c) 1994,95 by Division Incorporated
*
* To anyone who acknowledges that this file is provided "AS IS"
* without any express or implied warranty:
* permission to use, copy, modify, and distribute this file
* for any purpose is hereby granted without fee, provided that
* the above copyright notice and this notice appears in all
* copies, and that the name of Division Incorporated not be
* used in advertising or publicity pertaining to distribution
* of the software without specific, written prior permission.
* Division Incorporated makes no representations about the
* suitability of this software for any purpose.
*
* $Id$
*/
#include <rtems/score/hppa.h>
#include <rtems/score/cpu_asm.h>
@@ -39,69 +39,69 @@
.SPACE $TEXT$
.SUBSPA $CODE$
#
# Special register usage for context switch and interrupts
# Stay away from %cr28 which is used for TLB misses on 72000
#
/*
* Special register usage for context switch and interrupts
* Stay away from %cr28 which is used for TLB misses on 72000
*/
isr_arg0 .reg %cr24
isr_r9 .reg %cr25
isr_r8 .reg %cr26
#
# Interrupt stack frame looks like this
#
# offset item
# -----------------------------------------------------------------
# INTEGER_CONTEXT_OFFSET Context_Control
# FP_CONTEXT_OFFSET Context_Control_fp
#
# It is padded out to a multiple of 64
#
/*
* Interrupt stack frame looks like this
*
* offset item
* -----------------------------------------------------------------
* INTEGER_CONTEXT_OFFSET Context_Control
* FP_CONTEXT_OFFSET Context_Control_fp
*
* It is padded out to a multiple of 64
*/
# PAGE^L
# void _Generic_ISR_Handler()
#
# This routine provides the RTEMS interrupt management.
#
# We jump here from the interrupt vector.
# The HPPA hardware has done some stuff for us:
# PSW saved in IPSW
# PSW set to 0
# PSW[E] set to default (0)
# PSW[M] set to 1 iff this is HPMC
#
# IIA queue is frozen (since PSW[Q] is now 0)
# privilege level promoted to 0
# IIR, ISR, IOR potentially updated if PSW[Q] was 1 at trap
# registers GR 1,8,9,16,17,24,25 copied to shadow regs
# SHR 0 1 2 3 4 5 6
#
# Our vector stub (in the BSP) MUST have done the following:
#
# a) Saved the original %r9 into %isr_r9 (%cr25)
# b) Placed the vector number in %r9
# c) Was allowed to also destroy $isr_r8 (%cr26),
# but the stub was NOT allowed to destroy any other registers.
#
# The typical stub sequence (in the BSP) should look like this:
#
# a) mtctl %r9,isr_r9 ; (save r9 in cr25)
# b) ldi vector,%r9 ; (load constant vector number in r9)
# c) mtctl %r8,isr_r8 ; (save r8 in cr26)
# d) ldil L%MY_BSP_first_level_interrupt_handler,%r8
# e) ldo R%MY_BSP_first_level_interrupt_handler(%r8),%r8
# ; (point to BSP raw handler table)
# f) ldwx,s %r9(%r8),%r8 ; (load value from raw handler table)
# g) bv 0(%r8) ; (call raw handler: _Generic_ISR_Handler)
# h) mfctl isr_r8,%r8 ; (restore r8 from cr26 in delay slot)
#
# Optionally, steps (c) thru (h) _could_ be replaced with a single
# bl,n _Generic_ISR_Handler,%r0
#
#
#
/*PAGE^L
* void _Generic_ISR_Handler()
*
* This routine provides the RTEMS interrupt management.
*
* We jump here from the interrupt vector.
* The HPPA hardware has done some stuff for us:
* PSW saved in IPSW
* PSW set to 0
* PSW[E] set to default (0)
* PSW[M] set to 1 iff this is HPMC
*
* IIA queue is frozen (since PSW[Q] is now 0)
* privilege level promoted to 0
* IIR, ISR, IOR potentially updated if PSW[Q] was 1 at trap
* registers GR 1,8,9,16,17,24,25 copied to shadow regs
* SHR 0 1 2 3 4 5 6
*
* Our vector stub (in the BSP) MUST have done the following:
*
* a) Saved the original %r9 into %isr_r9 (%cr25)
* b) Placed the vector number in %r9
* c) Was allowed to also destroy $isr_r8 (%cr26),
* but the stub was NOT allowed to destroy any other registers.
*
* The typical stub sequence (in the BSP) should look like this:
*
* a) mtctl %r9,isr_r9 ; (save r9 in cr25)
* b) ldi vector,%r9 ; (load constant vector number in r9)
* c) mtctl %r8,isr_r8 ; (save r8 in cr26)
* d) ldil L%MY_BSP_first_level_interrupt_handler,%r8
* e) ldo R%MY_BSP_first_level_interrupt_handler(%r8),%r8
* ; (point to BSP raw handler table)
* f) ldwx,s %r9(%r8),%r8 ; (load value from raw handler table)
* g) bv 0(%r8) ; (call raw handler: _Generic_ISR_Handler)
* h) mfctl isr_r8,%r8 ; (restore r8 from cr26 in delay slot)
*
* Optionally, steps (c) thru (h) _could_ be replaced with a single
* bl,n _Generic_ISR_Handler,%r0
*
*
*/
.EXPORT _Generic_ISR_Handler,ENTRY,PRIV_LEV=0
_Generic_ISR_Handler:
.PROC
@@ -110,7 +110,9 @@ _Generic_ISR_Handler:
mtctl arg0, isr_arg0
# save interrupt state
/*
* save interrupt state
*/
mfctl ipsw, arg0
stw arg0, IPSW_OFFSET(sp)
@@ -130,18 +132,19 @@ _Generic_ISR_Handler:
mfctl %sar, arg0
stw arg0, SAR_OFFSET(sp)
#
# Build an interrupt frame to hold the contexts we will need.
# We have already saved the interrupt items on the stack
# At this point the following registers are damaged wrt the interrupt
# reg current value saved value
# ------------------------------------------------
# arg0 scratch isr_arg0 (cr24)
# r9 vector number isr_r9 (cr25)
#
# Point to beginning of integer context and
# save the integer context
/*
* Build an interrupt frame to hold the contexts we will need.
* We have already saved the interrupt items on the stack
*
* At this point the following registers are damaged wrt the interrupt
* reg current value saved value
* ------------------------------------------------
* arg0 scratch isr_arg0 (cr24)
* r9 vector number isr_r9 (cr25)
*
* Point to beginning of integer context and
* save the integer context
*/
stw %r1,R1_OFFSET(sp)
stw %r2,R2_OFFSET(sp)
stw %r3,R3_OFFSET(sp)
@@ -150,7 +153,9 @@ _Generic_ISR_Handler:
stw %r6,R6_OFFSET(sp)
stw %r7,R7_OFFSET(sp)
stw %r8,R8_OFFSET(sp)
# skip r9
/*
* skip r9
*/
stw %r10,R10_OFFSET(sp)
stw %r11,R11_OFFSET(sp)
stw %r12,R12_OFFSET(sp)
@@ -167,22 +172,25 @@ _Generic_ISR_Handler:
stw %r23,R23_OFFSET(sp)
stw %r24,R24_OFFSET(sp)
stw %r25,R25_OFFSET(sp)
# skip arg0
/*
* skip arg0
*/
stw %r27,R27_OFFSET(sp)
stw %r28,R28_OFFSET(sp)
stw %r29,R29_OFFSET(sp)
stw %r30,R30_OFFSET(sp)
stw %r31,R31_OFFSET(sp)
# Now most registers are available since they have been saved
#
# The following items are currently wrong in the integer context
# reg current value saved value
# ------------------------------------------------
# arg0 scratch isr_arg0 (cr24)
# r9 vector number isr_r9 (cr25)
#
# Fix them
/* Now most registers are available since they have been saved
*
* The following items are currently wrong in the integer context
* reg current value saved value
* ------------------------------------------------
* arg0 scratch isr_arg0 (cr24)
* r9 vector number isr_r9 (cr25)
*
* Fix them
*/
mfctl isr_arg0,%r3
stw %r3,ARG0_OFFSET(sp)
@@ -190,19 +198,21 @@ _Generic_ISR_Handler:
mfctl isr_r9,%r3
stw %r3,R9_OFFSET(sp)
#
# At this point we are done with isr_arg0, and isr_r9 control registers
#
# Prepare to re-enter virtual mode
# We need Q in case the interrupt handler enables interrupts
#
/*
* At this point we are done with isr_arg0, and isr_r9 control registers
*
* Prepare to re-enter virtual mode
* We need Q in case the interrupt handler enables interrupts
*/
ldil L%CPU_PSW_DEFAULT, arg0
ldo R%CPU_PSW_DEFAULT(arg0), arg0
mtctl arg0, ipsw
# Now jump to "rest_of_isr_handler" with the rfi
# We are assuming the space queues are all correct already
/*
* Now jump to "rest_of_isr_handler" with the rfi
* We are assuming the space queues are all correct already
*/
ldil L%rest_of_isr_handler, arg0
ldo R%rest_of_isr_handler(arg0), arg0
@@ -213,32 +223,43 @@ _Generic_ISR_Handler:
rfi
nop
# At this point we are back in virtual mode and all our
# normal addressing is once again ok.
#
# It is now ok to take an exception or trap
#
/*
* At this point we are back in virtual mode and all our
* normal addressing is once again ok.
*
* It is now ok to take an exception or trap
*/
rest_of_isr_handler:
# Point to beginning of float context and
# save the floating point context -- doing whatever patches are necessary
/*
* Point to beginning of float context and
* save the floating point context -- doing whatever patches are necessary
*/
.call ARGW0=GR
bl _CPU_Save_float_context,%r2
ldo FP_CONTEXT_OFFSET(sp),arg0
# save the ptr to interrupt frame as an argument for the interrupt handler
/*
* save the ptr to interrupt frame as an argument for the interrupt handler
*/
copy sp, arg1
# Advance the frame to point beyond all interrupt contexts (integer & float)
# this also includes the pad to align to 64byte stack boundary
/*
* Advance the frame to point beyond all interrupt contexts (integer & float)
* this also includes the pad to align to 64byte stack boundary
*/
ldo CPU_INTERRUPT_FRAME_SIZE(sp), sp
# r3 -- &_ISR_Nest_level
# r5 -- value _ISR_Nest_level
# r4 -- &_Thread_Dispatch_disable_level
# r6 -- value _Thread_Dispatch_disable_level
# r9 -- vector number
/*
* r3 -- &_ISR_Nest_level
* r5 -- value _ISR_Nest_level
* r4 -- &_Thread_Dispatch_disable_level
* r6 -- value _Thread_Dispatch_disable_level
* r9 -- vector number
*/
.import _ISR_Nest_level,data
ldil L%_ISR_Nest_level,%r3
@@ -250,50 +271,64 @@ rest_of_isr_handler:
ldo R%_Thread_Dispatch_disable_level(%r4),%r4
ldw 0(%r4),%r6
# increment interrupt nest level counter. If outermost interrupt
# switch the stack and squirrel away the previous sp.
/*
* increment interrupt nest level counter. If outermost interrupt
* switch the stack and squirrel away the previous sp.
*/
addi 1,%r5,%r5
stw %r5, 0(%r3)
# compute and save new stack (with frame)
# just in case we are nested -- simpler this way
/*
* compute and save new stack (with frame)
* just in case we are nested -- simpler this way
*/
comibf,= 1,%r5,stack_done
ldo 128(sp),%r7
#
# Switch to interrupt stack allocated by the interrupt manager (intr.c)
#
/*
* Switch to interrupt stack allocated by the interrupt manager (intr.c)
*/
.import _CPU_Interrupt_stack_low,data
ldil L%_CPU_Interrupt_stack_low,%r7
ldw R%_CPU_Interrupt_stack_low(%r7),%r7
ldo 128(%r7),%r7
stack_done:
# save our current stack pointer where the "old sp" is supposed to be
/*
* save our current stack pointer where the "old sp" is supposed to be
*/
stw sp, -4(%r7)
# and switch stacks (or advance old stack in nested case)
/*
* and switch stacks (or advance old stack in nested case)
*/
copy %r7, sp
# increment the dispatch disable level counter.
/*
* increment the dispatch disable level counter.
*/
addi 1,%r6,%r6
stw %r6, 0(%r4)
# load address of user handler
# Note: No error checking is done, it is assumed that the
# vector table contains a valid address or a stub
# spurious handler.
/*
* load address of user handler
* Note: No error checking is done, it is assumed that the
* vector table contains a valid address or a stub
* spurious handler.
*/
.import _ISR_Vector_table,data
ldil L%_ISR_Vector_table,%r8
ldo R%_ISR_Vector_table(%r8),%r8
ldwx,s %r9(%r8),%r8
# invoke user interrupt handler
# Interrupts are currently disabled, as per RTEMS convention
# The handler has the option of re-enabling interrupts
# NOTE: can not use 'bl' since it uses "pc-relative" addressing
# and we are using a hard coded address from a table
# So... we fudge r2 ourselves (ala dynacall)
# arg0 = vector number, arg1 = ptr to rtems_interrupt_frame
/*
* invoke user interrupt handler
* Interrupts are currently disabled, as per RTEMS convention
* The handler has the option of re-enabling interrupts
* NOTE: can not use 'bl' since it uses "pc-relative" addressing
* and we are using a hard coded address from a table
* So... we fudge r2 ourselves (ala dynacall)
* arg0 = vector number, arg1 = ptr to rtems_interrupt_frame
*/
copy %r9, %r26
.call ARGW0=GR, ARGW1=GR
blr %r0, rp
@@ -301,20 +336,24 @@ stack_done:
post_user_interrupt_handler:
# Back from user handler(s)
# Disable external interrupts (since the interrupt handler could
# have turned them on) and return to the interrupted task stack (assuming
# (_ISR_Nest_level == 0)
/*
* Back from user handler(s)
* Disable external interrupts (since the interrupt handler could
* have turned them on) and return to the interrupted task stack (assuming
* (_ISR_Nest_level == 0)
*/
rsm HPPA_PSW_I + HPPA_PSW_R, %r0
ldw -4(sp), sp
# r3 -- (most of) &_ISR_Nest_level
# r5 -- value _ISR_Nest_level
# r4 -- (most of) &_Thread_Dispatch_disable_level
# r6 -- value _Thread_Dispatch_disable_level
# r7 -- (most of) &_ISR_Signals_to_thread_executing
# r8 -- value _ISR_Signals_to_thread_executing
/*
* r3 -- (most of) &_ISR_Nest_level
* r5 -- value _ISR_Nest_level
* r4 -- (most of) &_Thread_Dispatch_disable_level
* r6 -- value _Thread_Dispatch_disable_level
* r7 -- (most of) &_ISR_Signals_to_thread_executing
* r8 -- value _ISR_Signals_to_thread_executing
*/
.import _ISR_Nest_level,data
ldil L%_ISR_Nest_level,%r3
@@ -327,33 +366,42 @@ post_user_interrupt_handler:
.import _ISR_Signals_to_thread_executing,data
ldil L%_ISR_Signals_to_thread_executing,%r7
# decrement isr nest level
/*
* decrement isr nest level
*/
addi -1, %r5, %r5
stw %r5, R%_ISR_Nest_level(%r3)
# decrement dispatch disable level counter and, if not 0, go on
/*
* decrement dispatch disable level counter and, if not 0, go on
*/
addi -1,%r6,%r6
comibf,= 0,%r6,isr_restore
stw %r6, R%_Thread_Dispatch_disable_level(%r4)
# check whether or not a context switch is necessary
/*
* check whether or not a context switch is necessary
*/
.import _Context_Switch_necessary,data
ldil L%_Context_Switch_necessary,%r8
ldw R%_Context_Switch_necessary(%r8),%r8
comibf,=,n 0,%r8,ISR_dispatch
# check whether or not a context switch is necessary because an ISR
# sent signals to the interrupted task
/*
* check whether or not a context switch is necessary because an ISR
* sent signals to the interrupted task
*/
ldw R%_ISR_Signals_to_thread_executing(%r7),%r8
comibt,=,n 0,%r8,isr_restore
# OK, something happened while in ISR and we need to switch to a task
# other than the one which was interrupted or the
# ISR_Signals_to_thread_executing case
# We also turn on interrupts, since the interrupted task had them
# on (obviously :-) and Thread_Dispatch is happy to leave ints on.
#
/*
* OK, something happened while in ISR and we need to switch to a task
* other than the one which was interrupted or the
* ISR_Signals_to_thread_executing case
* We also turn on interrupts, since the interrupted task had them
* on (obviously :-) and Thread_Dispatch is happy to leave ints on.
*/
ISR_dispatch:
stw %r0, R%_ISR_Signals_to_thread_executing(%r7)
@@ -369,32 +417,41 @@ ISR_dispatch:
isr_restore:
# enable interrupts during most of restore
/*
* enable interrupts during most of restore
*/
ssm HPPA_PSW_I, %r0
# Get a pointer to beginning of our stack frame
/*
* Get a pointer to beginning of our stack frame
*/
ldo -CPU_INTERRUPT_FRAME_SIZE(sp), %arg1
# restore float
/*
* restore float
*/
.call ARGW0=GR
bl _CPU_Restore_float_context,%r2
ldo FP_CONTEXT_OFFSET(%arg1), arg0
copy %arg1, %arg0
# ********** FALL THRU **********
/*
* ********** FALL THRU **********
*/
# Jump here from bottom of Context_Switch
# Also called directly by _CPU_Context_Restart_self via _Thread_Restart_self
# restore interrupt state
#
/*
* Jump here from bottom of Context_Switch
* Also called directly by _CPU_Context_Restart_self via _Thread_Restart_self
* restore interrupt state
*/
.EXPORT _CPU_Context_restore
_CPU_Context_restore:
#
# restore integer state
#
/*
* restore integer state
*/
ldw R1_OFFSET(arg0),%r1
ldw R2_OFFSET(arg0),%r2
ldw R3_OFFSET(arg0),%r3
@@ -419,18 +476,26 @@ _CPU_Context_restore:
ldw R22_OFFSET(arg0),%r22
ldw R23_OFFSET(arg0),%r23
ldw R24_OFFSET(arg0),%r24
# skipping r25; used as scratch register below
# skipping r26 (arg0) until we are done with it
/*
* skipping r25; used as scratch register below
* skipping r26 (arg0) until we are done with it
*/
ldw R27_OFFSET(arg0),%r27
ldw R28_OFFSET(arg0),%r28
ldw R29_OFFSET(arg0),%r29
# skipping r30 (sp) until we turn off interrupts
/*
* skipping r30 (sp) until we turn off interrupts
*/
ldw R31_OFFSET(arg0),%r31
# Turn off Q & R & I so we can write r30 and interrupt control registers
/*
* Turn off Q & R & I so we can write r30 and interrupt control registers
*/
rsm HPPA_PSW_Q + HPPA_PSW_R + HPPA_PSW_I, %r0
# now safe to restore r30
/*
* now safe to restore r30
*/
ldw R30_OFFSET(arg0),%r30
ldw IPSW_OFFSET(arg0), %r25
@@ -445,9 +510,13 @@ _CPU_Context_restore:
ldw PCOQBACK_OFFSET(arg0), %r25
mtctl %r25, pcoq
# Load r25 with interrupts off
/*
* Load r25 with interrupts off
*/
ldw R25_OFFSET(arg0),%r25
# Must load r26 (arg0) last
/*
* Must load r26 (arg0) last
*/
ldw R26_OFFSET(arg0),%r26
isr_exit:
@@ -455,13 +524,14 @@ isr_exit:
.EXIT
.PROCEND
#
# This section is used to context switch floating point registers.
# Ref: 6-35 of Architecture 1.1
#
# NOTE: since integer multiply uses the floating point unit,
# we have to save/restore fp on every trap. We cannot
# just try to keep track of fp usage.
/*
* This section is used to context switch floating point registers.
* Ref: 6-35 of Architecture 1.1
*
* NOTE: since integer multiply uses the floating point unit,
* we have to save/restore fp on every trap. We cannot
* just try to keep track of fp usage.
*/
.align 32
.EXPORT _CPU_Save_float_context,ENTRY,PRIV_LEV=0
@@ -549,13 +619,14 @@ _CPU_Restore_float_context:
.EXIT
.PROCEND
#
# These 2 small routines are unused right now.
# Normally we just go thru _CPU_Save_float_context (and Restore)
#
# Here we just deref the ptr and jump up, letting _CPU_Save_float_context
# do the return for us.
#
/*
* These 2 small routines are unused right now.
* Normally we just go thru _CPU_Save_float_context (and Restore)
*
* Here we just deref the ptr and jump up, letting _CPU_Save_float_context
* do the return for us.
*/
.EXPORT _CPU_Context_save_fp,ENTRY,PRIV_LEV=0
_CPU_Context_save_fp:
.PROC
@@ -577,10 +648,11 @@ _CPU_Context_restore_fp:
.PROCEND
# void _CPU_Context_switch( run_context, heir_context )
#
# This routine performs a normal non-FP context switch.
#
/*
* void _CPU_Context_switch( run_context, heir_context )
*
* This routine performs a normal non-FP context switch.
*/
.align 32
.EXPORT _CPU_Context_switch,ENTRY,PRIV_LEV=0,ARGW0=GR,ARGW1=GR
@@ -589,7 +661,9 @@ _CPU_Context_switch:
.CALLINFO FRAME=64
.ENTRY
# Save the integer context
/*
* Save the integer context
*/
stw %r1,R1_OFFSET(arg0)
stw %r2,R2_OFFSET(arg0)
stw %r3,R3_OFFSET(arg0)
@@ -622,13 +696,17 @@ _CPU_Context_switch:
stw %r30,R30_OFFSET(arg0)
stw %r31,R31_OFFSET(arg0)
# fill in interrupt context section
/*
* fill in interrupt context section
*/
stw %r2, PCOQFRONT_OFFSET(%arg0)
ldo 4(%r2), %r2
stw %r2, PCOQBACK_OFFSET(%arg0)
# Generate a suitable IPSW by using the system default psw
# with the current low bits added in.
/*
* Generate a suitable IPSW by using the system default psw
* with the current low bits added in.
*/
ldil L%CPU_PSW_DEFAULT, %r2
ldo R%CPU_PSW_DEFAULT(%r2), %r2
@@ -636,9 +714,11 @@ _CPU_Context_switch:
dep %arg2, 31, 8, %r2
stw %r2, IPSW_OFFSET(%arg0)
# at this point, the running task context is completely saved
# Now jump to the bottom of the interrupt handler to load the
# heirs context
/*
* at this point, the running task context is completely saved
* Now jump to the bottom of the interrupt handler to load the
* heirs context
*/
b _CPU_Context_restore
copy %arg1, %arg0

View File

@@ -27,6 +27,10 @@
#ifndef _INCLUDE_HPPA_H
#define _INCLUDE_HPPA_H
#ifdef ASM
#include <rtems/score/targopts.h>
#endif
#if defined(__cplusplus)
extern "C" {
#endif
@@ -39,8 +43,6 @@ extern "C" {
* present in a particular member of the family.
*/
#if !defined(CPU_MODEL_NAME)
#if defined(hppa7100)
#define CPU_MODEL_NAME "hppa 7100"
@@ -51,11 +53,9 @@ extern "C" {
#else
#define CPU_MODEL_NAME Unsupported CPU Model /* cause an error on usage */
#error "Unsupported CPU Model"
#endif
#endif /* !defined(CPU_MODEL_NAME) */
/*
* Define the name of the CPU family.
@@ -69,6 +69,7 @@ extern "C" {
* Processor Status Word (PSW) Masks
*/
#define HPPA_PSW_Y 0x80000000 /* Data Debug Trap Disable */
#define HPPA_PSW_Z 0x40000000 /* Instruction Debug Trap Disable */
#define HPPA_PSW_r2 0x20000000 /* reserved */

View File

@@ -0,0 +1,86 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/i386types.h
# H_FILES that get installed externally
# i386.h is handled specially
EXTERNAL_H_FILES = $(srcdir)/asm.h
# Assembly source names, if any, go here -- minus the .s
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
install: all
preinstall: ${PROJECT_RELEASE}/include/rtems/score/i386.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/i386.h: i386.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
< $< >$(ARCH)/i386.h-tmp
$(INSTALL) -m 444 $(ARCH)/i386.h-tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,86 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/i960types.h
# H_FILES that get installed externally
# i960.h is handled separately
EXTERNAL_H_FILES = $(srcdir)/asm.h
# Assembly source names, if any, go here -- minus the .s
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
install: all
preinstall: ${PROJECT_RELEASE}/include/rtems/score/i960.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/i960.h: i960.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
< $< >$(ARCH)/i960.h.tmp
$(INSTALL) -m 444 $(ARCH)/i960.h.tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,75 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/m68k.h $(srcdir)/m68ktypes.h
# H_FILES that get installed externally
EXTERNAL_H_FILES = $(srcdir)/asm.h $(srcdir)/m68302.h $(srcdir)/m68360.h \
$(srcdir)/qsm.h $(srcdir)/sim.h
# Assembly source names, if any, go here -- minus the .s
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
preinstall: ${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,81 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
# Normally cpu_asm and rtems are assembly files
C_PIECES=cpu rtems
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/mips64orion.h $(srcdir)/mipstypes.h \
$(srcdir)/idtcpu.h $(srcdir)/iregdef.h $(srcdir)/idtmon.h
# H_FILES that get installed externally
EXTERNAL_H_FILES = $(srcdir)/asm.h
# Assembly source names, if any, go here -- minus the .s
# Normally cpu_asm and rtems are assembly files
S_PIECES=cpu_asm
S_FILES=$(S_PIECES:%=%.S)
S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
$(INSTALL_VARIANT) -m 444 $(RELS) ${PROJECT_RELEASE}/lib
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
preinstall: ${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,90 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
# Normally cpu_asm and rtems are assembly files
C_PIECES=cpu cpu_asm rtems
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/no_cputypes.h
# H_FILES that get installed externally
# no_cpu.h is handled separately
EXTERNAL_H_FILES = $(srcdir)/asm.h
# Assembly source names, if any, go here -- minus the .s
# Normally cpu_asm and rtems are assembly files
S_PIECES=
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
install: all
# Real ports using the gnu tools will need to have bsp_specs!!!
# ${PROJECT_RELEASE}/lib/bsp_specs
preinstall: ${PROJECT_RELEASE}/include/rtems/score/no_cpu.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/no_cpu.h: $(srcdir)/no_cpu.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
<$(srcdir)/no_cpu.h >$(ARCH)/no_cpu.h.tmp
$(INSTALL) -m 444 $(ARCH)/no_cpu.h.tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
# Real ports using the gnu tools will need to have bsp_specs!!!
#${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
# $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,92 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
# Normally cpu_asm and rtems are assembly files
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/ppctypes.h
# H_FILES that get installed externally
# ppc.h is handled separately
EXTERNAL_H_FILES = $(srcdir)/asm.h
# Assembly source names, if any, go here -- minus the .s
# Normally cpu_asm and rtems are assembly files
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
$(ARCH)/cpu_asm.o: irq_stub.s
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
install: all
preinstall: ${PROJECT_RELEASE}/include/rtems/score/ppc.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
# make a link in case we are not compiling in the source directory
-$(LN) -s $(srcdir)/irq_stub.s irq_stub.s
${PROJECT_RELEASE}/include/rtems/score/ppc.h: ppc.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
< $< >$(ARCH)/ppc.h.tmp
$(INSTALL) -m 444 $(ARCH)/ppc.h.tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,74 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/sparc.h $(srcdir)/sparctypes.h
# H_FILES that get installed externally
EXTERNAL_H_FILES = $(srcdir)/asm.h $(srcdir)/erc32.h
# Assembly source names, if any, go here -- minus the .s
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
preinstall: ${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,90 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/unixtypes.h
# Assembly source names, if any, go here -- minus the .S
S_PIECES=
S_FILES=$(S_PIECES:%=%.S)
S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
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 +=
$(ARCH)/unixsize.h: $(ARCH) cpu.h $(PROJECT_RELEASE)/bin/gensize
$(RM) $@
$(PROJECT_RELEASE)/bin/gensize > $@
$(CHMOD) -w $@
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} $(SRCS) $(ARCH)/unixsize.h preinstall $(RELS)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
install: all
# Real ports using the gnu tools will need to have bsp_specs!!!
# ${PROJECT_RELEASE}/lib/bsp_specs
preinstall: ${PROJECT_RELEASE}/include/rtems/score/unix.h $(ARCH)/unixsize.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
$(INSTALL) -m 444 ${ARCH}/unixsize.h ${PROJECT_RELEASE}/include/rtems/score
${PROJECT_RELEASE}/include/rtems/score/unix.h: unix.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
-e 's?REPLACE_THIS_WITH_THE_CPU_FAMILY?$(RTEMS_CPU_FAMILY)?' \
-e 's?REPLACE_THIS_WITH_THE_UNIX_FLAVOR?$(RTEMS_UNIX_FLAVOR)?' \
<$(srcdir)/unix.h >$(ARCH)/unix.h.tmp
$(INSTALL) -m 444 $(ARCH)/unix.h.tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
# Real ports using the gnu tools will need to have bsp_specs!!!
#${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
# $(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
#
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -447,7 +447,7 @@ void _CPU_Context_Initialize(
*(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
*(addr + FP_OFF) = (unsigned32)(_stack_high);
#elif defined(i386)
#elif defined(i386) || defined(__i386__)
/*
* This information was gathered by disassembling setjmp().
@@ -817,7 +817,7 @@ void _CPU_SHM_Init(
char *shm_addr;
key_t shm_key;
key_t sem_key;
int status = 0;
int status;
int shm_size;
if (getenv("RTEMS_SHM_KEY"))

View File

@@ -251,7 +251,7 @@ extern "C" {
#if defined(hppa1_1)
#define CPU_STACK_GROWS_UP TRUE
#elif defined(sparc) || defined(i386)
#elif defined(sparc) || defined(i386) || defined(__i386__)
#define CPU_STACK_GROWS_UP FALSE
#else
#error "unknown CPU!!"
@@ -353,7 +353,7 @@ extern "C" {
#endif
#endif
#if defined(i386)
#if defined(i386) || defined(__i386__)
#ifdef RTEMS_NEWLIB
#error "Newlib not installed"
@@ -544,7 +544,7 @@ SCORE_EXTERN void (*_CPU_Thread_dispatch_pointer)();
#define CPU_FRAME_SIZE (32 * 4)
#elif defined(sparc)
#define CPU_FRAME_SIZE (112) /* based on disassembled test code */
#elif defined(i386)
#elif defined(i386) || defined(__i386__)
#define CPU_FRAME_SIZE (24) /* return address, sp, and bp pushed plus fudge */
#else
#error "Unknown CPU!!!"

View File

@@ -38,6 +38,10 @@ extern "C" {
#define CPU_MODEL_NAME "Solaris"
#elif defined(__linux__)
#define CPU_MODEL_NAME "Linux"
#elif defined(linux)
#define CPU_MODEL_NAME "Linux"

View File

@@ -0,0 +1,44 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# H_FILES that get installed in the rtems/score subdirectoy
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
coresem heap interr isr mpci mppkt object objectmp \
priority stack states sysstate system thread threadmp threadq \
tod tqdata userext watchdog wkspace
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed in the rtems subdirectoy
SAPI_H_PIECES=debug system
SAPI_H_FILES=$(SAPI_H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed at the top level
# system.h is handled specially
EXTERNAL_H_PIECES =
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(SAPI_H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
$(INSTALL) -m 444 ${SAPI_H_FILES} ${PROJECT_RELEASE}/include/rtems/
# $(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,44 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# H_FILES that get installed in the rtems/score subdirectoy
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
coresem heap interr isr mpci mppkt object objectmp \
priority stack states sysstate system thread threadmp threadq \
tod tqdata userext watchdog wkspace
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed in the rtems subdirectoy
SAPI_H_PIECES=debug system
SAPI_H_FILES=$(SAPI_H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed at the top level
# system.h is handled specially
EXTERNAL_H_PIECES =
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(SAPI_H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# 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 +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
$(INSTALL) -m 444 ${SAPI_H_FILES} ${PROJECT_RELEASE}/include/rtems/
# $(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= address chain coremsg coremutex coresem heap \
isr mppkt object objectmp priority stack states sysstate thread \
threadmp tod tqdata userext watchdog wkspace
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/score

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= address chain coremsg coremutex coresem heap \
isr mppkt object objectmp priority stack states sysstate thread \
threadmp tod tqdata userext watchdog wkspace
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/score

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= address chain coremsg coremutex coresem heap \
isr mppkt object objectmp priority stack states sysstate thread \
threadmp tod tqdata userext watchdog wkspace
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/score

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= address chain coremsg coremutex coresem heap \
isr mppkt object objectmp priority stack states sysstate thread \
threadmp tod tqdata userext watchdog wkspace
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# 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 += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/score

View File

@@ -0,0 +1,41 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# C and C++ source names, if any, go here -- minus the .c or .cc
C_PIECES=apiext chain coremsg coremutex coresem heap interr \
isr mpci object objectmp thread threadmp threadq tod userext \
watchdog wkspace
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# 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 +=
all: ${ARCH} $(SRCS) ${OBJS}

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=generic $(wildcard $(RTEMS_CPU))

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
# RTEMS build tools
# NOTE: of course we can't use any of these tools
# in this Makefile. Most notably: install-if-change
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/bin
PGMS=size_rtems
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
echo $(DESTDIR)
$(DESTDIR):
[ -d $@ ] || $(MKDIR) $@
install: $(INSTALLED)
# Install the program
$(DESTDIR)/%: %
$(make-script)

View File

@@ -0,0 +1,62 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# we use host compiler here for genoffsets. Hopefully it has same alignment!!
USE_HOST_COMPILER=yes
# C source names, if any, go here -- minus the .c
C_PIECES=genoffsets
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES)
PGMS=${ARCH}/genoffsets
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
# We use files that have not been installed yet.
CPU_DIR=../../cpu/$(RTEMS_CPU)
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS += -I$(PROJECT_RELEASE)/include \
-I$(CPU_DIR)
CFLAGS +=
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here.
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) preinstall $(PGMS)
$(INSTALL) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
# Hack
# we are #including files that haven't been installed yet.
# Make sure they are available in the src tree (ie: checked
# out from SCCS or RCS)
preinstall: FORCEIT
cd $(CPU_DIR); $(MAKE) install-headers
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)

View File

@@ -0,0 +1,61 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# we use host compiler here for gensize. Hopefully it has same alignment!!
USE_HOST_COMPILER=yes
# C source names, if any, go here -- minus the .c
C_PIECES=gensize
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES)
PGMS=${ARCH}/gensize
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
# We use files that have not been installed yet.
CPU_DIR=../../cpu/$(RTEMS_CPU)
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS += -I$(PROJECT_RELEASE)/include \
-I$(CPU_DIR)
CFLAGS +=
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here.
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(PGMS)
$(INSTALL) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
# Hack
# we are #including files that haven't been installed yet.
# Make sure they are available in the src tree (ie: checked
# out from SCCS or RCS)
preinstall:
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)

View File

@@ -0,0 +1,17 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
POSIX_DIRS_yes_V=posix
POSIX_DIRS = $(POSIX_DIRS_$(HAS_POSIX_API)_V)
SUB_DIRS=rtems $(POSIX_DIRS)

View File

@@ -0,0 +1,51 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#
# This is really temporary until posix is more an integral part of the tree.
#
#CPU_OBJS=$(wildcard ../../score/cpu/$(RTEMS_CPU)/$(ARCH)/*.rel)
#CORE_OBJS=$(wildcard ../../score/src/$(ARCH)/*.o)
#SAPI_OBJS=$(wildcard ../../sapi/src/$(ARCH)/*.o)
POSIX_OBJS=$(wildcard ../../posix/src/$(ARCH)/*.o)
OBJS=$(CPU_OBJS) $(CORE_OBJS) $(POSIX_OBJS) $(SAPI_OBJS)
LIB=$(ARCH)/libposix.a
include $(RTEMS_CUSTOM)
include $(PROJECT_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

View File

@@ -0,0 +1,48 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
CPU_OBJS=$(wildcard ../../score/cpu/$(RTEMS_CPU)/$(ARCH)/*.rel)
CORE_OBJS=$(wildcard ../../score/src/$(ARCH)/*.o)
SAPI_OBJS=$(wildcard ../../sapi/src/$(ARCH)/*.o)
RTEMS_OBJS=$(wildcard ../../rtems/src/$(ARCH)/*.o)
OBJS=$(CPU_OBJS) $(CORE_OBJS) $(RTEMS_OBJS) $(SAPI_OBJS)
LIB=$(ARCH)/librtems.a
include $(RTEMS_CUSTOM)
include $(PROJECT_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

13
c/src/lib/Makefile.in Normal file
View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=start include libmisc libc libcpu libbsp wrapup

View File

@@ -0,0 +1,28 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_FILES=console.h clockdrv.h iosupp.h ringbuf.h \
spurious.h timerdrv.h vmeintr.h z8036.h z8530.h z8536.h
HH_FILES=$(H_FILES:%=$(srcdir)/%)
SYS_H_FILES=
SRCS=$(HH_FILES) $(SYS_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 $(HH_FILES) ${PROJECT_RELEASE}/include
$(INSTALL) -m 444 $(SYS_H_FILES) ${PROJECT_RELEASE}/include/sys

View File

@@ -0,0 +1,20 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
# mptests are the multiprocessing test suite
# We only build them 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))

View File

@@ -0,0 +1,14 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
# Descend into the $(RTEMS_BSP) directory if it exists
SUB_DIRS=$(wildcard $(RTEMS_BSP))

View File

@@ -0,0 +1,19 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_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 startup console wrapup

View File

@@ -0,0 +1,58 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
PGM=${ARCH}/console.rel
# C source names, if any, go here -- minus the .c
C_PIECES=console serial
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/concntl.h
# Assembly source names, if any, go here -- minus the .s
S_PIECES=
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.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 +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
all: ${ARCH} $(SRCS) $(PGM)
$(INSTALL) -m 444 $(H_FILES) ${PROJECT_RELEASE}/include
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile

View File

@@ -0,0 +1,32 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_FILES = $(srcdir)/bsp.h $(srcdir)/coverhd.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_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 $(H_FILES) ${PROJECT_RELEASE}/include
$(INSTALL) -m 444 $(EQ_FILES) ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,59 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
PGM=${ARCH}/shmsupp.rel
# C source names, if any, go here -- minus the .c
C_PIECES=addrconv getcfg lock mpisr
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
# Assembly source names, if any, go here -- minus the .s
S_PIECES=
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.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 +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
install: all

View File

@@ -0,0 +1,53 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# C source names, if any, go here -- minus the .c
C_PIECES=
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
# Assembly source names, if any, go here -- minus the .s
S_PIECES=crt0 register
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
PGM=${ARCH}/crt0.o ${ARCH}/register.o
#
# (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 +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGM)
$(INSTALL_VARIANT) -m 555 ${PGM} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,59 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bspstart main sbrk setvec iface
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
# Assembly source names, if any, go here -- minus the .s
S_PIECES=
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=ramlink romlink $(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.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 +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
all: ${ARCH} $(SRCS) $(PGM)
$(INSTALL) ramlink romlink ${PROJECT_RELEASE}/lib
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile

View File

@@ -0,0 +1,50 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
BSP_PIECES=startup console iic ethernet flash nvram
CPU_PIECES=clock timer
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, $(CPU_PIECES), ../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) \
$(foreach piece, $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).rel)
LIB=$(ARCH)/libbsp.a
include $(RTEMS_CUSTOM)
include $(PROJECT_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

View File

@@ -0,0 +1,14 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
# Descend into the $(RTEMS_BSP) directory if it exists
SUB_DIRS=$(wildcard $(RTEMS_BSP))

View File

@@ -0,0 +1,49 @@
#
# Build the pixelflow bsp by cd'ing into another floss tree and
# building it there.
#
# NOTE: we also jump sideways in rtems tree and install test/support/include
# so that floss tests can use the rtems test structures
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
SRCS=$(srcdir)/floss-bsp.h
# HACK alert
# on a 'make -k' we don't want to bomb out of build
EXIT_CMD=exit 1
ifeq (k, $(findstring k, $(MAKEFLAGS)))
EXIT_CMD=true
endif
all install::
@$(ECHO); $(ECHO)
@if [ ! -d $(FLOSS_ROOT) ]; \
then \
$(ECHO) "*** ERROR FLOSS_ROOT ($(FLOSS_ROOT)) points to nonexistent directory"; \
$(ECHO); $(ECHO); \
$(EXIT_CMD); \
fi
@if [ -f $(FLOSS_ROOT)/PURE ]; \
then \
$(ECHO) "*** Assuming $(FLOSS_HOME) up to date since ./PURE exists"; \
else \
cmd="cd $(RTEMS_ROOT)/c/src/tests/support/include; $(MAKE) install"; \
$(ECHO) $$cmd; \
eval $$cmd || $(EXIT_CMD); \
cmd="cd $(FLOSS_ROOT); $(MAKE) $@"; \
$(ECHO) $$cmd; \
eval $$cmd || $(EXIT_CMD); \
fi
@$(ECHO); $(ECHO)
$(INSTALL) -m 444 $(srcdir)/floss-bsp.h $(PROJECT_RELEASE)/include/bsp.h

View File

@@ -0,0 +1,16 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
# NOTE: we pick up HPPA clock and timer from libcpu/hppa
SUB_DIRS=tools include startup tty shmsupp wrapup

View File

@@ -0,0 +1,34 @@
predefines:
-D__embedded__ -Asystem(embedded)
startfile: replace
mrtems:
pg: start.o%s
{!pg:
g: start.o%s
{!g:
p: start.o%s
!p: start.o%s
}}
{!mrtems:
pg: pgcrt0%O
{!pg:
g: gcrt0%O
{!g:
p: pcrt0%O
!p: crt0%O
}}}
link: replace
mrtems: -dc -dp -N -e start
lib: replace
mrtems: -( -lc -lrtemsall -lgcc -)
libgcc: replace

View File

@@ -0,0 +1,40 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES = bsp coverhd
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
RTEMS_H_PIECES = ttydrv
RTEMS_H_FILES=$(RTEMS_H_PIECES:%=$(srcdir)/%.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.
#
# If you add equate files, don't forget to uncomment the install line
# below.
#
EQ_FILES =
SRCS=$(H_FILES) $(EQ_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 $(H_FILES) ${PROJECT_RELEASE}/include
$(INSTALL) -m 444 $(RTEMS_H_FILES) ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,54 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
PGM=${ARCH}/shmsupp.rel
# C source names, if any, go here -- minus the .c
C_PIECES=addrconv getcfg intr lock mpisr
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.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 +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
install: all

View File

@@ -0,0 +1,169 @@
/*
* crt0.S -- startup file for hppa on RTEMS
*
* $Id$
*/
.COPYRIGHT "crt0.S for hppa"
.DATA
_progname .STRINGZ "simhppa"
_crt0_argv .WORD _progname, 0
/*
* Set up the standard spaces (sections) These definitions come
* from /lib/pcc_prefix.s.
*/
.TEXT
/*
* stuff we need that is defined elsewhere.
*/
.IMPORT main, CODE
.IMPORT _bss_start, DATA
.IMPORT _bss_end, DATA
.IMPORT environ, DATA
/*
* start -- set things up so the application will run.
*
*/
.PROC
.CALLINFO SAVE_SP, FRAME=48
.EXPORT $START$,ENTRY
.EXPORT start,ENTRY
$START$
start:
/*
* Get a stack
*/
ldil L%crt_stack+48,%r30
ldo R%crt_stack+48(%r30),%r30
/*
* we need to set %r27 (global data pointer) here
*/
ldil L%$global$,%r27
ldo R%$global$(%r27),%r27
/*
* zerobss -- zero out the bss section
* XXX We don't do this since simulator and boot rom will do this for us.
*/
#if 0
; load the start of bss
ldil L%_bss_start,%r4
ldo R%_bss_start(%r4),%r4
; load the end of bss
ldil L%_bss_end,%r5
ldo R%_bss_end(%r5),%r5
bssloop
addi -1,%r5,%r5 ; decrement _bss_end
stb %r0,0(0,%r5) ; we do this by bytes for now even
; though it is slower, it is safer
combf,= %r4,%r5, bssloop
nop
#endif
ldi 1,%ret0
/*
* Call the "main" routine from the application to get it going.
* We call it as main(1, argv, 0)
*/
copy %r0, %r24
ldil L%_crt0_argv,%r25
ldo R%_crt0_argv(%r25),%r25
bl main,%r2
ldo 1(%r0), %r26
.PROCEND
/*
* _exit -- Exit from the application. Normally we cause a user trap
* to return to the ROM monitor for another run, but with
* this monitor we can not. Still, "C" wants this symbol, it
* should be here. Jumping to 0xF0000004 jumps back into the
* firmware, while writing a 5 to 0xFFFE0030 causes a reset.
*/
_exit_fallthru
.PROC
.CALLINFO
.ENTRY
;; This just causes a breakpoint exception
break 0x0,0x0
bv,n (%rp)
nop
.EXIT
.PROCEND
/*
* _sr4export -- support for called functions. (mostly for GDB)
*/
.EXPORT _sr4export, ENTRY
_sr4export:
.PROC
.CALLINFO
.ENTRY
ble 0(%sr4,%r22)
copy %r31,%rp
ldw -18(%sr0,%sp),%rp
ldsid (%sr0,%rp),%r1
mtsp %r1,%sr0
be,n 0(%sr0,%rp)
nop
.EXIT
.PROCEND
.subspa $UNWIND_START$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=56
.export $UNWIND_START
$UNWIND_START
.subspa $UNWIND$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=64
.subspa $UNWIND_END$,QUAD=0,ALIGN=8,ACCESS=0x2c,SORT=72
.export $UNWIND_END
$UNWIND_END
.subspa $RECOVER_START$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=73
.export $RECOVER_START
$RECOVER_START
.subspa $RECOVER$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=80
.subspa $RECOVER_END$,QUAD=0,ALIGN=4,ACCESS=0x2c,SORT=88
.export $RECOVER_END
$RECOVER_END
/*
* Here we set up the standard date sub spaces.
*
* Set up some room for a stack. We just grab a chunk of memory.
* We also setup some space for the global variable space, which
* must be done using the reserved name "$global$" so "C" code
* can find it. The stack grows towards the higher addresses.
*/
.subspa $DATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=16
.subspa $SHORTDATA$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=24
.subspa $GLOBAL$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=40
.export $global$
$global$
.subspa $SHORTBSS$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=80,ZERO
.subspa $BSS$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=82,ZERO
.subspa $STACK$,QUAD=1,ALIGN=8,ACCESS=0x1f,SORT=88,ZERO
.export crt_stack
crt_stack
.comm 0x1000
.end

View File

@@ -0,0 +1,61 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
PGM=${ARCH}/startup.rel
# C source names, if any, go here -- minus the .c
C_PIECES=bspclean bspstart sbrk setvec
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
CC_PIECES=rtems-ctor
CC_FILES=$(CC_PIECES:%=%.cc)
CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES)
# We install the RTEMS constructor as a separate .o
# so it can be easily place correctly by the compiler config file.
INSTALLED_O_FILES=$(ARCH)/rtems-ctor.o
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.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 +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
all: ${ARCH} $(SRCS) $(INSTALLED_O_FILES) $(PGM)
$(INSTALL_VARIANT) $(INSTALLED_O_FILES) ${PROJECT_RELEASE}/lib
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile

View File

@@ -348,7 +348,7 @@ bsp_start(void)
Cpu_table.itimer_clicks_per_microsecond = 1;
#ifdef 0
#if 0
/*
* Commented by DIVISION INC. External interrupt
* processing is now divorced from RTEMS for HPPA.

View File

@@ -0,0 +1,51 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# we use host compiler here for genoffsets. Hopefully it has same alignment!!
USE_HOST_COMPILER=yes
# C source names, if any, go here -- minus the .c
C_PIECES=print_dump
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES)
PGMS=${ARCH}/print_dump
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS +=
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here.
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(PGMS)
$(INSTALL) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)

View File

@@ -0,0 +1,54 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
PGM=${ARCH}/tty.rel
# C source names, if any, go here -- minus the .c
C_PIECES=tty
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.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 +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
install: all

View File

@@ -0,0 +1,53 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
BSP_PIECES=startup tty shmsupp
# pieces to pick up out of libcpu/hppa
CPU_PIECES=clock milli timer
GENERIC_PIECES=shmdr
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS=$(foreach piece, $(BSP_PIECES), ../$(piece)/$(ARCH)/$(piece).rel) \
$(foreach piece, $(CPU_PIECES), \
../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) \
$(foreach piece, $(GENERIC_PIECES), \
../../../$(piece)/$(ARCH)/$(piece).rel)
LIB=$(ARCH)/libbsp.a
include $(RTEMS_CUSTOM)
include $(PROJECT_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

View File

@@ -0,0 +1,14 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
# Descend into the $(RTEMS_BSP) directory if it exists
SUB_DIRS=$(wildcard $(RTEMS_BSP))

Some files were not shown because too many files have changed in this diff Show More