forked from Imagelibrary/rtems
2000-12-13 Joel Sherrill <joel@OARcorp.com>
* README: Updated. We are now vectoring a clock tick ISR handler. But RTEMS is not returning from the ISR properly. * clock/clockdrv.c: Now causes interrupts but has not been calibrated. * include/bsp.h: Use <libcpu/tx3904.h> * startup/Makefile.am: Add setvec.c from shared. * startup/bspstart.c: Initialize the status register (SR) so no interrupts are masked but global interrupts (SR_IEC) are off. Added call to install the ISR prologue code. * wrapup/Makefile.am: Pick up more pieces from libcpu.
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
2000-12-13 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* README: Updated. We are now vectoring a clock tick ISR handler.
|
||||
But RTEMS is not returning from the ISR properly.
|
||||
* clock/clockdrv.c: Now causes interrupts but has not been calibrated.
|
||||
* include/bsp.h: Use <libcpu/tx3904.h>
|
||||
* startup/Makefile.am: Add setvec.c from shared.
|
||||
* startup/bspstart.c: Initialize the status register (SR) so
|
||||
no interrupts are masked but global interrupts (SR_IEC) are off.
|
||||
Added call to install the ISR prologue code.
|
||||
* wrapup/Makefile.am: Pick up more pieces from libcpu.
|
||||
|
||||
2000-12-11 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* startup/bspclean.c: New file to explicitly invoke _sys_exit().
|
||||
|
||||
@@ -14,12 +14,21 @@ GDB must be configured with a target like "tx39-rtems". Otherwise,
|
||||
the simulator will not be built for the correct instruction
|
||||
and peripheral set.
|
||||
|
||||
Simulator Information
|
||||
=====================
|
||||
The simulated system clock counts instructions. Setting the clock
|
||||
source to "clock" and the divider to 1 results in the timer directly
|
||||
counting the number of instructions executed.
|
||||
|
||||
Status
|
||||
======
|
||||
|
||||
+ hello.exe locks up while running the global destructors. This almost
|
||||
has to be a linkcmds issue.
|
||||
|
||||
+ There is no clock tick device driver.
|
||||
+ Workaround: bspclean.c actually explicits invokes _sys_exit() BEFORE
|
||||
letting the global destructors run.
|
||||
|
||||
+ There is a clock tick device driver which has not been calibrated.
|
||||
|
||||
+ There is no timer device driver.
|
||||
|
||||
@@ -7,12 +7,26 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#define CLOCK_VECTOR 0
|
||||
#include <rtems.h>
|
||||
#include <libcpu/tx3904.h>
|
||||
|
||||
#define CLOCK_VECTOR TX3904_IRQ_TMR0
|
||||
|
||||
#define Clock_driver_support_at_tick()
|
||||
|
||||
/* XXX */
|
||||
#define CLICKS 10000
|
||||
#define Clock_driver_support_install_isr( _new, _old ) \
|
||||
do { _old = 0; } while(0)
|
||||
do { \
|
||||
unsigned32 _clicks = CLICKS; \
|
||||
_old = (rtems_isr_entry) set_vector( _new, CLOCK_VECTOR, 1 ); \
|
||||
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CCDR, 0x3 ); \
|
||||
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_CPRA, _clicks ); \
|
||||
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TISR, 0x00 ); \
|
||||
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_ITMR, 0x8001 ); \
|
||||
TX3904_TIMER_WRITE( TX3904_TIMER0_BASE, TX3904_TIMER_TCR, 0xC0 ); \
|
||||
*((volatile unsigned32 *) 0xFFFFC01C) = 0x00000700; \
|
||||
} while(0)
|
||||
|
||||
|
||||
#define Clock_driver_support_initialize_hardware()
|
||||
|
||||
@@ -24,6 +24,7 @@ extern "C" {
|
||||
#include <iosupp.h>
|
||||
#include <console.h>
|
||||
#include <clockdrv.h>
|
||||
#include <libcpu/tx3904.h>
|
||||
|
||||
/*
|
||||
* Define the time limits for RTEMS Test Suite test durations.
|
||||
|
||||
@@ -9,7 +9,7 @@ VPATH = @srcdir@:@srcdir@/../../../shared
|
||||
PGM = $(ARCH)/startup.rel
|
||||
|
||||
C_FILES = bspclean.c bsplibc.c bsppost.c bspstart.c bootcard.c main.c sbrk.c \
|
||||
gnatinstallhandler.c
|
||||
gnatinstallhandler.c setvec.c
|
||||
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.o)
|
||||
|
||||
OBJS = $(C_O_FILES)
|
||||
|
||||
@@ -90,6 +90,10 @@ void bsp_start( void )
|
||||
_sys_exit( 1 );
|
||||
|
||||
BSP_Configuration.work_space_start = (void *) &WorkspaceBase;
|
||||
|
||||
mips_set_sr( 0xff00 ); /* all interrupts unmasked but globally off */
|
||||
/* depend on the IRC to take care of things */
|
||||
mips_install_isr_entries();
|
||||
}
|
||||
|
||||
/* XXX */
|
||||
|
||||
@@ -12,6 +12,8 @@ include $(top_srcdir)/../../../../../../automake/lib.am
|
||||
|
||||
# bummer; have to use $foreach since % pattern subst rules only replace 1x
|
||||
OBJS = $(foreach piece, $(BSP_FILES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
|
||||
$(wildcard ../../../../libcpu/$(RTEMS_CPU)/shared/*/$(ARCH)/*.o) \
|
||||
$(wildcard ../../../../libcpu/$(RTEMS_CPU)/tx39/*/$(ARCH)/*.o) \
|
||||
$(wildcard ../../../../libcpu/$(RTEMS_CPU)/$(RTEMS_CPU_MODEL)/$(ARCH)/*.o) \
|
||||
$(foreach piece, $(GENERIC_FILES), ../../../$(piece)/$(ARCH)/$(piece).rel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user