summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/efi332
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-12 15:00:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-12 15:00:15 +0000
commitdf49c60c9671e4a28e636964d744c1f59fb6cb68 (patch)
treeeabd85e189514ad412a35414ba5d483dcda3ef1f /c/src/lib/libbsp/m68k/efi332
parent0ab65474316231792faec37ec1dbddeaf8645775 (diff)
downloadrtems-df49c60c9671e4a28e636964d744c1f59fb6cb68.tar.bz2
Merged from 4.5.0-beta3a
Diffstat (limited to 'c/src/lib/libbsp/m68k/efi332')
-rw-r--r--c/src/lib/libbsp/m68k/efi332/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/README27
-rw-r--r--c/src/lib/libbsp/m68k/efi332/clock/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/console/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/include/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/include/bsp.h12
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/dotests14
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/gdbinit682
-rw-r--r--c/src/lib/libbsp/m68k/efi332/misc/interr.c7
-rw-r--r--c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/start/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/start/start.c6
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/Makefile.am10
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S2
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/linkcmds7
-rw-r--r--c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM2
-rw-r--r--c/src/lib/libbsp/m68k/efi332/timer/Makefile.am4
-rw-r--r--c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am4
19 files changed, 69 insertions, 56 deletions
diff --git a/c/src/lib/libbsp/m68k/efi332/Makefile.am b/c/src/lib/libbsp/m68k/efi332/Makefile.am
index 06ae4c41ab..02af1cbb18 100644
--- a/c/src/lib/libbsp/m68k/efi332/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal
diff --git a/c/src/lib/libbsp/m68k/efi332/README b/c/src/lib/libbsp/m68k/efi332/README
index 097ce132ad..2ece9ff5bb 100644
--- a/c/src/lib/libbsp/m68k/efi332/README
+++ b/c/src/lib/libbsp/m68k/efi332/README
@@ -4,7 +4,7 @@
Description: efi68k
============
-CPU: MC68332 @16MHz
+CPU: MC68332 @20MHz
RAM: 256k max. (supports several configurations)
ROM: 512k (supports several configurations)
@@ -12,25 +12,18 @@ ROM: 512k (supports several configurations)
Internet subscribes to the mailing list "efi332" (an offshoot of the
"diy_efi" mailing list). Although efi332 was initially designed for
automotive research, it is a fairly generalized embedded controller
-when used without the companion EFI I/O board. It is patterned much after
-the the Motorola BCC but cost on the order of $250US. A 4x3 inch
-(approx.) printed circuit board is available (about $14US). For complete
-information see
+when used without the companion EFI I/O board, and is patterned much
+after the the Motorola BCC. A 4x3 inch (approx.) printed circuit board
+is available (about $14US). For complete information see
+
+ http://www.diy-efi.org
- http://efi332.eng.ohio-state.edu
TODO:
=====
- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
- the interrupt priority and (2) to prevent it from blocking. (high
- priority)
+ the interrupt priority and (2) to prevent it from blocking.
- add a timer driver for the tmtest set.
-- generate include/coverhd.c to perform the tmtest.
-- add separate interrupt stack (low priority... may never happen :).
- John S Gwynne
- Gwynne.1@osu.edu
-_______________________________________________________________________________
- T h e O h i o - S t a t e U n i v e r s i t y
- ElectroScience Laboratory, 1320 Kinnear Road, Columbus, Ohio 43212, USA
- Telephone: (614) 292-7981 * Fax: (614) 292-7297
--------------------------------------------------------------------------------
+
+ John S Gwynne, PhD.
+ jgwynne@mrcday.com
diff --git a/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am b/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am
index 0b1ebe8a61..3e08045c00 100644
--- a/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/clock/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/console/Makefile.am b/c/src/lib/libbsp/m68k/efi332/console/Makefile.am
index 82b58ef82e..d4e5619fac 100644
--- a/c/src/lib/libbsp/m68k/efi332/console/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/console/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/include/Makefile.am b/c/src/lib/libbsp/m68k/efi332/include/Makefile.am
index a3a23aef21..550d392e01 100644
--- a/c/src/lib/libbsp/m68k/efi332/include/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/include/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/include/bsp.h b/c/src/lib/libbsp/m68k/efi332/include/bsp.h
index 284d54c27e..c44e1f75fd 100644
--- a/c/src/lib/libbsp/m68k/efi332/include/bsp.h
+++ b/c/src/lib/libbsp/m68k/efi332/include/bsp.h
@@ -28,6 +28,15 @@ extern "C" {
#include <qsm.h>
/*
+ * confdefs.h overrides for this BSP:
+ * - number of termios serial ports (defaults to 1)
+ * - Interrupt stack space is not minimum if defined.
+ */
+
+/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
+/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
+
+/*
* Define the time limits for RTEMS Test Suite test durations.
* Long test and short test duration limits are provided. These
* values are in seconds and need to be converted to ticks for the
@@ -78,12 +87,9 @@ extern char _edata[];
extern char _clear_start[];
extern char end[];
extern char _copy_data_from_rom[];
-extern char __end_of_ram[];
/* constants */
-#define RAM_END ((int)__end_of_ram)
-
#ifdef __START_C__
#define STACK_SIZE "#0x800"
#else
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/dotests b/c/src/lib/libbsp/m68k/efi332/misc/dotests
index b9449bffc3..f701e01114 100644
--- a/c/src/lib/libbsp/m68k/efi332/misc/dotests
+++ b/c/src/lib/libbsp/m68k/efi332/misc/dotests
@@ -3,13 +3,13 @@
# $Id$
#
-/bin/rm sp* &>/dev/null
-(cd ..; for f in sp*; do cp ${f}/o-efi332/${f}.nxe hold; done)
+mkdir MyTests
+find -name MyTests -prune -or -name "*.nxe" -exec cp {} MyTests \;
-stty 5:0:800008bf:0:0:0:0:0:0:1:1:0:0:0:0:0:0:0:0:0:0:0:0 </dev/cua0
-/bin/cp /dev/cua0 screen &
+stty 1:0:80001cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 </dev/ttyS1
+/bin/cp /dev/ttyS1 screen &
+cpJob=$!
-for f in sp*; do m68k-bdm-coff-gdb ${f} </dev/null; done
+( cd MyTests; for f in *nxe; do m68k-elf-gdb ${f} </dev/null; done )
-kill -9 `ps -efax | grep "/bin/cp /dev/cua0" | sed "/grep/D; s/ .*$//"`
-/bin/rm sp* &>/dev/null
+kill -9 $cpJob
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68 b/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
index 9a104f86d2..b929f5aa20 100644
--- a/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
+++ b/c/src/lib/libbsp/m68k/efi332/misc/gdbinit68
@@ -4,7 +4,7 @@
echo Setting up the environment for efi332 debuging.\n
target bdm /dev/pdbdm0
-bdm_setdelay 405
+bdm_setdelay 4
bdm_autoreset on
set remotecache off
bdm_timetocomeup 0
diff --git a/c/src/lib/libbsp/m68k/efi332/misc/interr.c b/c/src/lib/libbsp/m68k/efi332/misc/interr.c
index 245be54032..578ad139c3 100644
--- a/c/src/lib/libbsp/m68k/efi332/misc/interr.c
+++ b/c/src/lib/libbsp/m68k/efi332/misc/interr.c
@@ -83,7 +83,12 @@ void volatile _Internal_error_Occurred(
RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
RAW_PUTS("RTEMS: fatal error ");
RAW_PUTI( the_error );
- RAW_PUTS(".\r\n");
+ RAW_PUTS(" (");
+ outbyte( (char)((the_error>>24) & 0xff) );
+ outbyte( (char)((the_error>>16) & 0xff) );
+ outbyte( (char)((the_error>>8) & 0xff) );
+ outbyte( (char)(the_error & 0xff) );
+ RAW_PUTS(").\r\n");
/* configure peripherals for a safe exit */
bsp_cleanup();
diff --git a/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am b/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am
index b15b542bff..bfd07bd28e 100644
--- a/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/spurious/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/start/Makefile.am b/c/src/lib/libbsp/m68k/efi332/start/Makefile.am
index 945303e33e..9005137d73 100644
--- a/c/src/lib/libbsp/m68k/efi332/start/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/start/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/start/start.c b/c/src/lib/libbsp/m68k/efi332/start/start.c
index 4586a4c089..5394fb279c 100644
--- a/c/src/lib/libbsp/m68k/efi332/start/start.c
+++ b/c/src/lib/libbsp/m68k/efi332/start/start.c
@@ -93,7 +93,7 @@ void dumby_start() {
*CSBAR3 = (unsigned short int)
(((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */
*CSBAR4 = (unsigned short int)
- (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256 bytes located at 0xC0000 */
+ (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */
*CSBAR5 = (unsigned short int)
(0xfff8 | BS_64K); /* AVEC interrupts */
#ifdef EFI332_v040b
@@ -112,10 +112,10 @@ void dumby_start() {
/* see section 7 of the SIM Reference Manual */
#ifdef FLASHWRITE
*CSORBT = (unsigned short int)
- ( BothBytes | ReadWrite | SyncAS | WaitStates_2 | UserSupSpace );
+ ( BothBytes | ReadWrite | SyncAS | WaitStates_0 | UserSupSpace );
#else /* FLASHWRITE */
*CSORBT = (unsigned short int)
- ( BothBytes | ReadOnly | SyncAS | WaitStates_2 | UserSupSpace );
+ ( BothBytes | ReadOnly | SyncAS | WaitStates_0 | UserSupSpace );
#endif /* FLASHWRITE */
*CSOR0 = (unsigned short int)
( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am b/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am
index 2eb13ab2a0..1801ae3072 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/startup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
@@ -24,6 +24,9 @@ include $(top_srcdir)/../../../../../../automake/lib.am
# (OPTIONAL) Add local stuff here using +=
#
+# USE_INIT_FINI tells main.c what C++ help we need.
+AM_CPPFLAGS += -DUSE_INIT_FINI
+
$(PGM): $(OBJS)
$(make-rel)
@@ -33,7 +36,8 @@ $(PROJECT_RELEASE)/lib/linkcmds: linkcmds
$(PROJECT_RELEASE)/lib/linkcmds_ROM: linkcmds_ROM
$(INSTALL_DATA) $< $@
-$(PROJECT_RELEASE)/lib/except_vect_332_ROM$(LIB_VARIANT).o: $(ARCH)/except_vect_332_ROM.o
+$(PROJECT_RELEASE)/lib/except_vect_332_ROM$(LIB_VARIANT).o: \
+ $(ARCH)/except_vect_332_ROM.o
$(INSTALL_DATA) $< $@
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
index 765b26c902..b50dd710a1 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/efi332/startup/bspstart.c
@@ -50,6 +50,10 @@ void bsp_start( void )
{
void *vbr;
extern void *_WorkspaceBase;
+ extern void *_RamSize;
+ extern unsigned long _M68k_Ramsize;
+
+ _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
/*
* we only use a hook to get the C library initialized.
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S b/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S
index 0e5e11c085..9eb2f20556 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S
+++ b/c/src/lib/libbsp/m68k/efi332/startup/except_vect_332_ROM.S
@@ -11,7 +11,7 @@
will have priority. */
/* Vector 0: RESET: Initial SSP */
- .long __end_of_ram
+ .long _RamEnd
/* Vector 1: RESET: Initial PC */
.long start
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds
index 6ac7ee77a4..849c8692fa 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds
+++ b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds
@@ -33,6 +33,9 @@ __DYNAMIC = 0;
/*
* Declare some sizes.
*/
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000;
+_RamSize = DEFINED(_RamSize) ? _RamSize : 0x80000;
+_RamEnd = _RamBase + _RamSize;
_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
@@ -41,10 +44,6 @@ MEMORY
ram : ORIGIN = 0x80000, LENGTH = 512K
}
-_RamBase = 0x80000;
-_RamSize = 0x80000;
-
-__end_of_ram = 0x100000;
_copy_data_from_rom = 0;
/*
diff --git a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
index b4f3bf70b1..acfee4c07f 100644
--- a/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
+++ b/c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
@@ -43,6 +43,8 @@ MEMORY
ram : ORIGIN = 0x80000, LENGTH = 512K
}
+_RamBase = DEFINED(_RamBase) ? _RamBase : 0x080000;
+
__end_of_ram = 0x100000;
_copy_data_from_rom = 1;
diff --git a/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am b/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am
index 7f16dcc233..5c2b8edf56 100644
--- a/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/timer/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4
diff --git a/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am b/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am
index 192820440e..5b82482da1 100644
--- a/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am
+++ b/c/src/lib/libbsp/m68k/efi332/wrapup/Makefile.am
@@ -1,6 +1,6 @@
-##
+##
## $Id$
-##
+##
AUTOMAKE_OPTIONS = foreign 1.4