From a9c55f5bb14af52c853e7b3d63a53b3bd69f8e79 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 6 Dec 2000 15:43:35 +0000 Subject: 2000-12-06 Joel Sherrill * README: Updated to reflect status. * startup/linkcmds: Added .ctor and .dtor sections to no avail. --- c/src/lib/libbsp/mips/jmr3904/ChangeLog | 5 ++++ c/src/lib/libbsp/mips/jmr3904/README | 26 +++++++---------- c/src/lib/libbsp/mips/jmr3904/startup/linkcmds | 39 ++++++++++++++++++++++++-- 3 files changed, 51 insertions(+), 19 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/mips/jmr3904/ChangeLog b/c/src/lib/libbsp/mips/jmr3904/ChangeLog index 9427326c90..8b05320eaa 100644 --- a/c/src/lib/libbsp/mips/jmr3904/ChangeLog +++ b/c/src/lib/libbsp/mips/jmr3904/ChangeLog @@ -1,3 +1,8 @@ +2000-12-06 Joel Sherrill + + * README: Updated to reflect status. + * startup/linkcmds: Added .ctor and .dtor sections to no avail. + 2000-11-30 Joel Sherrill * README: Updated to reflect current status. Misaligned reference diff --git a/c/src/lib/libbsp/mips/jmr3904/README b/c/src/lib/libbsp/mips/jmr3904/README index a6d974712b..ab1685973b 100644 --- a/c/src/lib/libbsp/mips/jmr3904/README +++ b/c/src/lib/libbsp/mips/jmr3904/README @@ -6,26 +6,20 @@ Simple BSP for the TX3904 simulator built into gdb. Simulator Invocation ==================== -The following is not 100% correct since it does not work. :) +The following is how the simulator is invoked. -target sim --board=jmr3904pal --memory-region 0x8800000,0x100000 +target sim --board=jmr3904 + +GDB must be configured with a target like "tx39-rtems". Otherwise, +the simulator will not be built for the correct instruction +and peripheral set. Status ====== -+ printk() works and is being called from bsp_start as prove. - -+ There appears to be a compilation problem in _Thread_Handler_initialization -where _Thread_Ready_chain[1] is only 1 byte -- not 12 from -_Thread_Ready_chain[0]. I am throwing this to the RTEMS list -first before reporting it. - -Made it to bsp_start -mips-core: 4 byte write to unaligned address 0x8803bb01 at 0x8800d83c ++ hello.exe locks up while running the global destructors. This almost + has to be a linkcmds issue. -Program received signal SIGBUS, Bus error. -0x8800d83c in _Chain_Initialize_empty (the_chain=0x8803bb01) - at ../../../../../jmr3904/lib/include/rtems/score/chain.inl:222 -222 the_chain->first = _Chain_Tail( the_chain ); -(gdb) q ++ There is no clock tick device driver. ++ There is no timer device driver. diff --git a/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds b/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds index d26b2c1148..4543f01ff0 100644 --- a/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds +++ b/c/src/lib/libbsp/mips/jmr3904/startup/linkcmds @@ -32,6 +32,38 @@ SECTIONS etext = .; _etext = .; } + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + + KEEP (*crtbegin.o(.ctors)) + + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + + KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } + + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } + . = .; .rdata : { *(.rdata) @@ -44,7 +76,6 @@ SECTIONS *(.data) *(.data.*) *(.gnu.linkonce.d*) - CONSTRUCTORS } . = ALIGN(8); _gp = . + 0x8000; @@ -73,8 +104,10 @@ SECTIONS *(.bss) *(COMMON) . = ALIGN (64); - _stack_init = .; + _stack_limit = .; . += _StackSize; + __stack = .; + _stack_init = .; _clear_end = .; WorkspaceBase = .; . += 512K; /* reserve some memory for workspace */ @@ -87,7 +120,7 @@ SECTIONS /* Put starting stack in SRAM (8 Kb); this size is the same as the stack from the original script (when everything was in SRAM). */ - __stack = 0x8000A000; + /* __stack = 0x8000A000; */ /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ -- cgit v1.2.3