From 542e7b351267fa0b7fe9b7e4f06f236fa9d4957c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 30 Sep 2008 16:12:37 +0000 Subject: 2008-09-30 Joel Sherrill * 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. --- c/src/lib/libbsp/sh/shsim/ChangeLog | 8 ++++ c/src/lib/libbsp/sh/shsim/Makefile.am | 4 +- c/src/lib/libbsp/sh/shsim/include/bsp.h | 1 - c/src/lib/libbsp/sh/shsim/include/gdbsci.h | 69 --------------------------- c/src/lib/libbsp/sh/shsim/include/syscall.h | 30 ++++++++++++ c/src/lib/libbsp/sh/shsim/include/tm27.h | 1 + c/src/lib/libbsp/sh/shsim/preinstall.am | 8 ++-- c/src/lib/libbsp/sh/shsim/trap34/console-io.c | 6 +-- 8 files changed, 48 insertions(+), 79 deletions(-) delete mode 100644 c/src/lib/libbsp/sh/shsim/include/gdbsci.h create mode 100644 c/src/lib/libbsp/sh/shsim/include/syscall.h (limited to 'c/src/lib') 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 + + * 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 * 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 #include /* 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 #include -#define SYS_exit 1 -#define SYS_read 3 -#define SYS_write 4 +#include -int errno ; +int errno; extern int __trap34(int, int, void*, int ); -- cgit v1.2.3