summaryrefslogtreecommitdiffstats
path: root/c/src/lib
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-30 16:12:37 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-30 16:12:37 +0000
commit542e7b351267fa0b7fe9b7e4f06f236fa9d4957c (patch)
tree73623a63da681dd755d40676a168fc0f4d1018d9 /c/src/lib
parent2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-542e7b351267fa0b7fe9b7e4f06f236fa9d4957c.tar.bz2
2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, preinstall.am, include/bsp.h, include/tm27.h, trap34/console-io.c: Now builds cleanly for runs for SH1, SH2, and SH4. * include/syscall.h: New file. * include/gdbsci.h: Removed.
Diffstat (limited to '')
-rw-r--r--c/src/lib/libbsp/sh/shsim/ChangeLog8
-rw-r--r--c/src/lib/libbsp/sh/shsim/Makefile.am4
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/bsp.h1
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/gdbsci.h69
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/syscall.h30
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/tm27.h1
-rw-r--r--c/src/lib/libbsp/sh/shsim/preinstall.am8
-rw-r--r--c/src/lib/libbsp/sh/shsim/trap34/console-io.c6
8 files changed, 48 insertions, 79 deletions
diff --git a/c/src/lib/libbsp/sh/shsim/ChangeLog b/c/src/lib/libbsp/sh/shsim/ChangeLog
index 821b1000c2..90de842d91 100644
--- a/c/src/lib/libbsp/sh/shsim/ChangeLog
+++ b/c/src/lib/libbsp/sh/shsim/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-30 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, preinstall.am, include/bsp.h, include/tm27.h,
+ trap34/console-io.c: Now builds cleanly for runs for SH1, SH2, and
+ SH4.
+ * include/syscall.h: New file.
+ * include/gdbsci.h: Removed.
+
2008-09-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* Makefile.am: Eliminate bsp.am. Build startup files as side-effect
diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am
index 48d71bea76..9c1867ee5d 100644
--- a/c/src/lib/libbsp/sh/shsim/Makefile.am
+++ b/c/src/lib/libbsp/sh/shsim/Makefile.am
@@ -11,13 +11,13 @@ include_bspdir = $(includedir)/bsp
dist_project_lib_DATA = bsp_specs
include_HEADERS = include/bsp.h
+include_HEADERS += include/syscall.h
include_HEADERS += include/tm27.h
nodist_include_HEADERS = include/bspopts.h
nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
DISTCLEANFILES = include/bspopts.h
-include_HEADERS += include/gdbsci.h
nodist_include_HEADERS += ../../shared/include/coverhd.h
noinst_LIBRARIES = libbspstart.a
@@ -50,6 +50,8 @@ libbsp_a_SOURCES += trap34/console-io.c trap34/console-support.S \
../../shared/dummy_printk_support.c
# console
libbsp_a_SOURCES += ../../shared/console-polled.c
+# timer
+libbsp_a_SOURCES += ../../shared/timerstub.c
libbsp_a_LIBADD = \
../../../libcpu/@RTEMS_CPU@/@RTEMS_CPU_MODEL@/score.rel
diff --git a/c/src/lib/libbsp/sh/shsim/include/bsp.h b/c/src/lib/libbsp/sh/shsim/include/bsp.h
index b4b0c3e074..badb3d13c7 100644
--- a/c/src/lib/libbsp/sh/shsim/include/bsp.h
+++ b/c/src/lib/libbsp/sh/shsim/include/bsp.h
@@ -37,7 +37,6 @@ extern "C" {
/*
* FIXME: One of these would be enough.
*/
-#include <gdbsci.h>
#include <rtems/devnull.h>
/* Constants */
diff --git a/c/src/lib/libbsp/sh/shsim/include/gdbsci.h b/c/src/lib/libbsp/sh/shsim/include/gdbsci.h
deleted file mode 100644
index 837aa5fd16..0000000000
--- a/c/src/lib/libbsp/sh/shsim/include/gdbsci.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Driver for gdb's sh-simulator's sci emulation
- *
- * Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
- *
- * COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- *
- * $Id$
- */
-
-#ifndef _sh_gdbsci_h
-#define _sh_gdbsci_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- */
-
-#define DEVGDBSCI_DRIVER_TABLE_ENTRY \
- { sh_gdbsci_initialize, sh_gdbsci_open, sh_gdbsci_close, sh_gdbsci_read, \
- sh_gdbsci_write, sh_gdbsci_control }
-
-extern rtems_device_driver sh_gdbsci_initialize(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-extern rtems_device_driver sh_gdbsci_open(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-extern rtems_device_driver sh_gdbsci_close(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-extern rtems_device_driver sh_gdbsci_read(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-extern rtems_device_driver sh_gdbsci_write(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-extern rtems_device_driver sh_gdbsci_control(
- rtems_device_major_number,
- rtems_device_minor_number,
- void *
-);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/c/src/lib/libbsp/sh/shsim/include/syscall.h b/c/src/lib/libbsp/sh/shsim/include/syscall.h
new file mode 100644
index 0000000000..79fcc07a20
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shsim/include/syscall.h
@@ -0,0 +1,30 @@
+#define SYS_exit 1
+#define SYS_fork 2
+
+#define SYS_read 3
+#define SYS_write 4
+#define SYS_open 5
+#define SYS_close 6
+#define SYS_wait4 7
+#define SYS_creat 8
+#define SYS_link 9
+#define SYS_unlink 10
+#define SYS_execv 11
+#define SYS_chdir 12
+#define SYS_mknod 14
+#define SYS_chmod 15
+#define SYS_chown 16
+#define SYS_lseek 19
+#define SYS_getpid 20
+#define SYS_isatty 21
+#define SYS_fstat 22
+#define SYS_time 23
+
+#define SYS_ARG 24
+#define SYS_stat 38
+
+#define SYS_pipe 42
+#define SYS_execve 59
+
+#define SYS_utime 201 /* not really a system call */
+#define SYS_wait 202 /* nor is this */
diff --git a/c/src/lib/libbsp/sh/shsim/include/tm27.h b/c/src/lib/libbsp/sh/shsim/include/tm27.h
index 5a464e9bca..c65c907a1b 100644
--- a/c/src/lib/libbsp/sh/shsim/include/tm27.h
+++ b/c/src/lib/libbsp/sh/shsim/include/tm27.h
@@ -27,5 +27,6 @@
#define Cause_tm27_intr() /* empty */
#define Clear_tm27_intr() /* empty */
+#define Lower_tm27_intr() /* empty */
#endif
diff --git a/c/src/lib/libbsp/sh/shsim/preinstall.am b/c/src/lib/libbsp/sh/shsim/preinstall.am
index 3b4062fcad..f68973b330 100644
--- a/c/src/lib/libbsp/sh/shsim/preinstall.am
+++ b/c/src/lib/libbsp/sh/shsim/preinstall.am
@@ -41,6 +41,10 @@ $(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
+$(PROJECT_INCLUDE)/syscall.h: include/syscall.h $(PROJECT_INCLUDE)/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/syscall.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/syscall.h
+
$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
@@ -53,10 +57,6 @@ $(PROJECT_INCLUDE)/bsp/bootcard.h: ../../shared/include/bootcard.h $(PROJECT_INC
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/bootcard.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/bootcard.h
-$(PROJECT_INCLUDE)/gdbsci.h: include/gdbsci.h $(PROJECT_INCLUDE)/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/gdbsci.h
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/gdbsci.h
-
$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
diff --git a/c/src/lib/libbsp/sh/shsim/trap34/console-io.c b/c/src/lib/libbsp/sh/shsim/trap34/console-io.c
index d968323b1b..a4fa13cd61 100644
--- a/c/src/lib/libbsp/sh/shsim/trap34/console-io.c
+++ b/c/src/lib/libbsp/sh/shsim/trap34/console-io.c
@@ -19,11 +19,9 @@
#include <stdlib.h>
#include <assert.h>
-#define SYS_exit 1
-#define SYS_read 3
-#define SYS_write 4
+#include <syscall.h>
-int errno ;
+int errno;
extern int __trap34(int, int, void*, int );