Changeset 4a238002 in rtems for c/src/lib/libbsp/sh
- Timestamp:
- 11/18/99 21:22:58 (24 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 97c465c
- Parents:
- 5503d75
- Location:
- c/src/lib/libbsp/sh
- Files:
-
- 19 added
- 6 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/sh/gensh1/Makefile.in
r5503d75 r4a238002 21 21 # wrapup is the one that actually builds and installs the library 22 22 # from the individual .rel files built in other directories 23 SUB_DIRS = include start startup scitab wrapup23 SUB_DIRS = include start startup scitab console wrapup 24 24 25 25 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status -
c/src/lib/libbsp/sh/gensh1/README
r5503d75 r4a238002 46 46 ===== 47 47 48 (1) Only stub console driver available at the moment. 49 Driver for the on-chip serial devices (sci) will be available soon. 48 (1) The stub console driver (null) is enabled by default. 50 49 50 (2) The driver for the on-chip serial devices (sci) is still in its infancy 51 and not fully tested. It may even be non-functional and therefore is 52 disabled by default. Please let us know any problems you encounter with 53 it. 54 To activate it edit libbsp/sh/gensh1/include/bsp.h -
c/src/lib/libbsp/sh/gensh1/include/bsp.h
r5503d75 r4a238002 31 31 #endif 32 32 33 #define CPU_CONSOLE_DEVNAME "/dev/null"34 35 36 33 #include <rtems.h> 37 34 #include <clockdrv.h> 35 #include <console.h> 36 37 /* EDIT: To activate the sci driver, change the define below */ 38 #if 1 38 39 #include <sh/null.h> 39 #include <console.h> 40 #define BSP_CONSOLE_DEVNAME "/dev/null" 41 #define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVNULL_DRIVER_TABLE_ENTRY 42 #else 43 #include <sh/sci.h> 44 #define BSP_CONSOLE_DEVNAME "/dev/sci0" 45 #define BSP_CONSOLE_DRIVER_TABLE_ENTRY DEVSCI_DRIVER_TABLE_ENTRY 46 #endif 47 40 48 41 49 /* … … 69 77 70 78 /* Constants */ 71 #ifndef MHZ72 #error Missing MHZ73 #endif74 79 75 80 /* 76 81 * Simple spin delay in microsecond units for device drivers. 77 82 * This is very dependent on the clock speed of the target. 78 *79 * Since we don't have a real time clock, this is a very rough80 * approximation, assuming that each cycle of the delay loop takes81 * approx. 4 machine cycles.82 *83 * e.g.: MHZ = 20 => 5e-8 secs per instruction84 * => 4 * 5e-8 secs per delay loop85 83 */ 86 84 87 #define delay( microseconds ) \ 88 { register unsigned int _delay = (microseconds) * (MHZ / 4 ); \ 89 asm volatile ( \ 90 "0: add #-1,%0\n \ 91 nop\n \ 92 cmp/pl %0\n \ 93 bt 0b\ 94 nop" \ 95 :: "r" (_delay) ); \ 96 } 97 98 /* 99 * For backward compatibility only. 100 * Do not rely on them being present in future 101 */ 102 #define CPU_delay( microseconds ) delay( microseconds ) 103 #define sh_delay( microseconds ) delay( microseconds ) 85 #define delay( microseconds ) CPU_delay(microseconds) 86 #define sh_delay( microseconds ) CPU_delay(microseconds) 104 87 105 88 /* … … 129 112 * We redefine CONSOLE_DRIVER_TABLE_ENTRY to redirect /dev/console 130 113 */ 131 #if defined(CONSOLE_DRIVER_TABLE_ENTRY)132 #warning Overwriting CONSOLE_DRIVER_TABLE_ENTRY133 114 #undef CONSOLE_DRIVER_TABLE_ENTRY 134 #endif135 136 115 #define CONSOLE_DRIVER_TABLE_ENTRY \ 137 DEVNULL_DRIVER_TABLE_ENTRY, \116 BSP_CONSOLE_DRIVER_TABLE_ENTRY, \ 138 117 { console_initialize, console_open, console_close, \ 139 118 console_read, console_write, console_control } … … 143 122 */ 144 123 145 /*146 * FIXME: Should this go to libcpu/sh/sh7032 ?147 */148 #if 0149 /* functions */150 sh_isr_entry set_vector( /* returns old vector */151 rtems_isr_entry handler, /* isr routine */152 rtems_vector_number vector, /* vector number */153 int type /* RTEMS or RAW intr */154 );155 #endif156 157 124 #ifdef __cplusplus 158 125 } -
c/src/lib/libbsp/sh/gensh1/scitab/Makefile.in
r5503d75 r4a238002 65 65 66 66 scitab.c: $(SHGEN) 67 $(SHGEN) - M $(MHZ) sci > $@67 $(SHGEN) -H $(HZ) sci > $@ 68 68 69 69 # the .rel file built here will be put into libbsp.a by ../wrapup/Makefile -
c/src/lib/libbsp/sh/gensh1/startup/bspstart.c
r5503d75 r4a238002 127 127 Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */ 128 128 Cpu_table.postdriver_hook = bsp_postdriver_hook; 129 129 130 130 #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) 131 131 Cpu_table.interrupt_stack_size = 4096; 132 132 #endif 133 133 Cpu_table.clicks_per_second = HZ ; 134 134 } -
c/src/lib/libbsp/sh/gensh1/wrapup/Makefile.in
r5503d75 r4a238002 16 16 VPATH = @srcdir@ 17 17 18 BSP_PIECES = startup scitab 18 BSP_PIECES = startup scitab console 19 19 GENERIC_PIECES = 20 20 21 21 # pieces to pick up out of libcpu/sh 22 CPU_PIECES = sh7032/null sh7032/clock sh7032/ console sh7032/timer22 CPU_PIECES = sh7032/null sh7032/clock sh7032/timer sh7032/sci sh7032/delay 23 23 24 24 # bummer; have to use $foreach since % pattern subst rules only replace 1x … … 62 62 $(make-library) 63 63 64 all: ${ARCH} $(SRCS) $(LIB) 65 $(INSTALL_VARIANT) -m 644 $(LIB) $(PROJECT_RELEASE)/lib 64 $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA): $(LIB) 65 $(INSTALL_DATA) $^ $@ 66 67 all: ${ARCH} $(SRCS) $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA) 66 68 67 69 install: all -
c/src/lib/libbsp/sh/gensh2/console/Makefile.in
r5503d75 r4a238002 1 # 2 # $Id$3 # 1 ## 2 ## $Id$ 3 ## 4 4 5 5 @SET_MAKE@ … … 7 7 top_srcdir = @top_srcdir@ 8 8 top_builddir = ../../.. 9 subdir = sh/ sh7032/console9 subdir = sh/gensh2/console 10 10 11 11 RTEMS_ROOT = @RTEMS_ROOT@ 12 12 PROJECT_ROOT = @PROJECT_ROOT@ 13 13 14 VPATH = @srcdir@ 14 VPATH = @srcdir@:@top_srcdir@/sh/shared 15 15 16 16 PGM = ${ARCH}/console.rel … … 64 64 65 65 # the .rel file built here will be put into libbsp.a by 66 # libbsp/sh/BSP/wrapup/Makefile66 # ../wrapup/Makefile 67 67 install: all 68 68
Note: See TracChangeset
for help on using the changeset viewer.