summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/h8300
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-24 21:26:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-09-24 21:26:42 +0000
commitcf03ba2ac275fbfba854c2861f1ad7be61ef2bea (patch)
treeaabc80a903eb61e53591da30bb90908606b07022 /c/src/lib/libbsp/h8300
parent2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-cf03ba2ac275fbfba854c2861f1ad7be61ef2bea.tar.bz2
2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.am, console/console-io.c, include/bsp.h:
Diffstat (limited to 'c/src/lib/libbsp/h8300')
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/ChangeLog4
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/Makefile.am5
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/console-io.c13
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/include/bsp.h4
4 files changed, 21 insertions, 5 deletions
diff --git a/c/src/lib/libbsp/h8300/h8sim/ChangeLog b/c/src/lib/libbsp/h8300/h8sim/ChangeLog
index 96becc4c11..cbaf472564 100644
--- a/c/src/lib/libbsp/h8300/h8sim/ChangeLog
+++ b/c/src/lib/libbsp/h8300/h8sim/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-24 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * Makefile.am, console/console-io.c, include/bsp.h:
+
2008-09-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* configure.ac: Make letting boot_card() handle work area allocation
diff --git a/c/src/lib/libbsp/h8300/h8sim/Makefile.am b/c/src/lib/libbsp/h8300/h8sim/Makefile.am
index 4be7de0481..e42b5dade3 100644
--- a/c/src/lib/libbsp/h8300/h8sim/Makefile.am
+++ b/c/src/lib/libbsp/h8300/h8sim/Makefile.am
@@ -31,8 +31,9 @@ startup_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bspstart.c startup/h8bdinstallirq.c \
../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c startup/__main.c
-clock_SOURCES = ../../shared/clock_driver_stub.c
-console_SOURCES = ../../shared/console-polled.c console/console-io.c
+clock_SOURCES = ../../shared/clock_driver_simidle.c
+console_SOURCES = ../../shared/console-polled.c console/console-io.c \
+ console/syscalls.S
timer_SOURCES = ../../shared/timerstub.c
noinst_LIBRARIES = libbsp.a
diff --git a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
index 92df9de640..ded271920c 100644
--- a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
+++ b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
@@ -34,14 +34,21 @@ void console_initialize_hardware(void)
*
* This routine transmits a character using polling.
*/
-
+ssize_t _sys_write(int fd, const void *buf, size_t count);
void console_outbyte_polled(
int port,
char ch
)
{
- asm volatile( "mov.b #0,r1l ; mov.b %0l,r2l ; jsr @@0xc4"
- : : "r" (ch) : "r1", "r2");
+ _sys_write( 1, &ch, 1 );
+/*
+ typedef void (*_write_p_t)(int, char *, int);
+ _write_p_t _write_p = (_write_p_t)0xc7;
+ _write_p( 1, &ch, 1 );
+
+ asm volatile( "mov.b #1,r1l ; mov.b %0l,r2l ; mov.b #1,r3l; jsr @@0xc7"
+ : : "r" (&ch) : "r1", "r2");
+*/
}
/*
diff --git a/c/src/lib/libbsp/h8300/h8sim/include/bsp.h b/c/src/lib/libbsp/h8300/h8sim/include/bsp.h
index 27d41bdcd9..5a1e679f84 100644
--- a/c/src/lib/libbsp/h8300/h8sim/include/bsp.h
+++ b/c/src/lib/libbsp/h8300/h8sim/include/bsp.h
@@ -27,6 +27,10 @@ extern "C" {
#include <rtems/console.h>
#include <rtems/clockdrv.h>
+/* support for simulated clock tick */
+Thread clock_driver_sim_idle_body(uintptr_t);
+#define BSP_IDLE_TASK_BODY clock_driver_sim_idle_body
+
/*
* Simple spin delay in microsecond units for device drivers.
* This is very dependent on the clock speed of the target.