summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sh/shsim
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-15 14:20:14 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 08:58:49 -0500
commit0626dba48a5190abe2ec90db5febde46c951b3af (patch)
tree7785bb6280bbbf77a183429a65a3d04149d1eb99 /c/src/lib/libbsp/sh/shsim
parentarm/rtl22xx/startup/bspstart.c: Ensure bsp_start_default() is static (diff)
downloadrtems-0626dba48a5190abe2ec90db5febde46c951b3af.tar.bz2
SH libcpu and libbsp: Fix warnings
Diffstat (limited to 'c/src/lib/libbsp/sh/shsim')
-rw-r--r--c/src/lib/libbsp/sh/shsim/console/console-debugio.c5
-rw-r--r--c/src/lib/libbsp/sh/shsim/console/console-io.c16
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/bsp.h17
-rw-r--r--c/src/lib/libbsp/sh/shsim/start/start.S1
-rw-r--r--c/src/lib/libbsp/sh/shsim/startup/sysexit.c21
5 files changed, 37 insertions, 23 deletions
diff --git a/c/src/lib/libbsp/sh/shsim/console/console-debugio.c b/c/src/lib/libbsp/sh/shsim/console/console-debugio.c
index 38b6c8f698..0a81dbe45b 100644
--- a/c/src/lib/libbsp/sh/shsim/console/console-debugio.c
+++ b/c/src/lib/libbsp/sh/shsim/console/console-debugio.c
@@ -1,9 +1,6 @@
/**
* @file
* @brief Stub printk() support
- *
- * This file contains a stub for the required printk() support.
- * It is NOT functional!!!
*/
/*
@@ -27,7 +24,7 @@ void console_outbyte_polled(
char ch
);
-void BSP_output_char_f(char c)
+static void BSP_output_char_f(char c)
{
console_outbyte_polled( 0, c );
}
diff --git a/c/src/lib/libbsp/sh/shsim/console/console-io.c b/c/src/lib/libbsp/sh/shsim/console/console-io.c
index 7f5794e784..71b089fdf7 100644
--- a/c/src/lib/libbsp/sh/shsim/console/console-io.c
+++ b/c/src/lib/libbsp/sh/shsim/console/console-io.c
@@ -20,20 +20,13 @@
#include <bsp/syscall.h>
-int errno;
-
-extern int __trap34(int, int, void*, int );
-
/*
* console_initialize_hardware
*
* This routine initializes the console hardware.
- *
*/
-
void console_initialize_hardware(void)
{
- return;
}
/*
@@ -41,14 +34,12 @@ void console_initialize_hardware(void)
*
* This routine transmits a character using polling.
*/
-
void console_outbyte_polled(
int port,
char ch
)
{
__trap34 (SYS_write, 1, &ch, 1);
- return;
}
/*
@@ -56,7 +47,6 @@ void console_outbyte_polled(
*
* This routine polls for a character.
*/
-
int console_inbyte_nonblocking(
int port
)
@@ -65,9 +55,3 @@ int console_inbyte_nonblocking(
return __trap34 (SYS_read, 0, &c, 1);
}
-
-/* XXX wrong place for this */
-int _sys_exit (int n)
-{
- return __trap34 (SYS_exit, n, 0, 0);
-}
diff --git a/c/src/lib/libbsp/sh/shsim/include/bsp.h b/c/src/lib/libbsp/sh/shsim/include/bsp.h
index 8b926dd7a4..80ef2cea68 100644
--- a/c/src/lib/libbsp/sh/shsim/include/bsp.h
+++ b/c/src/lib/libbsp/sh/shsim/include/bsp.h
@@ -1,8 +1,10 @@
/*
- * This include file contains all board IO definitions.
- *
* SH-gdb simulator BSP
*
+ * This include file contains all board IO definitions.
+ */
+
+/*
* Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de)
*
* COPYRIGHT (c) 2001, Ralf Corsepius, Ulm, Germany
@@ -22,6 +24,8 @@
#ifndef _BSP_H
#define _BSP_H
+#ifndef ASM
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -46,12 +50,19 @@ Thread clock_driver_sim_idle_body(uintptr_t);
/*
* Defined in the linker script 'linkcmds'
*/
-
extern void *CPU_Interrupt_stack_low;
extern void *CPU_Interrupt_stack_high;
+/*
+ * BSP methods that cross file boundaries.
+ */
+int __trap34(int, int, void*, int );
+int _sys_exit (int n);
+void bsp_hw_init(void);
+
#ifdef __cplusplus
}
#endif
+#endif /* !ASM */
#endif
diff --git a/c/src/lib/libbsp/sh/shsim/start/start.S b/c/src/lib/libbsp/sh/shsim/start/start.S
index 567af1f37e..cc4727b9ff 100644
--- a/c/src/lib/libbsp/sh/shsim/start/start.S
+++ b/c/src/lib/libbsp/sh/shsim/start/start.S
@@ -18,6 +18,7 @@
*/
#include <rtems/asm.h>
+#include <bsp.h>
BEGIN_CODE
PUBLIC(start)
diff --git a/c/src/lib/libbsp/sh/shsim/startup/sysexit.c b/c/src/lib/libbsp/sh/shsim/startup/sysexit.c
new file mode 100644
index 0000000000..4b540a265a
--- /dev/null
+++ b/c/src/lib/libbsp/sh/shsim/startup/sysexit.c
@@ -0,0 +1,21 @@
+/*
+ * This file contains the simulator specific exit trap.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2014.
+ * 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.org/license/LICENSE.
+ */
+
+#include <bsp.h>
+
+extern int __trap34(int, int, void*, int );
+
+int _sys_exit (int n)
+{
+ return __trap34 (SYS_exit, n, 0, 0);
+}