summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-31 19:23:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-07-31 19:23:21 +0000
commit3631dad88fb90b4270c75b54f91ce72ccef262fe (patch)
treec08906c10c709a399014d935d294b69a1030b3e7 /c
parentNew bsp for simulator in gdb. Does not work yet. (diff)
downloadrtems-3631dad88fb90b4270c75b54f91ce72ccef262fe.tar.bz2
Closer to linking. h8300-rtems-ld now core dumps.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/console/console-io.c8
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c4
-rw-r--r--c/src/lib/libbsp/h8300/h8sim/startup/linkcmds37
3 files changed, 33 insertions, 16 deletions
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 c0b2b2340f..afebdbcd86 100644
--- a/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
+++ b/c/src/lib/libbsp/h8300/h8sim/console/console-io.c
@@ -48,3 +48,11 @@ int console_inbyte_nonblocking(
return -1;
}
+#include <bspIo.h>
+
+void H8simBSP_output_char(char c) { console_outbyte_polled( 0, c ); }
+
+BSP_output_char_function_type BSP_output_char = H8simBSP_output_char;
+BSP_polling_getchar_function_type BSP_poll_char = NULL;
+
+
diff --git a/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c b/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c
index 212dd0c8c3..da656d65c0 100644
--- a/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c
+++ b/c/src/lib/libbsp/h8300/h8sim/startup/bspstart.c
@@ -87,8 +87,12 @@ void bsp_start( void )
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_stack_size = 4096;
+/*
if ( BSP_Configuration.work_space_size >(512*1024) )
_sys_exit( 1 );
+*/
BSP_Configuration.work_space_start = (void *) &WorkspaceBase;
}
+
+H8BD_Install_IRQ() {}
diff --git a/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds b/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds
index 5c2982a873..b04a9728a1 100644
--- a/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds
+++ b/c/src/lib/libbsp/h8300/h8sim/startup/linkcmds
@@ -2,12 +2,13 @@
* $Id$
*/
+OUTPUT_ARCH(h8300h)
/*
* Declare some sizes.
*/
_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
-_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
+_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x4000;
_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
ENTRY("_start")
@@ -39,22 +40,26 @@ SECTIONS
.text :
{
- CREATE_OBJECT_SYMBOLS
*(.text)
- _etext = .;
-/*
- ___CTOR_LIST__ = .;
- LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
- *(.ctors)
- LONG(0)
- ___CTOR_END__ = .;
- ___DTOR_LIST__ = .;
- LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
- *(.dtors)
- LONG(0)
- ___DTOR_END__ = .;
-*/
+ /*
+ * Read-only data
+ */
+ . = ALIGN (16);
+ PROVIDE(_rodata_start = . );
+ *(.rodata)
+ *(.gnu.linkonce.r*)
+ PROVIDE(_erodata = . );
+
+ _etext = .;
+ } >ram
+ .tors : {
+ ___ctors = . ;
+ *(.ctors)
+ ___ctors_end = . ;
+ ___dtors = . ;
+ *(.dtors)
+ ___dtors_end = . ;
} >ram
.data SIZEOF(.text) + ADDR(.text):
{
@@ -72,7 +77,7 @@ SECTIONS
_stack_init = .;
_clear_end = .;
_WorkspaceBase = .;
- . += 512K; /* reserve some memory for workspace */
+ . += 64K; /* reserve some memory for workspace */
_HeapBase = .;
. += _HeapSize; /* reserve some memory for heap */
_end = .;