summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/sim68000
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-16 19:03:46 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-16 19:03:46 +0000
commita993d456cdd8d85b2628fb45415abbb71d6b5356 (patch)
tree206b1c807da4c244c62ce3daebf9a62c9d602352 /c/src/lib/libbsp/m68k/sim68000
parent2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-a993d456cdd8d85b2628fb45415abbb71d6b5356.tar.bz2
2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, configure.ac, startup/linkcmds: Add use of bsp_get_work_area() in its own file and rely on BSP Framework to perform more initialization. Remove unnecessary includes of rtems/libio.h and rtems/libcsupport.h. * console/debugio.c, startup/bsppredriverhook.c: New files. * startup/bspstart.c: Removed.
Diffstat (limited to 'c/src/lib/libbsp/m68k/sim68000')
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/ChangeLog9
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/Makefile.am14
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/configure.ac2
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/console/debugio.c22
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/startup/bsppredriverhook.c24
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c68
-rw-r--r--c/src/lib/libbsp/m68k/sim68000/startup/linkcmds2
7 files changed, 66 insertions, 75 deletions
diff --git a/c/src/lib/libbsp/m68k/sim68000/ChangeLog b/c/src/lib/libbsp/m68k/sim68000/ChangeLog
index 0e615446dc..ed0218ab58 100644
--- a/c/src/lib/libbsp/m68k/sim68000/ChangeLog
+++ b/c/src/lib/libbsp/m68k/sim68000/ChangeLog
@@ -1,3 +1,12 @@
+2008-09-16 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, configure.ac, startup/linkcmds: Add use of
+ bsp_get_work_area() in its own file and rely on BSP Framework to
+ perform more initialization. Remove unnecessary includes of
+ rtems/libio.h and rtems/libcsupport.h.
+ * console/debugio.c, startup/bsppredriverhook.c: New files.
+ * startup/bspstart.c: Removed.
+
2008-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/bsp.h: Review of all bsp_cleanup() implementations. In this
diff --git a/c/src/lib/libbsp/m68k/sim68000/Makefile.am b/c/src/lib/libbsp/m68k/sim68000/Makefile.am
index b6b18cbdf2..3bbb1b185e 100644
--- a/c/src/lib/libbsp/m68k/sim68000/Makefile.am
+++ b/c/src/lib/libbsp/m68k/sim68000/Makefile.am
@@ -27,18 +27,20 @@ project_lib_DATA = start.$(OBJEXT)
dist_project_lib_DATA += startup/linkcmds
startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
- ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
- ../../m68k/shared/m68kpretaskinghook.c \
- ../../shared/sbrk.c ../../m68k/shared/setvec.c \
- ../../shared/gnatinstallhandler.c ../../m68k/shared/bspspuriousinit.c \
- ../../m68k/shared/m68000spurious.c startup/spurious_assistant.c
+ ../../shared/bsppost.c ../../shared/bspstart.c ../../shared/bootcard.c \
+ startup/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
+ ../../m68k/shared/m68kbspgetworkarea.c ../../shared/sbrk.c \
+ ../../m68k/shared/setvec.c ../../shared/gnatinstallhandler.c \
+ ../../m68k/shared/bspspuriousinit.c ../../m68k/shared/m68000spurious.c \
+ startup/spurious_assistant.c
clock_SOURCES = clock/clockdrv.c
console_SOURCES = console/conscfg.c ../../shared/console.c
+debugio_SOURCES = console/debugio.c
timer_SOURCES = ../../shared/timerstub.c
noinst_LIBRARIES = libbsp.a
libbsp_a_SOURCES = $(startup_SOURCES) $(clock_SOURCES) $(console_SOURCES) \
- $(timer_SOURCES)
+ $(debugio_SOURCES) $(timer_SOURCES)
libbsp_a_LIBADD = \
../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
../../../libcpu/@RTEMS_CPU@/shared/misc.rel
diff --git a/c/src/lib/libbsp/m68k/sim68000/configure.ac b/c/src/lib/libbsp/m68k/sim68000/configure.ac
index 230748271b..34d21468b0 100644
--- a/c/src/lib/libbsp/m68k/sim68000/configure.ac
+++ b/c/src/lib/libbsp/m68k/sim68000/configure.ac
@@ -15,6 +15,8 @@ RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
RTEMS_CANONICALIZE_TOOLS
RTEMS_PROG_CCAS
+RTEMS_BSP_BOOTCARD_HANDLES_RAM_ALLOCATION
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
diff --git a/c/src/lib/libbsp/m68k/sim68000/console/debugio.c b/c/src/lib/libbsp/m68k/sim68000/console/debugio.c
new file mode 100644
index 0000000000..26487c68c2
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/sim68000/console/debugio.c
@@ -0,0 +1,22 @@
+/*
+ * This routine starts the application. It includes application,
+ * board, and monitor specific initialization and configuration.
+ * The generic CPU dependent initialization has been performed
+ * before this routine is invoked.
+ *
+ * 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$
+ */
+
+#include <bsp.h>
+#include <rtems/bspIo.h>
+
+void debug_putc( char c ) { write( 2, &c, 1 ); }
+BSP_output_char_function_type BSP_output_char = debug_putc;
+BSP_polling_getchar_function_type BSP_poll_char = NULL;
diff --git a/c/src/lib/libbsp/m68k/sim68000/startup/bsppredriverhook.c b/c/src/lib/libbsp/m68k/sim68000/startup/bsppredriverhook.c
new file mode 100644
index 0000000000..5632a55320
--- /dev/null
+++ b/c/src/lib/libbsp/m68k/sim68000/startup/bsppredriverhook.c
@@ -0,0 +1,24 @@
+/*
+ * 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$
+ */
+
+#include <bsp.h>
+#include <bsp/bootcard.h>
+
+extern void bsp_spurious_initialize(void);
+
+void bsp_predriver_hook(void)
+{
+ #if defined(mcpu32)
+ #warning "do something about vectors!!!"
+ #endif
+
+ bsp_spurious_initialize();
+}
diff --git a/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c b/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c
deleted file mode 100644
index a0104677e5..0000000000
--- a/c/src/lib/libbsp/m68k/sim68000/startup/bspstart.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * This routine starts the application. It includes application,
- * board, and monitor specific initialization and configuration.
- * The generic CPU dependent initialization has been performed
- * before this routine is invoked.
- *
- * 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$
- */
-
-#include <string.h>
-
-#include <bsp.h>
-#include <rtems/libio.h>
-#include <rtems/libcsupport.h>
-
-/*
- * Use the shared implementations of the following routines
- */
-
-void bsp_libc_init( void *, uint32_t, int );
-void bsp_pretasking_hook(void); /* m68k version */
-
-void bsp_predriver_hook(void)
-{
- extern void bsp_spurious_initialize(void);
- bsp_spurious_initialize();
-}
-
-/*
- * bsp_start
- *
- * This routine does the bulk of the system initialization.
- */
-
-void bsp_start( void )
-{
- extern void * _WorkspaceBase;
- extern void *_RamSize;
- extern unsigned long _M68k_Ramsize;
-
-#if defined(mcpu32)
-#warning "do something about vectors!!!"
-#endif
-
- /*
- * Clear interrupt sources.
- */
-
-/* XXX address shutdown
- if ( rtems_configuration_get_work_space_size() >(128*1024) )
- _sys_exit( 1 );
-*/
-
- Configuration.work_space_start = (void *) &_WorkspaceBase;
-}
-
-#include <rtems/bspIo.h>
-
-void debug_putc( char c ) { write( 2, &c, 1 ); }
-BSP_output_char_function_type BSP_output_char = debug_putc;
-BSP_polling_getchar_function_type BSP_poll_char = NULL;
diff --git a/c/src/lib/libbsp/m68k/sim68000/startup/linkcmds b/c/src/lib/libbsp/m68k/sim68000/startup/linkcmds
index 1bf7bb83af..92a2e6ec74 100644
--- a/c/src/lib/libbsp/m68k/sim68000/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/sim68000/startup/linkcmds
@@ -12,7 +12,7 @@ _RomBase = DEFINED(_RomBase) ? _RomBase : 0x0;
_RomSize = DEFINED(_RomSize) ? _RomSize : 512K;
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000;
_RamSize = DEFINED(_RamSize) ? _RamSize : 128K;
-_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 32K;
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
/*