1 Index: rtems-051009/make/custom/mo376.cfg
2 ===================================================================
4 +++ rtems/make/custom/mo376.cfg
7 +# Config file for the mrm332 BSP
9 +# $Id: mrm332.cfg,v 1.8 2004/02/04 16:50:30 ralf Exp $
12 +include $(RTEMS_ROOT)/make/custom/default.cfg
15 +RTEMS_CPU_MODEL=m68332
17 +# This is the actual bsp directory used during the build process.
18 +RTEMS_BSP_FAMILY=mrm332
20 +# This contains the compiler options necessary to select the CPU model
21 +# and (hopefully) optimize for it.
24 +# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
25 +CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
27 +# The following are definitions of make-exe which will work using ld as
28 +# is currently required. It is expected that as of gcc 2.8, the end user
29 +# will be able to override parts of the compilers specs and link using gcc.
31 +ifeq ($(MRM_IN_ROM),yes)
32 +# Build a rommable image - move the .data section after the .text section
34 +CPU_CFLAGS += -qnolinkcmds -T $(exec_prefix)/mrm332/lib/linkcmds_ROM
36 +# This is a good way to get debug information. The output file is large
37 +# though and greatly slows the build process so only do this if needed.
38 +# $(OBJDUMP) -dxC $(basename $@).nxe > $(basename $@).dump
41 + $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).pxe \
42 + $(LINK_OBJS) $(LINK_LIBS)
43 + $(OBJCOPY) --adjust-section-vma \
44 + .data=`m68k-rtems-objdump --section-headers $(basename $@).pxe | \
45 + awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
46 + for (p=digits; p>0; p--) \
47 + s += (16^(p-1)) * ( index("0123456789ABCDEF",\
48 + substr(x,1+digits-p,1)) -1 );\
50 + /\.text/ { base = $$4 ; size = $$3 };\
51 + END { printf("0x%x", h2d(base) + h2d(size)) }'\
52 + ` $(basename $@).pxe $(basename $@).nxe
53 + $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
54 + sed -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
55 + $(PACKHEX) > $(basename $@).exe
56 + $(NM) -g -n $(basename $@).pxe > $(basename $@).pnum
57 + $(NM) -g -n $(basename $@).nxe > $(basename $@).num
58 + $(SIZE) $(basename $@).nxe
62 + $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
63 + $(LINK_OBJS) $(LINK_LIBS)
64 + $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
65 +# m68k-rtems-objdump -dxC $(basename $@).nxe > $(basename $@).dump
66 + sed -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
67 + $(PACKHEX) > $(basename $@).exe
68 + $(NM) -g -n $(basename $@).nxe > $(basename $@).num
69 + $(SIZE) $(basename $@).nxe
73 +# Miscellaneous additions go here
74 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/console/sci.h
75 ===================================================================
77 +++ rtems/c/src/lib/libbsp/m68k/mo376/console/sci.h
79 +/****************************************************************************
82 +* Desc: This is the include file for the serial communications interface.
84 +* Note: See bsp.h,confdefs.h,system.h for installing drivers into RTEMS.
86 +* $Id: sci.h,v 1.4 2004/04/21 16:01:35 ralf Exp $
87 +****************************************************************************/
92 +/*******************************************************************************
93 + IOCTL commands for the sci driver.
94 + I'm still working on these...
95 +*******************************************************************************/
97 +#define SCI_IOCTL_PARITY_NONE 0x00 // no parity bit after the data bits
98 +#define SCI_IOCTL_PARITY_ODD 0x01 // parity bit added after data bits
99 +#define SCI_IOCTL_PARITY_EVEN 0x02 // parity bit added after data bits
100 +#define SCI_IOCTL_PARITY_MARK 0x03 // parity bit is lo, -12 volts, logical 1
101 +#define SCI_IOCTL_PARITY_SPACE 0x04 // parity bit is hi, +12 volts, logical 0
102 +#define SCI_IOCTL_PARITY_FORCED_ON 0x03 // parity bit is forced hi or lo
103 +#define SCI_IOCTL_PARITY_FORCED_OFF 0x04 // parity bit is forced hi or lo
105 +#define SCI_IOCTL_BAUD_RATE 0x20 // set the baud rate, arg is baud
107 +#define SCI_IOCTL_DATA_BITS 0x30 // set the data bits, arg is # bits
109 +#define SCI_IOCTL_STOP_BITS_1 0x40 // 1 stop bit after char frame
110 +#define SCI_IOCTL_STOP_BITS_2 0x41 // 2 stop bit after char frame
112 +#define SCI_IOCTL_MODE_NORMAL 0x50 // normal operating mode
113 +#define SCI_IOCTL_MODE_LOOP 0x51 // internal loopback mode
115 +#define SCI_IOCTL_FLOW_NONE 0x60 // no flow control
116 +#define SCI_IOCTL_FLOW_RTS_CTS 0x61 // hardware flow control
118 +#define SCI_IOCTL_SEND_BREAK 0x70 // send an rs-232 break
120 +#define SCI_IOCTL_MODE_1200 0x80 // 1200,n,8,1 download mode
121 +#define SCI_IOCTL_MODE_9600 0x81 // 9600,n,8,1 download mode
122 +#define SCI_IOCTL_MODE_9_BIT 0x82 // 9600,forced,8,1 command mode
125 +/*******************************************************************************
127 +*******************************************************************************/
129 +// SCI Control Register 0 (SCCR0) $FFFC08
131 +// 8 4 2 1 - 8 4 2 1 - 8 4 2 1 - 8 4 2 1
132 +// ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
133 +// | | | | | | | | | | | | | | | |
134 +// | | | | | | | | | | | | | | | +----- 0 baud rate divisor
135 +// | | | | | | | | | | | | | | +------- 1 baud rate divisor
136 +// | | | | | | | | | | | | | +--------- 2 baud rate divisor
137 +// | | | | | | | | | | | | +----------- 3 baud rate divisor
138 +// | | | | | | | | | | | |
139 +// | | | | | | | | | | | +--------------- 4 baud rate divisor
140 +// | | | | | | | | | | +----------------- 5 baud rate divisor
141 +// | | | | | | | | | +------------------- 6 baud rate divisor
142 +// | | | | | | | | +--------------------- 7 baud rate divisor
144 +// | | | | | | | +------------------------- 8 baud rate divisor
145 +// | | | | | | +--------------------------- 9 baud rate divisor
146 +// | | | | | +----------------------------- 10 baud rate divisor
147 +// | | | | +------------------------------- 11 baud rate divisor
149 +// | | | +----------------------------------- 12 baud rate divisor
150 +// | | +------------------------------------- 13 unused
151 +// | +--------------------------------------- 14 unused
152 +// +----------------------------------------- 15 unused
154 +// 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 1 0 0 reset value - (64k baud?)
156 +#define SCI_BAUD_57_6K 9
157 +#define SCI_BAUD_38_4K 14
158 +#define SCI_BAUD_19_2K 27
159 +#define SCI_BAUD_9600 55
160 +#define SCI_BAUD_4800 109
161 +#define SCI_BAUD_2400 218
162 +#define SCI_BAUD_1200 437
165 +// SCI Control Register 1 (SCCR1) $FFFC0A
167 +// 8 4 2 1 - 8 4 2 1 - 8 4 2 1 - 8 4 2 1
168 +// ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
169 +// | | | | | | | | | | | | | | | |
170 +// | | | | | | | | | | | | | | | +----- 0 send a break
171 +// | | | | | | | | | | | | | | +------- 1 rcvr wakeup mode
172 +// | | | | | | | | | | | | | +--------- 2 rcvr enable
173 +// | | | | | | | | | | | | +----------- 3 xmtr enable
174 +// | | | | | | | | | | | |
175 +// | | | | | | | | | | | +--------------- 4 idle line intr enable
176 +// | | | | | | | | | | +----------------- 5 rcvr intr enable
177 +// | | | | | | | | | +------------------- 6 xmit complete intr enable
178 +// | | | | | | | | +--------------------- 7 xmtr intr enable
180 +// | | | | | | | +------------------------- 8 wakeup on address mark
181 +// | | | | | | +--------------------------- 9 mode 1=9 bits, 0=8 bits
182 +// | | | | | +----------------------------- 10 parity enable 1=on, 0=off
183 +// | | | | +------------------------------- 11 parity type 1=odd, 0=even
185 +// | | | +----------------------------------- 12 idle line select
186 +// | | +------------------------------------- 13 wired-or mode
187 +// | +--------------------------------------- 14 loop mode
188 +// +----------------------------------------- 15 unused
190 +// 0 0 0 0 - 0 0 0 0 - 0 0 0 0 - 0 0 0 0 reset value
192 +#define SCI_SEND_BREAK 0x0001 // 0000-0000-0000-0001
193 +#define SCI_RCVR_WAKEUP 0x0002 // 0000-0000-0000-0010
194 +#define SCI_ENABLE_RCVR 0x0004 // 0000-0000-0000-0100
195 +#define SCI_ENABLE_XMTR 0x0008 // 0000-0000-0000-1000
197 +#define SCI_DISABLE_RCVR 0xFFFB // 1111-1111-1111-1011
198 +#define SCI_DISABLE_XMTR 0xFFF7 // 1111-1111-1111-0111
200 +#define SCI_ENABLE_INT_IDLE 0x0010 // 0000-0000-0001-0000
201 +#define SCI_ENABLE_INT_RX 0x0020 // 0000-0000-0010-0000
202 +#define SCI_ENABLE_INT_TX_DONE 0x0040 // 0000-0000-0100-0000
203 +#define SCI_ENABLE_INT_TX 0x0080 // 0000-0000-1000-0000
205 +#define SCI_DISABLE_INT_ALL 0xFF00 // 1111-1111-0000-0000 ???
207 +#define SCI_DISABLE_INT_RX 0xFFDF // 1111-1111-1101-1111
208 +#define SCI_CLEAR_RX_INT 0xFFBF // 1111-1111-1011-1111
209 +#define SCI_DISABLE_INT_TX 0xFF7F // 1111-1111-0111-1111
210 +#define SCI_CLEAR_TDRE 0xFEFF // 1111-1110-1111-1111
212 +#define SCI_RCVR_WAKE_ON_MARK 0x0100 // 0000-0001-0000-0000
213 +#define SCI_9_DATA_BITS 0x0200 // 0000-0010-0000-0000
214 +#define SCI_PARITY_ENABLE 0x0400 // 0000-0100-0000-0000
215 +#define SCI_PARITY_ODD 0x0800 // 0000-1000-0000-0000
217 +#define SCI_RCVR_WAKE_ON_IDLE 0xFEFF // 1111-1110-1111-1111
218 +#define SCI_8_DATA_BITS 0xFDFF // 1111-1101-1111-1111
219 +#define SCI_PARITY_DISABLE 0xFBFF // 1111-1011-1111-1111
220 +#define SCI_PARITY_EVEN 0xF7FF // 1111-0111-1111-1111
222 +#define SCI_PARITY_NONE 0xF3FF // 1111-0011-1111-1111
224 +#define SCI_IDLE_LINE_LONG 0x1000 // 0001-0000-0000-0000
225 +#define SCI_TXD_OPEN_DRAIN 0x2000 // 0010-0000-0000-0000
226 +#define SCI_LOOPBACK_MODE 0x4000 // 0100-0000-0000-0000
227 +#define SCI_SCCR1_UNUSED 0x8000 // 1000-0000-0000-0000
230 +// SCI Status Register (SCSR) $FFFC0C
232 +// 8 4 2 1 - 8 4 2 1 - 8 4 2 1 - 8 4 2 1
233 +// ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
234 +// | | | | | | | | | | | | | | | |
235 +// | | | | | | | | | | | | | | | +----- 0 PF - parity error
236 +// | | | | | | | | | | | | | | +------- 1 FE - framing error
237 +// | | | | | | | | | | | | | +--------- 2 NF - noise flag
238 +// | | | | | | | | | | | | +----------- 3 OR - overrun flag
239 +// | | | | | | | | | | | |
240 +// | | | | | | | | | | | +--------------- 4 IDLE - idle line detected
241 +// | | | | | | | | | | +----------------- 5 RAF - rcvr active flag
242 +// | | | | | | | | | +------------------- 6 RDRF - rcv data reg full
243 +// | | | | | | | | +--------------------- 7 TC - xmt complete flag
245 +// | | | | | | | +------------------------- 8 TDRE - xmt data reg empty
246 +// | | | | | | +--------------------------- 9 always zero
247 +// | | | | | +----------------------------- 10 always zero
248 +// | | | | +------------------------------- 11 always zero
250 +// | | | +----------------------------------- 12 always zero
251 +// | | +------------------------------------- 13 always zero
252 +// | +--------------------------------------- 14 always zero
253 +// +----------------------------------------- 15 always zero
255 +// 0 0 0 0 - 0 0 0 1 - 1 0 0 0 - 0 0 0 0 reset value
257 +#define SCI_ERROR_PARITY 0x0001 // 0000-0000-0000-0001
258 +#define SCI_ERROR_FRAMING 0x0002 // 0000-0000-0000-0010
259 +#define SCI_ERROR_NOISE 0x0004 // 0000-0000-0000-0100
260 +#define SCI_ERROR_OVERRUN 0x0008 // 0000-0000-0000-1000
262 +#define SCI_IDLE_LINE 0x0010 // 0000-0000-0001-0000
263 +#define SCI_RCVR_ACTIVE 0x0020 // 0000-0000-0010-0000
264 +#define SCI_RCVR_READY 0x0040 // 0000-0000-0100-0000
265 +#define SCI_XMTR_IDLE 0x0080 // 0000-0000-1000-0000
267 +#define SCI_CLEAR_RX_INT 0xFFBF // 1111-1111-1011-1111
269 +#define SCI_XMTR_READY 0x0100 // 0000-0001-0000-0000
271 +#define SCI_CLEAR_TDRE 0xFEFF // 1111-1110-1111-1111
273 +#define SCI_XMTR_AVAILABLE 0x0180 // 0000-0001-1000-0000
277 +/*******************************************************************************
278 + Function prototypes
279 +*******************************************************************************/
285 +// look at console_open to see how this is called
287 +const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled );
291 +//rtems_isr SciIsr( rtems_vector_number vector );
293 +//int32_t SciOpenPolled ( int32_t major, int32_t minor, void *arg );
294 +//int32_t SciOpenInterrupt ( int32_t major, int32_t minor, void *arg );
296 +//int32_t SciClose ( int32_t major, int32_t minor, void *arg );
298 +//int32_t SciWritePolled ( int32_t minor, const char *buf, int32_t len );
299 +//int32_t SciWriteInterrupt( int32_t minor, const char *buf, int32_t len );
301 +//int32_t SciReadPolled ( int32_t minor );
303 +//int32_t SciSetAttributes ( int32_t minor, const struct termios *t );
310 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM
311 ===================================================================
313 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/linkcmds_ROM
317 + * $Id: linkcmds_ROM,v 1.3 2004/11/26 01:54:51 joel Exp $
321 +STARTUP(except_vect_332_ROM.o)
326 + * +--------------------+ <- low memory
329 + * | ctor list | the ctor and dtor lists are for
330 + * | dtor list | C++ support
332 + * | temporary .data | .data is moved to RAM by crt0
334 + * +--------------------+ <- high memory
338 + * +--------------------+ <- low memory
339 + * | .data | initialized data goes here
342 + * +--------------------+
344 + * | __bss_start | start of bss, cleared by crt0
345 + * | _end | start of heap, used by sbrk()
346 + * +--------------------+
350 + * | __stack | top of stack
351 + * +--------------------+ <- high memory
356 + rom : ORIGIN = 0x90000, LENGTH = 0x70000
357 + ram : ORIGIN = 0x03000, LENGTH = 0x7d000
360 +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x003000;
361 +_RamSize = DEFINED(_RamSize) ? _RamSize : 0x7d000;
362 +_RamEnd = _RamBase + _RamSize;
364 +__end_of_ram = 0x080000;
365 +_copy_data_from_rom = 1;
366 +_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
367 +_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
377 + CREATE_OBJECT_SYMBOLS
385 + * Initialization and finalization code.
387 + * Various files can provide initialization and finalization
388 + * functions. crtbegin.o and crtend.o are two instances. The
389 + * body of these functions are in .init and .fini sections. We
390 + * accumulate the bodies here, and prepend function prologues
391 + * from crti.o and function epilogues from crtn.o. crti.o must
392 + * be linked first; crtn.o must be linked last. Because these
393 + * are wildcards, it doesn't matter if the user does not
394 + * actually link against crti.o and crtn.o; the linker won't
395 + * look for a file to match a wildcard. The wildcard also
396 + * means that it doesn't matter which directory crti.o and
399 + PROVIDE (_init = .);
403 + PROVIDE (_fini = .);
409 + * Special FreeBSD sysctl sections.
412 + __start_set_sysctl_set = .;
414 + __stop_set_sysctl_set = ABSOLUTE(.);
419 + * C++ constructors/destructors
421 + * gcc uses crtbegin.o to find the start of the constructors
422 + * and destructors so we make sure it is first. Because this
423 + * is a wildcard, it doesn't matter if the user does not
424 + * actually link against crtbegin.o; the linker won't look for
425 + * a file to match a wildcard. The wildcard also means that
426 + * it doesn't matter which directory crtbegin.o is in. The
427 + * constructor and destructor list are terminated in
428 + * crtend.o. The same comments apply to it.
431 + *crtbegin.o(.ctors)
434 + *crtbegin.o(.dtors)
445 + _rodata_start = . ;
447 + *(.gnu.linkonce.r*)
449 + etext = ALIGN(0x10);
451 + LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
456 + LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
466 + AT ( ADDR(.text) + SIZEOF( .text ) )
477 + *(.gnu.linkonce.d*)
478 + *(.gcc_except_table)
482 + edata = ALIGN(0x10);
491 + __bss_start = ALIGN(0x8);
497 + *(.bss .bss.* .gnu.linkonce.b.*)
502 + __end = ALIGN(0x8);
504 + _WorkspaceBase = . + _StackSize;
510 + .stabstr . (NOLOAD) :
515 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/startup/except_vect_332_ROM.S
516 ===================================================================
518 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/except_vect_332_ROM.S
521 + * $Id: except_vect_332_ROM.S,v 1.3 2004/04/21 16:01:35 ralf Exp $
524 +/* Exception Vector definitions follow */
526 + /* !!! Warning !!! This table is not tested, and
527 + the user must make sure it is complete. */
529 + /* If we use TRAP #15 for reboot, note that group 0 and 1 exceptions
530 + will have priority. */
532 + /* This is the "magic word" that CPU32bug uses to indicate that
533 + there is a bootable image here. */
536 + /* Vector 0: RESET: Initial SSP */
538 + /* Vector 1: RESET: Initial PC */
541 + /* default action for undefined vectors is to re-boot */
543 + /* Note group 0 and 1 exception (like trace) have priority
544 + over other exceptions (like trap #15) that may call this. */
546 + /* Vectors 2-255 */
547 + .long reboot /* exception vector: 2 */
548 + .long reboot /* exception vector: 3 */
549 + .long reboot /* exception vector: 4 */
550 + .long reboot /* exception vector: 5 */
551 + .long reboot /* exception vector: 6 */
552 + .long reboot /* exception vector: 7 */
553 + .long reboot /* exception vector: 8 */
554 + .long reboot /* exception vector: 9 */
555 + .long reboot /* exception vector: 10 */
556 + .long reboot /* exception vector: 11 */
557 + .long reboot /* exception vector: 12 */
558 + .long reboot /* exception vector: 13 */
559 + .long reboot /* exception vector: 14 */
560 + .long reboot /* exception vector: 15 */
561 + .long reboot /* exception vector: 16 */
562 + .long reboot /* exception vector: 17 */
563 + .long reboot /* exception vector: 18 */
564 + .long reboot /* exception vector: 19 */
565 + .long reboot /* exception vector: 20 */
566 + .long reboot /* exception vector: 21 */
567 + .long reboot /* exception vector: 22 */
568 + .long reboot /* exception vector: 23 */
569 + .long reboot /* exception vector: 24 */
570 + .long reboot /* exception vector: 25 */
571 + .long reboot /* exception vector: 26 */
572 + .long reboot /* exception vector: 27 */
573 + .long reboot /* exception vector: 28 */
574 + .long reboot /* exception vector: 29 */
575 + .long reboot /* exception vector: 30 */
576 + .long reboot /* exception vector: 31 */
577 + .long reboot /* exception vector: 32 */
578 + .long reboot /* exception vector: 33 */
579 + .long reboot /* exception vector: 34 */
580 + .long reboot /* exception vector: 35 */
581 + .long reboot /* exception vector: 36 */
582 + .long reboot /* exception vector: 37 */
583 + .long reboot /* exception vector: 38 */
584 + .long reboot /* exception vector: 39 */
585 + .long reboot /* exception vector: 40 */
586 + .long reboot /* exception vector: 41 */
587 + .long reboot /* exception vector: 42 */
588 + .long reboot /* exception vector: 43 */
589 + .long reboot /* exception vector: 44 */
590 + .long reboot /* exception vector: 45 */
591 + .long reboot /* exception vector: 46 */
592 + .long _reboot /* the reboot trap: 47 */
593 + .long reboot /* exception vector: 48 */
594 + .long reboot /* exception vector: 49 */
595 + .long reboot /* exception vector: 50 */
596 + .long reboot /* exception vector: 51 */
597 + .long reboot /* exception vector: 52 */
598 + .long reboot /* exception vector: 53 */
599 + .long reboot /* exception vector: 54 */
600 + .long reboot /* exception vector: 55 */
601 + .long reboot /* exception vector: 56 */
602 + .long reboot /* exception vector: 57 */
603 + .long reboot /* exception vector: 58 */
604 + .long reboot /* exception vector: 59 */
605 + .long reboot /* exception vector: 60 */
606 + .long reboot /* exception vector: 61 */
607 + .long reboot /* exception vector: 62 */
608 + .long reboot /* exception vector: 63 */
609 + .long reboot /* exception vector: 64 */
610 + .long reboot /* exception vector: 65 */
611 + .long reboot /* exception vector: 66 */
612 + .long reboot /* exception vector: 67 */
613 + .long reboot /* exception vector: 68 */
614 + .long reboot /* exception vector: 69 */
615 + .long reboot /* exception vector: 70 */
616 + .long reboot /* exception vector: 71 */
617 + .long reboot /* exception vector: 72 */
618 + .long reboot /* exception vector: 73 */
619 + .long reboot /* exception vector: 74 */
620 + .long reboot /* exception vector: 75 */
621 + .long reboot /* exception vector: 76 */
622 + .long reboot /* exception vector: 77 */
623 + .long reboot /* exception vector: 78 */
624 + .long reboot /* exception vector: 79 */
625 + .long reboot /* exception vector: 80 */
626 + .long reboot /* exception vector: 81 */
627 + .long reboot /* exception vector: 82 */
628 + .long reboot /* exception vector: 83 */
629 + .long reboot /* exception vector: 84 */
630 + .long reboot /* exception vector: 85 */
631 + .long reboot /* exception vector: 86 */
632 + .long reboot /* exception vector: 87 */
633 + .long reboot /* exception vector: 88 */
634 + .long reboot /* exception vector: 89 */
635 + .long reboot /* exception vector: 90 */
636 + .long reboot /* exception vector: 91 */
637 + .long reboot /* exception vector: 92 */
638 + .long reboot /* exception vector: 93 */
639 + .long reboot /* exception vector: 94 */
640 + .long reboot /* exception vector: 95 */
641 + .long reboot /* exception vector: 96 */
642 + .long reboot /* exception vector: 97 */
643 + .long reboot /* exception vector: 98 */
644 + .long reboot /* exception vector: 99 */
645 + .long reboot /* exception vector: 100 */
646 + .long reboot /* exception vector: 101 */
647 + .long reboot /* exception vector: 102 */
648 + .long reboot /* exception vector: 103 */
649 + .long reboot /* exception vector: 104 */
650 + .long reboot /* exception vector: 105 */
651 + .long reboot /* exception vector: 106 */
652 + .long reboot /* exception vector: 107 */
653 + .long reboot /* exception vector: 108 */
654 + .long reboot /* exception vector: 109 */
655 + .long reboot /* exception vector: 110 */
656 + .long reboot /* exception vector: 111 */
657 + .long reboot /* exception vector: 112 */
658 + .long reboot /* exception vector: 113 */
659 + .long reboot /* exception vector: 114 */
660 + .long reboot /* exception vector: 115 */
661 + .long reboot /* exception vector: 116 */
662 + .long reboot /* exception vector: 117 */
663 + .long reboot /* exception vector: 118 */
664 + .long reboot /* exception vector: 119 */
665 + .long reboot /* exception vector: 120 */
666 + .long reboot /* exception vector: 121 */
667 + .long reboot /* exception vector: 122 */
668 + .long reboot /* exception vector: 123 */
669 + .long reboot /* exception vector: 124 */
670 + .long reboot /* exception vector: 125 */
671 + .long reboot /* exception vector: 126 */
672 + .long reboot /* exception vector: 127 */
673 + .long reboot /* exception vector: 128 */
674 + .long reboot /* exception vector: 129 */
675 + .long reboot /* exception vector: 130 */
676 + .long reboot /* exception vector: 131 */
677 + .long reboot /* exception vector: 132 */
678 + .long reboot /* exception vector: 133 */
679 + .long reboot /* exception vector: 134 */
680 + .long reboot /* exception vector: 135 */
681 + .long reboot /* exception vector: 136 */
682 + .long reboot /* exception vector: 137 */
683 + .long reboot /* exception vector: 138 */
684 + .long reboot /* exception vector: 139 */
685 + .long reboot /* exception vector: 140 */
686 + .long reboot /* exception vector: 141 */
687 + .long reboot /* exception vector: 142 */
688 + .long reboot /* exception vector: 143 */
689 + .long reboot /* exception vector: 144 */
690 + .long reboot /* exception vector: 145 */
691 + .long reboot /* exception vector: 146 */
692 + .long reboot /* exception vector: 147 */
693 + .long reboot /* exception vector: 148 */
694 + .long reboot /* exception vector: 149 */
695 + .long reboot /* exception vector: 150 */
696 + .long reboot /* exception vector: 151 */
697 + .long reboot /* exception vector: 152 */
698 + .long reboot /* exception vector: 153 */
699 + .long reboot /* exception vector: 154 */
700 + .long reboot /* exception vector: 155 */
701 + .long reboot /* exception vector: 156 */
702 + .long reboot /* exception vector: 157 */
703 + .long reboot /* exception vector: 158 */
704 + .long reboot /* exception vector: 159 */
705 + .long reboot /* exception vector: 160 */
706 + .long reboot /* exception vector: 161 */
707 + .long reboot /* exception vector: 162 */
708 + .long reboot /* exception vector: 163 */
709 + .long reboot /* exception vector: 164 */
710 + .long reboot /* exception vector: 165 */
711 + .long reboot /* exception vector: 166 */
712 + .long reboot /* exception vector: 167 */
713 + .long reboot /* exception vector: 168 */
714 + .long reboot /* exception vector: 169 */
715 + .long reboot /* exception vector: 170 */
716 + .long reboot /* exception vector: 171 */
717 + .long reboot /* exception vector: 172 */
718 + .long reboot /* exception vector: 173 */
719 + .long reboot /* exception vector: 174 */
720 + .long reboot /* exception vector: 175 */
721 + .long reboot /* exception vector: 176 */
722 + .long reboot /* exception vector: 177 */
723 + .long reboot /* exception vector: 178 */
724 + .long reboot /* exception vector: 179 */
725 + .long reboot /* exception vector: 180 */
726 + .long reboot /* exception vector: 181 */
727 + .long reboot /* exception vector: 182 */
728 + .long reboot /* exception vector: 183 */
729 + .long reboot /* exception vector: 184 */
730 + .long reboot /* exception vector: 185 */
731 + .long reboot /* exception vector: 186 */
732 + .long reboot /* exception vector: 187 */
733 + .long reboot /* exception vector: 188 */
734 + .long reboot /* exception vector: 189 */
735 + .long reboot /* exception vector: 190 */
736 + .long reboot /* exception vector: 191 */
737 + .long reboot /* exception vector: 192 */
738 + .long reboot /* exception vector: 193 */
739 + .long reboot /* exception vector: 194 */
740 + .long reboot /* exception vector: 195 */
741 + .long reboot /* exception vector: 196 */
742 + .long reboot /* exception vector: 197 */
743 + .long reboot /* exception vector: 198 */
744 + .long reboot /* exception vector: 199 */
745 + .long reboot /* exception vector: 200 */
746 + .long reboot /* exception vector: 201 */
747 + .long reboot /* exception vector: 202 */
748 + .long reboot /* exception vector: 203 */
749 + .long reboot /* exception vector: 204 */
750 + .long reboot /* exception vector: 205 */
751 + .long reboot /* exception vector: 206 */
752 + .long reboot /* exception vector: 207 */
753 + .long reboot /* exception vector: 208 */
754 + .long reboot /* exception vector: 209 */
755 + .long reboot /* exception vector: 210 */
756 + .long reboot /* exception vector: 211 */
757 + .long reboot /* exception vector: 212 */
758 + .long reboot /* exception vector: 213 */
759 + .long reboot /* exception vector: 214 */
760 + .long reboot /* exception vector: 215 */
761 + .long reboot /* exception vector: 216 */
762 + .long reboot /* exception vector: 217 */
763 + .long reboot /* exception vector: 218 */
764 + .long reboot /* exception vector: 219 */
765 + .long reboot /* exception vector: 220 */
766 + .long reboot /* exception vector: 221 */
767 + .long reboot /* exception vector: 222 */
768 + .long reboot /* exception vector: 223 */
769 + .long reboot /* exception vector: 224 */
770 + .long reboot /* exception vector: 225 */
771 + .long reboot /* exception vector: 226 */
772 + .long reboot /* exception vector: 227 */
773 + .long reboot /* exception vector: 228 */
774 + .long reboot /* exception vector: 229 */
775 + .long reboot /* exception vector: 230 */
776 + .long reboot /* exception vector: 231 */
777 + .long reboot /* exception vector: 232 */
778 + .long reboot /* exception vector: 233 */
779 + .long reboot /* exception vector: 234 */
780 + .long reboot /* exception vector: 235 */
781 + .long reboot /* exception vector: 236 */
782 + .long reboot /* exception vector: 237 */
783 + .long reboot /* exception vector: 238 */
784 + .long reboot /* exception vector: 239 */
785 + .long reboot /* exception vector: 240 */
786 + .long reboot /* exception vector: 241 */
787 + .long reboot /* exception vector: 242 */
788 + .long reboot /* exception vector: 243 */
789 + .long reboot /* exception vector: 244 */
790 + .long reboot /* exception vector: 245 */
791 + .long reboot /* exception vector: 246 */
792 + .long reboot /* exception vector: 247 */
793 + .long reboot /* exception vector: 248 */
794 + .long reboot /* exception vector: 249 */
795 + .long reboot /* exception vector: 250 */
796 + .long reboot /* exception vector: 251 */
797 + .long reboot /* exception vector: 252 */
798 + .long reboot /* exception vector: 253 */
799 + .long reboot /* exception vector: 254 */
800 + .long reboot /* exception vector: 255 */
803 + move #0x2700,%sr /* mask interrupts */
804 + movea.l (0x0).w,%a7 /* load stack */
805 + movea.l (0x4).w,%a0 /* jmp to location of reset vector */
809 + trap #15 /* use trap exception to enter supervisor
810 + state. Trace mode ( and other group 0
811 + and 1 exceptions) *could* screw this up if
812 + not vectored to reboot or did not return. */
813 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/console/console.c
814 ===================================================================
816 +++ rtems/c/src/lib/libbsp/m68k/mo376/console/console.c
819 + * This file contains the generic console driver shell used
820 + * by all console drivers using libchip.
822 + * This driver uses the termios pseudo driver.
824 + * COPYRIGHT (c) 1989-1997.
825 + * On-Line Applications Research Corporation (OAR).
827 + * The license and distribution terms for this file may be
828 + * found in the file LICENSE in this distribution or at
829 + * http://www.rtems.com/license/LICENSE.
831 + * $Id: console.c,v 1.7 2004/04/21 16:01:35 ralf Exp $
835 +#include <rtems/libio.h>
836 +#include <termios.h>
838 +//#include "../../../../../../rtems/c/src/lib/libbsp/m68k/opti/console/duart.h"
839 +//#include "../../../../../../rtems/c/src/lib/libc/libio_.h"
845 + * open a port as a termios console.
847 + * the console is opened in bsp_postdriver_hook() in bsppost.c
851 +rtems_device_driver console_open(
852 + rtems_device_major_number major,
853 + rtems_device_minor_number minor,
857 + rtems_status_code status;
859 + /* the console is opened three times at startup */
860 + /* for standard input, output, and error */
862 + /* Get correct callback structure for the device */
864 + /* argument of FALSE gives us interrupt driven serial io */
865 + /* argument of TRUE gives us polling based serial io */
867 + /* SCI internal uart */
869 + status = rtems_termios_open( major, minor, arg, SciGetTermiosHandlers( TRUE ) );
878 + * This routine closes a port that has been opened as console.
881 +rtems_device_driver console_close(
882 + rtems_device_major_number major,
883 + rtems_device_minor_number minor,
887 + return rtems_termios_close (arg);
894 + * This routine uses the termios driver to read a character.
897 +rtems_device_driver console_read(
898 + rtems_device_major_number major,
899 + rtems_device_minor_number minor,
903 + return rtems_termios_read (arg);
910 + * this routine uses the termios driver to write a character.
913 +rtems_device_driver console_write(
914 + rtems_device_major_number major,
915 + rtems_device_minor_number minor,
919 + return rtems_termios_write (arg);
926 + * this routine uses the termios driver to process io
929 +rtems_device_driver console_control(
930 + rtems_device_major_number major,
931 + rtems_device_minor_number minor,
935 + return rtems_termios_ioctl (arg);
940 + * console_initialize
942 + * Routine called to initialize the console device driver.
945 +rtems_device_driver console_initialize(
946 + rtems_device_major_number major,
947 + rtems_device_minor_number minor_arg,
951 + rtems_status_code status;
954 + * initialize the termio interface.
956 + rtems_termios_initialize();
959 + * register the SCI device name for termios
960 + * do this over in the sci driver init routine?
963 + status = rtems_io_register_name( "/dev/sci", major, 0 );
965 + if (status != RTEMS_SUCCESSFUL)
967 + rtems_fatal_error_occurred(status);
971 + * Link the uart device to the console device
975 + status = rtems_io_register_name( "/dev/console", major, 0 );
977 + if (status != RTEMS_SUCCESSFUL)
979 + rtems_fatal_error_occurred(status);
982 + if ( link( "/dev/sci", "/dev/console") < 0 )
984 + rtems_fatal_error_occurred( RTEMS_IO_ERROR );
989 + * Console Initialize Succesful
992 + return RTEMS_SUCCESSFUL;
994 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/.cvsignore
995 ===================================================================
997 +++ rtems/c/src/lib/libbsp/m68k/mo376/.cvsignore
1013 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/start/start.S
1014 ===================================================================
1016 +++ rtems/c/src/lib/libbsp/m68k/mo376/start/start.S
1022 +#include "mrm332.h"
1023 +#include <rtems/asm.h>
1024 +#include <rtems/m68k/sim.h>
1028 + /* Put the header necessary for the modified CPU32bug to automatically
1029 + start up rtems: */
1041 + addl #_StackSize,d0
1045 + /* include in ram_init.S */
1047 + * Initalize the SIM module.
1048 + * The stack pointer is not usable until the RAM chip select lines
1049 + * are configured. The following code must remain inline.
1052 + /* Module Configuration Register */
1053 + /* see section(s) 3.1.3-3.1.6 of the SIM Reference Manual */
1056 + oriw #SAM(0,8,SHEN),d0
1057 + oriw #(MM*SIM_MM),d0
1058 + oriw #SAM(SIM_IARB,0,IARB),d0
1061 + jsr start_c /* Jump to the C startup code */
1067 + /* Synthesizer Control Register */
1068 + /* see section(s) 4.8 */
1069 + /* end include in ram_init.S */
1070 + *SYNCR = (unsigned short int)
1071 + ( SAM(MRM_W,15,VCO) | SAM(0x0,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
1072 + while (! (*SYNCR & SLOCK)); /* protect from clock overshoot */
1073 + /* include in ram_init.S */
1074 + *SYNCR = (unsigned short int)
1075 + ( SAM(MRM_W,15,VCO) | SAM(MRM_X,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
1077 + /* System Protection Control Register */
1078 + /* !!! can only write to once after reset !!! */
1079 + /* see section 3.8.4 of the SIM Reference Manual */
1080 + *SYPCR = (unsigned char)( HME | BME );
1082 + /* Periodic Interrupr Control Register */
1083 + /* see section 3.8.2 of the SIM Reference Manual */
1084 + *PICR = (unsigned short int)
1085 + ( SAM(0,8,PIRQL) | SAM(MRM_PIV,0,PIV) );
1086 + /* ^^^ zero disables interrupt, don't enable here or ram_init will
1087 + be wrong. It's enabled below. */
1089 + /* Periodic Interrupt Timer Register */
1090 + /* see section 3.8.3 of the SIM Reference Manual */
1091 + *PITR = (unsigned short int)( SAM(0x09,0,PITM) );
1092 + /* 1.098mS interrupt, assuming 32.768 KHz input clock */
1095 + /* load values before enabled */
1096 + *PORTC = (unsigned char) 0x0;
1098 + /* Port E and F Data Register */
1099 + /* see section 9 of the SIM Reference Manual */
1100 + *PORTE0 = (unsigned char) 0;
1101 + *PORTF0 = (unsigned char) 0;
1103 + /* Port E and F Data Direction Register */
1104 + /* see section 9 of the SIM Reference Manual */
1105 + *DDRE = (unsigned char) 0xff;
1106 + *DDRF = (unsigned char) 0xfd;
1108 + /* Port E and F Pin Assignment Register */
1109 + /* see section 9 of the SIM Reference Manual */
1110 + *PEPAR = (unsigned char) 0;
1111 + *PFPAR = (unsigned char) 0;
1113 + /* end of SIM initalization code */
1114 + /* end include in ram_init.S */
1117 + * Initialize RAM by copying the .data section out of ROM (if
1118 + * needed) and "zero-ing" the .bss section.
1121 + register char *src = _etext;
1122 + register char *dst = _copy_start;
1124 + if (_copy_data_from_rom)
1125 + /* ROM has data at end of text; copy it. */
1126 + while (dst < _edata)
1130 + for (dst = _clear_start; dst< end; dst++)
1137 + * Initialize vector table.
1140 + m68k_isr_entry *monitors_vector_table;
1142 + m68k_get_vbr(monitors_vector_table);
1144 + M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
1145 + M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
1146 + M68Kvec[ 31 ] = monitors_vector_table[ 31 ]; /* level 7 interrupt */
1147 + M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
1148 + M68Kvec[ 66 ] = monitors_vector_table[ 66 ]; /* user defined */
1150 + m68k_set_vbr(&M68Kvec);
1154 + * Initalize the board.
1156 + Spurious_Initialize();
1160 + * Execute main with arguments argc and agrv.
1162 + boot_card(1,__argv);
1168 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/misc/dotests
1169 ===================================================================
1171 +++ rtems/c/src/lib/libbsp/m68k/mo376/misc/dotests
1175 +# $Id: dotests,v 1.1 2001/05/25 16:28:46 joel Exp $
1179 +find -name MyTests -prune -or -name "*.nxe" -exec cp {} MyTests \;
1181 +stty 1:0:80001cb2:0:3:1c:7f:15:4:5:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 </dev/ttyS1
1182 +/bin/cp /dev/ttyS1 screen &
1185 +( cd MyTests; for f in *nxe; do m68k-elf-gdb ${f} </dev/null; done )
1188 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/include/bsp.h
1189 ===================================================================
1191 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/bsp.h
1195 + * This include file contains all mrm board IO definitions.
1197 + * COPYRIGHT (c) 1989-1999.
1198 + * On-Line Applications Research Corporation (OAR).
1200 + * The license and distribution terms for this file may be
1201 + * found in the file LICENSE in this distribution or at
1202 + * http://www.rtems.com/license/LICENSE.
1204 + * $Id: bsp.h,v 1.13 2005/05/26 05:31:17 ralf Exp $
1214 +#include <bspopts.h>
1217 +#include <rtems/bspIo.h>
1218 +#include <rtems/clockdrv.h>
1219 +#include <rtems/console.h>
1220 +#include <rtems/iosupp.h>
1221 +#include <mrm332.h>
1222 +#include <rtems/m68k/sim.h>
1223 +#include <rtems/m68k/qsm.h>
1226 + * confdefs.h overrides for this BSP:
1227 + * - number of termios serial ports (defaults to 1)
1228 + * - Interrupt stack space is not minimum if defined.
1231 +#define CONSOLE_SCI
1232 +/* #define CONFIGURE_NUMBER_OF_TERMIOS_PORTS 2 */
1233 +/* #define CONFIGURE_INTERRUPT_STACK_MEMORY (TBD * 1024) */
1236 + * Simple spin delay in microsecond units for device drivers.
1237 + * This is very dependent on the clock speed of the target.
1240 +#define rtems_bsp_delay( microseconds ) \
1241 + { register uint32_t _delay=(microseconds); \
1242 + register uint32_t _tmp=123; \
1243 + asm volatile( "0: \
1247 + : "=d" (_tmp), "=d" (_delay) \
1248 + : "0" (_tmp), "1" (_delay) ); \
1253 +extern char _etext[];
1254 +extern char _copy_start[];
1255 +extern char _edata[];
1256 +extern char _clear_start[];
1258 +extern char _copy_data_from_rom[];
1263 +#define STACK_SIZE "#0x800"
1265 +#define STACK_SIZE 0x800
1270 +#define RAW_PUTS(str) \
1271 + { register char *ptr = str; \
1272 + while (*ptr) SCI_output_char(*ptr++); \
1275 +#define RAW_PUTI(n) { \
1276 + register int i, j; \
1279 + for (i=28;i>=0;i -= 4) { \
1280 + j = (n>>i) & 0xf; \
1281 + SCI_output_char( (j>9 ? j-10+'a' : j+'0') ); \
1285 +/* miscellaneous stuff assumed to exist */
1287 +extern rtems_configuration_table BSP_Configuration;
1289 +extern m68k_isr_entry M68Kvec[]; /* vector table address */
1291 +extern int stack_size;
1293 +extern int stack_start;
1296 + * Device Driver Table Entries
1300 + * NOTE: Use the standard Console driver entry
1304 + * NOTE: Use the standard Clock driver entry
1309 +void bsp_cleanup( void );
1311 +m68k_isr_entry set_vector(
1312 + rtems_isr_entry handler,
1313 + rtems_vector_number vector,
1317 +void console_init(void);
1319 +void Spurious_Initialize(void);
1321 +void _UART_flush(void);
1323 +void Clock_exit(void);
1325 +void outbyte(char);
1332 +/* end of include file */
1333 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/misc/interr.c
1334 ===================================================================
1336 +++ rtems/c/src/lib/libbsp/m68k/mo376/misc/interr.c
1339 + * Internal Error Handler
1341 + * COPYRIGHT (c) 1989-1999.
1342 + * On-Line Applications Research Corporation (OAR).
1344 + * The license and distribution terms for this file may be
1345 + * found in the file LICENSE in this distribution or at
1346 + * http://www.rtems.com/license/LICENSE.
1348 + * $Id: interr.c,v 1.3 2004/03/31 04:37:05 ralf Exp $
1351 +#include <rtems/system.h>
1352 +#include <rtems/score/interr.h>
1353 +#include <rtems/score/sysstate.h>
1354 +#include <rtems/score/userext.h>
1358 + * _Internal_error_Occurred
1360 + * This routine will invoke the fatal error handler supplied by the user
1361 + * followed by the the default one provided by the executive. The default
1362 + * error handler assumes no hardware is present to help inform the user
1363 + * of the problem. Halt stores the error code in a known register,
1364 + * disables interrupts, and halts the CPU. If the CPU does not have a
1365 + * halt instruction, it will loop to itself.
1367 + * Input parameters:
1368 + * the_source - what subsystem the error originated in
1369 + * is_internal - if the error was internally generated
1370 + * the_error - fatal error status code
1372 + * Output parameters:
1373 + * As much information as possible is stored in a CPU dependent fashion.
1374 + * See the CPU dependent code for more information.
1376 + * NOTE: The the_error is not necessarily a directive status code.
1380 + * Ugly hack.... _CPU_Fatal_halt() disonnects the bdm. Without this
1381 + * change, the_error is only known only to the cpu :).
1383 + * From "bsp.h" which is not yet available in the arch tree during
1384 + * this phase of install. jsg
1386 +void outbyte(char);
1387 +void bsp_cleanup( void );
1389 +#define RAW_PUTS(str) \
1390 + { register char *ptr = str; \
1391 + while (*ptr) outbyte(*ptr++); \
1394 +#define RAW_PUTI(n) { \
1395 + register int i, j; \
1398 + for (i=28;i>=0;i -= 4) { \
1399 + j = (n>>i) & 0xf; \
1400 + outbyte( (j>9 ? j-10+'a' : j+'0') ); \
1404 +void volatile _Internal_error_Occurred(
1405 + Internal_errors_Source the_source,
1406 + boolean is_internal,
1407 + uint32_t the_error
1411 + Internal_errors_What_happened.the_source = the_source;
1412 + Internal_errors_What_happened.is_internal = is_internal;
1413 + Internal_errors_What_happened.the_error = the_error;
1415 + _User_extensions_Fatal( the_source, is_internal, the_error );
1417 + _System_state_Set( SYSTEM_STATE_FAILED );
1419 + /* try to print error message to outbyte */
1420 + RAW_PUTS("\r\nRTEMS: A fatal error has occured.\r\n");
1421 + RAW_PUTS("RTEMS: fatal error ");
1422 + RAW_PUTI( the_error );
1424 + outbyte( (char)((the_error>>24) & 0xff) );
1425 + outbyte( (char)((the_error>>16) & 0xff) );
1426 + outbyte( (char)((the_error>>8) & 0xff) );
1427 + outbyte( (char)(the_error & 0xff) );
1428 + RAW_PUTS(").\r\n");
1430 + /* configure peripherals for a safe exit */
1433 + _CPU_Fatal_halt( the_error );
1435 + /* will not return from this routine */
1437 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/ChangeLog
1438 ===================================================================
1440 +++ rtems/c/src/lib/libbsp/m68k/mo376/ChangeLog
1442 +2005-05-26 Ralf Corsepius <ralf.corsepius@rtems.org>
1444 + * include/bsp.h: New header guard.
1446 +2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
1448 + * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
1450 +2005-01-05 Ralf Corsepius <ralf.corsepius@rtems.org>
1452 + * console/sci.c: Remove CVS Log.
1454 +2005-01-04 Joel Sherrill <joel@OARcorp.com>
1456 + * console/sci.c: Remove warnings.
1458 +2005-01-02 Ralf Corsepius <ralf.corsepius@rtems.org>
1460 + * Makefile.am: Remove build-variant support.
1462 +2004-11-25 Joel Sherrill <joel@OARcorp.com>
1464 + * startup/linkcmds, startup/linkcmds_ROM: Add new bss sections .bss.*
1465 + and .gnu.linkonce.b*.
1467 +2004-09-24 Ralf Corsepius <ralf_corsepius@rtems.org>
1469 + * configure.ac: Require automake > 1.9.
1471 +2004-04-23 Ralf Corsepius <ralf_corsepius@rtems.org>
1474 + * Makefile.am: Add include/tm27.h, Cosmetics.
1475 + * include/tm27.h: Final cosmetics.
1477 +2004-04-22 Ralf Corsepius <ralf_corsepius@rtems.org>
1479 + * include/bsp.h: Split out tmtest27 support.
1480 + * include/tm27.h: New.
1482 +2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
1485 + * include/bsp.h: Remove MAX_LONG_TEST_DURATION.
1487 +2004-04-21 Ralf Corsepius <ralf_corsepius@rtems.org>
1490 + * include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
1492 +2004-04-03 Ralf Corsepiu <ralf_corsepiu@rtems.org>
1494 + * c/src/lib/libbsp/m68k/mrm332/include/bsp.h,
1495 + c/src/lib/libbsp/m68k/mrm332/start/start.S,
1496 + c/src/lib/libbsp/m68k/mrm332/startup/start_c.c: Include
1497 + <rtems/m68k/sim.h> instead of <sim.h>.
1498 + * c/src/lib/libbsp/m68k/mrm332/include/bsp.h: Include
1499 + <rtems/m68k/qsm.h> instead of <qsm.h>.
1501 +2004-04-02 Ralf Corsepius <ralf_corsepius@rtems.org>
1503 + * start/start.S: Include <rtems/asm.h> instead of <asm.h>.
1505 +2004-04-01 Ralf Corsepius <ralf_corsepius@rtems.org>
1507 + * include/bsp.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
1508 + * include/bsp.h: Include <rtems/console.h> instead of <console.h>.
1509 + * include/bsp.h: Include <rtems/iosupp.h> instead of <iosupp.h>.
1511 +2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
1513 + * clock/ckinit.c, console/sci.c, console/sci.h, include/bsp.h,
1514 + misc/interr.c, startup/bspstart.c, timer/timer.c: Convert to using
1515 + c99 fixed size types.
1517 +2004-02-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1519 + * Makefile.am: Reflect changes to bsp.am.
1520 + Preinstall dist_project_lib*.
1522 +2004-02-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1524 + * Makefile.am: Reflect changes to bsp.am.
1526 +2004-02-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1528 + * Makefile.am: Use CPPASCOMPILE instead of CCASCOMPILE.
1530 +2004-02-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1532 + * Makefile.am: Pickup files from ../../m68k/shared instead of
1533 + ../shared. Reformat.
1535 +2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1537 + * configure.ac: Add nostdinc to AUTOMAKE_OPTIONS.
1539 +2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1541 + * Makefile.am: Don't include subdirs.am.
1543 +2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1545 + * Makefile.am: Fix typo.
1547 +2004-01-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1549 + * Makefile.am: Merge-in clock/Makefile.am, console/Makefile.am,
1550 + spurious/Makefile.am, startup/Makefile.am, timer/Makefile.am,
1551 + wrapup/Makefile.am.
1552 + Use automake compilation rules.
1553 + * clock/Makefile.am, console/Makefile.am, spurious/Makefile.am,
1554 + startup/Makefile.am, timer/Makefile.am, wrapup/Makefile.am:
1556 + * configure.ac: Reflect changes above.
1558 +2004-01-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1560 + * Makefile.am: Add PREINSTALL_DIRS.
1561 + * wrapup/Makefile.am: Reflect changes to libcpu.
1563 +2004-01-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1565 + * wrapup/Makefile.am: Reflect changes to libcpu.
1567 +2004-01-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1569 + * Makefile.am: Re-add dirstamps to PRE/TMPINSTALL_FILES.
1570 + Add PRE/TMPINSTALL_FILES to CLEANFILES.
1571 + * startup/Makefile.am: Ditto.
1573 +2004-01-07 Joel Sherrill <joel@OARcorp.com>
1575 + * times, console/sci.c: Remove efi68k and efi332 references as they are
1576 + no longer in the tree.
1578 +2004-01-07 Joel Sherrill <joel@OARcorp.com>
1580 + * timer/timer.c: Remove efi68k and efi332 references as they are no
1581 + longer in the tree.
1583 +2004-01-07 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1585 + * start/Makefile.am: Remove.
1586 + * Makefile.am: Merge-in start/Makefile.am.
1587 + * configure.ac: Reflect changes above.
1589 +2004-01-05 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1591 + * wrapup/Makefile.am: Eliminate $(LIB).
1592 + Use noinst_DATA to trigger building libbsp.a.
1594 +2003-12-13 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1596 + * start/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
1597 + * startup/Makefile.am: s,${PROJECT_RELEASE}/lib,$(PROJECT_LIB),g.
1599 +2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1601 + * start/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
1602 + * startup/Makefile.am: Use mkdir_p. Remove dirs from PRE/TMPINSTALL_FILES.
1604 +2003-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1606 + * configure.ac: Require automake >= 1.8, autoconf >= 2.59.
1608 +2003-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1610 + * start/Makefile.am: Misc cleanups and fixes.
1611 + * startup/Makefile.am: Misc cleanups and fixes.
1612 + * wrapup/Makefile.am: Misc cleanups and fixes.
1614 +2003-12-03 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1616 + * Makefile.am: Add preinstallation dirstamp support.
1617 + * clock/Makefile.am: Cosmetics.
1618 + * console/Makefile.am: Cosmetics.
1619 + * spurious/Makefile.am: Cosmetics.
1620 + * startup/Makefile.am: Cosmetics.
1621 + * timer/Makefile.am: Cosmetics.
1622 + * wrapup/Makefile.am: Cosmetics.
1624 +2003-12-02 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1626 + * clock/Makefile.am: Remove all-local: $(ARCH).
1627 + * console/Makefile.am: Remove all-local: $(ARCH).
1628 + * spurious/Makefile.am: Remove all-local: $(ARCH).
1629 + * start/Makefile.am: Remove all-local: $(ARCH).
1630 + * startup/Makefile.am: Remove all-local: $(ARCH).
1631 + * timer/Makefile.am: Remove all-local: $(ARCH).
1632 + * wrapup/Makefile.am: Remove all-local: $(ARCH).
1634 +2003-09-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1636 + * Makefile.am: Merge-in include/Makefile.am.
1637 + Reflect changes to bsp.am.
1638 + * include/Makefile.am: Remove.
1639 + * configure.ac: Reflect changes above.
1641 +2003-09-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1643 + * bsp_specs: Remove *lib:.
1645 +2003-09-15 Joel Sherrill <joel@OARcorp.com>
1648 + * startup/bspstart.c, startup/start_c.c: Spurious interrupt handlers
1649 + cannot be installed until RTEMS has initialized the vector table.
1651 +2003-09-04 Joel Sherrill <joel@OARcorp.com>
1653 + * clock/ckinit.c, console/console.c, include/bsp.h, misc/interr.c,
1654 + spurious/spinit.c, startup/bspclean.c, startup/bspstart.c,
1655 + timer/timer.c: URL for license changed.
1657 +2003-08-20 Joel Sherrill <joel@OARcorp.com>
1659 + * console/console.c: Correct copyright statements.
1661 +2003-08-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1663 + * Makefile.am: Reflect having moved aclocal/.
1665 +2003-08-16 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1667 + * Makefile.am: Reflect having moved automake/.
1668 + * clock/Makefile.am: Reflect having moved automake/.
1669 + * console/Makefile.am: Reflect having moved automake/.
1670 + * include/Makefile.am: Reflect having moved automake/.
1671 + * spurious/Makefile.am: Reflect having moved automake/.
1672 + * start/Makefile.am: Reflect having moved automake/.
1673 + * startup/Makefile.am: Reflect having moved automake/.
1674 + * timer/Makefile.am: Reflect having moved automake/.
1675 + * wrapup/Makefile.am: Reflect having moved automake/.
1677 +2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1680 + * startup/Makefile.am: Remove USE_INIT_FINI.
1682 +2003-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1684 + * configure.ac: Use rtems-bugs@rtems.com as bug report email address.
1686 +2003-08-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1689 + * bsp_specs: Remove -D__embedded__ -Asystem(embedded) from cpp.
1690 + Remove cpp, old_cpp (now unused).
1692 +2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1694 + * configure.ac: Remove AC_CONFIG_AUX_DIR.
1696 +2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1698 + * configure.ac: AM_INIT_AUTOMAKE([1.7.2]).
1700 +2003-02-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1702 + * configure.ac: AC_PREREQ(2.57).
1704 +2003-01-20 Duane Gustavus <duane@unt.edu>
1706 + * console/sci.c, include/mrm332.h, startup/linkcmds,
1707 + startup/linkcmds_ROM: Various updates to make this run properly
1710 +2002-12-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1712 + * clock/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1713 + * console/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1714 + * spurious/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1715 + * start/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1716 + * startup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1717 + * timer/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1719 +2002-12-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1721 + * start/Makefile.am: Use install-data-local to install startfile.
1723 +2002-12-10 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1725 + * wrapup/Makefile.am: Don't include @RTEMS_BSP@.cfg.
1727 +2002-11-04 Joel Sherrill <joel@OARcorp.com>
1729 + * console/sci.c, spurious/spinit.c: Removed warnings.
1731 +2002-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1733 + * .cvsignore: Reformat.
1734 + Add autom4te*cache.
1735 + Remove autom4te.cache.
1737 +2002-09-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1739 + * Makefile.am: ACLOCAL_AMFLAGS = -I ../../../../../../aclocal.
1741 +2002-08-21 Joel Sherrill <joel@OARcorp.com>
1743 + * wrapup/Makefile.am: PR217 required that the idle task be moved to
1744 + libcpu so it could be more acutely aware of the CPU model. This
1745 + file was modified to pick up the idle task from there.
1747 +2002-08-21 Joel Sherrill <joel@OARcorp.com>
1749 + * bsp_specs: Added support for -nostdlibs.
1751 +2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1753 + * clock/Makefile.am: Use .$(OBJEXT) instead of .o.
1754 + * console/Makefile.am: Use .$(OBJEXT) instead of .o.
1755 + * spurious/Makefile.am: Use .$(OBJEXT) instead of .o.
1756 + * start/Makefile.am: Use .$(OBJEXT) instead of .o.
1757 + * startup/Makefile.am: Use .$(OBJEXT) instead of .o.
1758 + * timer/Makefile.am: Use .$(OBJEXT) instead of .o.
1759 + * wrapup/Makefile.am: Use .$(OBJEXT) instead of .o.
1761 +2002-08-05 Joel Sherrill <joel@OARcorp.com>
1763 + * Per PR260 eliminate use of make-target-options. This impacted
1764 + RTEMS allowing a distinction between the CPU32 and CPU32+ in the
1765 + SuperCore and required that the m68k optimized memcpy be moved
1767 + * wrapup/Makefile.am: Pick up memcpy.o from libcpu.
1769 +2002-07-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1771 + * start/Makefile.am: Eliminate PGM.
1772 + Add bsplib_DATA = $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o.
1774 +2002-07-19 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1776 + * startup/Makefile.am: Add bsplib_DATA = linkcmds linkcmds_ROM.
1778 +2002-07-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1780 + * wrapup/Makefile.am: Eliminate TMPINSTALL_FILES.
1781 + Remove $(OBJS) from all-local.
1783 +2002-06-29 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1785 + * wrapup/Makefile.am: Remove preinstallation of libbsp.a,
1787 +2001-05-09 Joel Sherrill <joel@OARcorp.com>
1789 + * startup/linkcmds: In support of gcc 3.1, added one of more
1790 + of the sections .jcr, .rodata*, .data.*, .gnu.linkonce.s2.*,
1791 + .gnu.linkonce.sb2.*, and .gnu.linkonce.s.*. Spacing corrections
1792 + and direction of segments to memory regions may also have been
1793 + addressed. This was a sweep across all BSPs.
1795 +2002-03-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1798 + AC_INIT(package,_RTEMS_VERSION,_RTEMS_BUGS).
1799 + AM_INIT_AUTOMAKE([no-define foreign 1.6]).
1800 + * clock/Makefile.am: Remove AUTOMAKE_OPTIONS.
1801 + * Makefile.am: Remove AUTOMAKE_OPTIONS.
1802 + * console/Makefile.am: Remove AUTOMAKE_OPTIONS.
1803 + * include/Makefile.am: Remove AUTOMAKE_OPTIONS.
1804 + * spurious/Makefile.am: Remove AUTOMAKE_OPTIONS.
1805 + * start/Makefile.am: Remove AUTOMAKE_OPTIONS.
1806 + * startup/Makefile.am: Remove AUTOMAKE_OPTIONS.
1807 + * timer/Makefile.am: Remove AUTOMAKE_OPTIONS.
1808 + * wrapup/Makefile.am: Remove AUTOMAKE_OPTIONS.
1810 +2002-02-28 Mike Panetta <ahuitzot@mindspring.com>
1812 + * console/sci.c, console/sci.h,
1813 + console/console.c: Added new SCI driver.
1814 + * start/start.c: Removed file.
1815 + * start/start.S: New file, the asm portion of the updated start code.
1816 + * start/configure.am: Added start.S, removed start.c
1817 + * startup/start_c.c: New file, the C portion of the updated start code. Contains most of the code that was in the old start.c.
1818 + * startup/configure.am: Added start_c.c to C_FILES.
1819 + * include/bsp.h: Added include <rtems/bspIo.h>
1821 +2001-11-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1823 + * configure.ac: Introduce RTEMS_BSP_CONFIGURE.
1825 +2001-10-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1827 + * .cvsignore: Add autom4te.cache for autoconf > 2.52.
1828 + * configure.in: Remove.
1829 + * configure.ac: New file, generated from configure.in by autoupdate.
1831 +2001-09-27 Joel Sherrill <joel@OARcorp.com>
1833 + * include/bsp.h: Renamed delay() to rtems_bsp_delay().
1835 +2001-09-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1837 + * include/Makefile.am: Use 'TMPINSTALL_FILES ='.
1839 +2001-05-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1841 + * configure.in: Add bspopts.h.
1842 + * include/.cvsignore: Add bspopts.h*, stamp-h*.
1843 + * include/Makefile.am: Use *_HEADERS instead of *H_FILES.
1844 + * include/bsp.h: Include bspopts.h.
1846 +2001-05-25 Joel Sherrill <joel@OARcorp.com>
1848 + * clock/Makefile.am, console/Makefile.am, spurious/Makefile.am,
1849 + start/Makefile.am, startup/Makefile.am, timer/Makefile.am,
1850 + wrapup/Makefile.am: Modified to include compile.am.
1851 + * startup/bspstart.c: Removed include of <libcsupport.h>
1853 +2000-05-25 Matt Cross <profesor@gweep.net>
1855 + * New MRM332 BSP for the Mini RoboMind board based
1856 + on the 68332 microcontroller designed and build by Mark
1857 + Castelluccio. For details on the MRM see http://www.robominds.com.
1858 + * .cvsignore, ChangeLog Makefile.am, README, bsp_specs,
1859 + clock/.cvsignore, clock/Makefile.am, clock/ckinit.c, configure.in,
1860 + console/.cvsignore, console/Makefile.am, console/console.c,
1861 + include/.cvsignore, include/Makefile.am, include/bsp.h,
1862 + include/mrm332.h, misc/dotests, misc/gdbinit68, misc/interr.c,
1863 + spurious/.cvsignore, spurious/Makefile.am, spurious/spinit.c,
1864 + start/.cvsignore, start/Makefile.am, start/start.c, startup/.cvsignore,
1865 + startup/Makefile.am, startup/bspclean.c, startup/bspstart.c,
1866 + startup/except_vect_332_ROM.S, startup/linkcmds, startup/linkcmds_ROM,
1867 + timer/.cvsignore, timer/Makefile.am, timer/timer.c, times,
1868 + wrapup/.cvsignore, wrapup/Makefile.am: Initial files.
1870 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/startup/bspclean.c
1871 ===================================================================
1873 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/bspclean.c
1877 + * This routine cleans up in the sense that it places the board
1878 + * in a safe state and flushes the I/O buffers before exiting.
1884 + * COPYRIGHT (c) 1989-1999.
1885 + * On-Line Applications Research Corporation (OAR).
1887 + * The license and distribution terms for this file may be
1888 + * found in the file LICENSE in this distribution or at
1889 + * http://www.rtems.com/license/LICENSE.
1891 + * $Id: bspclean.c,v 1.4 2004/04/21 10:42:52 ralf Exp $
1896 +void bsp_cleanup(void)
1898 + /* interrupt driven stdio must be flushed */
1899 + _CPU_ISR_Set_level( 7 );
1902 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/timer/timer.c
1903 ===================================================================
1905 +++ rtems/c/src/lib/libbsp/m68k/mo376/timer/timer.c
1909 + * This routine is not implemented for this BSP.
1911 + * Input parameters: NONE
1913 + * Output parameters: NONE
1915 + * NOTE: It is important that the timer start/stop overhead be
1916 + * determined when porting or modifying this code.
1918 + * COPYRIGHT (c) 1989-1999.
1919 + * On-Line Applications Research Corporation (OAR).
1921 + * The license and distribution terms for this file may be
1922 + * found in the file LICENSE in this distribution or at
1923 + * http://www.rtems.com/license/LICENSE.
1925 + * $Id: timer.c,v 1.6 2004/04/21 16:01:35 ralf Exp $
1930 +rtems_boolean Timer_driver_Find_average_overhead;
1932 +extern rtems_isr Clock_isr();
1934 +void Timer_initialize( void )
1939 + * The following controls the behavior of Read_timer().
1941 + * FIND_AVG_OVERHEAD * instructs the routine to return the "raw" count.
1943 + * AVG_OVEREHAD is the overhead for starting and stopping the timer. It
1944 + * is usually deducted from the number returned.
1946 + * LEAST_VALID is the lowest number this routine should trust. Numbers
1947 + * below this are "noise" and zero is returned.
1950 +#define AVG_OVERHEAD 0 /* It typically takes X.X microseconds */
1951 + /* (Y countdowns) to start/stop the timer. */
1952 + /* This value is in microseconds. */
1953 +#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
1956 + * Return timer value in 1/2-microsecond units
1958 +int Read_timer( void )
1963 + if ( Timer_driver_Find_average_overhead == 1 )
1964 + return total; /* in XXX microsecond units */
1966 + if ( total < LEAST_VALID )
1967 + return 0; /* below timer resolution */
1969 + return (total - AVG_OVERHEAD);
1973 + * Empty function call used in loops to measure basic cost of looping
1974 + * in Timing Test Suite.
1977 +rtems_status_code Empty_function(void)
1979 + return RTEMS_SUCCESSFUL;
1982 +void Set_find_average_overhead(
1983 + rtems_boolean find_flag
1986 + Timer_driver_Find_average_overhead = find_flag;
1988 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c
1989 ===================================================================
1991 +++ rtems/c/src/lib/libbsp/m68k/mo376/clock/ckinit.c
1995 + * This routine initailizes the periodic interrupt timer on
1996 + * the Motorola 68332.
1998 + * Input parameters: NONE
2000 + * Output parameters: NONE
2002 + * COPYRIGHT (c) 1989-1999.
2003 + * On-Line Applications Research Corporation (OAR).
2005 + * The license and distribution terms for this file may be
2006 + * found in the file LICENSE in this distribution or at
2007 + * http://www.rtems.com/license/LICENSE.
2009 + * $Id: ckinit.c,v 1.5 2004/04/21 10:42:52 ralf Exp $
2012 +#include <stdlib.h>
2014 +#include <rtems/libio.h>
2015 +#include <mrm332.h>
2017 +#define CLOCK_VECTOR MRM_PIV
2019 +uint32_t Clock_isrs; /* ISRs until next tick */
2020 +volatile uint32_t Clock_driver_ticks;
2021 + /* ticks since initialization */
2022 +rtems_isr_entry Old_ticker;
2024 +void Clock_exit( void );
2027 + * These are set by clock driver during its init
2030 +rtems_device_major_number rtems_clock_major = ~0;
2031 +rtems_device_minor_number rtems_clock_minor;
2033 +rtems_isr Clock_isr(rtems_vector_number vector)
2035 + Clock_driver_ticks += 1;
2037 + if ( Clock_isrs == 1 ) {
2038 + rtems_clock_tick();
2039 + Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
2045 +void Install_clock(
2046 + rtems_isr_entry clock_isr
2049 + Clock_driver_ticks = 0;
2050 + Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
2052 + Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
2054 + /* enable 1mS interrupts */
2055 + *PITR = (unsigned short int)( SAM(0x09,0,PITM) );/* load counter */
2056 + *PICR = (unsigned short int) /* enable interrupt */
2057 + ( SAM(ISRL_PIT,8,PIRQL) | SAM(CLOCK_VECTOR,0,PIV) );
2059 + atexit( Clock_exit );
2062 +void Clock_exit( void )
2064 + /* shutdown the periodic interrupt */
2065 + *PICR = (unsigned short int)
2066 + ( SAM(0,8,PIRQL) | SAM(CLOCK_VECTOR,0,PIV) );
2067 + /* ^^ zero disables interrupt */
2069 + /* do not restore old vector */
2072 +rtems_device_driver Clock_initialize(
2073 + rtems_device_major_number major,
2074 + rtems_device_minor_number minor,
2078 + Install_clock( Clock_isr );
2081 + * make major/minor avail to others such as shared memory driver
2084 + rtems_clock_major = major;
2085 + rtems_clock_minor = minor;
2087 + return RTEMS_SUCCESSFUL;
2090 +rtems_device_driver Clock_control(
2091 + rtems_device_major_number major,
2092 + rtems_device_minor_number minor,
2096 + uint32_t isrlevel;
2097 + rtems_libio_ioctl_args_t *args = pargp;
2103 + * This is hokey, but until we get a defined interface
2104 + * to do this, it will just be this simple...
2107 + if (args->command == rtems_build_name('I', 'S', 'R', ' '))
2109 + Clock_isr(CLOCK_VECTOR);
2111 + else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
2113 + rtems_interrupt_disable( isrlevel );
2114 + (void) set_vector( args->buffer, CLOCK_VECTOR, 1 );
2115 + rtems_interrupt_enable( isrlevel );
2119 + return RTEMS_SUCCESSFUL;
2121 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68
2122 ===================================================================
2124 +++ rtems/c/src/lib/libbsp/m68k/mo376/misc/gdbinit68
2127 +# $Id: gdbinit68,v 1.1 2001/05/25 16:28:46 joel Exp $
2129 +echo Setting up the environment for mrm debuging.\n
2131 +target bdm /dev/bdmcpu320
2134 +set remotecache off
2142 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/configure.ac
2143 ===================================================================
2145 +++ rtems/c/src/lib/libbsp/m68k/mo376/configure.ac
2147 +## Process this file with autoconf to produce a configure script.
2149 +## $Id: configure.ac,v 1.14 2004/09/24 06:32:09 ralf Exp $
2152 +AC_INIT([rtems-c-src-lib-libbsp-m68k-mrm332],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
2153 +AC_CONFIG_SRCDIR([bsp_specs])
2154 +RTEMS_TOP(../../../../../..)
2156 +RTEMS_CANONICAL_TARGET_CPU
2157 +AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.9])
2158 +RTEMS_BSP_CONFIGURE
2160 +RTEMS_PROG_CC_FOR_TARGET
2161 +RTEMS_CANONICALIZE_TOOLS
2164 +# Explicitly list all Makefiles here
2165 +AC_CONFIG_FILES([Makefile])
2167 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/README
2168 ===================================================================
2170 +++ rtems/c/src/lib/libbsp/m68k/mo376/README
2173 +# $Id: README,v 1.1 2001/05/25 16:28:46 joel Exp $
2176 +Description: mrm332
2178 +CPU: MC68332 @16 or 25MHz
2182 + The Mini RoboMind is a small board based on the 68332 microcontroller
2183 +designed and build by Mark Castelluccio. For details, see:
2185 + http://www.robominds.com
2187 + This BSP was ported from the efi332 BSP by Matt Cross (profesor@gweep.net),
2188 +the efi332 BSP was written by John S Gwynne.
2192 +- integrate the interrupt driven stdin/stdout into RTEMS to (a) reduce
2193 + the interrupt priority and (2) to prevent it from blocking.
2194 +- add a timer driver for the tmtest set.
2196 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/Makefile.am
2197 ===================================================================
2199 +++ rtems/c/src/lib/libbsp/m68k/mo376/Makefile.am
2202 +## $Id: Makefile.am,v 1.21 2005/01/07 06:54:44 ralf Exp $
2205 +ACLOCAL_AMFLAGS = -I ../../../../aclocal
2207 +include $(top_srcdir)/../../../../automake/compile.am
2208 +include $(top_srcdir)/../../bsp.am
2210 +dist_project_lib_DATA = bsp_specs
2212 +include_HEADERS = include/bsp.h
2213 +include_HEADERS += include/tm27.h
2215 +nodist_include_HEADERS = include/bspopts.h
2216 +DISTCLEANFILES = include/bspopts.h
2220 +include_HEADERS += include/mrm332.h
2221 +nodist_include_HEADERS += ../../shared/include/coverhd.h
2225 +EXTRA_DIST += start/start.S
2226 +start.$(OBJEXT): start/start.S
2227 + $(CPPASCOMPILE) -DASM -o $@ -c $<
2229 +project_lib_DATA = start.$(OBJEXT)
2231 +dist_project_lib_DATA += startup/linkcmds startup/linkcmds_ROM
2233 +noinst_PROGRAMS += startup.rel
2234 +startup_rel_SOURCES = startup/start_c.c ../../shared/bsplibc.c \
2235 + ../../shared/bsppost.c startup/bspstart.c startup/bspclean.c \
2236 + ../../shared/bootcard.c ../../m68k/shared/m68kpretaskinghook.c \
2237 + ../../shared/main.c ../../shared/sbrk.c ../../m68k/shared/setvec.c \
2238 + ../../shared/gnatinstallhandler.c startup/except_vect_332_ROM.S
2239 +startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
2240 +startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
2242 +noinst_PROGRAMS += clock.rel
2243 +clock_rel_SOURCES = clock/ckinit.c
2244 +clock_rel_CPPFLAGS = $(AM_CPPFLAGS)
2245 +clock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
2247 +noinst_PROGRAMS += console.rel
2248 +console_rel_SOURCES = console/console.c console/sci.c console/sci.h
2249 +console_rel_CPPFLAGS = $(AM_CPPFLAGS)
2250 +console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
2252 +noinst_PROGRAMS += spurious.rel
2253 +spurious_rel_SOURCES = spurious/spinit.c
2254 +spurious_rel_CPPFLAGS = $(AM_CPPFLAGS)
2255 +spurious_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
2257 +noinst_PROGRAMS += timer.rel
2258 +timer_rel_SOURCES = timer/timer.c
2259 +timer_rel_CPPFLAGS = $(AM_CPPFLAGS)
2260 +timer_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
2262 +noinst_LIBRARIES = libbsp.a
2264 +libbsp_a_LIBADD = startup.rel clock.rel console.rel spurious.rel timer.rel
2265 +libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cache.rel \
2266 + ../../../libcpu/@RTEMS_CPU@/shared/misc.rel
2268 +all-local: $(PREINSTALL_FILES) $(TMPINSTALL_FILES)
2274 +$(PROJECT_INCLUDE)/$(dirstamp):
2275 + @$(mkdir_p) $(PROJECT_INCLUDE)
2276 + @: > $(PROJECT_INCLUDE)/$(dirstamp)
2277 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
2279 +$(PROJECT_LIB)/$(dirstamp):
2280 + @$(mkdir_p) $(PROJECT_LIB)
2281 + @: > $(PROJECT_LIB)/$(dirstamp)
2282 +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
2284 +$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
2285 + $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
2286 +PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
2288 +$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
2289 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
2290 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
2292 +$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
2293 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
2294 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
2296 +$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
2297 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
2298 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
2300 +$(PROJECT_INCLUDE)/mrm332.h: include/mrm332.h $(PROJECT_INCLUDE)/$(dirstamp)
2301 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mrm332.h
2302 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/mrm332.h
2304 +$(PROJECT_INCLUDE)/coverhd.h: ../../shared/include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
2305 + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
2306 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
2308 +$(PROJECT_LIB)/start.$(OBJEXT): start.$(OBJEXT) $(PROJECT_LIB)/$(dirstamp)
2309 + $(INSTALL_DATA) $< $(PROJECT_LIB)/start.$(OBJEXT)
2310 +TMPINSTALL_FILES += $(PROJECT_LIB)/start.$(OBJEXT)
2312 +$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
2313 + $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
2314 +PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
2316 +$(PROJECT_LIB)/linkcmds_ROM: startup/linkcmds_ROM $(PROJECT_LIB)/$(dirstamp)
2317 + $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds_ROM
2318 +PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds_ROM
2320 +CLEANFILES = $(PREINSTALL_FILES)
2321 +DISTCLEANFILES += $(PREINSTALL_DIRS)
2322 +CLEANFILES += $(TMPINSTALL_FILES)
2324 +include $(top_srcdir)/../../../../automake/local.am
2325 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/console/sci.c
2326 ===================================================================
2328 +++ rtems/c/src/lib/libbsp/m68k/mo376/console/sci.c
2330 +/*****************************************************************************
2333 +* Desc: This file contains the console IO routines for the SCI port.
2334 +* There are two interfaces in this module. One is for the rtems
2335 +* termios/console code and the other is a device driver interface.
2336 +* This module works together with the termio module which is
2337 +* sometimes referred to as the "line disciplines" which implements
2338 +* terminal i/o processing like tabs, backspaces, and newlines.
2339 +* The rtems printf uses interrupt io and the rtems printk routine
2340 +* uses polled io which is better for debugging.
2342 +* Index: Documentation
2343 +* Section A - Include Files
2344 +* Section B - Manifest Constants
2345 +* Section C - External Data
2346 +* Section D - External Functions
2347 +* Section E - Local Functions
2348 +* Section F - Local Variables
2349 +* Section G - A circular data buffer for rcv chars
2350 +* Section H - RTEMS termios callbacks for the interrupt api
2351 +* Section I - RTEMS termios callbacks for the polled api
2353 +* Section 0 - Miscellaneous routines
2354 +* Section 1 - Routines to manipulate the circular buffer
2355 +* Section 2 - Interrupt based entry points for the termios module
2356 +* Section 3 - Polling based entry points for the termios module
2357 +* Section 4 - Device driver public api entry points
2358 +* Section 5 - Hardware level routines
2359 +* Section 6 - Testing and debugging code
2361 +* Refer: Motorola QSM Reference Manual - Chapter 5 - SCI sub-module
2363 +* Note: See bsp.h,confdefs.h,system.h for installing drivers into RTEMS.
2365 +* $Id: sci.c,v 1.10 2005/01/05 18:12:35 ralf Exp $
2367 +*****************************************************************************/
2370 +/*****************************************************************************
2371 + Compiler Options for the incurably curious
2372 +*****************************************************************************/
2375 +/opt/rtems/bin/m68k-rtems-gcc
2376 + --pipe # use pipes, not tmp files
2377 + -B../../../../../../../../opti/lib/ # where the library is
2378 + -specs bsp_specs # ???
2380 + -g # add debugging info
2381 + -Wall # issue all warnings
2382 + -fasm # allow inline asm???
2383 + -DCONSOLE_SCI # for opti-r box/rev b proto
2384 + -mcpu32 # machine = motorola cpu 32
2385 + -c # compile, don't link
2386 + -O4 # max optimization
2387 + -fomit-frame-pointer # stack frames are optional
2388 + -o o-optimize/sci.o # the object file
2389 + ../../../../../../../../../rtems/c/src/lib/libbsp/m68k/opti/console/sci.c
2393 +/*****************************************************************************
2394 + Overview of serial port console terminal input/output
2395 +*****************************************************************************/
2398 + +-----------+ +---------+
2400 + +-----------+ +---------+
2402 + | (printf,scanf,etc.) |
2409 + | (open,close,read,write,ioctl) |
2410 + ======|==========================================|========================
2411 + | /dev/console | /dev/sci
2412 + | (stdin,stdout,stderr) |
2413 + ======|==========================================|========================
2417 + +-----------+ +-----------+ +---------+
2418 + | console | <---> | termios | <---> | sci |
2419 + | driver | | module | | driver |
2420 + +-----------+ +-----------+ +---------+
2432 +/*****************************************************************************
2433 + Section A - Include Files
2434 +*****************************************************************************/
2438 +#include <rtems/bspIo.h>
2440 +#include <rtems/libio.h>
2441 +#include <libchip/serial.h>
2442 +#include <libchip/sersupp.h>
2444 +//#include "../misc/include/cpu332.h"
2447 +/*****************************************************************************
2448 + Section B - Manifest Constants
2449 +*****************************************************************************/
2451 +#define SCI_MINOR 0 // minor device number
2453 +// IMPORTANT - if the device driver api is opened, it means the sci is being
2454 +// used for direct hardware access, so other users (like termios) get ignored
2456 +#define DRIVER_CLOSED 0 // the device driver api is closed
2457 +#define DRIVER_OPENED 1 // the device driver api is opened
2459 +// system clock definitions, i dont have documentation on this...
2461 +#if 0 // Not needed, this is provided in mrm332.h
2462 +#define XTAL 32768.0 // crystal frequency in Hz
2463 +#define NUMB_W 0 // system clock parameters
2465 +//efine NUMB_Y 0x38 // for 14.942 Mhz
2466 +#define NUMB_Y 0x3F // for 16.777 Mhz
2468 +#define SYS_CLOCK (XTAL * 4.0 * (NUMB_Y+1) * (1 << (2 * NUMB_W + NUMB_X)))
2473 +/*****************************************************************************
2474 + Section C - External Data
2475 +*****************************************************************************/
2479 +/*****************************************************************************
2480 + Section D - External Functions
2481 +*****************************************************************************/
2485 +/*****************************************************************************
2486 + Section E - Local Functions
2487 +*****************************************************************************/
2489 +void SCI_output_char(char c);
2491 +rtems_isr SciIsr( rtems_vector_number vector ); // interrupt handler
2493 +const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled );
2495 +rtems_device_driver SciInitialize (); // device driver api
2496 +rtems_device_driver SciOpen (); // device driver api
2497 +rtems_device_driver SciClose (); // device driver api
2498 +rtems_device_driver SciRead (); // device driver api
2499 +rtems_device_driver SciWrite (); // device driver api
2500 +rtems_device_driver SciControl (); // device driver api
2502 +int32_t SciInterruptOpen(); // termios api
2503 +int32_t SciInterruptClose(); // termios api
2504 +int32_t SciInterruptWrite(); // termios api
2506 +int32_t SciSetAttributes(); // termios api
2508 +int32_t SciPolledOpen(); // termios api
2509 +int32_t SciPolledClose(); // termios api
2510 +int32_t SciPolledRead(); // termios api
2511 +int32_t SciPolledWrite(); // termios api
2513 +static void SciSetBaud(uint32_t rate); // hardware routine
2514 +static void SciSetDataBits(uint16_t bits); // hardware routine
2515 +static void SciSetParity(uint16_t parity); // hardware routine
2517 +static void inline SciDisableAllInterrupts( void ); // hardware routine
2518 +static void inline SciDisableTransmitInterrupts( void );// hardware routine
2519 +static void inline SciDisableReceiveInterrupts( void ); // hardware routine
2521 +static void inline SciEnableTransmitInterrupts( void ); // hardware routine
2522 +static void inline SciEnableReceiveInterrupts( void ); // hardware routine
2524 +static void inline SciDisableReceiver( void ); // hardware routine
2525 +static void inline SciDisableTransmitter( void ); // hardware routine
2527 +static void inline SciEnableReceiver( void ); // hardware routine
2528 +static void inline SciEnableTransmitter( void ); // hardware routine
2530 +void SciWriteCharWait ( uint8_t); // hardware routine
2531 +void SciWriteCharNoWait( uint8_t); // hardware routine
2533 +uint8_t inline SciCharAvailable( void ); // hardware routine
2535 +uint8_t inline SciReadCharWait( void ); // hardware routine
2536 +uint8_t inline SciReadCharNoWait( void ); // hardware routine
2538 +void SciSendBreak( void ); // test routine
2540 +static int8_t SciRcvBufGetChar(); // circular rcv buf
2541 +static void SciRcvBufPutChar( uint8_t); // circular rcv buf
2542 +//atic void SciRcvBufFlush( void ); // circular rcv buf
2544 +void SciUnitTest(); // test routine
2545 +void SciPrintStats(); // test routine
2548 +/*****************************************************************************
2549 + Section F - Local Variables
2550 +*****************************************************************************/
2552 +static struct rtems_termios_tty *SciTermioTty;
2554 +static uint8_t SciInited = 0; // has the driver been inited
2556 +static uint8_t SciOpened; // has the driver been opened
2558 +static uint8_t SciMajor; // major device number
2560 +static uint16_t SciBaud; // current value in baud register
2562 +static uint32_t SciBytesIn = 0; // bytes received
2563 +static uint32_t SciBytesOut = 0; // bytes transmitted
2565 +static uint32_t SciErrorsParity = 0; // error counter
2566 +static uint32_t SciErrorsNoise = 0; // error counter
2567 +static uint32_t SciErrorsFraming = 0; // error counter
2568 +static uint32_t SciErrorsOverrun = 0; // error counter
2570 +#if defined(CONSOLE_SCI)
2572 +// this is what rtems printk uses to do polling based output
2574 +BSP_output_char_function_type BSP_output_char = SCI_output_char;
2575 +BSP_polling_getchar_function_type BSP_poll_char = NULL;
2579 +// cvs id string so you can use the unix ident command on the object
2582 +static const char SciIdent[]="$Id: sci.c,v 1.10 2005/01/05 18:12:35 ralf Exp $";
2586 +/*****************************************************************************
2587 + Section G - A circular buffer for rcv chars when the driver interface is used.
2588 +*****************************************************************************/
2590 +// it is trivial to wrap your buffer pointers when size is a power of two
2592 +#define SCI_RCV_BUF_SIZE 256 // must be a power of 2 !!!
2594 +// if someone opens the sci device using the device driver interface,
2595 +// then the receive data interrupt handler will put characters in this buffer
2596 +// instead of sending them up to the termios module for the console
2598 +static uint8_t SciRcvBuffer[SCI_RCV_BUF_SIZE];
2600 +static uint8_t SciRcvBufPutIndex = 0; // array index to put in next char
2602 +static uint8_t SciRcvBufGetIndex = 0; // array index to take out next char
2604 +static uint16_t SciRcvBufCount = 0; // how many bytes are in the buffer
2608 +/*****************************************************************************
2609 + Section H - RTEMS termios callbacks for the interrupt version of the driver
2610 +*****************************************************************************/
2612 +static const rtems_termios_callbacks SciInterruptCallbacks =
2614 + SciInterruptOpen, // first open
2615 + SciInterruptClose, // last close
2616 + NULL, // polled read (not required)
2617 + SciInterruptWrite, // write
2618 + SciSetAttributes, // set attributes
2619 + NULL, // stop remote xmit
2620 + NULL, // start remote xmit
2621 + TRUE // output uses interrupts
2624 +/*****************************************************************************
2625 + Section I - RTEMS termios callbacks for the polled version of the driver
2626 +*****************************************************************************/
2628 +static const rtems_termios_callbacks SciPolledCallbacks =
2630 + SciPolledOpen, // first open
2631 + SciPolledClose, // last close
2632 + SciPolledRead, // polled read
2633 + SciPolledWrite, // write
2634 + SciSetAttributes, // set attributes
2635 + NULL, // stop remote xmit
2636 + NULL, // start remote xmit
2637 + FALSE // output uses interrupts
2641 +/////////////////////////////////////////////////////////////////////////////
2644 +// MISCELLANEOUS ROUTINES
2646 +/////////////////////////////////////////////////////////////////////////////
2648 +/****************************************************************************
2649 +* Func: SCI_output_char
2650 +* Desc: used by rtems printk function to send a char to the uart
2651 +* Inputs: the character to transmit
2655 +****************************************************************************/
2657 +void SCI_output_char(char c)
2659 +// ( minor device number, pointer to the character, length )
2661 + SciPolledWrite( SCI_MINOR, &c, 1);
2667 +/****************************************************************************
2668 +* Func: SciGetTermiosHandlers
2669 +* Desc: returns a pointer to the table of serial io functions
2670 +* this is called from console_open with polled set to false
2671 +* Inputs: flag indicating whether we want polled or interrupt driven io
2672 +* Outputs: pointer to function table
2675 +****************************************************************************/
2677 +const rtems_termios_callbacks * SciGetTermiosHandlers( int32_t polled )
2681 + return &SciPolledCallbacks; // polling based
2685 + return &SciInterruptCallbacks; // interrupt driven
2690 +/****************************************************************************
2692 +* Desc: interrupt handler for serial communications interface
2693 +* Inputs: vector number - unused
2696 +* Scope: public API
2697 +****************************************************************************/
2699 +rtems_isr SciIsr( rtems_vector_number vector )
2703 + if ( (*SCSR) & SCI_ERROR_PARITY ) SciErrorsParity ++;
2704 + if ( (*SCSR) & SCI_ERROR_FRAMING ) SciErrorsFraming ++;
2705 + if ( (*SCSR) & SCI_ERROR_NOISE ) SciErrorsNoise ++;
2706 + if ( (*SCSR) & SCI_ERROR_OVERRUN ) SciErrorsOverrun ++;
2708 + // see if it was a transmit interrupt
2710 + if ( (*SCSR) & SCI_XMTR_AVAILABLE ) // data reg empty, xmt complete
2712 + SciDisableTransmitInterrupts();
2714 + // tell termios module that the charcter was sent
2715 + // he will call us later to transmit more if there are any
2717 + if (rtems_termios_dequeue_characters( SciTermioTty, 1 ))
2719 + // there are more bytes to transmit so enable TX interrupt
2721 + SciEnableTransmitInterrupts();
2725 + // see if it was a receive interrupt
2726 + // on the sci uart we just get one character per interrupt
2728 + while ( SciCharAvailable() ) // char in data register?
2730 + ch = SciReadCharNoWait(); // get the char from the uart
2733 + // either send it to the termios module or keep it locally
2735 + if ( SciOpened == DRIVER_OPENED ) // the driver is open
2737 + SciRcvBufPutChar(ch); // keep it locally
2739 + else // put in termios buffer
2741 + rtems_termios_enqueue_raw_characters( SciTermioTty, &ch, 1 );
2744 + *SCSR &= SCI_CLEAR_RX_INT; // clear the interrupt
2749 +/////////////////////////////////////////////////////////////////////////////
2752 +// ROUTINES TO MANIPULATE THE CIRCULAR BUFFER
2754 +/////////////////////////////////////////////////////////////////////////////
2756 +/****************************************************************************
2757 +* Func: SciRcvBufGetChar
2758 +* Desc: read a character from the circular buffer
2759 +* make sure there is data before you call this!
2761 +* Outputs: the character or -1
2764 +****************************************************************************/
2766 +static int8_t SciRcvBufGetChar()
2768 + rtems_interrupt_level level;
2771 + if ( SciRcvBufCount == 0 )
2773 + rtems_fatal_error_occurred(0xDEAD); // check the count first!
2776 + rtems_interrupt_disable( level ); // disable interrupts
2778 + ch = SciRcvBuffer[SciRcvBufGetIndex]; // get next byte
2780 + SciRcvBufGetIndex++; // bump the index
2782 + SciRcvBufGetIndex &= SCI_RCV_BUF_SIZE - 1; // and wrap it
2784 + SciRcvBufCount--; // decrement counter
2786 + rtems_interrupt_enable( level ); // restore interrupts
2788 + return ch; // return the char
2792 +/****************************************************************************
2793 +* Func: SciRcvBufPutChar
2794 +* Desc: put a character into the rcv data circular buffer
2795 +* Inputs: the character
2799 +****************************************************************************/
2801 +static void SciRcvBufPutChar( uint8_t ch )
2803 + rtems_interrupt_level level;
2805 + if ( SciRcvBufCount == SCI_RCV_BUF_SIZE ) // is there room?
2807 + return; // no, throw it away
2810 + rtems_interrupt_disable( level ); // disable interrupts
2812 + SciRcvBuffer[SciRcvBufPutIndex] = ch; // put it in the buf
2814 + SciRcvBufPutIndex++; // bump the index
2816 + SciRcvBufPutIndex &= SCI_RCV_BUF_SIZE - 1; // and wrap it
2818 + SciRcvBufCount++; // increment counter
2820 + rtems_interrupt_enable( level ); // restore interrupts
2826 +/****************************************************************************
2827 +* Func: SciRcvBufFlush
2828 +* Desc: completely reset and clear the rcv buffer
2833 +****************************************************************************/
2835 +#if 0 // prevents compiler warning
2836 +static void SciRcvBufFlush( void )
2838 + rtems_interrupt_level level;
2840 + rtems_interrupt_disable( level ); // disable interrupts
2842 + memset( SciRcvBuffer, 0, sizeof(SciRcvBuffer) );
2844 + SciRcvBufPutIndex = 0; // clear
2846 + SciRcvBufGetIndex = 0; // clear
2848 + SciRcvBufCount = 0; // clear
2850 + rtems_interrupt_enable( level ); // restore interrupts
2857 +/////////////////////////////////////////////////////////////////////////////
2860 +// INTERRUPT BASED ENTRY POINTS FOR THE TERMIOS MODULE
2862 +/////////////////////////////////////////////////////////////////////////////
2864 +/****************************************************************************
2865 +* Func: SciInterruptOpen
2866 +* Desc: open routine for the interrupt based device driver
2867 +* Default state is 9600 baud, 8 bits, No parity, and 1 stop bit. ??
2868 +**CHANGED** Default baud rate is now 19200, 8N1
2869 +* called from rtems_termios_open which is called from console_open
2870 +* Inputs: major - device number
2871 +* minor - device number
2872 +* args - points to terminal info
2873 +* Outputs: success/fail
2875 +* Scope: public API
2876 +****************************************************************************/
2878 +int32_t SciInterruptOpen(
2884 + rtems_libio_open_close_args_t * args = arg;
2885 + rtems_isr_entry old_vector;
2887 + if ( minor != SCI_MINOR ) // check minor device num
2892 + if ( !args ) // must have args
2897 + SciTermioTty = args->iop->data1; // save address of struct
2899 + SciDisableAllInterrupts(); // turn off sci interrupts
2901 + // THIS IS ACTUALLY A BAD THING - SETTING LINE PARAMETERS HERE
2902 + // IT SHOULD BE DONE THROUGH TCSETATTR() WHEN THE CONSOLE IS OPENED!!!
2904 +// SciSetBaud(115200); // set the baud rate
2905 +// SciSetBaud( 57600); // set the baud rate
2906 +// SciSetBaud( 38400); // set the baud rate
2907 +SciSetBaud( 19200); // set the baud rate
2908 +// SciSetBaud( 9600); // set the baud rate
2910 + SciSetParity(SCI_PARITY_NONE); // set parity to none
2912 + SciSetDataBits(SCI_8_DATA_BITS); // set data bits to 8
2914 + // Install our interrupt handler into RTEMS, where does 66 come from?
2916 + rtems_interrupt_catch( SciIsr, 66, &old_vector );
2920 + *QILR |= 0x06 & 0x07;
2922 + SciEnableTransmitter(); // enable the transmitter
2924 + SciEnableReceiver(); // enable the receiver
2926 + SciEnableReceiveInterrupts(); // enable rcv interrupts
2928 + return RTEMS_SUCCESSFUL;
2932 +/****************************************************************************
2933 +* Func: SciInterruptClose
2934 +* Desc: close routine called by the termios module
2935 +* Inputs: major - device number
2936 +* minor - device number
2938 +* Outputs: success/fail
2940 +* Scope: public - termio entry point
2941 +****************************************************************************/
2943 +int32_t SciInterruptClose(
2949 + SciDisableAllInterrupts();
2951 + return RTEMS_SUCCESSFUL;
2955 +/****************************************************************************
2956 +* Func: SciInterruptWrite
2957 +* Desc: writes data to the uart using transmit interrupts
2958 +* Inputs: minor - device number
2959 +* buf - points to the data
2960 +* len - number of bytes to send
2961 +* Outputs: success/fail
2963 +* Scope: public API
2964 +****************************************************************************/
2966 +int32_t SciInterruptWrite(
2972 + // We are using interrupt driven output so termios only sends us
2973 + // one character at a time. The sci does not have a fifo.
2975 + if ( !len ) // no data?
2977 + return 0; // return error
2980 + if ( minor != SCI_MINOR ) // check the minor dev num
2982 + return 0; // return error
2985 + if ( SciOpened == DRIVER_OPENED ) // is the driver api open?
2987 + return 1; // yep, throw this away
2990 + SciWriteCharNoWait(*buf); // try to send a char
2992 + *SCSR &= SCI_CLEAR_TDRE; // clear tx data reg empty flag
2994 + SciEnableTransmitInterrupts(); // enable the tx interrupt
2996 + return 1; // return success
3000 +/****************************************************************************
3001 +* Func: SciSetAttributes
3002 +* Desc: setup the uart based on the termios modules requests
3003 +* Inputs: minor - device number
3004 +* t - pointer to the termios info struct
3007 +* Scope: public API
3008 +****************************************************************************/
3010 +int32_t SciSetAttributes(
3012 + const struct termios *t
3015 + uint32_t baud_requested;
3016 + uint32_t sci_rate = 0;
3017 + uint16_t sci_parity = 0;
3018 + uint16_t sci_databits = 0;
3020 + if ( minor != SCI_MINOR ) // check the minor dev num
3022 + return -1; // return error
3025 + // if you look closely you will see this is the only thing we use
3026 + // set the baud rate
3028 + baud_requested = t->c_cflag & CBAUD; // baud rate
3030 + if (!baud_requested)
3032 +// baud_requested = B9600; // default to 9600 baud
3033 + baud_requested = B19200; // default to 19200 baud
3036 + sci_rate = termios_baud_to_number( baud_requested );
3038 + // parity error detection
3040 + if (t->c_cflag & PARENB) // enable parity detection?
3042 + if (t->c_cflag & PARODD)
3044 + sci_parity = SCI_PARITY_ODD; // select odd parity
3048 + sci_parity = SCI_PARITY_EVEN; // select even parity
3053 + sci_parity = SCI_PARITY_NONE; // no parity, most common
3056 + // set the number of data bits, 8 is most common
3058 + if (t->c_cflag & CSIZE) // was it specified?
3060 + switch (t->c_cflag & CSIZE)
3062 + case CS8: sci_databits = SCI_8_DATA_BITS; break;
3063 + default : sci_databits = SCI_9_DATA_BITS; break;
3068 + sci_databits = SCI_8_DATA_BITS; // default to 8 data bits
3071 + // the number of stop bits; always 1 for SCI
3073 + if (t->c_cflag & CSTOPB)
3078 + // setup the hardware with these serial port parameters
3080 + SciSetBaud(sci_rate); // set the baud rate
3082 + SciSetParity(sci_parity); // set the parity type
3084 + SciSetDataBits(sci_databits); // set the data bits
3086 + return RTEMS_SUCCESSFUL;
3090 +/////////////////////////////////////////////////////////////////////////////
3093 +// POLLING BASED ENTRY POINTS FOR THE TERMIOS MODULE
3095 +/////////////////////////////////////////////////////////////////////////////
3097 +/****************************************************************************
3098 +* Func: SciPolledOpen
3099 +* Desc: open routine for the polled i/o version of the driver
3100 +* called from rtems_termios_open which is called from console_open
3101 +* Inputs: major - device number
3102 +* minor - device number
3103 +* args - points to terminal info struct
3104 +* Outputs: success/fail
3106 +* Scope: public - termios entry point
3107 +****************************************************************************/
3109 +int32_t SciPolledOpen(
3115 + rtems_libio_open_close_args_t * args = arg;
3117 + if ( minor != SCI_MINOR ) // check minor device num
3122 + if ( !args ) // must have args
3127 + SciTermioTty = args->iop->data1; // Store tty pointer
3129 + SciDisableAllInterrupts(); // don't generate interrupts
3131 + // THIS IS ACTUALLY A BAD THING - SETTING LINE PARAMETERS HERE
3132 + // IT SHOULD BE DONE THROUGH TCSETATTR() WHEN THE CONSOLE IS OPENED!!!
3134 +// SciSetBaud(115200); // set the baud rate
3135 +// SciSetBaud( 57600); // set the baud rate
3136 +// SciSetBaud( 38400); // set the baud rate
3137 + SciSetBaud( 19200); // set the baud rate
3138 +// SciSetBaud( 9600); // set the baud rate
3140 + SciSetParity(SCI_PARITY_NONE); // set no parity
3142 + SciSetDataBits(SCI_8_DATA_BITS); // set 8 data bits
3144 + SciEnableTransmitter(); // enable the xmitter
3146 + SciEnableReceiver(); // enable the rcvr
3148 + return RTEMS_SUCCESSFUL;
3152 +/****************************************************************************
3153 +* Func: SciPolledClose
3154 +* Desc: close routine for the device driver, same for both
3155 +* Inputs: major - device number
3156 +* minor - device number
3158 +* Outputs: success/fail
3160 +* Scope: public termios API
3161 +****************************************************************************/
3163 +int32_t SciPolledClose(
3169 + SciDisableAllInterrupts();
3171 + return RTEMS_SUCCESSFUL;
3175 +/****************************************************************************
3176 +* Func: SciPolledRead
3177 +* Desc: polling based read routine for the uart
3178 +* Inputs: minor - device number
3179 +* Outputs: error or the character read
3181 +* Scope: public API
3182 +****************************************************************************/
3184 +int32_t SciPolledRead(
3188 + if ( minor != SCI_MINOR ) // check the minor dev num
3190 + return -1; // return error
3193 + if ( SciCharAvailable() ) // if a char is available
3195 + return SciReadCharNoWait(); // read the rx data register
3198 + return -1; // return error
3202 +/****************************************************************************
3203 +* Func: SciPolledWrite
3204 +* Desc: writes out characters in polled mode, waiting for the uart
3205 +* check in console_open, but we only seem to use interrupt mode
3206 +* Inputs: minor - device number
3207 +* buf - points to the data
3208 +* len - how many bytes
3209 +* Outputs: error or number of bytes written
3211 +* Scope: public termios API
3212 +****************************************************************************/
3214 +int32_t SciPolledWrite(
3220 + int32_t written = 0;
3222 + if ( minor != SCI_MINOR ) // check minor device num
3227 + if ( SciOpened == DRIVER_OPENED ) // is the driver api open?
3229 + return -1; // toss the data
3232 + // send each byte in the string out the port
3234 + while ( written < len )
3236 + SciWriteCharWait(*buf++); // send a byte
3238 + written++; // increment counter
3241 + return written; // return count
3245 +/////////////////////////////////////////////////////////////////////////////
3248 +// DEVICE DRIVER PUBLIC API ENTRY POINTS
3250 +/////////////////////////////////////////////////////////////////////////////
3252 +/****************************************************************************
3254 +* Desc: Initialize the lasers device driver and hardware
3255 +* Inputs: major - the major device number which is assigned by rtems
3256 +* minor - the minor device number which is undefined at this point
3258 +* Outputs: RTEMS_SUCCESSFUL
3260 +* Scope: public API
3261 +****************************************************************************/
3263 +rtems_device_driver SciInitialize (
3264 + rtems_device_major_number major,
3265 + rtems_device_minor_number minor,
3269 +// rtems_status_code status;
3271 +//printk("%s\r\n", __FUNCTION__);
3273 + // register the SCI device name for termios console i/o
3274 + // this is done over in console.c which doesn't seem exactly right
3275 + // but there were problems doing it here...
3277 +// status = rtems_io_register_name( "/dev/sci", major, 0 );
3279 +// if (status != RTEMS_SUCCESSFUL)
3280 +// rtems_fatal_error_occurred(status);
3282 + SciMajor = major; // save the rtems major number
3284 + SciOpened = DRIVER_CLOSED; // initial state is closed
3286 + // if you have an interrupt handler, install it here
3288 + SciInited = 1; // set the inited flag
3290 + return RTEMS_SUCCESSFUL;
3294 +/****************************************************************************
3296 +* Desc: device driver open routine
3297 +* you must open a device before you can anything else
3298 +* only one process can have the device opened at a time
3299 +* you could look at the task id to restrict access if you want
3300 +* Inputs: major - the major device number assigned by rtems
3301 +* minor - the minor device number assigned by us
3303 +* Outputs: see below
3305 +* Scope: public API
3306 +****************************************************************************/
3308 +rtems_device_driver SciOpen (
3309 + rtems_device_major_number major,
3310 + rtems_device_minor_number minor,
3314 +//printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor);
3316 + if (SciInited == 0) // must be initialized first!
3318 + return RTEMS_NOT_CONFIGURED;
3321 + if (minor != SCI_MINOR)
3323 + return RTEMS_INVALID_NAME; // verify minor number
3326 + if (SciOpened == DRIVER_OPENED)
3328 + return RTEMS_RESOURCE_IN_USE; // already opened!
3331 + SciOpened = DRIVER_OPENED; // set the opened flag
3333 + return RTEMS_SUCCESSFUL;
3337 +/****************************************************************************
3339 +* Desc: device driver close routine
3340 +* the device must be opened before you can close it
3341 +* the device must be closed before someone (else) can open it
3342 +* Inputs: major - the major device number
3343 +* minor - the minor device number
3345 +* Outputs: see below
3347 +* Scope: public API
3348 +****************************************************************************/
3350 +rtems_device_driver SciClose (
3351 + rtems_device_major_number major,
3352 + rtems_device_minor_number minor,
3356 +//printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor);
3358 + if (minor != SCI_MINOR)
3360 + return RTEMS_INVALID_NAME; // check the minor number
3363 + if (SciOpened != DRIVER_OPENED)
3365 + return RTEMS_INCORRECT_STATE; // must be opened first
3368 + SciOpened = DRIVER_CLOSED; // set the flag
3370 + return RTEMS_SUCCESSFUL;
3374 +/****************************************************************************
3376 +* Desc: device driver read routine
3377 +* this function is not meaningful for the laser devices
3378 +* Inputs: major - the major device number
3379 +* minor - the minor device number
3380 +* arg - read/write arguments
3381 +* Outputs: see below
3383 +* Scope: public API
3384 +****************************************************************************/
3386 +rtems_device_driver SciRead (
3387 + rtems_device_major_number major,
3388 + rtems_device_minor_number minor,
3392 + rtems_libio_rw_args_t *rw_args; // ptr to argument struct
3396 + rw_args = (rtems_libio_rw_args_t *) arg; // arguments to read()
3398 + if (minor != SCI_MINOR)
3400 + return RTEMS_INVALID_NAME; // check the minor number
3403 + if (SciOpened == DRIVER_CLOSED)
3405 + return RTEMS_INCORRECT_STATE; // must be opened first
3408 + buffer = rw_args->buffer; // points to user's buffer
3410 + length = rw_args->count; // how many bytes they want
3412 +// *buffer = SciReadCharWait(); // wait for a character
3414 + // if there isn't a character available, wait until one shows up
3415 + // or the timeout period expires, which ever happens first
3417 + if ( SciRcvBufCount == 0 ) // no chars
3419 + // wait for someone to wake me up...
3420 + //rtems_task_wake_after(SciReadTimeout);
3423 + if ( SciRcvBufCount ) // any characters locally?
3425 + *buffer = SciRcvBufGetChar(); // get the character
3427 + rw_args->bytes_moved = 1; // how many we actually read
3430 + return RTEMS_SUCCESSFUL;
3434 +/****************************************************************************
3436 +* Desc: device driver write routine
3437 +* this function is not meaningful for the laser devices
3438 +* Inputs: major - the major device number
3439 +* minor - the minor device number
3440 +* arg - read/write arguments
3441 +* Outputs: see below
3443 +* Scope: public API
3444 +****************************************************************************/
3446 +rtems_device_driver SciWrite (
3447 + rtems_device_major_number major,
3448 + rtems_device_minor_number minor,
3452 + rtems_libio_rw_args_t *rw_args; // ptr to argument struct
3456 + rw_args = (rtems_libio_rw_args_t *) arg;
3458 + if (minor != SCI_MINOR)
3460 + return RTEMS_INVALID_NAME; // check the minor number
3463 + if (SciOpened == DRIVER_CLOSED)
3465 + return RTEMS_INCORRECT_STATE; // must be opened first
3468 + buffer = (uint8_t*)rw_args->buffer; // points to data
3470 + length = rw_args->count; // how many bytes
3474 + SciWriteCharWait(*buffer++); // send the bytes out
3477 + rw_args->bytes_moved = rw_args->count; // how many we wrote
3479 + return RTEMS_SUCCESSFUL;
3483 +/****************************************************************************
3485 +* Desc: device driver control routine
3486 +* see below for an example of how to use the ioctl interface
3487 +* Inputs: major - the major device number
3488 +* minor - the minor device number
3489 +* arg - io control args
3490 +* Outputs: see below
3492 +* Scope: public API
3493 +****************************************************************************/
3495 +rtems_device_driver SciControl (
3496 + rtems_device_major_number major,
3497 + rtems_device_minor_number minor,
3501 + rtems_libio_ioctl_args_t *args = arg; // rtems arg struct
3502 + uint16_t command; // the cmd to execute
3503 + uint16_t unused; // maybe later
3504 + uint16_t *ptr; // ptr to user data
3506 +//printk("%s major=%d minor=%d\r\n", __FUNCTION__,major,minor);
3508 + // do some sanity checking
3510 + if (minor != SCI_MINOR)
3512 + return RTEMS_INVALID_NAME; // check the minor number
3515 + if (SciOpened == DRIVER_CLOSED)
3517 + return RTEMS_INCORRECT_STATE; // must be open first
3522 + return RTEMS_INVALID_ADDRESS; // must have args
3525 + args->ioctl_return = -1; // assume an error
3527 + command = args->command; // get the command
3528 + ptr = args->buffer; // this is an address
3529 + unused = *ptr; // brightness
3531 + if (command == SCI_SEND_BREAK) // process the command
3533 + SciSendBreak(); // send break char
3536 + args->ioctl_return = 0; // return status
3538 + return RTEMS_SUCCESSFUL;
3542 +/////////////////////////////////////////////////////////////////////////////
3545 +// HARDWARE LEVEL ROUTINES
3547 +/////////////////////////////////////////////////////////////////////////////
3549 +/****************************************************************************
3551 +* Desc: setup the uart based on the termios modules requests
3552 +* Inputs: baud rate
3556 +****************************************************************************/
3558 +static void SciSetBaud(uint32_t rate)
3561 + uint16_t save_sccr1;
3563 +// when you open the console you need to set the termio struct baud rate
3564 +// it has a default value of 9600, when someone calls tcsetattr it reverts!
3566 + SciBaud = rate; // save the rate
3568 + // calculate the register value as a float and convert to an int
3569 + // set baud rate - you must define the system clock constant
3570 + // see mrm332.h for an example
3572 + value = ( (uint16_t) ( SYS_CLOCK / rate / 32.0 + 0.5 ) & 0x1fff );
3574 + save_sccr1 = *SCCR1; // save register
3576 + // also turns off the xmtr and rcvr
3578 + *SCCR1 &= SCI_DISABLE_INT_ALL; // disable interrupts
3580 + *SCCR0 = value; // write the register
3582 + *SCCR1 = save_sccr1; // restore register
3588 +/****************************************************************************
3589 +* Func: SciSetParity
3590 +* Desc: setup the uart based on the termios modules requests
3595 +****************************************************************************/
3597 +static void SciSetParity(uint16_t parity)
3601 + value = *SCCR1; // get the register
3603 + if (parity == SCI_PARITY_ODD)
3605 + value |= SCI_PARITY_ENABLE; // parity enabled
3606 + value |= SCI_PARITY_ODD; // parity odd
3609 + else if (parity == SCI_PARITY_EVEN)
3611 + value |= SCI_PARITY_ENABLE; // parity enabled
3612 + value &= ~SCI_PARITY_ODD; // parity even
3615 + else if (parity == SCI_PARITY_NONE)
3617 + value &= ~SCI_PARITY_ENABLE; // disabled, most common
3620 + /* else no changes */
3622 + *SCCR1 = value; // write the register
3628 +/****************************************************************************
3629 +* Func: SciSetDataBits
3630 +* Desc: setup the uart based on the termios modules requests
3631 +* Inputs: data bits
3635 +****************************************************************************/
3637 +static void SciSetDataBits(uint16_t bits)
3641 + value = *SCCR1; // get the register
3643 + /* note - the parity setting affects the number of data bits */
3645 + if (bits == SCI_9_DATA_BITS)
3647 + value |= SCI_9_DATA_BITS; // 9 data bits
3650 + else if (bits == SCI_8_DATA_BITS)
3652 + value &= SCI_8_DATA_BITS; // 8 data bits
3655 + /* else no changes */
3657 + *SCCR1 = value; // write the register
3663 +/****************************************************************************
3664 +* Func: SciDisableAllInterrupts
3665 +* Func: SciEnableTransmitInterrupts
3666 +* Func: SciEnableReceiveInterrupts
3667 +* Desc: handles generation of interrupts by the sci module
3672 +****************************************************************************/
3674 +static void inline SciDisableAllInterrupts( void )
3676 + // this also turns off the xmtr and rcvr
3678 + *SCCR1 &= SCI_DISABLE_INT_ALL;
3681 +static void inline SciEnableReceiveInterrupts( void )
3683 + *SCCR1 |= SCI_ENABLE_INT_RX;
3686 +static void inline SciDisableReceiveInterrupts( void )
3688 + *SCCR1 &= SCI_DISABLE_INT_RX;
3691 +static void inline SciEnableTransmitInterrupts( void )
3693 + *SCCR1 |= SCI_ENABLE_INT_TX;
3696 +static void inline SciDisableTransmitInterrupts( void )
3698 + *SCCR1 &= SCI_DISABLE_INT_TX;
3702 +/****************************************************************************
3703 +* Func: SciEnableTransmitter, SciDisableTransmitter
3704 +* Func: SciEnableReceiver, SciDisableReceiver
3705 +* Desc: turns the transmitter and receiver on and off
3710 +****************************************************************************/
3712 +static void inline SciEnableTransmitter( void )
3714 + *SCCR1 |= SCI_ENABLE_XMTR;
3717 +static void inline SciDisableTransmitter( void )
3719 + *SCCR1 &= SCI_DISABLE_XMTR;
3722 +static void inline SciEnableReceiver( void )
3724 + *SCCR1 |= SCI_ENABLE_RCVR;
3727 +static void inline SciDisableReceiver( void )
3729 + *SCCR1 &= SCI_DISABLE_RCVR;
3733 +/****************************************************************************
3734 +* Func: SciWriteCharWait
3735 +* Desc: wait for room in the fifo and then put a char in
3736 +* Inputs: a byte to send
3740 +****************************************************************************/
3742 +void SciWriteCharWait(uint8_t c)
3744 + // poll the fifo, waiting for room for another character
3746 + while ( ( *SCSR & SCI_XMTR_AVAILABLE ) == 0 )
3748 + /* Either we are writing to the fifo faster than
3749 + * the uart can clock bytes out onto the cable,
3750 + * or we are in flow control (actually no, we
3751 + * are ignoring flow control from the other end).
3752 + * In the first case, higher baud rates will help.
3754 + /* relinquish processor while waiting */
3755 + rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
3758 + *SCDR = c; // send the charcter
3760 + SciBytesOut++; // increment the counter
3765 +/****************************************************************************
3766 +* Func: SciWriteCharNoWait
3767 +* Desc: if no room in the fifo throw the char on the floor
3768 +* Inputs: a byte to send
3772 +****************************************************************************/
3774 +void SciWriteCharNoWait(uint8_t c)
3776 + if ( ( *SCSR & SCI_XMTR_AVAILABLE ) == 0 )
3778 + return; // no room, throw it away
3781 + *SCDR = c; // put the char in the fifo
3783 + SciBytesOut++; // increment the counter
3789 +/****************************************************************************
3790 +* Func: SciReadCharWait
3791 +* Desc: read a character, waiting for one to show up, if need be
3793 +* Outputs: a character
3796 +****************************************************************************/
3798 +uint8_t inline SciReadCharWait( void )
3802 + while ( SciCharAvailable() == 0 ) // anything there?
3804 + /* relinquish processor while waiting */
3805 + rtems_task_wake_after(RTEMS_YIELD_PROCESSOR);
3808 + // if you have rcv ints enabled, then the isr will probably
3809 + // get the character before you will unless you turn off ints
3810 + // ie polling and ints don't mix that well
3812 + ch = *SCDR; // get the charcter
3814 + SciBytesIn++; // increment the counter
3816 + return ch; // return the char
3819 +/****************************************************************************
3820 +* Func: SciReadCharNoWait
3821 +* Desc: try to get a char but dont wait for one
3823 +* Outputs: a character or -1 if none
3826 +****************************************************************************/
3828 +uint8_t inline SciReadCharNoWait( void )
3832 + if ( SciCharAvailable() == 0 ) // anything there?
3835 + ch = *SCDR; // get the character
3837 + SciBytesIn++; // increment the count
3839 + return ch; // return the char
3843 +/****************************************************************************
3844 +* Func: SciCharAvailable
3845 +* Desc: is there a receive character in the data register
3847 +* Outputs: false if no char available, else true
3850 +****************************************************************************/
3852 +uint8_t inline SciCharAvailable( void )
3854 + return ( *SCSR & SCI_RCVR_READY ); // char in data register?
3858 +/****************************************************************************
3859 +* Func: SciSendBreak
3860 +* Desc: send 1 or tow breaks (all zero bits)
3865 +****************************************************************************/
3867 +void SciSendBreak( void )
3869 + // From the Motorola QSM reference manual -
3871 + // "if SBK is toggled by writing it first to a one and then immediately
3872 + // to a zero (in less than one serial frame interval), the transmitter
3873 + // sends only one or two break frames before reverting to mark (idle)
3874 + // or before commencing to send more data"
3876 + *SCCR1 |= SCI_SEND_BREAK; // set the bit
3878 + *SCCR1 &= ~SCI_SEND_BREAK; // clear the bit
3884 +/////////////////////////////////////////////////////////////////////////////
3889 +/////////////////////////////////////////////////////////////////////////////
3891 +/****************************************************************************
3892 +* Func: SciUnitTest
3893 +* Desc: test the device driver
3897 +****************************************************************************/
3900 +#define O_RDWR LIBIO_FLAGS_READ_WRITE // dont like this but...
3904 + uint8_t byte; // a character
3905 + uint16_t fd; // file descriptor for device
3906 + uint16_t result; // result of ioctl
3908 + fd = open("/dev/sci",O_RDWR); // open the device
3910 +printk("SCI open fd=%d\r\n",fd);
3912 + result = write(fd, "abcd\r\n", 6); // send a string
3914 +printk("SCI write result=%d\r\n",result);
3916 + result = read(fd, &byte, 1); // read a byte
3918 +printk("SCI read result=%d,byte=%x\r\n",result,byte);
3925 +/****************************************************************************
3926 +* Func: SciPrintStats
3927 +* Desc: print out some driver information
3931 +****************************************************************************/
3933 +void SciPrintStats ( void )
3937 + printk( "SYS_CLOCK is %2.6f Mhz\r\n\n", SYS_CLOCK / 1000000.0 );
3939 + printk( "Current baud rate is %d bps or %d cps\r\n\n", SciBaud, SciBaud / 10 );
3941 + printk( "SCI Uart chars in %8d\r\n", SciBytesIn );
3942 + printk( "SCI Uart chars out %8d\r\n", SciBytesOut );
3943 + printk( "SCI Uart framing errors %8d\r\n", SciErrorsFraming );
3944 + printk( "SCI Uart parity errors %8d\r\n", SciErrorsParity );
3945 + printk( "SCI Uart overrun errors %8d\r\n", SciErrorsOverrun );
3946 + printk( "SCI Uart noise errors %8d\r\n", SciErrorsNoise );
3950 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/startup/bspstart.c
3951 ===================================================================
3953 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/bspstart.c
3956 + * This routine starts the application. It includes application,
3957 + * board, and monitor specific initialization and configuration.
3958 + * The generic CPU dependent initialization has been performed
3959 + * before this routine is invoked.
3961 + * COPYRIGHT (c) 1989-1999.
3962 + * On-Line Applications Research Corporation (OAR).
3964 + * The license and distribution terms for this file may be
3965 + * found in the file LICENSE in this distribution or at
3966 + * http://www.rtems.com/license/LICENSE.
3968 + * $Id: bspstart.c,v 1.7 2004/04/21 10:42:52 ralf Exp $
3972 +#include <rtems/libio.h>
3974 +#include <string.h>
3977 + * The original table from the application and our copy of it with
3981 +extern rtems_configuration_table Configuration;
3982 +rtems_configuration_table BSP_Configuration;
3984 +rtems_cpu_table Cpu_table;
3986 +char *rtems_progname;
3989 + * Use the shared implementations of the following routines
3992 +void bsp_postdriver_hook(void);
3993 +void bsp_libc_init( void *, uint32_t, int );
3994 +void bsp_pretasking_hook(void); /* m68k version */
3997 + * Call Spurious_Initialize in bsp_predriver_hook because
3998 + * bsp_predriver_hook is call after the _ISR_Vector_Table allocation
4001 +void bsp_predriver_hook(void)
4003 + void Spurious_Initialize();
4004 + Spurious_Initialize();
4010 + * This routine does the bulk of the system initialization.
4013 +void bsp_start( void )
4016 + extern void *_WorkspaceBase;
4017 + extern void *_RamSize;
4018 + extern unsigned long _M68k_Ramsize;
4020 + _M68k_Ramsize = (unsigned long)&_RamSize; /* RAM size set in linker script */
4023 + * we only use a hook to get the C library initialized.
4026 + Cpu_table.pretasking_hook = bsp_pretasking_hook;
4027 + Cpu_table.predriver_hook = bsp_predriver_hook;
4028 + Cpu_table.postdriver_hook = bsp_postdriver_hook;
4030 + m68k_get_vbr( vbr );
4031 + Cpu_table.interrupt_vector_table = vbr;
4033 + BSP_Configuration.work_space_start = (void *) &_WorkspaceBase;
4035 + /* Clock_exit is done as an atexit() function */
4037 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/startup/start_c.c
4038 ===================================================================
4040 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/start_c.c
4046 +#include <mrm332.h>
4047 +#include <rtems/m68k/sim.h>
4048 +#define __START_C__
4051 +m68k_isr_entry M68Kvec[256];
4052 +m68k_isr_entry vectors[256];
4053 +char * const __argv[]= {"main", ""};
4055 +void boot_card(int argc, char * const argv[]);
4058 + * This prototype really should have the noreturn attribute but
4059 + * that causes a warning. Not sure how to fix that.
4061 +/* void dumby_start () __attribute__ ((noreturn)); */
4066 + /* Synthesizer Control Register */
4067 + /* see section(s) 4.8 */
4068 + /* end include in ram_init.S */
4069 + *SYNCR = (unsigned short int)
4070 + ( SAM(MRM_W,15,VCO) | SAM(0x0,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
4071 + while (! (*SYNCR & SLOCK)); /* protect from clock overshoot */
4072 + /* include in ram_init.S */
4073 + *SYNCR = (unsigned short int)
4074 + ( SAM(MRM_W,15,VCO) | SAM(MRM_X,14,PRESCALE) | SAM(MRM_Y,8,COUNTER) );
4076 + /* System Protection Control Register */
4077 + /* !!! can only write to once after reset !!! */
4078 + /* see section 3.8.4 of the SIM Reference Manual */
4079 + *SYPCR = (unsigned char)( HME | BME );
4081 + /* Periodic Interrupr Control Register */
4082 + /* see section 3.8.2 of the SIM Reference Manual */
4083 + *PICR = (unsigned short int)
4084 + ( SAM(0,8,PIRQL) | SAM(MRM_PIV,0,PIV) );
4085 + /* ^^^ zero disables interrupt, don't enable here or ram_init will
4086 + be wrong. It's enabled below. */
4088 + /* Periodic Interrupt Timer Register */
4089 + /* see section 3.8.3 of the SIM Reference Manual */
4090 + *PITR = (unsigned short int)( SAM(0x09,0,PITM) );
4091 + /* 1.098mS interrupt, assuming 32.768 KHz input clock */
4094 + /* load values before enabled */
4095 + *PORTC = (unsigned char) 0x0;
4097 + /* Port E and F Data Register */
4098 + /* see section 9 of the SIM Reference Manual */
4099 + *PORTE0 = (unsigned char) 0;
4100 + *PORTF0 = (unsigned char) 0;
4102 + /* Port E and F Data Direction Register */
4103 + /* see section 9 of the SIM Reference Manual */
4104 + *DDRE = (unsigned char) 0xff;
4105 + *DDRF = (unsigned char) 0xfd;
4107 + /* Port E and F Pin Assignment Register */
4108 + /* see section 9 of the SIM Reference Manual */
4109 + *PEPAR = (unsigned char) 0;
4110 + *PFPAR = (unsigned char) 0;
4112 + /* end of SIM initalization code */
4113 + /* end include in ram_init.S */
4116 + * Initialize RAM by copying the .data section out of ROM (if
4117 + * needed) and "zero-ing" the .bss section.
4120 + register char *src = _etext;
4121 + register char *dst = _copy_start;
4123 + if (_copy_data_from_rom)
4124 + /* ROM has data at end of text; copy it. */
4125 + while (dst < _edata)
4129 + for (dst = _clear_start; dst< end; dst++)
4136 + * Initialize vector table.
4139 + m68k_isr_entry *monitors_vector_table;
4141 + m68k_get_vbr(monitors_vector_table);
4143 + M68Kvec[ 4 ] = monitors_vector_table[ 4 ]; /* breakpoints vector */
4144 + M68Kvec[ 9 ] = monitors_vector_table[ 9 ]; /* trace vector */
4145 + M68Kvec[ 31 ] = monitors_vector_table[ 31 ]; /* level 7 interrupt */
4146 + M68Kvec[ 47 ] = monitors_vector_table[ 47 ]; /* system call vector */
4147 + M68Kvec[ 66 ] = monitors_vector_table[ 66 ]; /* user defined */
4149 + m68k_set_vbr(&M68Kvec);
4153 + * Initalize the board.
4156 + /* Spurious should be called in the predriver hook */
4157 + /* Spurious_Initialize(); */
4161 + * Execute main with arguments argc and agrv.
4163 + boot_card(1,__argv);
4167 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/include/tm27.h
4168 ===================================================================
4170 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/tm27.h
4175 + * The license and distribution terms for this file may be
4176 + * found in the file LICENSE in this distribution or at
4177 + * http://www.rtems.com/license/LICENSE.
4179 + * $Id: tm27.h,v 1.2 2004/04/23 04:47:36 ralf Exp $
4182 +#ifndef _RTEMS_TMTEST27
4183 +#error "This is an RTEMS internal file you must not include directly."
4190 + * Define the interrupt mechanism for Time Test 27
4193 +/* XXX - JRS - I want to compile the tmtests */
4195 +#define MUST_WAIT_FOR_INTERRUPT 1
4197 +#define Install_tm27_vector( handler ) /* empty */
4199 +#define Cause_tm27_intr() /* empty */
4201 +#define Clear_tm27_intr() /* empty */
4203 +#define Lower_tm27_intr() /* empty */
4206 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/times
4207 ===================================================================
4209 +++ rtems/c/src/lib/libbsp/m68k/mo376/times
4212 +# Timing Test Suite Results for the MRM332 BSP
4214 +# $Id: times,v 1.2 2004/01/07 21:13:50 joel Exp $
4217 +NOTE: This BSP is user submitted and no information is currently available.
4219 +TBD: MATT - update this with real times!
4223 +Clock Speed: 20 Mhz
4224 +Memory Configuration: SRAM, DRAM, cache, etc
4227 +Times Reported in: cycles, microseconds, etc
4228 +Timer Source: Count Down Timer, on-CPU cycle counter, etc
4234 +== ================================================================= ==== ====
4235 + 1 rtems_semaphore_create 20
4236 + rtems_semaphore_delete 21
4237 + rtems_semaphore_obtain: available 15
4238 + rtems_semaphore_obtain: not available -- NO_WAIT 15
4239 + rtems_semaphore_release: no waiting tasks 16
4241 + 2 rtems_semaphore_obtain: not available -- caller blocks 62
4243 + 3 rtems_semaphore_release: task readied -- preempts caller 55
4245 + 4 rtems_task_restart: blocked task -- preempts caller 77
4246 + rtems_task_restart: ready task -- preempts caller 70
4247 + rtems_semaphore_release: task readied -- returns to caller 25
4248 + rtems_task_create 57
4249 + rtems_task_start 31
4250 + rtems_task_restart: suspended task -- returns to caller 36
4251 + rtems_task_delete: suspended task 47
4252 + rtems_task_restart: ready task -- returns to caller 37
4253 + rtems_task_restart: blocked task -- returns to caller 46
4254 + rtems_task_delete: blocked task 50
4256 + 5 rtems_task_suspend: calling task 51
4257 + rtems_task_resume: task readied -- preempts caller 49
4259 + 6 rtems_task_restart: calling task 59
4260 + rtems_task_suspend: returns to caller 18
4261 + rtems_task_resume: task readied -- returns to caller 19
4262 + rtems_task_delete: ready task 50
4264 + 7 rtems_task_restart: suspended task -- preempts caller 70
4266 + 8 rtems_task_set_priority: obtain current priority 12
4267 + rtems_task_set_priority: returns to caller 27
4268 + rtems_task_mode: obtain current mode 5
4269 + rtems_task_mode: no reschedule 5
4270 + rtems_task_mode: reschedule -- returns to caller 8
4271 + rtems_task_mode: reschedule -- preempts caller 39
4272 + rtems_task_set_note 13
4273 + rtems_task_get_note 13
4274 + rtems_clock_set 33
4277 + 9 rtems_message_queue_create 110
4278 + rtems_message_queue_send: no waiting tasks 37
4279 + rtems_message_queue_urgent: no waiting tasks 37
4280 + rtems_message_queue_receive: available 31
4281 + rtems_message_queue_flush: no messages flushed 12
4282 + rtems_message_queue_flush: messages flushed 16
4283 + rtems_message_queue_delete 26
4285 +10 rtems_message_queue_receive: not available -- NO_WAIT 15
4286 + rtems_message_queue_receive: not available -- caller blocks 62
4288 +11 rtems_message_queue_send: task readied -- preempts caller 72
4290 +12 rtems_message_queue_send: task readied -- returns to caller 39
4292 +13 rtems_message_queue_urgent: task readied -- preempts caller 72
4294 +14 rtems_message_queue_urgent: task readied -- returns to caller 39
4296 +15 rtems_event_receive: obtain current events 1
4297 + rtems_event_receive: not available -- NO_WAIT 12
4298 + rtems_event_receive: not available -- caller blocks 56
4299 + rtems_event_send: no task readied 12
4300 + rtems_event_receive: available 12
4301 + rtems_event_send: task readied -- returns to caller 24
4303 +16 rtems_event_send: task readied -- preempts caller 55
4305 +17 rtems_task_set_priority: preempts caller 62
4307 +18 rtems_task_delete: calling task 83
4309 +19 rtems_signal_catch 9
4310 + rtems_signal_send: returns to caller 15
4311 + rtems_signal_send: signal to self 18
4312 + exit ASR overhead: returns to calling task 22
4313 + exit ASR overhead: returns to preempting task 49
4315 +20 rtems_partition_create 35
4316 + rtems_region_create 23
4317 + rtems_partition_get_buffer: available 15
4318 + rtems_partition_get_buffer: not available 13
4319 + rtems_partition_return_buffer 18
4320 + rtems_partition_delete 16
4321 + rtems_region_get_segment: available 22
4322 + rtems_region_get_segment: not available -- NO_WAIT 21
4323 + rtems_region_return_segment: no waiting tasks 19
4324 + rtems_region_get_segment: not available -- caller blocks 64
4325 + rtems_region_return_segment: task readied -- preempts caller 74
4326 + rtems_region_return_segment: task readied -- returns to caller 44
4327 + rtems_region_delete 16
4328 + rtems_io_initialize 2
4333 + rtems_io_control 1
4335 +21 rtems_task_ident 149
4336 + rtems_message_queue_ident 145
4337 + rtems_semaphore_ident 156
4338 + rtems_partition_ident 145
4339 + rtems_region_ident 148
4340 + rtems_port_ident 145
4341 + rtems_timer_ident 145
4342 + rtems_rate_monotonic_ident 145
4344 +22 rtems_message_queue_broadcast: task readied -- returns to caller 42
4345 + rtems_message_queue_broadcast: no waiting tasks 17
4346 + rtems_message_queue_broadcast: task readied -- preempts caller 78
4348 +23 rtems_timer_create 14
4349 + rtems_timer_fire_after: inactive 22
4350 + rtems_timer_fire_after: active 24
4351 + rtems_timer_cancel: active 15
4352 + rtems_timer_cancel: inactive 13
4353 + rtems_timer_reset: inactive 21
4354 + rtems_timer_reset: active 23
4355 + rtems_timer_fire_when: inactive 34
4356 + rtems_timer_fire_when: active 34
4357 + rtems_timer_delete: active 19
4358 + rtems_timer_delete: inactive 17
4359 + rtems_task_wake_when 69
4361 +24 rtems_task_wake_after: yield -- returns to caller 9
4362 + rtems_task_wake_after: yields -- preempts caller 45
4364 +25 rtems_clock_tick 4
4369 + _Thread_Disable_dispatch 0
4370 + _Thread_Enable_dispatch 7
4371 + _Thread_Set_state 11
4372 + _Thread_Disptach (NO FP) 31
4373 + context switch: no floating point contexts 21
4374 + context switch: self 10
4375 + context switch: to another task 10
4376 + context switch: restore 1st FP task 25
4377 + fp context switch: save idle, restore idle 31
4378 + fp context switch: save idle, restore initialized 19
4379 + fp context switch: save initialized, restore initialized 20
4385 + _Thread_Get: invalid id 0
4387 +27 interrupt entry overhead: returns to interrupted task 6
4388 + interrupt exit overhead: returns to interrupted task 6
4389 + interrupt entry overhead: returns to nested interrupt 6
4390 + interrupt exit overhead: returns to nested interrupt 5
4391 + interrupt entry overhead: returns to preempting task 7
4392 + interrupt exit overhead: returns to preempting task 36
4394 +28 rtems_port_create 16
4395 + rtems_port_external_to_internal 11
4396 + rtems_port_internal_to_external 11
4397 + rtems_port_delete 16
4399 +29 rtems_rate_monotonic_create 15
4400 + rtems_rate_monotonic_period: initiate period -- returns to caller 21
4401 + rtems_rate_monotonic_period: obtain status 13
4402 + rtems_rate_monotonic_cancel 16
4403 + rtems_rate_monotonic_delete: inactive 18
4404 + rtems_rate_monotonic_delete: active 20
4405 + rtems_rate_monotonic_period: conclude periods -- caller blocks 53
4406 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/include/mrm332.h
4407 ===================================================================
4409 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/mrm332.h
4413 + * $Id: mrm332.h,v 1.5 2004/04/21 16:01:35 ralf Exp $
4419 +/* SIM_MM (SIM Module Mapping) determines the location of the control
4420 + register block. When MM=0, register addresses range fom 0x7ff000 to
4421 + 0x7FFFFF. When MM=1, register addresses range from 0xfff000 to
4425 +/* Interrupt related definitions */
4426 +#define SIM_IARB 15
4427 +#define QSM_IARB 10
4430 +#define ISRL_PIT 4 /* zero disables PIT */
4432 +#define EFI_QIVR 66 /* 66=>SCI and 67=>QSPI interrupt */
4433 +#define ISRL_QSPI 0
4435 +#define EFI_SPINT 24 /* spurious interrupt */
4436 +#define EFI_INT1 25 /* CTS interrupt */
4439 +/* System Clock definitions */
4440 +#define XTAL 32768.0 /* crystal frequency in Hz */
4443 +/* Default MRM clock rate (8.388688 MHz) set by CPU32: */
4444 +#define MRM_W 0 /* system clock parameters */
4450 +/* 16.77722 MHz: */
4451 +#define MRM_W 1 /* system clock parameters */
4457 +/* 25.16582 MHz: */
4458 +#define MRM_W 1 /* system clock parameters */
4463 +#define SYS_CLOCK (XTAL*4.0*(MRM_Y+1)*(1 << (2*MRM_W+MRM_X)))
4464 +#define SCI_BAUD 19200 /* RS232 Baud Rate */
4466 +/* macros/functions */
4471 + * This prototype really should have the noreturn attribute but
4472 + * that causes a warning. Not sure how to fix that.
4474 +/* static void reboot(void) __attribute__ ((noreturn)); */
4475 +static void reboot(void);
4476 +__inline__ static void reboot() {asm("trap #15; .word 0x0063");}
4480 +#endif /* _MRM_H_ */
4481 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/include/bspopts.h.in
4482 ===================================================================
4484 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/bspopts.h.in
4486 +/* include/bspopts.h.in. Generated from configure.ac by autoheader. */
4488 +/* Define to the address where bug reports for this package should be sent. */
4489 +#undef PACKAGE_BUGREPORT
4491 +/* Define to the full name of this package. */
4492 +#undef PACKAGE_NAME
4494 +/* Define to the full name and version of this package. */
4495 +#undef PACKAGE_STRING
4497 +/* Define to the one symbol short name of this package. */
4498 +#undef PACKAGE_TARNAME
4500 +/* Define to the version of this package. */
4501 +#undef PACKAGE_VERSION
4502 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c
4503 ===================================================================
4505 +++ rtems/c/src/lib/libbsp/m68k/mo376/spurious/spinit.c
4509 + * This routine installs spurious interrupt handlers for the mrm.
4511 + * Input parameters: NONE
4513 + * Output parameters: NONE
4515 + * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993.
4516 + * On-Line Applications Research Corporation (OAR).
4518 + * The license and distribution terms for this file may be
4519 + * found in the file LICENSE in this distribution or at
4520 + * http://www.rtems.com/license/LICENSE.
4522 + * $Id: spinit.c,v 1.5 2004/04/21 10:42:52 ralf Exp $
4528 +const char * const _Spurious_Error_[] = {"Reset","Bus Error","Address Error",
4529 + "Illegal Instruction","Zero Division","CHK, CHK2 Instruction",
4530 + "TRAPcc, TRAPV Instruction","Privilege Violation","Trace",
4531 + "Line 1010 Emulation","Line 1111 Emulation","Hardware Breakpoint",
4532 + "Coprocessor Protocal Violation",
4533 + "Format Error ans Uninitialized Interrupt","Unassigned",
4534 + "Spurious Interrupt","AVec1","AVec2","AVec3","AVec4","AVec5","AVec6",
4535 + "AVec7","Trap Instruction","Debug","Reboot","Reserved Coprocessor",
4536 + "Reserved Unassigned","User Defined"};
4538 +rtems_isr Spurious_Isr(
4539 + rtems_vector_number vector
4544 + const char * const VectDescrip[] = {
4545 + _Spurious_Error_[0], _Spurious_Error_[0], _Spurious_Error_[1],
4546 + _Spurious_Error_[2], _Spurious_Error_[3], _Spurious_Error_[4],
4547 + _Spurious_Error_[5], _Spurious_Error_[6], _Spurious_Error_[7],
4548 + _Spurious_Error_[8], _Spurious_Error_[9], _Spurious_Error_[10],
4549 + _Spurious_Error_[11], _Spurious_Error_[12], _Spurious_Error_[13],
4550 + _Spurious_Error_[13], _Spurious_Error_[14], _Spurious_Error_[14],
4551 + _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
4552 + _Spurious_Error_[14], _Spurious_Error_[14], _Spurious_Error_[14],
4553 + _Spurious_Error_[15], _Spurious_Error_[16], _Spurious_Error_[17],
4554 + _Spurious_Error_[18], _Spurious_Error_[19], _Spurious_Error_[20],
4555 + _Spurious_Error_[21], _Spurious_Error_[22], _Spurious_Error_[23],
4556 + _Spurious_Error_[24], _Spurious_Error_[23], _Spurious_Error_[23],
4557 + _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
4558 + _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
4559 + _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[23],
4560 + _Spurious_Error_[23], _Spurious_Error_[23], _Spurious_Error_[25],
4561 + _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
4562 + _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
4563 + _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[26],
4564 + _Spurious_Error_[26], _Spurious_Error_[26], _Spurious_Error_[27],
4565 + _Spurious_Error_[27], _Spurious_Error_[27], _Spurious_Error_[27],
4566 + _Spurious_Error_[27], _Spurious_Error_[28]};
4569 + //asm volatile ( "movea.l %%sp,%0 " : "=a" (sp) : "0" (sp) );
4571 + _CPU_ISR_Set_level( 7 );
4574 + RAW_PUTS("\n\rRTEMS: Spurious interrupt: ");
4575 + RAW_PUTS((char *)VectDescrip[( (vector>64) ? 64 : vector )]);
4576 + RAW_PUTS("\n\rRTEMS: Vector: ");
4578 + RAW_PUTS(" sp: ");
4585 + asm(" .word 0x4afa");
4590 +void Spurious_Initialize(void)
4592 + rtems_vector_number vector;
4594 + for ( vector = 0x0 ; vector <= 0xFF ; vector++ )
4603 + /* These vectors used by CPU32bug - don't overwrite them. */
4607 + (void) set_vector( Spurious_Isr, vector, 1 );
4612 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/startup/linkcmds
4613 ===================================================================
4615 +++ rtems/c/src/lib/libbsp/m68k/mo376/startup/linkcmds
4619 + * $Id: linkcmds,v 1.5 2004/11/26 01:54:51 joel Exp $
4626 + * The memory map looks like this:
4627 + * +--------------------+ <- low memory
4630 + * | ctor list | the ctor and dtor lists are for
4631 + * | dtor list | C++ support
4633 + * +--------------------+
4634 + * | .data | initialized data goes here
4637 + * +--------------------+
4639 + * | _clear_start| start of bss, cleared by crt0
4640 + * | _end | start of heap, used by sbrk()
4641 + * +--------------------+
4645 + * | __stack | top of stack
4646 + * +--------------------+ <- high memory
4650 + * Declare some sizes.
4652 +_RamBase = DEFINED(_RamBase) ? _RamBase : 0x10000;
4653 +_RamSize = DEFINED(_RamSize) ? _RamSize : 0x70000;
4654 +_RamEnd = _RamBase + _RamSize;
4655 +_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
4656 +_StackSize = DEFINED(_StackSize) ? _StackSize : 0x2000;
4660 + ram : ORIGIN = 0x10000, LENGTH = 0x70000
4663 +_copy_data_from_rom = 0;
4666 + * stick everything in ram (of course)
4675 + * Text, data and bss segments
4681 + * C++ constructors/destructors
4683 + *(.gnu.linkonce.t.*)
4686 + * Initialization and finalization code.
4688 + * Various files can provide initialization and finalization
4689 + * functions. crtbegin.o and crtend.o are two instances. The
4690 + * body of these functions are in .init and .fini sections. We
4691 + * accumulate the bodies here, and prepend function prologues
4692 + * from crti.o and function epilogues from crtn.o. crti.o must
4693 + * be linked first; crtn.o must be linked last. Because these
4694 + * are wildcards, it doesn't matter if the user does not
4695 + * actually link against crti.o and crtn.o; the linker won't
4696 + * look for a file to match a wildcard. The wildcard also
4697 + * means that it doesn't matter which directory crti.o and
4700 + PROVIDE (_init = .);
4704 + PROVIDE (_fini = .);
4710 + * Special FreeBSD sysctl sections.
4713 + __start_set_sysctl_set = .;
4715 + __stop_set_sysctl_set = ABSOLUTE(.);
4720 + * C++ constructors/destructors
4722 + * gcc uses crtbegin.o to find the start of the constructors
4723 + * and destructors so we make sure it is first. Because this
4724 + * is a wildcard, it doesn't matter if the user does not
4725 + * actually link against crtbegin.o; the linker won't look for
4726 + * a file to match a wildcard. The wildcard also means that
4727 + * it doesn't matter which directory crtbegin.o is in. The
4728 + * constructor and destructor list are terminated in
4729 + * crtend.o. The same comments apply to it.
4732 + *crtbegin.o(.ctors)
4735 + *crtbegin.o(.dtors)
4740 + * Exception frame info
4749 + _rodata_start = .;
4751 + *(.gnu.linkonce.r*)
4754 + PROVIDE (_etext = .);
4757 + PROVIDE (_copy_start = .);
4759 + *(.gnu.linkonce.d*)
4760 + *(.gcc_except_table)
4763 + PROVIDE (_edata = .);
4764 + PROVIDE (_copy_end = .);
4769 + *(.bss .bss.* .gnu.linkonce.b.*)
4772 + PROVIDE (end = .);
4778 + _WorkspaceBase = .;
4781 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/bsp_specs
4782 ===================================================================
4784 +++ rtems/c/src/lib/libbsp/m68k/mo376/bsp_specs
4786 +%rename endfile old_endfile
4787 +%rename startfile old_startfile
4788 +%rename link old_link
4791 +%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: \
4792 +%{!qrtems_debug: start.o%s} \
4793 +%{qrtems_debug: start_g.o%s} \
4794 +crti.o%s crtbegin.o%s}}
4797 +%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -e start}
4800 +%{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s}
4802 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/include/.cvsignore
4803 ===================================================================
4805 +++ rtems/c/src/lib/libbsp/m68k/mo376/include/.cvsignore
4812 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/aclocal.m4
4813 ===================================================================
4815 +++ rtems/c/src/lib/libbsp/m68k/mo376/aclocal.m4
4817 +# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
4819 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4820 +# 2005 Free Software Foundation, Inc.
4821 +# This file is free software; the Free Software Foundation
4822 +# gives unlimited permission to copy and/or distribute it,
4823 +# with or without modifications, as long as this notice is preserved.
4825 +# This program is distributed in the hope that it will be useful,
4826 +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
4827 +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
4828 +# PARTICULAR PURPOSE.
4830 +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
4832 +# This file is free software; the Free Software Foundation
4833 +# gives unlimited permission to copy and/or distribute it,
4834 +# with or without modifications, as long as this notice is preserved.
4836 +# AM_AUTOMAKE_VERSION(VERSION)
4837 +# ----------------------------
4838 +# Automake X.Y traces this macro to ensure aclocal.m4 has been
4839 +# generated from the m4 files accompanying Automake X.Y.
4840 +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
4842 +# AM_SET_CURRENT_AUTOMAKE_VERSION
4843 +# -------------------------------
4844 +# Call AM_AUTOMAKE_VERSION so it can be traced.
4845 +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
4846 +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
4847 + [AM_AUTOMAKE_VERSION([1.9.5])])
4849 +# AM_AUX_DIR_EXPAND -*- Autoconf -*-
4851 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
4853 +# This file is free software; the Free Software Foundation
4854 +# gives unlimited permission to copy and/or distribute it,
4855 +# with or without modifications, as long as this notice is preserved.
4857 +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
4858 +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
4859 +# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
4861 +# Of course, Automake must honor this variable whenever it calls a
4862 +# tool from the auxiliary directory. The problem is that $srcdir (and
4863 +# therefore $ac_aux_dir as well) can be either absolute or relative,
4864 +# depending on how configure is run. This is pretty annoying, since
4865 +# it makes $ac_aux_dir quite unusable in subdirectories: in the top
4866 +# source directory, any form will work fine, but in subdirectories a
4867 +# relative path needs to be adjusted first.
4869 +# $ac_aux_dir/missing
4870 +# fails when called from a subdirectory if $ac_aux_dir is relative
4871 +# $top_srcdir/$ac_aux_dir/missing
4872 +# fails if $ac_aux_dir is absolute,
4873 +# fails when called from a subdirectory in a VPATH build with
4874 +# a relative $ac_aux_dir
4876 +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
4877 +# are both prefixed by $srcdir. In an in-source build this is usually
4878 +# harmless because $srcdir is `.', but things will broke when you
4879 +# start a VPATH build or use an absolute $srcdir.
4881 +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
4882 +# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
4883 +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
4884 +# and then we would define $MISSING as
4885 +# MISSING="\${SHELL} $am_aux_dir/missing"
4886 +# This will work as long as MISSING is not called from configure, because
4887 +# unfortunately $(top_srcdir) has no meaning in configure.
4888 +# However there are other variables, like CC, which are often used in
4889 +# configure, and could therefore not use this "fixed" $ac_aux_dir.
4891 +# Another solution, used here, is to always expand $ac_aux_dir to an
4892 +# absolute PATH. The drawback is that using absolute paths prevent a
4893 +# configured tree to be moved without reconfiguration.
4895 +AC_DEFUN([AM_AUX_DIR_EXPAND],
4896 +[dnl Rely on autoconf to set up CDPATH properly.
4897 +AC_PREREQ([2.50])dnl
4898 +# expand $ac_aux_dir to an absolute path
4899 +am_aux_dir=`cd $ac_aux_dir && pwd`
4902 +# AM_CONDITIONAL -*- Autoconf -*-
4904 +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
4905 +# Free Software Foundation, Inc.
4907 +# This file is free software; the Free Software Foundation
4908 +# gives unlimited permission to copy and/or distribute it,
4909 +# with or without modifications, as long as this notice is preserved.
4913 +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
4914 +# -------------------------------------
4915 +# Define a conditional.
4916 +AC_DEFUN([AM_CONDITIONAL],
4917 +[AC_PREREQ(2.52)dnl
4918 + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
4919 + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
4920 +AC_SUBST([$1_TRUE])
4921 +AC_SUBST([$1_FALSE])
4929 +AC_CONFIG_COMMANDS_PRE(
4930 +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
4931 + AC_MSG_ERROR([[conditional "$1" was never defined.
4932 +Usually this means the macro was only invoked conditionally.]])
4936 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
4937 +# Free Software Foundation, Inc.
4939 +# This file is free software; the Free Software Foundation
4940 +# gives unlimited permission to copy and/or distribute it,
4941 +# with or without modifications, as long as this notice is preserved.
4945 +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
4946 +# written in clear, in which case automake, when reading aclocal.m4,
4947 +# will think it sees a *use*, and therefore will trigger all it's
4948 +# C support machinery. Also note that it means that autoscan, seeing
4949 +# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
4952 +# _AM_DEPENDENCIES(NAME)
4953 +# ----------------------
4954 +# See how the compiler implements dependency checking.
4955 +# NAME is "CC", "CXX", "GCJ", or "OBJC".
4956 +# We try a few techniques and use that to set a single cache variable.
4958 +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
4959 +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
4960 +# dependency, and given that the user is not expected to run this macro,
4961 +# just rely on AC_PROG_CC.
4962 +AC_DEFUN([_AM_DEPENDENCIES],
4963 +[AC_REQUIRE([AM_SET_DEPDIR])dnl
4964 +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
4965 +AC_REQUIRE([AM_MAKE_INCLUDE])dnl
4966 +AC_REQUIRE([AM_DEP_TRACK])dnl
4968 +ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
4969 + [$1], CXX, [depcc="$CXX" am_compiler_list=],
4970 + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
4971 + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
4972 + [depcc="$$1" am_compiler_list=])
4974 +AC_CACHE_CHECK([dependency style of $depcc],
4975 + [am_cv_$1_dependencies_compiler_type],
4976 +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4977 + # We make a subdir and do the tests there. Otherwise we can end up
4978 + # making bogus files that we don't know about and never remove. For
4979 + # instance it was reported that on HP-UX the gcc test will end up
4980 + # making a dummy file named `D' -- because `-MD' means `put the output
4982 + mkdir conftest.dir
4983 + # Copy depcomp to subdir because otherwise we won't find it if we're
4984 + # using a relative directory.
4985 + cp "$am_depcomp" conftest.dir
4987 + # We will build objects and dependencies in a subdirectory because
4988 + # it helps to detect inapplicable dependency modes. For instance
4989 + # both Tru64's cc and ICC support -MD to output dependencies as a
4990 + # side effect of compilation, but ICC will put the dependencies in
4991 + # the current directory while Tru64 will put them in the object
4995 + am_cv_$1_dependencies_compiler_type=none
4996 + if test "$am_compiler_list" = ""; then
4997 + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
4999 + for depmode in $am_compiler_list; do
5000 + # Setup a source with many dependencies, because some compilers
5001 + # like to wrap large dependency lists on column 80 (with \), and
5002 + # we should not choose a depcomp mode which is confused by this.
5004 + # We need to recreate these files for each test, as the compiler may
5005 + # overwrite some of them when testing with obscure command lines.
5006 + # This happens at least with the AIX C compiler.
5007 + : > sub/conftest.c
5008 + for i in 1 2 3 4 5 6; do
5009 + echo '#include "conftst'$i'.h"' >> sub/conftest.c
5010 + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5011 + # Solaris 8's {/usr,}/bin/sh.
5012 + touch sub/conftst$i.h
5014 + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5018 + # after this tag, mechanisms are not by side-effect, so they'll
5019 + # only be used when explicitly requested
5020 + if test "x$enable_dependency_tracking" = xyes; then
5028 + # We check with `-c' and `-o' for the sake of the "dashmstdout"
5029 + # mode. It turns out that the SunPro C++ compiler does not properly
5030 + # handle `-M -o', and we need to detect this.
5031 + if depmode=$depmode \
5032 + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
5033 + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5034 + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
5035 + >/dev/null 2>conftest.err &&
5036 + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5037 + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
5038 + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5039 + # icc doesn't choke on unknown options, it will just issue warnings
5040 + # or remarks (even with -Werror). So we grep stderr for any message
5041 + # that says an option was ignored or not supported.
5042 + # When given -MP, icc 7.0 and 7.1 complain thusly:
5043 + # icc: Command line warning: ignoring option '-M'; no argument required
5044 + # The diagnosis changed in icc 8.0:
5045 + # icc: Command line remark: option '-MP' not supported
5046 + if (grep 'ignoring option' conftest.err ||
5047 + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5048 + am_cv_$1_dependencies_compiler_type=$depmode
5055 + rm -rf conftest.dir
5057 + am_cv_$1_dependencies_compiler_type=none
5060 +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
5061 +AM_CONDITIONAL([am__fastdep$1], [
5062 + test "x$enable_dependency_tracking" != xno \
5063 + && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
5069 +# Choose a directory name for dependency files.
5070 +# This macro is AC_REQUIREd in _AM_DEPENDENCIES
5071 +AC_DEFUN([AM_SET_DEPDIR],
5072 +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
5073 +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
5079 +AC_DEFUN([AM_DEP_TRACK],
5080 +[AC_ARG_ENABLE(dependency-tracking,
5081 +[ --disable-dependency-tracking speeds up one-time build
5082 + --enable-dependency-tracking do not reject slow dependency extractors])
5083 +if test "x$enable_dependency_tracking" != xno; then
5084 + am_depcomp="$ac_aux_dir/depcomp"
5085 + AMDEPBACKSLASH='\'
5087 +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
5088 +AC_SUBST([AMDEPBACKSLASH])
5091 +# Generate code to set up dependency tracking. -*- Autoconf -*-
5093 +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
5094 +# Free Software Foundation, Inc.
5096 +# This file is free software; the Free Software Foundation
5097 +# gives unlimited permission to copy and/or distribute it,
5098 +# with or without modifications, as long as this notice is preserved.
5102 +# _AM_OUTPUT_DEPENDENCY_COMMANDS
5103 +# ------------------------------
5104 +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
5105 +[for mf in $CONFIG_FILES; do
5106 + # Strip MF so we end up with the name of the file.
5107 + mf=`echo "$mf" | sed -e 's/:.*$//'`
5108 + # Check whether this is an Automake generated Makefile or not.
5109 + # We used to match only the files named `Makefile.in', but
5110 + # some people rename them; so instead we look at the file content.
5111 + # Grep'ing the first line is not enough: some people post-process
5112 + # each Makefile.in and add a new line on top of each file to say so.
5113 + # So let's grep whole file.
5114 + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
5115 + dirpart=`AS_DIRNAME("$mf")`
5119 + # Extract the definition of DEPDIR, am__include, and am__quote
5120 + # from the Makefile without running `make'.
5121 + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
5122 + test -z "$DEPDIR" && continue
5123 + am__include=`sed -n 's/^am__include = //p' < "$mf"`
5124 + test -z "am__include" && continue
5125 + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
5126 + # When using ansi2knr, U may be empty or an underscore; expand it
5127 + U=`sed -n 's/^U = //p' < "$mf"`
5128 + # Find all dependency output files, they are included files with
5129 + # $(DEPDIR) in their names. We invoke sed twice because it is the
5130 + # simplest approach to changing $(DEPDIR) to its actual value in the
5132 + for file in `sed -n "
5133 + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
5134 + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
5135 + # Make sure the directory exists.
5136 + test -f "$dirpart/$file" && continue
5137 + fdir=`AS_DIRNAME(["$file"])`
5138 + AS_MKDIR_P([$dirpart/$fdir])
5139 + # echo "creating $dirpart/$file"
5140 + echo '# dummy' > "$dirpart/$file"
5143 +])# _AM_OUTPUT_DEPENDENCY_COMMANDS
5146 +# AM_OUTPUT_DEPENDENCY_COMMANDS
5147 +# -----------------------------
5148 +# This macro should only be invoked once -- use via AC_REQUIRE.
5150 +# This code is only required when automatic dependency tracking
5151 +# is enabled. FIXME. This creates each `.P' file that we will
5152 +# need in order to bootstrap the dependency handling code.
5153 +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
5154 +[AC_CONFIG_COMMANDS([depfiles],
5155 + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
5156 + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
5159 +# Do all the work for Automake. -*- Autoconf -*-
5161 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
5162 +# Free Software Foundation, Inc.
5164 +# This file is free software; the Free Software Foundation
5165 +# gives unlimited permission to copy and/or distribute it,
5166 +# with or without modifications, as long as this notice is preserved.
5170 +# This macro actually does too much. Some checks are only needed if
5171 +# your package does certain things. But this isn't really a big deal.
5173 +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
5174 +# AM_INIT_AUTOMAKE([OPTIONS])
5175 +# -----------------------------------------------
5176 +# The call with PACKAGE and VERSION arguments is the old style
5177 +# call (pre autoconf-2.50), which is being phased out. PACKAGE
5178 +# and VERSION should now be passed to AC_INIT and removed from
5179 +# the call to AM_INIT_AUTOMAKE.
5180 +# We support both call styles for the transition. After
5181 +# the next Automake release, Autoconf can make the AC_INIT
5182 +# arguments mandatory, and then we can depend on a new Autoconf
5183 +# release and drop the old call support.
5184 +AC_DEFUN([AM_INIT_AUTOMAKE],
5185 +[AC_PREREQ([2.58])dnl
5186 +dnl Autoconf wants to disallow AM_ names. We explicitly allow
5187 +dnl the ones we care about.
5188 +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
5189 +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
5190 +AC_REQUIRE([AC_PROG_INSTALL])dnl
5191 +# test to see if srcdir already configured
5192 +if test "`cd $srcdir && pwd`" != "`pwd`" &&
5193 + test -f $srcdir/config.status; then
5194 + AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
5197 +# test whether we have cygpath
5198 +if test -z "$CYGPATH_W"; then
5199 + if (cygpath --version) >/dev/null 2>/dev/null; then
5200 + CYGPATH_W='cygpath -w'
5205 +AC_SUBST([CYGPATH_W])
5207 +# Define the identity of the package.
5208 +dnl Distinguish between old-style and new-style calls.
5210 +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
5211 + AC_SUBST([PACKAGE], [$1])dnl
5212 + AC_SUBST([VERSION], [$2])],
5213 +[_AM_SET_OPTIONS([$1])dnl
5214 + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
5215 + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
5217 +_AM_IF_OPTION([no-define],,
5218 +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
5219 + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
5221 +# Some tools Automake needs.
5222 +AC_REQUIRE([AM_SANITY_CHECK])dnl
5223 +AC_REQUIRE([AC_ARG_PROGRAM])dnl
5224 +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
5225 +AM_MISSING_PROG(AUTOCONF, autoconf)
5226 +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
5227 +AM_MISSING_PROG(AUTOHEADER, autoheader)
5228 +AM_MISSING_PROG(MAKEINFO, makeinfo)
5230 +AM_PROG_INSTALL_STRIP
5231 +AC_REQUIRE([AM_PROG_MKDIR_P])dnl
5232 +# We need awk for the "check" target. The system "awk" is bad on
5234 +AC_REQUIRE([AC_PROG_AWK])dnl
5235 +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
5236 +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
5237 +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5238 + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5239 + [_AM_PROG_TAR([v7])])])
5240 +_AM_IF_OPTION([no-dependencies],,
5241 +[AC_PROVIDE_IFELSE([AC_PROG_CC],
5242 + [_AM_DEPENDENCIES(CC)],
5243 + [define([AC_PROG_CC],
5244 + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
5245 +AC_PROVIDE_IFELSE([AC_PROG_CXX],
5246 + [_AM_DEPENDENCIES(CXX)],
5247 + [define([AC_PROG_CXX],
5248 + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
5253 +# When config.status generates a header, we must update the stamp-h file.
5254 +# This file resides in the same directory as the config header
5255 +# that is generated. The stamp files are numbered to have different names.
5257 +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
5258 +# loop where config.status creates the headers, so we can generate
5259 +# our stamp files there.
5260 +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
5261 +[# Compute $1's index in $config_headers.
5263 +for _am_header in $config_headers :; do
5264 + case $_am_header in
5268 + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5271 +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
5273 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
5275 +# This file is free software; the Free Software Foundation
5276 +# gives unlimited permission to copy and/or distribute it,
5277 +# with or without modifications, as long as this notice is preserved.
5279 +# AM_PROG_INSTALL_SH
5280 +# ------------------
5281 +# Define $install_sh.
5282 +AC_DEFUN([AM_PROG_INSTALL_SH],
5283 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5284 +install_sh=${install_sh-"$am_aux_dir/install-sh"}
5285 +AC_SUBST(install_sh)])
5287 +# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
5289 +# This file is free software; the Free Software Foundation
5290 +# gives unlimited permission to copy and/or distribute it,
5291 +# with or without modifications, as long as this notice is preserved.
5295 +# Check whether the underlying file-system supports filenames
5296 +# with a leading dot. For instance MS-DOS doesn't.
5297 +AC_DEFUN([AM_SET_LEADING_DOT],
5298 +[rm -rf .tst 2>/dev/null
5299 +mkdir .tst 2>/dev/null
5300 +if test -d .tst; then
5305 +rmdir .tst 2>/dev/null
5306 +AC_SUBST([am__leading_dot])])
5308 +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
5309 +# From Jim Meyering
5311 +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
5312 +# Free Software Foundation, Inc.
5314 +# This file is free software; the Free Software Foundation
5315 +# gives unlimited permission to copy and/or distribute it,
5316 +# with or without modifications, as long as this notice is preserved.
5320 +AC_DEFUN([AM_MAINTAINER_MODE],
5321 +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
5322 + dnl maintainer-mode is disabled by default
5323 + AC_ARG_ENABLE(maintainer-mode,
5324 +[ --enable-maintainer-mode enable make rules and dependencies not useful
5325 + (and sometimes confusing) to the casual installer],
5326 + USE_MAINTAINER_MODE=$enableval,
5327 + USE_MAINTAINER_MODE=no)
5328 + AC_MSG_RESULT([$USE_MAINTAINER_MODE])
5329 + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
5330 + MAINT=$MAINTAINER_MODE_TRUE
5331 + AC_SUBST(MAINT)dnl
5335 +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
5337 +# Check to see how 'make' treats includes. -*- Autoconf -*-
5339 +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
5341 +# This file is free software; the Free Software Foundation
5342 +# gives unlimited permission to copy and/or distribute it,
5343 +# with or without modifications, as long as this notice is preserved.
5347 +# AM_MAKE_INCLUDE()
5348 +# -----------------
5349 +# Check to see how make treats includes.
5350 +AC_DEFUN([AM_MAKE_INCLUDE],
5351 +[am_make=${MAKE-make}
5352 +cat > confinc << 'END'
5357 +# If we don't find an include directive, just comment out the code.
5358 +AC_MSG_CHECKING([for style of include used by $am_make])
5362 +# First try GNU make style include.
5363 +echo "include confinc" > confmf
5364 +# We grep out `Entering directory' and `Leaving directory'
5365 +# messages which can occur if `w' ends up in MAKEFLAGS.
5366 +# In particular we don't look at `^make:' because GNU make might
5367 +# be invoked under some other name (usually "gmake"), in which
5368 +# case it prints its new name instead of `make'.
5369 +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5370 + am__include=include
5374 +# Now try BSD make style include.
5375 +if test "$am__include" = "#"; then
5376 + echo '.include "confinc"' > confmf
5377 + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5378 + am__include=.include
5383 +AC_SUBST([am__include])
5384 +AC_SUBST([am__quote])
5385 +AC_MSG_RESULT([$_am_result])
5386 +rm -f confinc confmf
5389 +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
5391 +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
5392 +# Free Software Foundation, Inc.
5394 +# This file is free software; the Free Software Foundation
5395 +# gives unlimited permission to copy and/or distribute it,
5396 +# with or without modifications, as long as this notice is preserved.
5400 +# AM_MISSING_PROG(NAME, PROGRAM)
5401 +# ------------------------------
5402 +AC_DEFUN([AM_MISSING_PROG],
5403 +[AC_REQUIRE([AM_MISSING_HAS_RUN])
5404 +$1=${$1-"${am_missing_run}$2"}
5408 +# AM_MISSING_HAS_RUN
5409 +# ------------------
5410 +# Define MISSING if not defined so far and test if it supports --run.
5411 +# If it does, set am_missing_run to use it, otherwise, to nothing.
5412 +AC_DEFUN([AM_MISSING_HAS_RUN],
5413 +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5414 +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
5415 +# Use eval to expand $SHELL
5416 +if eval "$MISSING --run true"; then
5417 + am_missing_run="$MISSING --run "
5420 + AC_MSG_WARN([`missing' script is too old or missing])
5424 +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
5426 +# This file is free software; the Free Software Foundation
5427 +# gives unlimited permission to copy and/or distribute it,
5428 +# with or without modifications, as long as this notice is preserved.
5432 +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
5434 +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
5435 +# created by `make install' are always world readable, even if the
5436 +# installer happens to have an overly restrictive umask (e.g. 077).
5437 +# This was a mistake. There are at least two reasons why we must not
5439 +# - it causes special bits like SGID to be ignored,
5440 +# - it may be too restrictive (some setups expect 775 directories).
5442 +# Do not use -m 0755 and let people choose whatever they expect by
5445 +# We cannot accept any implementation of `mkdir' that recognizes `-p'.
5446 +# Some implementations (such as Solaris 8's) are not thread-safe: if a
5447 +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
5448 +# concurrently, both version can detect that a/ is missing, but only
5449 +# one can create it and the other will error out. Consequently we
5450 +# restrict ourselves to GNU make (using the --version option ensures
5452 +AC_DEFUN([AM_PROG_MKDIR_P],
5453 +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
5454 + # We used to keeping the `.' as first argument, in order to
5455 + # allow $(mkdir_p) to be used without argument. As in
5456 + # $(mkdir_p) $(somedir)
5457 + # where $(somedir) is conditionally defined. However this is wrong
5458 + # for two reasons:
5459 + # 1. if the package is installed by a user who cannot write `.'
5460 + # make install will fail,
5461 + # 2. the above comment should most certainly read
5462 + # $(mkdir_p) $(DESTDIR)$(somedir)
5463 + # so it does not work when $(somedir) is undefined and
5464 + # $(DESTDIR) is not.
5465 + # To support the latter case, we have to write
5466 + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
5467 + # so the `.' trick is pointless.
5468 + mkdir_p='mkdir -p --'
5470 + # On NextStep and OpenStep, the `mkdir' command does not
5471 + # recognize any option. It will interpret all options as
5472 + # directories to create, and then abort because `.' already
5474 + for d in ./-p ./--version;
5476 + test -d $d && rmdir $d
5478 + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
5479 + if test -f "$ac_aux_dir/mkinstalldirs"; then
5480 + mkdir_p='$(mkinstalldirs)'
5482 + mkdir_p='$(install_sh) -d'
5485 +AC_SUBST([mkdir_p])])
5487 +# Helper functions for option handling. -*- Autoconf -*-
5489 +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
5491 +# This file is free software; the Free Software Foundation
5492 +# gives unlimited permission to copy and/or distribute it,
5493 +# with or without modifications, as long as this notice is preserved.
5497 +# _AM_MANGLE_OPTION(NAME)
5498 +# -----------------------
5499 +AC_DEFUN([_AM_MANGLE_OPTION],
5500 +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
5502 +# _AM_SET_OPTION(NAME)
5503 +# ------------------------------
5504 +# Set option NAME. Presently that only means defining a flag for this option.
5505 +AC_DEFUN([_AM_SET_OPTION],
5506 +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
5508 +# _AM_SET_OPTIONS(OPTIONS)
5509 +# ----------------------------------
5510 +# OPTIONS is a space-separated list of Automake options.
5511 +AC_DEFUN([_AM_SET_OPTIONS],
5512 +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
5514 +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
5515 +# -------------------------------------------
5516 +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
5517 +AC_DEFUN([_AM_IF_OPTION],
5518 +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
5520 +# Check to make sure that the build environment is sane. -*- Autoconf -*-
5522 +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
5523 +# Free Software Foundation, Inc.
5525 +# This file is free software; the Free Software Foundation
5526 +# gives unlimited permission to copy and/or distribute it,
5527 +# with or without modifications, as long as this notice is preserved.
5533 +AC_DEFUN([AM_SANITY_CHECK],
5534 +[AC_MSG_CHECKING([whether build environment is sane])
5537 +echo timestamp > conftest.file
5538 +# Do `set' in a subshell so we don't clobber the current shell's
5539 +# arguments. Must try -L first in case configure is actually a
5540 +# symlink; some systems play weird games with the mod time of symlinks
5541 +# (eg FreeBSD returns the mod time of the symlink's containing
5544 + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
5545 + if test "$[*]" = "X"; then
5547 + set X `ls -t $srcdir/configure conftest.file`
5549 + rm -f conftest.file
5550 + if test "$[*]" != "X $srcdir/configure conftest.file" \
5551 + && test "$[*]" != "X conftest.file $srcdir/configure"; then
5553 + # If neither matched, then we have a broken ls. This can happen
5554 + # if, for instance, CONFIG_SHELL is bash and it inherits a
5555 + # broken ls alias from the environment. This has actually
5556 + # happened. Such a system could not be considered "sane".
5557 + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
5558 +alias in your environment])
5561 + test "$[2]" = conftest.file
5567 + AC_MSG_ERROR([newly created file is older than distributed files!
5568 +Check your system clock])
5570 +AC_MSG_RESULT(yes)])
5572 +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
5574 +# This file is free software; the Free Software Foundation
5575 +# gives unlimited permission to copy and/or distribute it,
5576 +# with or without modifications, as long as this notice is preserved.
5578 +# AM_PROG_INSTALL_STRIP
5579 +# ---------------------
5580 +# One issue with vendor `install' (even GNU) is that you can't
5581 +# specify the program used to strip binaries. This is especially
5582 +# annoying in cross-compiling environments, where the build's strip
5583 +# is unlikely to handle the host's binaries.
5584 +# Fortunately install-sh will honor a STRIPPROG variable, so we
5585 +# always use install-sh in `make install-strip', and initialize
5586 +# STRIPPROG with the value of the STRIP variable (set by the user).
5587 +AC_DEFUN([AM_PROG_INSTALL_STRIP],
5588 +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
5589 +# Installed binaries are usually stripped using `strip' when the user
5590 +# run `make install-strip'. However `strip' might not be the right
5591 +# tool to use in cross-compilation environments, therefore Automake
5592 +# will honor the `STRIP' environment variable to overrule this program.
5593 +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
5594 +if test "$cross_compiling" != no; then
5595 + AC_CHECK_TOOL([STRIP], [strip], :)
5597 +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
5598 +AC_SUBST([INSTALL_STRIP_PROGRAM])])
5600 +# Check how to create a tarball. -*- Autoconf -*-
5602 +# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
5604 +# This file is free software; the Free Software Foundation
5605 +# gives unlimited permission to copy and/or distribute it,
5606 +# with or without modifications, as long as this notice is preserved.
5610 +# _AM_PROG_TAR(FORMAT)
5611 +# --------------------
5612 +# Check how to create a tarball in format FORMAT.
5613 +# FORMAT should be one of `v7', `ustar', or `pax'.
5615 +# Substitute a variable $(am__tar) that is a command
5616 +# writing to stdout a FORMAT-tarball containing the directory
5618 +# tardir=directory && $(am__tar) > result.tar
5620 +# Substitute a variable $(am__untar) that extract such
5621 +# a tarball read from stdin.
5622 +# $(am__untar) < result.tar
5623 +AC_DEFUN([_AM_PROG_TAR],
5624 +[# Always define AMTAR for backward compatibility.
5625 +AM_MISSING_PROG([AMTAR], [tar])
5627 + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
5628 + [m4_case([$1], [ustar],, [pax],,
5629 + [m4_fatal([Unknown tar format])])
5630 +AC_MSG_CHECKING([how to create a $1 tar archive])
5631 +# Loop over all known methods to create a tar archive until one works.
5632 +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
5633 +_am_tools=${am_cv_prog_tar_$1-$_am_tools}
5634 +# Do not fold the above two line into one, because Tru64 sh and
5635 +# Solaris sh will not grok spaces in the rhs of `-'.
5636 +for _am_tool in $_am_tools
5640 + for _am_tar in tar gnutar gtar;
5642 + AM_RUN_LOG([$_am_tar --version]) && break
5644 + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
5645 + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
5646 + am__untar="$_am_tar -xf -"
5649 + # Must skip GNU tar: if it does not support --format= it doesn't create
5650 + # ustar tarball either.
5651 + (tar --version) >/dev/null 2>&1 && continue
5652 + am__tar='tar chf - "$$tardir"'
5653 + am__tar_='tar chf - "$tardir"'
5654 + am__untar='tar xf -'
5657 + am__tar='pax -L -x $1 -w "$$tardir"'
5658 + am__tar_='pax -L -x $1 -w "$tardir"'
5659 + am__untar='pax -r'
5662 + am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
5663 + am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
5664 + am__untar='cpio -i -H $1 -d'
5673 + # If the value was cached, stop now. We just wanted to have am__tar
5674 + # and am__untar set.
5675 + test -n "${am_cv_prog_tar_$1}" && break
5677 + # tar/untar a dummy directory, and stop if the command works
5678 + rm -rf conftest.dir
5679 + mkdir conftest.dir
5680 + echo GrepMe > conftest.dir/file
5681 + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
5682 + rm -rf conftest.dir
5683 + if test -s conftest.tar; then
5684 + AM_RUN_LOG([$am__untar <conftest.tar])
5685 + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
5688 +rm -rf conftest.dir
5690 +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
5691 +AC_MSG_RESULT([$am_cv_prog_tar_$1])])
5692 +AC_SUBST([am__tar])
5693 +AC_SUBST([am__untar])
5696 +m4_include([../../../../aclocal/bsp-configure.m4])
5697 +m4_include([../../../../aclocal/canonical-target-name.m4])
5698 +m4_include([../../../../aclocal/canonicalize-tools.m4])
5699 +m4_include([../../../../aclocal/check-custom-bsp.m4])
5700 +m4_include([../../../../aclocal/check-multiprocessing.m4])
5701 +m4_include([../../../../aclocal/check-tool.m4])
5702 +m4_include([../../../../aclocal/enable-multiprocessing.m4])
5703 +m4_include([../../../../aclocal/env-rtemsbsp.m4])
5704 +m4_include([../../../../aclocal/gcc-isystem.m4])
5705 +m4_include([../../../../aclocal/gcc-pipe.m4])
5706 +m4_include([../../../../aclocal/gcc-specs.m4])
5707 +m4_include([../../../../aclocal/multilib.m4])
5708 +m4_include([../../../../aclocal/prog-cc.m4])
5709 +m4_include([../../../../aclocal/prog-ccas.m4])
5710 +m4_include([../../../../aclocal/project-root.m4])
5711 +m4_include([../../../../aclocal/rtems-top.m4])
5712 +m4_include([../../../../aclocal/version.m4])
5713 Index: rtems-051009/c/src/lib/libbsp/m68k/mo376/wrapup/.keep
5714 ===================================================================
5716 +++ rtems/c/src/lib/libbsp/m68k/mo376/wrapup/.keep