mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-27 06:58:19 +00:00
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* .cvsignore, ChangeLog, Makefile.am, bsp_specs, configure.ac, preinstall.am, console/console-io.c, console/syscalls.S, include/.cvsignore, include/bsp.h, start/start.S, startup/bspstart.c, startup/crtn.S, startup/linkcmds, timer/timer.c, tools/.cvsignore, tools/Makefile.am, tools/configure.ac, tools/runtest.in: New files.
This commit is contained in:
8
c/src/lib/libbsp/m32c/m32cbsp/.cvsignore
Normal file
8
c/src/lib/libbsp/m32c/m32cbsp/.cvsignore
Normal file
@@ -0,0 +1,8 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
Makefile
|
||||
Makefile.in
|
||||
520
c/src/lib/libbsp/m32c/m32cbsp/ChangeLog
Normal file
520
c/src/lib/libbsp/m32c/m32cbsp/ChangeLog
Normal file
@@ -0,0 +1,520 @@
|
||||
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* .cvsignore, ChangeLog, Makefile.am, bsp_specs, configure.ac,
|
||||
preinstall.am, console/console-io.c, console/syscalls.S,
|
||||
include/.cvsignore, include/bsp.h, start/start.S, startup/bspstart.c,
|
||||
startup/crtn.S, startup/linkcmds, timer/timer.c, tools/.cvsignore,
|
||||
tools/Makefile.am, tools/configure.ac, tools/runtest.in: New files.
|
||||
|
||||
2008-09-26 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Cleanup ../../shared/include/bootcard.h handling.
|
||||
|
||||
2008-09-25 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* console/console-io.c: Add missing file and remove junk code.
|
||||
* console/syscalls.S: New file.
|
||||
|
||||
2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/linkcmds: Simulator now appears to have 16M RAM support by
|
||||
default in gdb 6.8.
|
||||
|
||||
2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, console/console-io.c, include/bsp.h:
|
||||
|
||||
2008-09-23 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* configure.ac: Make letting boot_card() handle work area allocation
|
||||
mandatory. Rename RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION to
|
||||
BSP_BOOTCARD_OPTIONS.
|
||||
|
||||
2008-09-19 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am: Split out bspstart contents. Use shared stub for
|
||||
bsp_start.
|
||||
* startup/h8bdinstallirq.c: New file.
|
||||
* startup/bspstart.c: Removed.
|
||||
|
||||
2008-09-18 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* include/bsp.h: Remove unnecessary boilerplate comments.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, startup/linkcmds: Use top level shared
|
||||
bsp_get_work_area() implementation.
|
||||
* startup/bspgetworkarea.c: Removed.
|
||||
|
||||
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* startup/bspstart.c: Remove unnecessary includes of
|
||||
rtems/libcsupport.h and rtems/libio.h.
|
||||
|
||||
2008-09-14 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* Makefile.am, configure.ac, startup/__main.c, startup/bspstart.c:
|
||||
Split out bsp_get_work_area() into its own file and user BSP
|
||||
Framework to perform more initialization.
|
||||
* startup/bspgetworkarea.c: New file.
|
||||
|
||||
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
|
||||
phase, all prototypes were removed from bsp.h and empty
|
||||
implementations were removed and made to use the shared stub.
|
||||
|
||||
2008-08-19 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* startup/__main.c: Add missing prototypes.
|
||||
|
||||
2008-05-15 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c: Add capability for bootcard.c BSP Initialization
|
||||
Framework to ask the BSP where it has memory for the RTEMS Workspace
|
||||
and C Program Heap. These collectively are referred to as work area.
|
||||
If the BSP supports this, then it does not have to include code to
|
||||
split the available memory between the two areas. This reduces the
|
||||
amount of code in the BSP specific bspstart.c file. Additionally, the
|
||||
shared framework can initialize the C Library, call
|
||||
rtems_debug_enable(), and dirty the work area memory. Until most/all
|
||||
BSPs support this new capability, if the BSP supports this, it should
|
||||
call RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION from its configure.ac.
|
||||
When the transition is complete, this autoconf macro can be removed.
|
||||
|
||||
2008-05-14 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* Makefile.am: Rework to avoid .rel files.
|
||||
|
||||
2008-05-12 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c: Refactored and renamed initialization routines to
|
||||
rtems_initialize_data_structures, rtems_initialize_before_drivers,
|
||||
rtems_initialize_device_drivers, and
|
||||
rtems_initialize_start_multitasking. This opened the sequence up so
|
||||
that bootcard() could provide a more robust and flexible framework
|
||||
which is easier to explain and understand. This also lays the
|
||||
groundwork for sharing the division of available memory between the
|
||||
RTEMS workspace and heap and the C library initialization across all
|
||||
BSPs.
|
||||
|
||||
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* include/bsp.h, startup/bspstart.c: Eliminate copies of the
|
||||
Configuration Table. Use the RTEMS provided accessor macros to obtain
|
||||
configuration fields.
|
||||
|
||||
2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c: Move interrupt_stack_size field from CPU Table to
|
||||
Configuration Table. Eliminate CPU Table from all ports. Delete
|
||||
references to CPU Table in all forms.
|
||||
|
||||
2007-12-03 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* Makefile.am, startup/bspstart.c: Moved most of the remaining CPU
|
||||
Table fields to the Configuration Table. This included
|
||||
pretasking_hook, predriver_hook, postdriver_hook, idle_task,
|
||||
do_zero_of_workspace, extra_mpci_receive_server_stack,
|
||||
stack_allocate_hook, and stack_free_hook. As a side-effect of this
|
||||
effort some multiprocessing code was made conditional and some style
|
||||
clean up occurred.
|
||||
|
||||
2007-05-03 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Handle .data.* sections
|
||||
|
||||
2007-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* bsp_specs: Remove qrtems_debug.
|
||||
|
||||
2006-12-02 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* configure.ac: New BUG-REPORT address.
|
||||
|
||||
2006-11-15 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* Makefile.am: Merge c_rtems_main() into boot_card(). This eliminated a
|
||||
file and simplified initialization.
|
||||
|
||||
2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Remove superfluous -DASM.
|
||||
|
||||
2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Require autoconf-2.60. Require automake-1.10.
|
||||
|
||||
2006-02-08 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Add sections required by newer gcc versions.
|
||||
|
||||
2006-01-11 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Add preinstall.am.
|
||||
|
||||
2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: New header guard.
|
||||
|
||||
2005-05-11 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Add .rodata.* sections.
|
||||
|
||||
2005-03-07 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* Makefile.am: Add timerstub so more tests link.
|
||||
|
||||
2005-03-07 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Hacked so there is enough memory to link pppd.exe.
|
||||
|
||||
2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
|
||||
|
||||
2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* Makefile.am: Remove build-variant support.
|
||||
|
||||
2004-09-29 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/bsp.h, include/tm27.h: i960 obsoleted and all references
|
||||
removed.
|
||||
|
||||
2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* configure.ac: Require automake > 1.9.
|
||||
|
||||
2004-04-23 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 610/bsps
|
||||
* Makefile.am: Add include/tm27.h, Cosmetics.
|
||||
* include/tm27.h: Final cosmetics.
|
||||
|
||||
2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Split out tmtest27 support.
|
||||
* include/tm27.h: New.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 613/bsps
|
||||
* include/bsp.h: Remove MAX_LONG_TEST_DURATION.
|
||||
|
||||
2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
PR 614/bsps
|
||||
* include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
|
||||
|
||||
2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
|
||||
* include/bsp.h: Include <rtems/console.h> instead of <console.h>.
|
||||
* include/bsp.h: Include <rtems/iosupp.h> instead of <iosupp.h>.
|
||||
|
||||
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* include/bsp.h, startup/bspstart.c: Convert to using c99 fixed size
|
||||
types.
|
||||
|
||||
2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect changes to bsp.am.
|
||||
Preinstall dist_project_lib*.
|
||||
|
||||
2004-02-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect changes to bsp.am.
|
||||
|
||||
2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Use CPPASCOMPILE instead of CCASCOMPILE.
|
||||
|
||||
2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am,
|
||||
start/Makefile.am, startup/Makefile.am, wrapup/Makefile.am.
|
||||
* clock/Makefile.am, console/Makefile.am, start/Makefile.am,
|
||||
startup/Makefile.am, wrapup/Makefile.am: Remove.
|
||||
Use automake compilation rules.
|
||||
* configure.ac: Reflect changes above.
|
||||
|
||||
2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Add PREINSTALL_DIRS.
|
||||
|
||||
2004-01-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Re-add dirstamps to PRE/TMPINSTALL_FILES.
|
||||
Add PRE/TMPINSTALL_FILES to CLEANFILES.
|
||||
* startup/Makefile.am: Ditto.
|
||||
|
||||
2004-01-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Eliminate $(LIB).
|
||||
Use noinst_DATA to trigger building libbsp.a.
|
||||
|
||||
2003-12-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
|
||||
* startup/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
|
||||
|
||||
2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
|
||||
* startup/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
|
||||
|
||||
2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Require automake >= 1.8, autoconf >= 2.59.
|
||||
|
||||
2003-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Misc cleanups and fixes.
|
||||
* start/Makefile.am: Misc cleanups and fixes.
|
||||
* startup/Makefile.am: Misc cleanups and fixes.
|
||||
* wrapup/Makefile.am: Misc cleanups and fixes.
|
||||
|
||||
2003-12-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Add dirstamps to preinstallation.
|
||||
* clock/Makefile.am: Cosmetics.
|
||||
* console/Makefile.am: Cosmetics.
|
||||
* startup/Makefile.am: Cosmetics.
|
||||
* wrapup/Makefile.am: Cosmetics.
|
||||
|
||||
2003-12-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Remove all-local: $(ARCH).
|
||||
* console/Makefile.am: Remove all-local: $(ARCH).
|
||||
* start/Makefile.am: Remove all-local: $(ARCH).
|
||||
* startup/Makefile.am: Remove all-local: $(ARCH).
|
||||
* wrapup/Makefile.am: Remove all-local: $(ARCH).
|
||||
|
||||
2003-09-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Merge-in include/Makefile.am.
|
||||
Reflect changes to bsp.am.
|
||||
* include/Makefile.am: Remove.
|
||||
* configure.ac: Reflect changes above.
|
||||
|
||||
2003-09-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* bsp_specs: Remove *lib:.
|
||||
|
||||
2003-09-04 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* console/console-io.c, include/bsp.h, startup/bspstart.c: URL for
|
||||
license changed.
|
||||
|
||||
2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect having moved aclocal/.
|
||||
|
||||
2003-08-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Reflect having moved automake/.
|
||||
* clock/Makefile.am: Reflect having moved automake/.
|
||||
* console/Makefile.am: Reflect having moved automake/.
|
||||
* include/Makefile.am: Reflect having moved automake/.
|
||||
* start/Makefile.am: Reflect having moved automake/.
|
||||
* startup/Makefile.am: Reflect having moved automake/.
|
||||
* wrapup/Makefile.am: Reflect having moved automake/.
|
||||
|
||||
2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Use rtems-bugs@rtems.com as bug report email address.
|
||||
|
||||
2003-08-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
PR 445/bsps
|
||||
* bsp_specs: Remove -D__embedded__ -Asystem(embedded) from cpp.
|
||||
Remove cpp, old_cpp (now unused).
|
||||
|
||||
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove AC_CONFIG_AUX_DIR.
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
|
||||
|
||||
2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: AC_PREREQ(2.57).
|
||||
|
||||
2003-01-20 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/linkcmds: Add FreeBSD SYSCTL() sections for networking.
|
||||
|
||||
2002-12-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* console/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* start/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
* startup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
|
||||
2002-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Use install-data-local to install startfile.
|
||||
|
||||
2002-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
|
||||
|
||||
2002-11-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/bspstart.c: Add empty H8BD_Install_IRQ so the port will have
|
||||
a routine to call.
|
||||
|
||||
2002-11-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/bspstart.c: Remove ramStart to eliminate warning.
|
||||
|
||||
2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Reformat.
|
||||
Add autom4te*cache.
|
||||
Remove autom4te.cache.
|
||||
|
||||
2002-08-21 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* bsp_specs: Added support for -nostdlibs.
|
||||
|
||||
2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* clock/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* console/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* start/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* startup/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
* wrapup/Makefile.am: Use .$(OBJEXT) instead of .o.
|
||||
|
||||
2002-08-05 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c, startup/linkcmds: Per PR247 , fix the linkcmds
|
||||
to avoid overlapping sections and reworked the way the heap and
|
||||
workspace are calculated.
|
||||
|
||||
2002-07-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* start/Makefile.am: Eliminate PGM.
|
||||
Add bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o.
|
||||
|
||||
2002-07-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* startup/Makefile.am: Add bsplib_DATA = linkcmds.
|
||||
|
||||
2002-07-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Eliminate TMPINSTALL_FILES.
|
||||
Remove $(OBJS) from all-local.
|
||||
|
||||
2002-07-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Add $(LIB) to all-local.
|
||||
|
||||
2002-06-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* wrapup/Makefile.am: Remove preinstallation of libbsp.a,
|
||||
|
||||
2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac:
|
||||
AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.6]).
|
||||
* clock/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* console/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* include/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* start/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* startup/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
* wrapup/Makefile.am: Remove AUTOMAKE_OPTIONS.
|
||||
|
||||
2002-01-03 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* console/console-io.c: Include rtems/bspIo.h instead of bspIo.h.
|
||||
|
||||
2001-12-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* bsp_specs: Replace -lrtemsall with -lrtemsbsp -lrtemscpu,
|
||||
replace -lrtemsall_g with -lrtemsbsp_g -lrtemscpu_g.
|
||||
|
||||
2001-12-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* bsp_specs: Replace -lrtemsall with -lrtemsbsp -lrtemscpu,
|
||||
replace -lrtemsall_g with -lrtemsbsp_g -lrtemscpu_g.
|
||||
|
||||
2001-11-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Introduce RTEMS_BSP_CONFIGURE.
|
||||
|
||||
2001-10-12 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* console/console-io.c: Fixed typo.
|
||||
|
||||
2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* .cvsignore: Add autom4te.cache for autoconf > 2.52.
|
||||
* configure.in: Remove.
|
||||
* configure.ac: New file, generated from configure.in by autoupdate.
|
||||
|
||||
2001-09-27 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* include/bsp.h: Renamed delay() to rtems_bsp_delay().
|
||||
|
||||
2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* include/Makefile.am: Use 'CLEANFILES ='.
|
||||
* include/Makefile.am: Use 'TMPINSTALL_FILES ='.
|
||||
|
||||
2001-05-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Add bspopts.h.
|
||||
* include/.cvsignore: Add bspopts.h*, stamp-h*.
|
||||
* include/Makefile.am: Use *_HEADERS instead of *H_FILES.
|
||||
* include/bsp.h: Include bspopts.h.
|
||||
|
||||
2001-05-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.in: Use RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]).
|
||||
|
||||
2001-01-03 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* console/console-io.c: Added console_initialize_hardware().
|
||||
|
||||
2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.
|
||||
|
||||
2000-11-09 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* configure.in, Makefile.am, clock/Makefile.am, clock/.cvsignore,
|
||||
wrapup/Makefile.am: Added include of stub clock driver so ticker
|
||||
would link.
|
||||
|
||||
2000-11-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: Switch to ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal.
|
||||
|
||||
2000-11-01 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/bspstart.c: assoc.h, error.h, libio_.h, libio.h, and
|
||||
libcsupport.h moved from libc to lib/include/rtems and
|
||||
now must be referenced as <rtems/XXX.h>. Header file order
|
||||
was cleaned up while doing this.
|
||||
|
||||
2000-10-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* Makefile.am: ACLOCAL_AMFLAGS= -I $(RTEMS_TOPdir)/macros.
|
||||
Switch to GNU canonicalization.
|
||||
|
||||
2000-09-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* console/Makefile.am, start/Makefile.am, startup/Makefile.am,
|
||||
wrapup/Makefile.am: Include compile.am
|
||||
|
||||
2000-08-10 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* ChangeLog: New file.
|
||||
50
c/src/lib/libbsp/m32c/m32cbsp/Makefile.am
Normal file
50
c/src/lib/libbsp/m32c/m32cbsp/Makefile.am
Normal file
@@ -0,0 +1,50 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../aclocal
|
||||
|
||||
include $(top_srcdir)/../../../../automake/compile.am
|
||||
include $(top_srcdir)/../../bsp.am
|
||||
|
||||
include_bspdir = $(includedir)/bsp
|
||||
|
||||
dist_project_lib_DATA = bsp_specs
|
||||
|
||||
include_HEADERS = include/bsp.h
|
||||
include_HEADERS += ../../shared/include/tm27.h
|
||||
|
||||
nodist_include_HEADERS = include/bspopts.h
|
||||
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
|
||||
DISTCLEANFILES = include/bspopts.h
|
||||
noinst_PROGRAMS =
|
||||
|
||||
SUBDIRS = . tools
|
||||
|
||||
nodist_include_HEADERS += ../../shared/include/coverhd.h
|
||||
|
||||
EXTRA_DIST = start/start.S
|
||||
start.$(OBJEXT): start/start.S
|
||||
$(CPPASCOMPILE) -o $@ -c $<
|
||||
project_lib_DATA = start.$(OBJEXT)
|
||||
|
||||
dist_project_lib_DATA += startup/linkcmds
|
||||
|
||||
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
|
||||
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
|
||||
../../shared/bspgetworkarea.c ../../shared/bsppost.c \
|
||||
startup/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
|
||||
../../shared/gnatinstallhandler.c startup/crtn.S
|
||||
clock_SOURCES = ../../shared/clock_driver_simidle.c
|
||||
console_SOURCES = ../../shared/console-polled.c console/console-io.c \
|
||||
console/syscalls.S
|
||||
timer_SOURCES = timer/timer.c
|
||||
|
||||
noinst_LIBRARIES = libbsp.a
|
||||
libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
|
||||
$(timer_SOURCES)
|
||||
|
||||
EXTRA_DIST += times
|
||||
|
||||
include $(srcdir)/preinstall.am
|
||||
include $(top_srcdir)/../../../../automake/local.am
|
||||
15
c/src/lib/libbsp/m32c/m32cbsp/bsp_specs
Normal file
15
c/src/lib/libbsp/m32c/m32cbsp/bsp_specs
Normal file
@@ -0,0 +1,15 @@
|
||||
%rename endfile old_endfile
|
||||
%rename startfile old_startfile
|
||||
%rename link old_link
|
||||
|
||||
*startfile:
|
||||
%{!qrtems: %(old_startfile)} \
|
||||
%{!nostdlib: %{qrtems: start.o%s crtbegin.o%s}}
|
||||
|
||||
*endfile:
|
||||
%{!qrtems: %(old_endfile)} \
|
||||
%{!nostdlib: %{qrtems: crtend.o%s}}
|
||||
|
||||
*link:
|
||||
%(old_link) %{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e _start}
|
||||
|
||||
24
c/src/lib/libbsp/m32c/m32cbsp/configure.ac
Normal file
24
c/src/lib/libbsp/m32c/m32cbsp/configure.ac
Normal file
@@ -0,0 +1,24 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-h8300-h8sim],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
|
||||
AC_CONFIG_SRCDIR([bsp_specs])
|
||||
RTEMS_TOP(../../../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.10])
|
||||
RTEMS_BSP_CONFIGURE
|
||||
|
||||
RTEMS_CONFIG_BUILD_SUBDIRS(tools)
|
||||
|
||||
RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
|
||||
RTEMS_CANONICALIZE_TOOLS
|
||||
RTEMS_PROG_CCAS
|
||||
|
||||
BSP_BOOTCARD_OPTIONS
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
64
c/src/lib/libbsp/m32c/m32cbsp/console/console-io.c
Normal file
64
c/src/lib/libbsp/m32c/m32cbsp/console/console-io.c
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* This file contains the hardware specific portions of the TTY driver
|
||||
* for the serial ports on the erc32.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <rtems/libio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
* console_initialize_hardware
|
||||
*
|
||||
* This routine initializes the console hardware.
|
||||
*
|
||||
*/
|
||||
|
||||
void console_initialize_hardware(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* console_outbyte_polled
|
||||
*
|
||||
* This routine transmits a character using polling.
|
||||
*/
|
||||
ssize_t sys_write(int fd, const void *buf, size_t count);
|
||||
void console_outbyte_polled(
|
||||
int port,
|
||||
char ch
|
||||
)
|
||||
{
|
||||
sys_write( 2, &ch, 1 );
|
||||
}
|
||||
|
||||
/*
|
||||
* console_inbyte_nonblocking
|
||||
*
|
||||
* This routine polls for a character.
|
||||
*/
|
||||
|
||||
int console_inbyte_nonblocking(
|
||||
int port
|
||||
)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#include <rtems/bspIo.h>
|
||||
|
||||
void H8simBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
|
||||
|
||||
BSP_output_char_function_type BSP_output_char = H8simBSP_output_char;
|
||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||
45
c/src/lib/libbsp/m32c/m32cbsp/console/syscalls.S
Normal file
45
c/src/lib/libbsp/m32c/m32cbsp/console/syscalls.S
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* System call support for simulator in gdb.
|
||||
* Adapted from newlib 1.16.0.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define SYS_exit 1
|
||||
#define SYS_open 2
|
||||
#define SYS_close 3
|
||||
#define SYS_read 4
|
||||
#define SYS_write 5
|
||||
#define SYS_lseek 6
|
||||
#define SYS_unlink 7
|
||||
#define SYS_getpid 8
|
||||
#define SYS_kill 9
|
||||
#define SYS_fstat 10
|
||||
#define SYS_sbrk 11
|
||||
|
||||
#define POUND #
|
||||
#define SYSCALL(N) mov.b POUND N,0x400
|
||||
|
||||
#define S(n) _sys_##n: .global _sys_##n | SYSCALL(SYS_##n) | rts
|
||||
|
||||
S(write)
|
||||
S(exit)
|
||||
S(sbrk)
|
||||
|
||||
.global _abort
|
||||
_abort:
|
||||
/* This is for debuggers. The simulator stops here too. */
|
||||
brk
|
||||
|
||||
/* Else, fall back on the simulator's "kill me" option. */
|
||||
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
|
||||
mov.w #42,r1
|
||||
#else
|
||||
mov.w #42,r0
|
||||
#endif
|
||||
|
||||
SYSCALL(SYS_kill)
|
||||
|
||||
/* Else, exit. */
|
||||
jmp.a __exit
|
||||
|
||||
5
c/src/lib/libbsp/m32c/m32cbsp/include/.cvsignore
Normal file
5
c/src/lib/libbsp/m32c/m32cbsp/include/.cvsignore
Normal file
@@ -0,0 +1,5 @@
|
||||
bspopts.h
|
||||
bspopts.h.in
|
||||
coverhd.h
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
55
c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h
Normal file
55
c/src/lib/libbsp/m32c/m32cbsp/include/bsp.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* bsp.h
|
||||
*
|
||||
* This include file contains some definitions specific to the
|
||||
* h8 simulator in gdb.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _BSP_H
|
||||
#define _BSP_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bspopts.h>
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/iosupp.h>
|
||||
#include <rtems/console.h>
|
||||
#include <rtems/clockdrv.h>
|
||||
|
||||
/* support for simulated clock tick */
|
||||
Thread clock_driver_sim_idle_body(uintptr_t);
|
||||
#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
|
||||
|
||||
/*
|
||||
* Simple spin delay in microsecond units for device drivers.
|
||||
* This is very dependent on the clock speed of the target.
|
||||
*/
|
||||
|
||||
#define rtems_bsp_delay( microseconds ) \
|
||||
{ register uint32_t _delay=(microseconds); \
|
||||
register uint32_t _tmp = 0; /* initialized to avoid warning */ \
|
||||
asm volatile( "0: \
|
||||
remo 3,31,%0 ; \
|
||||
cmpo 0,%0 ; \
|
||||
subo 1,%1,%1 ; \
|
||||
cmpobne.t 0,%1,0b " \
|
||||
: "=d" (_tmp), "=d" (_delay) \
|
||||
: "0" (_tmp), "1" (_delay) ); \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
67
c/src/lib/libbsp/m32c/m32cbsp/preinstall.am
Normal file
67
c/src/lib/libbsp/m32c/m32cbsp/preinstall.am
Normal file
@@ -0,0 +1,67 @@
|
||||
## Automatically generated by ampolish3 - Do not edit
|
||||
|
||||
if AMPOLISH3
|
||||
$(srcdir)/preinstall.am: Makefile.am
|
||||
$(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
|
||||
endif
|
||||
|
||||
PREINSTALL_DIRS =
|
||||
DISTCLEANFILES += $(PREINSTALL_DIRS)
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
TMPINSTALL_FILES =
|
||||
CLEANFILES = $(TMPINSTALL_FILES)
|
||||
|
||||
all-am: $(PREINSTALL_FILES)
|
||||
|
||||
PREINSTALL_FILES =
|
||||
CLEANFILES += $(PREINSTALL_FILES)
|
||||
|
||||
$(PROJECT_LIB)/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_LIB)
|
||||
@: > $(PROJECT_LIB)/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)
|
||||
@: > $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_INCLUDE)/bsp
|
||||
@: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
|
||||
$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
|
||||
|
||||
$(PROJECT_INCLUDE)/tm27.h: ../../shared/include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
|
||||
|
||||
$(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
|
||||
|
||||
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
|
||||
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
|
||||
|
||||
$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
|
||||
|
||||
$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
|
||||
$(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
|
||||
PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
|
||||
|
||||
181
c/src/lib/libbsp/m32c/m32cbsp/start/start.S
Normal file
181
c/src/lib/libbsp/m32c/m32cbsp/start/start.S
Normal file
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2005 Red Hat Incorporated.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
The name of Red Hat Incorporated may not be used to endorse
|
||||
or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
|
||||
#define A16
|
||||
#define A(n,w) n
|
||||
#define W w
|
||||
#define ALIGN 1
|
||||
#else
|
||||
#define A24
|
||||
#define A(n,w) w
|
||||
#define W l
|
||||
#define ALIGN 2
|
||||
#endif
|
||||
|
||||
.text
|
||||
|
||||
.global _start
|
||||
_start:
|
||||
.LFB2:
|
||||
fset U /* User stack */
|
||||
ldc #__stack,sp
|
||||
|
||||
#ifdef A16
|
||||
mov.b #%hi8(__romdatastart),r1h
|
||||
mov.w #%lo16(__romdatastart),a0
|
||||
mov.w #__datastart,a1
|
||||
#else
|
||||
mov.l #__romdatastart,a0
|
||||
mov.l #__datastart,a1
|
||||
#endif
|
||||
mov.w #__romdatacopysize,r3
|
||||
shl.w #-1,r3
|
||||
smovf.w
|
||||
|
||||
#ifdef A16
|
||||
mov.w #__bssstart,a1
|
||||
#else
|
||||
mov.l #__bssstart,a1
|
||||
#endif
|
||||
mov.w #__bsssize,r3
|
||||
shl.w #-1,r3
|
||||
mov.w #0,r0
|
||||
sstr.w
|
||||
|
||||
/* jsr.a __m32c_init */
|
||||
|
||||
jsr.a _boot_card
|
||||
.LFE2:
|
||||
|
||||
#ifdef A24
|
||||
/* rv in r0, ok for arg0 */
|
||||
#else
|
||||
mov.w r0,r1
|
||||
#endif
|
||||
|
||||
jsr.a _sys_exit
|
||||
|
||||
.text
|
||||
|
||||
.global _m32c_run_preinit_array
|
||||
.type _m32c_run_preinit_array,@function
|
||||
_m32c_run_preinit_array:
|
||||
mov.W #__preinit_array_start,a0
|
||||
mov.W #__preinit_array_end,a1
|
||||
jmp.w _m32c_run_inilist
|
||||
|
||||
.global _m32c_run_init_array
|
||||
.type _m32c_run_init_array,@function
|
||||
_m32c_run_init_array:
|
||||
mov.W #__init_array_start,a0
|
||||
mov.W #__init_array_end,a1
|
||||
jmp.w _m32c_run_inilist
|
||||
|
||||
.global _m32c_run_fini_array
|
||||
.type _m32c_run_fini_array,@function
|
||||
_m32c_run_fini_array:
|
||||
mov.W #__fini_array_start,a0
|
||||
mov.W #__fini_array_end,a1
|
||||
/* fall through */
|
||||
|
||||
_m32c_run_inilist:
|
||||
next_inilist:
|
||||
cmp.W a0,a1
|
||||
jeq done_inilist
|
||||
pushm a0,a1
|
||||
mov.W [a0],a0
|
||||
#ifdef A16
|
||||
mov.b:s #0,a1 /* zero extends */
|
||||
jsri.a a1a0
|
||||
#else
|
||||
jsri.a a0
|
||||
#endif
|
||||
popm a0,a1
|
||||
add.W A(#2,#4),a0
|
||||
jmp.b next_inilist
|
||||
done_inilist:
|
||||
rts
|
||||
|
||||
.section .init,"ax",@progbits
|
||||
|
||||
.global __init
|
||||
.global __m32c_init
|
||||
__init:
|
||||
__m32c_init:
|
||||
enter #0
|
||||
exitd
|
||||
|
||||
.section .fini,"ax",@progbits
|
||||
|
||||
.global __fini
|
||||
.global __m32c_fini
|
||||
__fini:
|
||||
__m32c_fini:
|
||||
enter #0
|
||||
jsr.a _m32c_run_fini_array
|
||||
exitd
|
||||
|
||||
|
||||
;;; Provide Dwarf unwinding information that will help GDB stop
|
||||
;;; backtraces at the right place. This is stolen from assembly
|
||||
;;; code generated by GCC with -dA.
|
||||
.section .debug_frame,"",@progbits
|
||||
.Lframe0:
|
||||
.4byte .LECIE0-.LSCIE0 ; Length of Common Information Entry
|
||||
.LSCIE0:
|
||||
.4byte 0xffffffff ; CIE Identifier Tag
|
||||
.byte 0x1 ; CIE Version
|
||||
.ascii "\0" ; CIE Augmentation
|
||||
.uleb128 0x1 ; CIE Code Alignment Factor
|
||||
.sleb128 -1 ; CIE Data Alignment Factor
|
||||
.byte 0xd ; CIE RA Column
|
||||
.byte 0xc ; DW_CFA_def_cfa
|
||||
.uleb128 0xc
|
||||
.uleb128 0x3
|
||||
.byte 0x8d ; DW_CFA_offset, column 0xd
|
||||
.uleb128 0x3
|
||||
.p2align ALIGN
|
||||
.LECIE0:
|
||||
.LSFDE0:
|
||||
.4byte .LEFDE0-.LASFDE0 ; FDE Length
|
||||
.LASFDE0:
|
||||
.4byte .Lframe0 ; FDE CIE offset
|
||||
.4byte .LFB2 ; FDE initial location
|
||||
.4byte .LFE2-.LFB2 ; FDE address range
|
||||
.byte 0xf ; DW_CFA_def_cfa_expression
|
||||
.uleb128 1 ; length of expression
|
||||
.byte 0x30 ; DW_OP_lit0
|
||||
.p2align ALIGN
|
||||
.LEFDE0:
|
||||
|
||||
.text
|
||||
26
c/src/lib/libbsp/m32c/m32cbsp/startup/bspstart.c
Normal file
26
c/src/lib/libbsp/m32c/m32cbsp/startup/bspstart.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2008.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
extern void sys_sbrk(int);
|
||||
|
||||
/*
|
||||
* This routine would usually do the bulk of the system initialization.
|
||||
* But if a BSP doesn't need to do anything, it can use this version.
|
||||
*/
|
||||
|
||||
void bsp_start( void )
|
||||
{
|
||||
/* Tell the simulator not to test for heap/stack collision */
|
||||
sys_sbrk(0);
|
||||
}
|
||||
58
c/src/lib/libbsp/m32c/m32cbsp/startup/crtn.S
Normal file
58
c/src/lib/libbsp/m32c/m32cbsp/startup/crtn.S
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2005 Red Hat Incorporated.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
The name of Red Hat Incorporated may not be used to endorse
|
||||
or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL RED HAT INCORPORATED BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#if defined(__r8c_cpu__) || defined(__m16c_cpu__)
|
||||
#define A16
|
||||
#define A(n,w) n
|
||||
#define W w
|
||||
#else
|
||||
#define A24
|
||||
#define A(n,w) w
|
||||
#define W l
|
||||
#endif
|
||||
|
||||
.section .init,"ax",@progbits
|
||||
jsr.a _m32c_run_preinit_array
|
||||
jsr.a _m32c_run_init_array
|
||||
exitd
|
||||
.global __m32c_init_end
|
||||
__m32c_init_end:
|
||||
|
||||
.section .fini,"ax",@progbits
|
||||
|
||||
exitd
|
||||
.global __m32c_fini_end
|
||||
__m32c_fini_end:
|
||||
|
||||
.text
|
||||
|
||||
200
c/src/lib/libbsp/m32c/m32cbsp/startup/linkcmds
Normal file
200
c/src/lib/libbsp/m32c/m32cbsp/startup/linkcmds
Normal file
@@ -0,0 +1,200 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Declare some sizes.
|
||||
*/
|
||||
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x200000;
|
||||
_RamSize = DEFINED(_RamSize) ? _RamSize : 0x800000;
|
||||
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
|
||||
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
|
||||
|
||||
|
||||
/* Default linker script, for normal executables */
|
||||
OUTPUT_FORMAT("elf32-m32c", "elf32-m32c",
|
||||
"elf32-m32c")
|
||||
OUTPUT_ARCH(m32c)
|
||||
ENTRY(_start)
|
||||
/* Do we need any of these for elf?
|
||||
__DYNAMIC = 0; */
|
||||
MEMORY {
|
||||
RAM (w) : ORIGIN = 0x200000, LENGTH = 0x800000
|
||||
VEC (r) : ORIGIN = 0xffffdc, LENGTH = 32
|
||||
RESETVEC (r) : ORIGIN = 0xfffffc, LENGTH = 4
|
||||
}
|
||||
SECTIONS
|
||||
{
|
||||
/* There are three cases we care about: First, RW data that must be
|
||||
in the low 64k. This will always be copied from ROM. Second, RO
|
||||
data that must be in the low 64k. This may be copied from ROM if
|
||||
the ROM is above 64k. Third, anything that does not need to be
|
||||
in the first 64k. Chips normally only have two memory regions;
|
||||
low ram and either high or low rom. We map the low rom needs
|
||||
into one of the actual regions. */
|
||||
|
||||
/* .text goes first so the rom image of ram data will follow it. */
|
||||
.text :
|
||||
{
|
||||
*(.text .stub .text.* .gnu.linkonce.t.*)
|
||||
KEEP (*(.text.*personality*))
|
||||
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||
*(.gnu.warning)
|
||||
*(.interp .hash .dynsym .dynstr .gnu.version*)
|
||||
PROVIDE (__etext = .);
|
||||
PROVIDE (_etext = .);
|
||||
PROVIDE (etext = .);
|
||||
. = ALIGN(2);
|
||||
} > RAM =0
|
||||
|
||||
/* rodata will either be part of data, or will be in low rom. So we
|
||||
might be spanning it, or we might not. This lets us include it
|
||||
in our calculations when appropriate. */
|
||||
|
||||
.rodata : {
|
||||
. = ALIGN(2);
|
||||
*(.plt)
|
||||
KEEP (*(.init))
|
||||
KEEP (*(.fini))
|
||||
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
||||
*(.rodata1)
|
||||
*(.eh_frame_hdr)
|
||||
KEEP (*(.eh_frame))
|
||||
KEEP (*(.gcc_except_table)) *(.gcc_except_table.*)
|
||||
. = ALIGN(2);
|
||||
PROVIDE(__romdatastart = .); /* IF_ROROM */
|
||||
} > RAM
|
||||
|
||||
.data : {
|
||||
. = ALIGN(32 / 8);
|
||||
PROVIDE (__datastart = .); /* IF_ROROM */
|
||||
PROVIDE (__preinit_array_start = .);
|
||||
KEEP (*(.preinit_array))
|
||||
PROVIDE (__preinit_array_end = .);
|
||||
PROVIDE (__init_array_start = .);
|
||||
KEEP (*(.init_array))
|
||||
PROVIDE (__init_array_end = .);
|
||||
PROVIDE (__fini_array_start = .);
|
||||
KEEP (*(.fini_array))
|
||||
PROVIDE (__fini_array_end = .);
|
||||
|
||||
/* gcc uses crtbegin.o to find the start of
|
||||
the constructors, so we make sure it is
|
||||
first. Because this is a wildcard, it
|
||||
doesn't matter if the user does not
|
||||
actually link against crtbegin.o; the
|
||||
linker won't look for a file to match a
|
||||
wildcard. The wildcard also means that it
|
||||
doesn't matter which directory crtbegin.o
|
||||
is in. */
|
||||
KEEP (*crtbegin*.o(.ctors))
|
||||
/* We don't want to include the .ctor section from
|
||||
from the crtend.o file until after the sorted ctors.
|
||||
The .ctor section from the crtend file contains the
|
||||
end of ctors marker and it must be last */
|
||||
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .ctors))
|
||||
KEEP (*(SORT(.ctors.*)))
|
||||
KEEP (*(.ctors))
|
||||
|
||||
KEEP (*crtbegin*.o(.dtors))
|
||||
KEEP (*(EXCLUDE_FILE (*crtend*.o ) .dtors))
|
||||
KEEP (*(SORT(.dtors.*)))
|
||||
KEEP (*(.dtors))
|
||||
|
||||
KEEP (*(.jcr))
|
||||
*(.data.rel.ro.local) *(.data.rel.ro*)
|
||||
*(.dynamic)
|
||||
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
KEEP (*(.gnu.linkonce.d.*personality*))
|
||||
SORT(CONSTRUCTORS)
|
||||
*(.data1)
|
||||
*(.got.plt) *(.got)
|
||||
|
||||
. = ALIGN(2);
|
||||
_edata = .;
|
||||
PROVIDE (edata = .);
|
||||
PROVIDE (__dataend = .);
|
||||
} > RAM
|
||||
|
||||
/* Note that __romdatacopysize may be ZERO for the simulator, which
|
||||
knows how to intialize RAM directly. It should ONLY be used for
|
||||
copying data from ROM to RAM; if you need to know the size of the
|
||||
data section, subtract the end symbol from the start symbol. */
|
||||
/* Note that crt0 assumes this is even; all the start/stop symbols
|
||||
are also assumed word-aligned. */
|
||||
PROVIDE (__romdatacopysize = 0);
|
||||
|
||||
.bss : {
|
||||
. = ALIGN(2);
|
||||
PROVIDE (__bssstart = .);
|
||||
*(.dynbss)
|
||||
*(.bss .bss.* .gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(2);
|
||||
PROVIDE (__bssend = .);
|
||||
_end = .;
|
||||
PROVIDE (end = .);
|
||||
} > RAM
|
||||
PROVIDE (__bsssize = 0);
|
||||
. = ALIGN(16);
|
||||
|
||||
. += _StackSize;
|
||||
PROVIDE (__stack = .);
|
||||
PROVIDE (_WorkAreaBase = .);
|
||||
. = 0xa00000;
|
||||
PROVIDE (_WorkAreaEnd = .);
|
||||
PROVIDE (_WorkAreaSize = _WorkAreaEnd - _WorkAreaBase);
|
||||
|
||||
/*
|
||||
.stack (0x200000 + 0x800000 - 2) :
|
||||
{
|
||||
PROVIDE (__stack = .);
|
||||
*(.stack)
|
||||
}
|
||||
*/
|
||||
|
||||
.vec : {
|
||||
*(.vec)
|
||||
} > VEC
|
||||
.resetvec : {
|
||||
*(.resetvec)
|
||||
} > RESETVEC
|
||||
|
||||
/* The rest are all not normally part of the runtime image. */
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
/DISCARD/ : { *(.note.GNU-stack) }
|
||||
}
|
||||
67
c/src/lib/libbsp/m32c/m32cbsp/timer/timer.c
Normal file
67
c/src/lib/libbsp/m32c/m32cbsp/timer/timer.c
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
* This file implements a stub benchmark timer that is sufficient to
|
||||
* satisfy linking the RTEMS Benchmarks.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2001.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include <bsp.h>
|
||||
|
||||
#include <varvects.h>
|
||||
|
||||
bool benchmark_timer_find_average_overhead;
|
||||
uint32_t benchmark_timer_overhead = 10;
|
||||
|
||||
#define TABSR *((uint8_t *)0x340)
|
||||
#define TA0MR *((uint8_t *)0x356)
|
||||
#define TA0 *((uint16_t *)0x346)
|
||||
#define TA0IC *((uint8_t *)0x6c)
|
||||
|
||||
static int benchmark_timer_interrupts;
|
||||
|
||||
#define ivec_timer_a0 12
|
||||
|
||||
void __attribute__((interrupt))
|
||||
timer_ra_interrupt(void)
|
||||
{
|
||||
benchmark_timer_interrupts++;
|
||||
TA0IC = 0x05;
|
||||
|
||||
}
|
||||
|
||||
void benchmark_timer_initialize(void)
|
||||
{
|
||||
benchmark_timer_interrupts = 0;
|
||||
_set_var_vect (timer_ra_interrupt, ivec_timer_a0);
|
||||
TA0MR = 0x00;
|
||||
TA0 = 0xffff;
|
||||
TA0IC = 0x05;
|
||||
TABSR = 0x55;
|
||||
}
|
||||
|
||||
uint32_t benchmark_timer_read(void)
|
||||
{
|
||||
uint32_t count;
|
||||
|
||||
count = 0xFFFF - TA0;
|
||||
count += benchmark_timer_interrupts * 0xFFFFL;
|
||||
|
||||
if (!benchmark_timer_find_average_overhead) {
|
||||
if ( count > benchmark_timer_overhead )
|
||||
count -= benchmark_timer_overhead;
|
||||
else
|
||||
count = 0;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
void benchmark_timer_disable_subtracting_average_overhead(
|
||||
bool find_flag
|
||||
)
|
||||
{
|
||||
benchmark_timer_find_average_overhead = find_flag;
|
||||
}
|
||||
9
c/src/lib/libbsp/m32c/m32cbsp/tools/.cvsignore
Normal file
9
c/src/lib/libbsp/m32c/m32cbsp/tools/.cvsignore
Normal file
@@ -0,0 +1,9 @@
|
||||
aclocal.m4
|
||||
autom4te*.cache
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
Makefile
|
||||
Makefile.in
|
||||
runtest
|
||||
26
c/src/lib/libbsp/m32c/m32cbsp/tools/Makefile.am
Normal file
26
c/src/lib/libbsp/m32c/m32cbsp/tools/Makefile.am
Normal file
@@ -0,0 +1,26 @@
|
||||
##
|
||||
## $Id$
|
||||
##
|
||||
|
||||
ACLOCAL_AMFLAGS = -I ../../../../../aclocal
|
||||
|
||||
transform =
|
||||
bsptools_bindir = ${exec_prefix}/@RTEMS_BSP@/tests
|
||||
bsptools_bin_SCRIPTS = runtest
|
||||
|
||||
all-local: $(TMPINSTALL_FILES)
|
||||
|
||||
TMPINSTALL_FILES =
|
||||
|
||||
$(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp):
|
||||
@$(MKDIR_P) $(PROJECT_ROOT)/@RTEMS_BSP@/tests
|
||||
@: > $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp)
|
||||
TMPINSTALL_FILES += $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp)
|
||||
|
||||
$(PROJECT_ROOT)/@RTEMS_BSP@/tests/runtest: runtest $(PROJECT_ROOT)/@RTEMS_BSP@/tests/$(dirstamp)
|
||||
$(INSTALL_SCRIPT) $< $(PROJECT_ROOT)/@RTEMS_BSP@/tests/runtest
|
||||
TMPINSTALL_FILES += $(PROJECT_ROOT)/@RTEMS_BSP@/tests/runtest
|
||||
|
||||
CLEANFILES = $(TMPINSTALL_FILES)
|
||||
|
||||
include $(top_srcdir)/../../../../../automake/host.am
|
||||
25
c/src/lib/libbsp/m32c/m32cbsp/tools/configure.ac
Normal file
25
c/src/lib/libbsp/m32c/m32cbsp/tools/configure.ac
Normal file
@@ -0,0 +1,25 @@
|
||||
## Process this file with autoconf to produce a configure script.
|
||||
##
|
||||
## $Id$
|
||||
|
||||
AC_PREREQ(2.60)
|
||||
AC_INIT([rtems-c-src-lib-libbsp-sparc-erc32-tools],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
|
||||
AC_CONFIG_SRCDIR([runtest.in])
|
||||
RTEMS_TOP(../../../../../../..)
|
||||
|
||||
RTEMS_CANONICAL_TARGET_CPU
|
||||
|
||||
AM_INIT_AUTOMAKE([no-define foreign 1.10])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
RTEMS_ENV_RTEMSBSP
|
||||
|
||||
RTEMS_PATH_KSH
|
||||
|
||||
RTEMS_PROJECT_ROOT
|
||||
RTEMS_TOOLPATHS
|
||||
|
||||
# Explicitly list all Makefiles here
|
||||
AC_CONFIG_FILES([Makefile
|
||||
runtest])
|
||||
AC_OUTPUT
|
||||
226
c/src/lib/libbsp/m32c/m32cbsp/tools/runtest.in
Normal file
226
c/src/lib/libbsp/m32c/m32cbsp/tools/runtest.in
Normal file
@@ -0,0 +1,226 @@
|
||||
#!@KSH@ -p
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# Run rtems tests on the M32C simulator includeed with GDB
|
||||
#
|
||||
|
||||
# progname=`basename $0`
|
||||
progname=${0##*/} # fast basename hack for ksh, bash
|
||||
|
||||
USAGE=\
|
||||
"usage: $progname [ -opts ] test [ test ... ]
|
||||
-o options -- specify options to be passed to simulator
|
||||
-v -- verbose
|
||||
-l logdir -- specify log directory (default is 'logdir')
|
||||
|
||||
Specify test as 'test' or 'test.exe' or 'test.ralf'.
|
||||
All multiprocessing tests *must* be specified simply as 'mp01', etc.
|
||||
"
|
||||
|
||||
# export everything
|
||||
set -a
|
||||
|
||||
# log an error to stderr
|
||||
prerr()
|
||||
{
|
||||
echo "$*" >&2
|
||||
}
|
||||
|
||||
fatal() {
|
||||
[ "$1" ] && prerr $*
|
||||
prerr "$USAGE"
|
||||
exit 1
|
||||
}
|
||||
|
||||
warn() {
|
||||
[ "$1" ] && prerr $*
|
||||
}
|
||||
|
||||
# print args, 1 per line
|
||||
ml_echo()
|
||||
{
|
||||
for l
|
||||
do
|
||||
echo "$l"
|
||||
done
|
||||
}
|
||||
|
||||
# run at normal and signalled exit
|
||||
test_exit()
|
||||
{
|
||||
exit_code=$1
|
||||
|
||||
rm -f ${statfile}* ${logfile}.tmp*
|
||||
[ "$sim_pid" ] && kill -9 $sim_pid
|
||||
|
||||
exit $exit_code
|
||||
}
|
||||
|
||||
#
|
||||
# process the options
|
||||
#
|
||||
# defaults for getopt vars
|
||||
#
|
||||
# max_run_time is defaulted to 3 minutes
|
||||
#
|
||||
|
||||
verbose=""
|
||||
extra_options=""
|
||||
stdio_setup="yes"
|
||||
run_to_completion="yes"
|
||||
logdir=log
|
||||
update_on_tick="no"
|
||||
max_run_time=$((30))
|
||||
using_print_buffer="yes"
|
||||
|
||||
while getopts vhr12o:c:sl:t OPT
|
||||
do
|
||||
case "$OPT" in
|
||||
v)
|
||||
verbose="yes";;
|
||||
l)
|
||||
logdir="$OPTARG";;
|
||||
o)
|
||||
extra_options="$OPTARG";;
|
||||
*)
|
||||
fatal;;
|
||||
esac
|
||||
done
|
||||
|
||||
let $((shiftcount = $OPTIND - 1))
|
||||
shift $shiftcount
|
||||
|
||||
args=$*
|
||||
|
||||
#
|
||||
# Run the tests
|
||||
#
|
||||
|
||||
tests="$args"
|
||||
if [ ! "$tests" ]
|
||||
then
|
||||
set -- `ls -1 *.exe *.ralf 2>/dev/null`
|
||||
tests="$*"
|
||||
fi
|
||||
|
||||
[ -d $logdir ] ||
|
||||
mkdir $logdir || fatal "could not create log directory ($logdir)"
|
||||
|
||||
# where the tmp files go
|
||||
statfile=/tmp/stats$$
|
||||
|
||||
trap "test_exit" 1 2 3 13 14 15
|
||||
|
||||
for tfile in $tests
|
||||
do
|
||||
|
||||
echo $tfile | grep "exe$" >/dev/null
|
||||
if [ $? -eq 0 ] ; then
|
||||
ext=.exe
|
||||
else
|
||||
ext=.ralf
|
||||
fi
|
||||
tname=`basename $tfile ${ext}`
|
||||
TEST_TYPE="single"
|
||||
|
||||
case $tname in
|
||||
capture* | monitor* | termios* | fileio* | pppd*)
|
||||
if [ $run_to_completion = "yes" ]
|
||||
then
|
||||
warn "Skipping $tname; it is interactive"
|
||||
continue
|
||||
fi
|
||||
;;
|
||||
*-node2*)
|
||||
fatal "MP tests not supported"
|
||||
warn "Skipping $tname; 'runtest' runs both nodes when for *-node1"
|
||||
continue;;
|
||||
*-node1*)
|
||||
warn "Running both nodes associated with $tname"
|
||||
variant=`echo $tname | sed 's/.*-node[12]//' | sed "s/${ext}/"`
|
||||
tname=`echo $tname | sed 's/-node.*//'`
|
||||
TEST_TYPE="mp"
|
||||
;;
|
||||
sp39*|sp41*)
|
||||
warn "Skipping $tname; it does not complete long on sis"
|
||||
continue
|
||||
;;
|
||||
minimum*|stackchk*|*fatal*|termio*)
|
||||
warn "Skipping $tname; it locks up or takes a VERY long time to run"
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
|
||||
# Change the title bar to indicate which test we are running
|
||||
# The simulator screen doesn't provide any indication
|
||||
|
||||
logfile=$logdir/$tname
|
||||
infofile=$logfile.info
|
||||
|
||||
rm -f ${statfile}* ${logfile}.tmp*
|
||||
|
||||
date=`date`
|
||||
echo "Starting $tname at $date"
|
||||
|
||||
# Spin off the simulator in the background
|
||||
@target_alias@-run ${tfile} >${logfile}.tmp 2>&1 &
|
||||
sim_pid=$!
|
||||
|
||||
# Make sure it won't run forever...
|
||||
{
|
||||
time_run=0
|
||||
while [ $time_run -lt $max_run_time ]
|
||||
do
|
||||
# sleep 1s at a time waiting for job to finish or timer to expire
|
||||
# if job has exited, then we exit, too.
|
||||
sleep 1
|
||||
if kill -0 $sim_pid 2>/dev/null
|
||||
then
|
||||
grep "Memory exception " ${logfile}.tmp >/dev/null
|
||||
if [ $? -eq 0 ] ; then
|
||||
break
|
||||
fi
|
||||
|
||||
time_run=$((time_run + 1))
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
kill -2 $sim_pid 2>/dev/null
|
||||
{ sleep 5; kill -9 $sim_pid 2>/dev/null; } &
|
||||
} &
|
||||
|
||||
wait $sim_pid
|
||||
status=$?
|
||||
if [ $status -ne 0 ]
|
||||
then
|
||||
ran_too_long="yes"
|
||||
else
|
||||
ran_too_long="no"
|
||||
fi
|
||||
|
||||
sim_pid=""
|
||||
|
||||
# fix up the printf output from the test
|
||||
case $TEST_TYPE in
|
||||
mp)
|
||||
fatal "MP not supported"
|
||||
;;
|
||||
*)
|
||||
output_it=1
|
||||
cat ${logfile}.tmp > ${logfile}
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -f ${logfile}.tmp*
|
||||
|
||||
done
|
||||
|
||||
test_exit 0
|
||||
|
||||
# Local Variables: ***
|
||||
# mode:ksh ***
|
||||
# End: ***
|
||||
|
||||
Reference in New Issue
Block a user