]> rtime.felk.cvut.cz Git - rtems-devel.git/blob - rtems-patches/rtems-clone-ss555-to-ec555.patch
Patches updated to the newer RTEMS version.
[rtems-devel.git] / rtems-patches / rtems-clone-ss555-to-ec555.patch
1 Index: rtems/c/src/lib/libbsp/powerpc/ec555/.cvsignore
2 ===================================================================
3 --- /dev/null
4 +++ rtems/c/src/lib/libbsp/powerpc/ec555/.cvsignore
5 @@ -0,0 +1,14 @@
6 +aclocal.m4
7 +autom4te*.cache
8 +config.cache
9 +config.guess
10 +config.log
11 +config.status
12 +config.sub
13 +configure
14 +depcomp
15 +install-sh
16 +Makefile
17 +Makefile.in
18 +missing
19 +mkinstalldirs
20 Index: rtems/c/src/lib/libbsp/powerpc/ec555/ChangeLog
21 ===================================================================
22 --- /dev/null
23 +++ rtems/c/src/lib/libbsp/powerpc/ec555/ChangeLog
24 @@ -0,0 +1,119 @@
25 +2006-03-08     Joel Sherrill <joel@OARcorp.com>
26 +
27 +       * startup/linkcmds: Add .gnu.linkonce.b.* section.
28 +
29 +2006-02-08     Joel Sherrill <joel@OARcorp.com>
30 +
31 +       * startup/linkcmds: Add sections required by newer gcc versions.
32 +
33 +2006-01-11     Ralf Corsepius <ralf.corsepius@rtems.org>
34 +
35 +       * configure.ac: Remove explicit ampolish3 support (now in
36 +       RTEMS_BSP_CONFIGURE).
37 +
38 +2006-01-10     Ralf Corsepius <ralf.corsepius@rtems.org>
39 +
40 +       * configure.ac: Add ampolish3 support.
41 +       * Makefile.am: Add preinstall.am.
42 +
43 +2006-01-09     Ralf Corsepius <ralf.corsepius@rtems.org>
44 +
45 +       * Makefile.am: Don't include subdirs.am.
46 +
47 +2005-05-26     Ralf Corsepius <ralf.corsepius@rtems.org>
48 +
49 +       * include/bsp.h: New header guard.
50 +
51 +2005-05-10     Ralf Corsepius <ralf.corsepius@rtems.org>
52 +
53 +       * console/console.c: Eliminate unsigned8.
54 +
55 +2005-04-26     Joel Sherrill <joel@OARcorp.com>
56 +
57 +       * startup/bspstart.c: Eliminate warnings.
58 +
59 +2005-04-25      Jennifer Averett <jennifer.averett@oarcorp.com>
60 +
61 +        PR 779/bsp
62 +        * clock/p_clock.c: Add parameter to powerpc exception handler routines
63 +
64 +2005-02-17     Ralf Corsepius <ralf.corsepius@rtems.org>
65 +
66 +       * startup/bspstart.c: include <rtems/powerpc/powerpc.h>.
67 +       Use PPC_MINIMUM_STACK_FRAME_SIZE instead of
68 +       CPU_MINIMUM_STACK_FRAME_SIZE.
69 +
70 +2005-02-16     Ralf Corsepius <ralf.corsepius@rtems.org>
71 +
72 +       * configure.ac: Remove argument from RTEMS_PPC_EXCEPTIONS.
73 +
74 +2005-02-11     Ralf Corsepius <ralf.corsepius@rtems.org>
75 +
76 +       * Makefile.am: Merge-in wrapup/Makefile.am.
77 +       * wrapup/Makefile.am: Remove.
78 +       * configure.ac: Reflect changes above.
79 +
80 +2005-01-07     Ralf Corsepius <ralf.corsepius@rtems.org>
81 +
82 +       * Makefile.am: Eliminate CFLAGS_OPTIMIZE_V.
83 +
84 +2005-01-02     Ralf Corsepius <ralf.corsepius@rtems.org>
85 +
86 +       * Makefile.am, wrapup/Makefile.am: Remove build-variant support.
87 +
88 +2004-10-20     Ralf Corsepius <ralf_corsepius@rtems.org>
89 +
90 +       * console/console.c, include/bsp.h, startup/bspstart.c,
91 +       startup/iss555.c: Use POSIX fixed size types.
92 +
93 +2004-09-24     Ralf Corsepius <ralf_corsepius@rtems.org>
94 +
95 +       * configure.ac: Require automake > 1.9.
96 +
97 +2004-04-23     Ralf Corsepius <ralf_corsepius@rtems.org>
98 +
99 +       PR 610/bsps
100 +       * Makefile.am: Add include/tm27.h, Cosmetics.
101 +       * include/tm27.h: Final cosmetics.
102 +
103 +2004-04-22     Ralf Corsepius <ralf_corsepius@rtems.org>
104 +
105 +       * include/bsp.h: Split out tmtest27 support.
106 +       * include/tm27.h: New.
107 +
108 +2004-04-21     Joel Sherrill <joel@OARcorp.com>
109 +
110 +       PR 611/bsps
111 +       * Makefile.am, include/bsp.h, wrapup/Makefile.am: Follow conventions
112 +       for tm27 and do not add another macro definition.
113 +       * startup/tm27supp.c: New file.
114 +
115 +2004-04-21     Joel Sherrill <joel@OARcorp.com>
116 +
117 +       PR 611/bsps
118 +       * Makefile.am, include/bsp.h, wrapup/Makefile.am: Follow conventions
119 +       for tm27 and do not add another macro definition.
120 +       * startup/tm27supp.c: New file.
121 +
122 +2004-04-21     Ralf Corsepius <ralf_corsepius@rtems.org>
123 +
124 +       PR 613/bsps
125 +       * include/bsp.h: Remove MAX_LONG_TEST_DURATION.
126 +
127 +2004-04-21     Ralf Corsepius <ralf_corsepius@rtems.org>
128 +
129 +       PR 614/bsps
130 +       * include/bsp.h: Remove MAX_SHORT_TEST_DURATION (Unused).
131 +
132 +2004-04-13     Ralf Corsepius <ralf_corsepius@rtems.org>
133 +
134 +       * include/bsp.h, startup/start.S: Reflect new locations of cpukit headers.
135 +
136 +2004-04-12     David Querbach <querbach@realtime.bc.ca>
137 +
138 +       * .cvsignore, ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
139 +       times, clock/p_clock.c, console/console.c, include/.cvsignore,
140 +       include/bsp.h, include/coverhd.h, irq/irq.h, startup/bspstart.c,
141 +       startup/iss555.c, startup/linkcmds, startup/start.S,
142 +       wrapup/.cvsignore, wrapup/Makefile.am: New files.
143 +
144 Index: rtems/c/src/lib/libbsp/powerpc/ec555/Makefile.am
145 ===================================================================
146 --- /dev/null
147 +++ rtems/c/src/lib/libbsp/powerpc/ec555/Makefile.am
148 @@ -0,0 +1,65 @@
149 +##
150 +## $Id: Makefile.am,v 1.10 2006/01/12 10:12:30 ralf Exp $
151 +##
152 +
153 +ACLOCAL_AMFLAGS = -I ../../../../aclocal
154 +
155 +include $(top_srcdir)/../../../../automake/compile.am
156 +include $(top_srcdir)/../../bsp.am
157 +
158 +dist_project_lib_DATA = bsp_specs
159 +
160 +include_HEADERS = include/bsp.h
161 +include_HEADERS += include/tm27.h
162 +
163 +nodist_include_HEADERS = include/bspopts.h
164 +DISTCLEANFILES = include/bspopts.h
165 +
166 +noinst_PROGRAMS =
167 +
168 +include_bspdir = $(includedir)/bsp
169 +
170 +include_HEADERS += include/coverhd.h
171 +include_bsp_HEADERS = irq/irq.h
172 +
173 +EXTRA_DIST = times
174 +
175 +dist_project_lib_DATA += startup/linkcmds
176 +
177 +noinst_PROGRAMS += pclock.rel
178 +pclock_rel_SOURCES = clock/p_clock.c
179 +pclock_rel_CPPFLAGS = $(AM_CPPFLAGS)
180 +pclock_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
181 +
182 +noinst_PROGRAMS += console.rel
183 +console_rel_SOURCES = console/console.c
184 +console_rel_CPPFLAGS = $(AM_CPPFLAGS)
185 +console_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
186 +
187 +noinst_PROGRAMS += startup.rel
188 +startup_rel_SOURCES = ../../shared/bspclean.c ../../shared/bsplibc.c \
189 +    ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \
190 +    startup/iss555.c ../../shared/main.c ../../shared/sbrk.c \
191 +    ../../shared/gnatinstallhandler.c startup/start.S
192 +startup_rel_CPPFLAGS = $(AM_CPPFLAGS)
193 +startup_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
194 +
195 +noinst_PROGRAMS += tm27supp.rel
196 +tm27supp_rel_SOURCES = startup/tm27supp.c
197 +tm27supp_rel_CPPFLAGS = $(AM_CPPFLAGS)
198 +tm27supp_rel_LDFLAGS = $(RTEMS_RELLDFLAGS)
199 +
200 +noinst_LIBRARIES = libbsp.a
201 +libbsp_a_SOURCES =
202 +libbsp_a_LIBADD = pclock.rel console.rel startup.rel tm27supp.rel
203 +libbsp_a_LIBADD += ../../../libcpu/@RTEMS_CPU@/shared/cpuIdent.rel \
204 +    ../../../libcpu/@RTEMS_CPU@/@exceptions@/rtems-cpu.rel \
205 +    ../../../libcpu/@RTEMS_CPU@/mpc5xx/clock.rel \
206 +    ../../../libcpu/@RTEMS_CPU@/mpc5xx/console-generic.rel \
207 +    ../../../libcpu/@RTEMS_CPU@/mpc5xx/exceptions.rel \
208 +    ../../../libcpu/@RTEMS_CPU@/mpc5xx/irq.rel \
209 +    ../../../libcpu/@RTEMS_CPU@/mpc5xx/timer.rel \
210 +    ../../../libcpu/@RTEMS_CPU@/mpc5xx/vectors.rel
211 +
212 +include $(srcdir)/preinstall.am
213 +include $(top_srcdir)/../../../../automake/local.am
214 Index: rtems/c/src/lib/libbsp/powerpc/ec555/README
215 ===================================================================
216 --- /dev/null
217 +++ rtems/c/src/lib/libbsp/powerpc/ec555/README
218 @@ -0,0 +1,262 @@
219 +#
220 +#  $Id: README,v 1.1 2004/04/12 21:52:13 joel Exp $
221 +#
222 +
223 +This is a README file for the Intec SS555 of RTEMS 4.6.0
224 +
225 +The SS555 port was sponsored by Defence Research and Development 
226 +Canada - Suffield, and is Copyright (C) 2004, Real-Time Systems Inc.
227 +
228 +Please send any comments, improvements, or bug reports to:
229 +
230 +David Querbach
231 +querbach@realtime.bc.ca
232 +
233 +
234 +Summary
235 +-------
236 +
237 +BSP NAME:           ss555
238 +BOARD:              Intec Automation Inc. SS555
239 +BUS:                None 
240 +CPU FAMILY:         PowerPC
241 +CPU:                PowerPC MPC555
242 +COPROCESSORS:       Built-in Motorola TPU
243 +MODE:               32 bit mode
244 +
245 +DEBUG MONITOR:      None
246 +
247 +PERIPHERALS
248 +===========
249 +TIMERS:             PIT / Timebase
250 +  RESOLUTION:       1 microsecond (4 MHz crystal / 4)
251 +SERIAL PORTS:       2 SCI
252 +REAL-TIME CLOCK:    On-chip.
253 +DMA:                None.
254 +VIDEO:              None.
255 +SCSI:               None.
256 +NETWORKING:         None.
257 +                  
258 +
259 +DRIVER INFORMATION
260 +==================
261 +CLOCK DRIVER:       yes
262 +CONSOLE DRIVER:     yes
263 +SHMSUPP:            N/A
264 +TIMER DRIVER:       yes
265 +NETWORK DRIVER:            no
266 +
267 +NOTES
268 +=====
269 +On-chip resources:
270 +       SCI1            serial port
271 +       SCI2            serial port (console)
272 +       PIT             clock
273 +       TB              timing test support
274 +       DEC
275 +       SWT             watchdog timer -- enable in startup/iss555.c
276 +       *CS0            external 512k 2-1-1-1 Burst SRAM
277 +       *CS1
278 +       *CS2
279 +       *CS3            CPLD
280 +       IRQ0
281 +       IRQ1
282 +       IRQ2            
283 +       IRQ3            
284 +       IRQ4            
285 +       IRQ5    
286 +       IRQ6
287 +       IRQ7
288 +       IRQ_LVL0        
289 +       IRQ_LVL1
290 +       IRQ_LVL2
291 +       IRQ_LVL3
292 +       IRQ_LVL4
293 +       IRQ_LVL5        SCI
294 +       IRQ_LVL6        PIT
295 +       IRQ_LVL7
296 +       
297 +
298 +Board description
299 +-----------------
300 +Clock rate:     40 MHz development/embeddable board
301 +Bus width:      32-bit on-board RAM, 16-bit off-board I/O
302 +FLASH:         512k on-chip
303 +RAM:            512k 2-1-1-1 burst SRAM
304 +
305 +
306 +Installation
307 +------------
308 +
309 +The ss555 port uses the Intec SS555's external RAM in two different ways,
310 +depending on whether or not it is built for debugging by giving the
311 +VARIANT=DEBUG switch to make:
312 +
313 +       make VARIANT=DEBUG all
314 +
315 +1.  In the debugging case, the linker script concanttenates the .text,
316 +.data, and .bss sections starting at location zero, so they all can be
317 +loaded into the external RAM for debugging.  We assume that the debugger
318 +disables the internal Flash ROM and enables the external RAM before loading
319 +the code into the external RAM.
320 +
321 +2.  In the normal (non-debugging) case, the linker script still places the
322 +.text section near zero, but places the start of the .data and .bss sections
323 +at the start location of the MPC555's internal RAM.  The system startup code
324 +then configures the external RAM just after the internal RAM in memory,
325 +forming one large block from the two RAM devices.
326 +
327 +
328 +Console driver
329 +---------------
330 +
331 +This BSP includes an termios-capable asynchronous serial line driver that
332 +supports SCI1 and SCI2. The RTEMS console is selected at configuration time
333 +with the CONSOLE_MINOR variable (see .../ss555/configure.ac).  We default to
334 +SCI2 for the console, since SCI1 has some extra features which may be
335 +desired for application use.
336 +
337 +The BSP console supports three different modes of operation:
338 +
339 +  1. polled I/O done with termios support,
340 +  2. polled I/O done without termios support,
341 +  3. interrupt-driven I/O with termios support.
342 +     
343 +The mode of operation of the serial driver is determined at configure time in
344 +part by the value of the UARTS_IO_MODE variable (see .../ss555/configure.ac).
345 +
346 +  0 - polled I/O.
347 +  1 - interrupt-driven I/O.
348 +  
349 +Also, set the value of UARTS_USE_TERMIOS to select whether termios should be
350 +used to perform buffering and input/output processing. Without termios
351 +support, input processing is limited to the substitution of LF for a
352 +received CR, and output processing is limited to the transmission of a CR
353 +following the transmission of a LF. The choices for UARTS_USE_TERMIOS are:
354 +
355 +  0 - do not use termios
356 +  1 - use termios
357 +
358 +In most real-time applications, the driver should be configured to use
359 +termios and interrupt-driven I/O. Special requirements may dictate otherwise.
360 +
361 +Polled I/O must be used when running the timing tests. It must also be used
362 +to run some other tests and some samples, such as the cdtest. Some tests
363 +change the interrupt mask and will hang interrupt-driven I/O indefinitely.
364 +Others, such as cdtest, perform console output from the static constructors
365 +before the console is opened, causing the test to hang. Still other tests
366 +produce output that is supposed to be in some specific order. For these
367 +tests, termios should not be used, as termios buffers output and the
368 +transmission of the buffers occur at somewhat unpredictable times.
369 +
370 +The real solution is to fix the tests so that they work with interrupt-driven
371 +I/O and termios.
372 +
373 +
374 +printk() and debug output
375 +-----------------------
376 +
377 +The implementation of printk() in RTEMS is mostly independent of most system
378 +services. The printk() function can therefore be used to print messages to a
379 +debug console, particularly when debugging startup code or device drivers,
380 +i.e. code that runs before the console driver is opened or that runs with
381 +interrupts disabled.
382 +
383 +Support is provided to send printk output to either port. Specify the
384 +desired port at configure time by setting the value of PRINTK_MINOR to one
385 +of SCI1_MINOR or SCI2_MINOR.
386 +
387 +printk() always uses polled I/O, and never uses termios.
388 +
389 +If the printk() port is opened by RTEMS, then UARTS_IO_MODE must be set for
390 +polled I/O, otherwise the I/O functions will be in conflict.  Using printk()
391 +before the port is initialized is, of course, not possible.  This
392 +initialization occurs in console_initialize(), which is called by
393 +rtems_initialize_executive_early().
394 +
395 +
396 +Watchdog Timer
397 +--------------
398 +
399 +The MPC555 watchdog timer can be enabled at configuration time by defining
400 +the WATCHDOG_TIMEOUT variable.  This variable sets the watchdog timeout
401 +period in steps of
402 +
403 +         2048          2048
404 +       ---------  =  ---------  =  51.2 usec
405 +        Fsystem       40 MHz
406 +
407 +or about 1/20 msec.  When WATCHDOG_TIMEOUT is left undefined, the watchdog
408 +timer is disabled.
409 +
410 +
411 +Miscellaneous
412 +-------------
413 +
414 +Most code came from the mbx8xx port, except for the floating-point handling
415 +which came from the mpc8260ads.
416 +
417 +
418 +Host System
419 +-----------
420 +
421 +The port was developed on an x86 box running Debian 3.0.  The toolchain was
422 +built from the sources at rtems.org, except for the autotools which came
423 +from the Debian distribution.
424 +
425 +
426 +Test Configuration
427 +------------------
428 +
429 +Board:                Intec SS555 v1.1
430 +CPU:                  Motorola MPC555LFMZP40, mask 1K83H
431 +Clock Speed:          Crystal 4.0 MHz, CPU 40.0 MHz
432 +RAM:                  512K bytes of 2-1-1-1 Burst SRAM
433 +Times Reported in:    Microseconds
434 +Timer Source:         Timebase clock
435 +GCC Flags:            -O4 -fno-keep-inline-functions -mcpu=(821/860) 
436 +Console:              Operates in polled mode on SMC2. No I/O through EPPC-Bug.    
437 +
438 +
439 +Test Results
440 +------------
441 +
442 +Single processor tests:  
443 +  All tests passed, except that:
444 +    - sp09 aborts due to memory shortage
445 +    - sp20 needs to be run with output buffering enabled (see
446 +      buffer_test_io.h)
447 +
448 +Multi-processor tests:  
449 +  Not applicable.
450 +
451 +Library tests:
452 +  All tests passed.  Note that the termios test only works if the system is
453 +  rebuilt with termios enabled.                         
454 +
455 +Posix tests:
456 +  All tests passed, except that:
457 +    - the message queue test failed with "errno (91 - File or path name too
458 +      long)"
459 +
460 +Timing tests:
461 +  Due to memory limitations, many of the tests will not run unless you set
462 +  OPERATION_COUNT=20 at configuration time.
463 +
464 +  To run tm27 (the interrupt latency timer test), short CN5-48 to CN5-50 on
465 +  the SS555 board.
466 +
467 +  All tests run cleanly, except for tm26, which gives a "PANIC 12" after it
468 +  exits.  This doesn't seem to cause a problem otherwise.
469 +
470 +  See the times file for the results of the timing tests.
471 +
472 +Network tests:  
473 +  Not applicable.
474 +
475 +Sample programs:
476 +  These run correctly, except that:
477 +    - The "minimum" sample is not designed to run properly on any system.
478 +    - The loopback, fileio, unilimited, and pppd tests fail due to memory
479 +      limitations.
480 +    - The paranoia program dies on a floating-point assist exception.
481 Index: rtems/c/src/lib/libbsp/powerpc/ec555/bsp_specs
482 ===================================================================
483 --- /dev/null
484 +++ rtems/c/src/lib/libbsp/powerpc/ec555/bsp_specs
485 @@ -0,0 +1,20 @@
486 +%rename lib old_lib
487 +%rename endfile old_endfile
488 +%rename startfile old_startfile
489 +%rename link old_link
490 +
491 +*lib:
492 +%{!qrtems: %(old_lib)} %{!nostdlib: %{qrtems: --start-group \
493 +%{!qrtems_debug: -lrtemsbsp -lrtemscpu} %{qrtems_debug: -lrtemsbsp_g -lrtemscpu_g} \
494 +%{qjava: -lffi -lgcjgc -lzgcj -lgcj} %{qc++: -lstdc++} -lc -lgcc --end-group \
495 +%{!qnolinkcmds: %{qrtems_debug: --defsym RTEMS_DEBUG=1} -T linkcmds%s -Map %b.map}}}
496 +
497 +*startfile:
498 +%{!qrtems: %(old_startfile)} %{!nostdlib: %{qrtems: ecrti%O%s}}
499 +
500 +*endfile:
501 +%{!qrtems: %(old_endfile)} %{qrtems: ecrtn%O%s}
502 +
503 +*link:
504 +%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N -u start -e start}
505 +
506 Index: rtems/c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c
507 ===================================================================
508 --- /dev/null
509 +++ rtems/c/src/lib/libbsp/powerpc/ec555/clock/p_clock.c
510 @@ -0,0 +1,69 @@
511 +/*
512 + *  Clock Tick interrupt conexion code.
513 + *
514 + *  COPYRIGHT (c) 1989-1997.
515 + *  On-Line Applications Research Corporation (OAR).
516 + *
517 + *  The license and distribution terms for this file may in
518 + *  the file LICENSE in this distribution or at
519 + *  http://www.rtems.com/license/LICENSE.
520 + *
521 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
522 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
523 + *
524 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/clock/p_clock.c:
525 + *
526 + *  Modified to support the MPC750.
527 + *  Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
528 + *
529 + *  $Id: p_clock.c,v 1.3 2005/04/25 14:46:37 jennifer Exp $
530 + */
531 +
532 +#include <bsp.h>
533 +#include <bsp/irq.h>
534 +#include <rtems/bspIo.h>
535 +
536 +extern void clockOn(void*);
537 +extern void clockOff (void*);
538 +extern int clockIsOn(void*);
539 +extern void Clock_isr(void *);
540 +
541 +static rtems_irq_connect_data clockIrqData = {
542 +  CPU_PERIODIC_TIMER,
543 +  (rtems_irq_hdl)Clock_isr,
544 +  NULL,
545 +  (rtems_irq_enable)clockOn,
546 +  (rtems_irq_disable)clockOff,
547 +  (rtems_irq_is_enabled)clockIsOn
548 +};
549 +
550 +int BSP_disconnect_clock_handler (void)
551 +{
552 +  if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
553 +     printk("Unable to stop system clock\n");
554 +    rtems_fatal_error_occurred(1);
555 +  }
556 +  return BSP_remove_rtems_irq_handler (&clockIrqData);
557 +}
558 +
559 +int BSP_connect_clock_handler (rtems_irq_hdl hdl)
560 +{
561 +  if (!BSP_get_current_rtems_irq_handler(&clockIrqData)) {
562 +     printk("Unable to get system clock handler\n");
563 +    rtems_fatal_error_occurred(1);
564 +  }
565 +  if (!BSP_remove_rtems_irq_handler (&clockIrqData)) {
566 +   printk("Unable to remove current system clock handler\n");
567 +    rtems_fatal_error_occurred(1);
568 +  }
569 +  /*
570 +   * Reinit structure
571 +   */
572 +  clockIrqData.name = CPU_PERIODIC_TIMER;
573 +  clockIrqData.hdl = (rtems_irq_hdl) hdl;
574 +  clockIrqData.on = (rtems_irq_enable)clockOn;
575 +  clockIrqData.off = (rtems_irq_enable)clockOff;
576 +  clockIrqData.isOn = (rtems_irq_is_enabled)clockIsOn;
577 +
578 +  return BSP_install_rtems_irq_handler (&clockIrqData);
579 +}
580 Index: rtems/c/src/lib/libbsp/powerpc/ec555/configure.ac
581 ===================================================================
582 --- /dev/null
583 +++ rtems/c/src/lib/libbsp/powerpc/ec555/configure.ac
584 @@ -0,0 +1,52 @@
585 +## Process this file with autoconf to produce a configure script.
586 +## 
587 +## $Id: configure.ac,v 1.7 2006/01/11 04:52:39 ralf Exp $
588 +
589 +AC_PREREQ(2.59)
590 +AC_INIT([rtems-c-src-lib-libbsp-powerpc-mbx5xx],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
591 +AC_CONFIG_SRCDIR([bsp_specs])
592 +RTEMS_TOP(../../../../../..)
593 +
594 +RTEMS_CANONICAL_TARGET_CPU
595 +AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.9])
596 +RTEMS_BSP_CONFIGURE
597 +
598 +RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm])
599 +RTEMS_CANONICALIZE_TOOLS
600 +RTEMS_PROG_CCAS
601 +
602 +RTEMS_CHECK_NETWORKING
603 +AM_CONDITIONAL(HAS_NETWORKING,test "$HAS_NETWORKING" = "yes")
604 +
605 +RTEMS_BSPOPTS_SET([WATCHDOG_TIMEOUT],[*],[0xFFFF])
606 +RTEMS_BSPOPTS_HELP([WATCHDOG_TIMEOUT], 
607 +[Define to the desired timeout (in steps of 1/20 msec) to enable the
608 + watchdog.  Default is to disable the watchdog entirely.])
609 +
610 +RTEMS_BSPOPTS_SET([UARTS_USE_TERMIOS],[*],[0])
611 +RTEMS_BSPOPTS_HELP([UARTS_USE_TERMIOS],
612 +[Define to 1 if you want termios support for every port.
613 + Termios support is independent of the choice of UART I/O mode.])
614 +
615 +RTEMS_BSPOPTS_SET([CONSOLE_MINOR],[*],[SCI2_MINOR])
616 +RTEMS_BSPOPTS_HELP([CONSOLE_MINOR],
617 +[Must be defined to be one of SCI1_MINOR or SCI2_MINOR.  Determines which
618 + device will be registered as /dev/console.])
619 +
620 +RTEMS_BSPOPTS_SET([UARTS_IO_MODE],[*],[0])
621 +RTEMS_BSPOPTS_HELP([UARTS_IO_MODE],
622 +[Define to 1 if you want interrupt-driven I/O for the SCI ports.])
623 +
624 +RTEMS_BSPOPTS_SET([PRINTK_MINOR],[*],[SCI2_MINOR])
625 +RTEMS_BSPOPTS_HELP([PRINTK_MINOR],
626 +[Must be defined to be one of SCI1_MINOR or SCI2_MINOR.  Determines which
627 + device is used for output by printk().  The printk port always uses polled
628 + I/O.  Don't open the printk port from RTEMS unless also using polled I/O
629 + for the SCI ports.])
630 +
631 +# Explicitly list a Makefile here 
632 +AC_CONFIG_FILES([Makefile])
633 +
634 +RTEMS_PPC_EXCEPTIONS
635 +
636 +AC_OUTPUT
637 Index: rtems/c/src/lib/libbsp/powerpc/ec555/console/console.c
638 ===================================================================
639 --- /dev/null
640 +++ rtems/c/src/lib/libbsp/powerpc/ec555/console/console.c
641 @@ -0,0 +1,368 @@
642 +/*
643 + *  console.c
644 + *
645 + *  This file contains the Intec SS555 termios serial I/O package.
646 + *
647 + *  The SCI channels are assigned as follows
648 + *
649 + *   Channel     Device      Minor
650 + *    SCI1      /dev/tty0      0
651 + *    SCI2      /dev/tty1      1
652 + *
653 + *  All ports support termios. The use of termios is recommended for real-time
654 + *  applications. Termios provides buffering and input processing. When not
655 + *  using termios, processing is limited to the substitution of LF for CR on
656 + *  input, and the output of a CR following the output of a LF character.
657 + *  Note that the terminal should not send CR/LF pairs when the return key
658 + *  is pressed, and that output lines are terminated with LF/CR, not CR/LF
659 + *  (although that would be easy to change).
660 + *
661 + *  I/O may be interrupt-driven (recommended for real-time applications) or
662 + *  polled.
663 + *
664 + *  LIMITATIONS:
665 + *
666 + *  It is not possible to use different I/O modes on the different ports. The
667 + *  exception is with printk. The printk port can use a different mode from
668 + *  the other ports. If this is done, it is important not to open the printk
669 + *  port from an RTEMS application.
670 + *
671 + *  Currently, the I/O modes are determined at build time. It would be much
672 + *  better to have the mode selected at boot time based on parameters in
673 + *  NVRAM.
674 + *
675 + *  Interrupt-driven I/O requires termios.
676 + *
677 + *  TESTS:
678 + *
679 + *  TO RUN THE TESTS, USE POLLED I/O WITHOUT TERMIOS SUPPORT. Some tests
680 + *  play with the interrupt masks and turn off I/O. Those tests will hang
681 + *  when interrupt-driven I/O is used. Other tests, such as cdtest, do I/O
682 + *  from the static constructors before the console is open. This test
683 + *  will not work with interrupt-driven I/O. Because of the buffering
684 + *  performed in termios, test output may not be in sequence.The tests
685 + *  should all be fixed to work with interrupt-driven I/O and to
686 + *  produce output in the expected sequence. Obviously, the termios test
687 + *  requires termios support in the driver.
688 + *
689 + *  Set CONSOLE_MINOR to the appropriate device minor number in the
690 + *  config file. This allows the RTEMS application console to be different
691 + *  from the GDB port.
692 + *
693 + *  This driver handles both available serial ports: it distinguishes
694 + *  the sub-devices using minor device numbers. It is not possible to have
695 + *  other protocols running on the other ports when this driver is used as
696 + *  currently written.
697 + *
698 + *
699 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
700 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
701 + *
702 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/console/console.c:
703 + *
704 + *  Based on code (alloc860.c in eth_comm port) by
705 + *  Jay Monkman (jmonkman@frasca.com),
706 + *  Copyright (C) 1998 by Frasca International, Inc.
707 + *
708 + *  Modifications by Darlene Stewart <Darlene.Stewart@iit.nrc.ca>
709 + *  and Charles-Antoine Gauthier <charles.gauthier@iit.nrc.ca>.
710 + *  Copyright (c) 2000, National Research Council of Canada
711 + *
712 + */
713 +#include <stdarg.h>
714 +#include <stdio.h>
715 +#include <bsp.h>                /* Must be before libio.h */
716 +#include <rtems/bspIo.h>
717 +#include <rtems/libio.h>
718 +#include <termios.h>
719 +
720 +static void _BSP_output_char( char c );
721 +static rtems_status_code do_poll_read( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
722 +static rtems_status_code do_poll_write( rtems_device_major_number major, rtems_device_minor_number minor, void * arg);
723 +
724 +static void _BSP_null_char( char c ) {return;}
725 +
726 +BSP_output_char_function_type BSP_output_char = _BSP_null_char;
727 +
728 +/*
729 + *  do_poll_read
730 + *
731 + *  Input characters through polled I/O. Returns as soon as a character has
732 + *  been received. Otherwise, if we wait for the number of requested
733 + *  characters, we could be here forever!
734 + *
735 + *  CR is converted to LF on input. The terminal should not send a CR/LF pair
736 + *  when the return or enter key is pressed.
737 + *
738 + *  Input parameters:
739 + *    major - ignored. Should be the major number for this driver.
740 + *    minor - selected channel.
741 + *    arg->buffer - where to put the received characters.
742 + *    arg->count  - number of characters to receive before returning--Ignored.
743 + *
744 + *  Output parameters:
745 + *    arg->bytes_moved - the number of characters read. Always 1.
746 + *
747 + *  Return value: RTEMS_SUCCESSFUL
748 + *
749 + *  CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
750 + */
751 +static rtems_status_code do_poll_read(
752 +  rtems_device_major_number major,
753 +  rtems_device_minor_number minor,
754 +  void                    * arg
755 +)
756 +{
757 +  rtems_libio_rw_args_t *rw_args = arg;
758 +  int c;
759 +
760 +  while( (c = m5xx_uart_pollRead(minor)) == -1 );
761 +  rw_args->buffer[0] = (uint8_t)c;
762 +  if( rw_args->buffer[0] == '\r' )
763 +      rw_args->buffer[0] = '\n';
764 +  rw_args->bytes_moved = 1;
765 +
766 +  return RTEMS_SUCCESSFUL;
767 +}
768 +
769 +/*
770 + *  do_poll_write
771 + *
772 + *  Output characters through polled I/O. Returns only once every character has
773 + *  been sent.
774 + *
775 + *  CR is transmitted AFTER a LF on output.
776 + *
777 + *  Input parameters:
778 + *    major - ignored. Should be the major number for this driver.
779 + *    minor - selected channel
780 + *    arg->buffer - where to get the characters to transmit.
781 + *    arg->count  - the number of characters to transmit before returning.
782 + *
783 + *  Output parameters:
784 + *    arg->bytes_moved - the number of characters read
785 + *
786 + *  Return value: RTEMS_SUCCESSFUL
787 + *
788 + *  CANNOT BE COMBINED WITH INTERRUPT DRIVEN I/O!
789 + */
790 +static rtems_status_code do_poll_write(
791 +  rtems_device_major_number major,
792 +  rtems_device_minor_number minor,
793 +  void                    * arg
794 +)
795 +{
796 +  rtems_libio_rw_args_t *rw_args = arg;
797 +  uint32_t i;
798 +  char cr ='\r';
799 +
800 +  for( i = 0; i < rw_args->count; i++ ) {
801 +    m5xx_uart_pollWrite(minor, &(rw_args->buffer[i]), 1);
802 +    if ( rw_args->buffer[i] == '\n' )
803 +      m5xx_uart_pollWrite(minor, &cr, 1);
804 +  }
805 +  rw_args->bytes_moved = i;
806 +
807 +  return RTEMS_SUCCESSFUL;
808 +}
809 +
810 +/*
811 + *  Print functions prototyped in bspIo.h
812 + */
813 +
814 +static void _BSP_output_char( char c )
815 +{
816 +  char cr = '\r';
817 +
818 +  /*
819 +   *  Can't rely on console_initialize having been called before this
820 +   *  function is used, so it may fail.
821 +   */
822 +
823 +  m5xx_uart_pollWrite( PRINTK_MINOR, &c, 1 );
824 +  if( c == '\n' )
825 +    m5xx_uart_pollWrite( PRINTK_MINOR, &cr, 1 );
826 +}
827 +
828 +/*
829 + ***************
830 + * BOILERPLATE *
831 + ***************
832 + *
833 + *  All these functions are prototyped in rtems/c/src/lib/include/console.h.
834 + */
835 +
836 +/*
837 + * Initialize and register the device
838 + */
839 +rtems_device_driver console_initialize(
840 +  rtems_device_major_number major,
841 +  rtems_device_minor_number minor,
842 +  void *arg
843 +)
844 +{
845 +  rtems_status_code status;
846 +
847 +  /*
848 +   * Set up TERMIOS if needed
849 +   */
850 +  #if UARTS_USE_TERMIOS == 1
851 +    rtems_termios_initialize ();
852 +  #endif /* UARTS_USE_TERMIOS */
853 +
854 +  /*
855 +   * Do device-specific initialization
856 +   */
857 +  BSP_output_char = _BSP_output_char;
858 +
859 +  m5xx_uart_initialize(SCI1_MINOR);
860 +  status = rtems_io_register_name ("/dev/tty0", major, SCI1_MINOR);
861 +  if (status != RTEMS_SUCCESSFUL)
862 +    rtems_fatal_error_occurred (status);
863 +
864 +  m5xx_uart_initialize(SCI2_MINOR);
865 +  status = rtems_io_register_name ("/dev/tty1", major, SCI2_MINOR);
866 +  if (status != RTEMS_SUCCESSFUL)
867 +    rtems_fatal_error_occurred (status);
868 +
869 +  /* Now register the RTEMS console */
870 +  status = rtems_io_register_name ("/dev/console", major, CONSOLE_MINOR);
871 +  if (status != RTEMS_SUCCESSFUL)
872 +    rtems_fatal_error_occurred (status);
873 +
874 +  return RTEMS_SUCCESSFUL;
875 +}
876 +
877 +/*
878 + * Open the device
879 + */
880 +rtems_device_driver console_open(
881 +  rtems_device_major_number major,
882 +  rtems_device_minor_number minor,
883 +  void *arg
884 +)
885 +{
886 +  rtems_status_code sc;
887 +
888 +  if ( minor > NUM_PORTS - 1 )
889 +    return RTEMS_INVALID_NUMBER;
890 +
891 +  #if (UARTS_USE_TERMIOS == 1)
892 +  {
893 +    #if (UARTS_IO_MODE == 1)    /* RTEMS interrupt-driven I/O with termios */
894 +
895 +      static const rtems_termios_callbacks callbacks = {
896 +        m5xx_uart_firstOpen,                   /* firstOpen */
897 +        m5xx_uart_lastClose,                   /* lastClose */
898 +        NULL,                           /* pollRead */
899 +        m5xx_uart_write,                       /* write */
900 +        m5xx_uart_setAttributes,       /* setAttributes */
901 +        NULL,                          /* stopRemoteTx */
902 +        NULL,                          /* startRemoteTx */
903 +        TERMIOS_IRQ_DRIVEN             /* outputUsesInterrupts */
904 +      };
905 +      sc = rtems_termios_open( major, minor, arg, &callbacks );
906 +
907 +    #else /* UARTS_IO_MODE != 1        */      /* RTEMS polled I/O with termios */
908 +
909 +      static const rtems_termios_callbacks callbacks = {
910 +        m5xx_uart_firstOpen,                   /* firstOpen */
911 +        m5xx_uart_lastClose,                   /* lastClose */
912 +        m5xx_uart_pollRead,             /* pollRead */
913 +        m5xx_uart_pollWrite,            /* write */
914 +        m5xx_uart_setAttributes,        /* setAttributes */
915 +        NULL,                           /* stopRemoteTx */
916 +        NULL,                          /* startRemoteTx */
917 +        TERMIOS_POLLED                         /* outputUsesInterrupts */
918 +      };
919 +      sc = rtems_termios_open( major, minor, arg, &callbacks );
920 +
921 +    #endif
922 +
923 +    return sc;
924 +  }
925 +
926 +  #else                /* no termios -- default to polled I/O */
927 +  {
928 +    sc = RTEMS_SUCCESSFUL;
929 +  }
930 +  #endif
931 +
932 +  return sc;
933 +}
934 +
935 +/*
936 + * Close the device
937 + */
938 +rtems_device_driver console_close(
939 +  rtems_device_major_number major,
940 +  rtems_device_minor_number minor,
941 +  void *arg
942 +)
943 +{
944 +  if ( minor > NUM_PORTS-1 )
945 +    return RTEMS_INVALID_NUMBER;
946 +
947 +  #if UARTS_USE_TERMIOS == 1
948 +    return rtems_termios_close( arg );
949 +  #else
950 +    return RTEMS_SUCCESSFUL;
951 +  #endif
952 +}
953 +
954 +/*
955 + * Read from the device
956 + */
957 +rtems_device_driver console_read(
958 +  rtems_device_major_number major,
959 +  rtems_device_minor_number minor,
960 +  void *arg
961 +)
962 +{
963 +  if ( minor > NUM_PORTS-1 )
964 +    return RTEMS_INVALID_NUMBER;
965 +
966 +  #if UARTS_USE_TERMIOS == 1
967 +    return rtems_termios_read( arg );
968 +  #else
969 +    return do_poll_read( major, minor, arg );
970 +  #endif
971 +}
972 +
973 +/*
974 + * Write to the device
975 + */
976 +rtems_device_driver console_write(
977 +  rtems_device_major_number major,
978 +  rtems_device_minor_number minor,
979 +  void *arg
980 +)
981 +{
982 +  if ( minor > NUM_PORTS-1 )
983 +    return RTEMS_INVALID_NUMBER;
984 +
985 +  #if UARTS_USE_TERMIOS == 1
986 +    return rtems_termios_write( arg );
987 +  #else
988 +    return do_poll_write( major, minor, arg );
989 +  #endif
990 +}
991 +
992 +/*
993 + * Handle ioctl request.
994 + */
995 +rtems_device_driver console_control(
996 +  rtems_device_major_number major,
997 +  rtems_device_minor_number minor,
998 +  void *arg
999 +)
1000 +{
1001 +  if ( minor > NUM_PORTS-1 )
1002 +    return RTEMS_INVALID_NUMBER;
1003 +
1004 +  #if UARTS_USE_TERMIOS == 1
1005 +    return rtems_termios_ioctl( arg );
1006 +  #else
1007 +    return RTEMS_SUCCESSFUL;
1008 +  #endif
1009 +}
1010 Index: rtems/c/src/lib/libbsp/powerpc/ec555/include/.cvsignore
1011 ===================================================================
1012 --- /dev/null
1013 +++ rtems/c/src/lib/libbsp/powerpc/ec555/include/.cvsignore
1014 @@ -0,0 +1,4 @@
1015 +bspopts.h
1016 +bspopts.h.in
1017 +stamp-h
1018 +stamp-h.in
1019 Index: rtems/c/src/lib/libbsp/powerpc/ec555/include/bsp.h
1020 ===================================================================
1021 --- /dev/null
1022 +++ rtems/c/src/lib/libbsp/powerpc/ec555/include/bsp.h
1023 @@ -0,0 +1,115 @@
1024 +/*  bsp.h
1025 + *
1026 + *  This include file contains all board IO definitions.
1027 + *
1028 + *  This file includes definitions for the Intec SS555.
1029 + *
1030 + *
1031 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1032 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1033 + *
1034 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h:
1035 + *
1036 + *  COPYRIGHT (c) 1989-1998.
1037 + *  On-Line Applications Research Corporation (OAR).
1038 + *
1039 + *  The license and distribution terms for this file may be
1040 + *  found in the file LICENSE in this distribution or at
1041 + *  http://www.rtems.com/license/LICENSE.
1042 + *
1043 + *  $Id: bsp.h,v 1.9 2005/05/26 05:36:48 ralf Exp $
1044 + */
1045 +
1046 +#ifndef _BSP_H
1047 +#define _BSP_H
1048 +
1049 +#ifdef __cplusplus
1050 +extern "C" {
1051 +#endif
1052 +
1053 +#include <bspopts.h>
1054 +
1055 +#include <rtems.h>
1056 +#include <rtems/console.h>
1057 +#include <rtems/clockdrv.h>
1058 +#include <mpc5xx.h>
1059 +#include <mpc5xx/console.h>
1060 +#include <libcpu/vectors.h>
1061 +#include <bsp/irq.h>
1062 +
1063 +/*
1064 + * Clock definitions
1065 + */
1066 +
1067 +#define BSP_CRYSTAL_HZ          4000000        /* crystal frequency, Hz */
1068 +#define BSP_CLOCK_HZ   40000000        /* CPU clock frequency, Hz
1069 +
1070 +/*
1071 + * I/O definitions
1072 + *
1073 + * The SS555 board includes a CPLD to control on-board features and
1074 + * off-board devices.
1075 + */
1076 +typedef struct cpld_ {
1077 +  uint8_t      cs3a[32];               /* Chip select 3A */
1078 +  uint8_t      pad0[0x200000 - 0x000020];
1079 +
1080 +  uint8_t      cs3b[32];               /* Chip select 3B */
1081 +  uint8_t      pad2[0x400000 - 0x200020];
1082 +
1083 +  uint8_t      cs3c[32];               /* Chip select 3C */
1084 +  uint8_t      pad4[0x600000 - 0x400020];
1085 +
1086 +  uint8_t      cs3d[32];               /* Chip select 3D */
1087 +  uint8_t      pad6[0x800000 - 0x600020];
1088 +
1089 +  uint8_t      serial_ints;    /* Enable/disable serial interrupts */
1090 +  uint8_t      serial_resets;  /* Enable/disable serial resets */
1091 +  uint8_t      serial_ack;     /* Acknowledge serial transfers */
1092 +  uint8_t      pad8[0xA00000 - 0x800003];
1093 +
1094 +  uint8_t      iflash_writess; /* Enable/disable internal-flash writes */
1095 +  uint8_t      nflash_writess; /* Enable/disable NAND-flash writes */
1096 +  uint8_t      padA[0xC00000 - 0xA00002];
1097 +} cpld_t;
1098 +
1099 +extern volatile cpld_t cpld;              /* defined in linkcmds */
1100 +
1101 +/* miscellaneous stuff assumed to exist */
1102 +
1103 +extern rtems_configuration_table BSP_Configuration;
1104 +
1105 +/*
1106 + *  Device Driver Table Entries
1107 + */
1108 +
1109 +/*
1110 + * NOTE: Use the standard Console driver entry
1111 + */
1112 +
1113 +/*
1114 + * NOTE: Use the standard Clock driver entry
1115 + */
1116 +
1117 +/*
1118 + * How many libio files we want
1119 + */
1120 +
1121 +#define BSP_LIBIO_MAX_FDS       20
1122 +
1123 +/* functions */
1124 +
1125 +void bsp_cleanup( void );
1126 +
1127 +rtems_isr_entry set_vector(                    /* returns old vector */
1128 +  rtems_isr_entry     handler,                  /* isr routine        */
1129 +  rtems_vector_number vector,                   /* vector number      */
1130 +  int                 type                      /* RTEMS or RAW intr  */
1131 +);
1132 +
1133 +#ifdef __cplusplus
1134 +}
1135 +#endif
1136 +
1137 +#endif
1138 +/* end of include file */
1139 Index: rtems/c/src/lib/libbsp/powerpc/ec555/include/coverhd.h
1140 ===================================================================
1141 --- /dev/null
1142 +++ rtems/c/src/lib/libbsp/powerpc/ec555/include/coverhd.h
1143 @@ -0,0 +1,117 @@
1144 +/*  coverhd.h
1145 + *
1146 + *  This include file has defines to represent the overhead associated
1147 + *  with calling a particular directive from C.  These are used in the
1148 + *  Timing Test Suite to ignore the overhead required to pass arguments
1149 + *  to directives.  On some CPUs and/or target boards, this overhead
1150 + *  is significant and makes it difficult to distinguish internal
1151 + *  RTEMS execution time from that used to call the directive.
1152 + *  This file should be updated after running the C overhead timing
1153 + *  test.  Once this update has been performed, the RTEMS Time Test
1154 + *  Suite should be rebuilt to account for these overhead times in the
1155 + *  timing results.
1156 + *
1157 + *  NOTE:  If these are all zero, then the times reported include
1158 + *         all calling overhead including passing of arguments.
1159 + *
1160 + *  COPYRIGHT (c) 1989-1998.
1161 + *  On-Line Applications Research Corporation (OAR).
1162 + *
1163 + *  The license and distribution terms for this file may be
1164 + *  found in the file LICENSE in this distribution or at
1165 + *  http://www.rtems.com/license/LICENSE.
1166 + *
1167 + *  $Id: coverhd.h,v 1.1 2004/04/12 21:52:13 joel Exp $
1168 + */
1169 +
1170 +#ifndef __COVERHD_h
1171 +#define __COVERHD_h
1172 +
1173 +#ifdef __cplusplus
1174 +extern "C" {
1175 +#endif
1176 +
1177 +/*
1178 + * 40 MHz processor, running from external 2-1-1-1 burst SRAM.
1179 + */
1180 +#define CALLING_OVERHEAD_INITIALIZE_EXECUTIVE      0
1181 +#define CALLING_OVERHEAD_SHUTDOWN_EXECUTIVE        0
1182 +#define CALLING_OVERHEAD_TASK_CREATE               0
1183 +#define CALLING_OVERHEAD_TASK_IDENT                0
1184 +#define CALLING_OVERHEAD_TASK_START                0
1185 +#define CALLING_OVERHEAD_TASK_RESTART              0
1186 +#define CALLING_OVERHEAD_TASK_DELETE               0
1187 +#define CALLING_OVERHEAD_TASK_SUSPEND              0
1188 +#define CALLING_OVERHEAD_TASK_RESUME               0
1189 +#define CALLING_OVERHEAD_TASK_SET_PRIORITY         0
1190 +#define CALLING_OVERHEAD_TASK_MODE                 0
1191 +#define CALLING_OVERHEAD_TASK_GET_NOTE             0
1192 +#define CALLING_OVERHEAD_TASK_SET_NOTE             0
1193 +#define CALLING_OVERHEAD_TASK_WAKE_WHEN            2
1194 +#define CALLING_OVERHEAD_TASK_WAKE_AFTER           0
1195 +#define CALLING_OVERHEAD_INTERRUPT_CATCH           0
1196 +#define CALLING_OVERHEAD_CLOCK_GET                 2
1197 +#define CALLING_OVERHEAD_CLOCK_SET                 3
1198 +#define CALLING_OVERHEAD_CLOCK_TICK                0
1199 +
1200 +#define CALLING_OVERHEAD_TIMER_CREATE              0
1201 +#define CALLING_OVERHEAD_TIMER_IDENT               0
1202 +#define CALLING_OVERHEAD_TIMER_DELETE              0
1203 +#define CALLING_OVERHEAD_TIMER_FIRE_AFTER          0
1204 +#define CALLING_OVERHEAD_TIMER_FIRE_WHEN           3
1205 +#define CALLING_OVERHEAD_TIMER_RESET               0
1206 +#define CALLING_OVERHEAD_TIMER_CANCEL              0
1207 +#define CALLING_OVERHEAD_SEMAPHORE_CREATE          0
1208 +#define CALLING_OVERHEAD_SEMAPHORE_IDENT           0
1209 +#define CALLING_OVERHEAD_SEMAPHORE_DELETE          0
1210 +#define CALLING_OVERHEAD_SEMAPHORE_OBTAIN          0
1211 +#define CALLING_OVERHEAD_SEMAPHORE_RELEASE         0
1212 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_CREATE      0
1213 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_IDENT       0
1214 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_DELETE      0
1215 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_SEND        0
1216 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_URGENT      0
1217 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_BROADCAST   0
1218 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_RECEIVE     0
1219 +#define CALLING_OVERHEAD_MESSAGE_QUEUE_FLUSH       0
1220 +
1221 +#define CALLING_OVERHEAD_EVENT_SEND                0
1222 +#define CALLING_OVERHEAD_EVENT_RECEIVE             0
1223 +#define CALLING_OVERHEAD_SIGNAL_CATCH              0
1224 +#define CALLING_OVERHEAD_SIGNAL_SEND               0
1225 +#define CALLING_OVERHEAD_PARTITION_CREATE          0
1226 +#define CALLING_OVERHEAD_PARTITION_IDENT           0
1227 +#define CALLING_OVERHEAD_PARTITION_DELETE          0
1228 +#define CALLING_OVERHEAD_PARTITION_GET_BUFFER      0
1229 +#define CALLING_OVERHEAD_PARTITION_RETURN_BUFFER   0
1230 +#define CALLING_OVERHEAD_REGION_CREATE             0
1231 +#define CALLING_OVERHEAD_REGION_IDENT              0
1232 +#define CALLING_OVERHEAD_REGION_DELETE             0
1233 +#define CALLING_OVERHEAD_REGION_GET_SEGMENT        0
1234 +#define CALLING_OVERHEAD_REGION_RETURN_SEGMENT     0
1235 +#define CALLING_OVERHEAD_PORT_CREATE               0
1236 +#define CALLING_OVERHEAD_PORT_IDENT                0
1237 +#define CALLING_OVERHEAD_PORT_DELETE               0
1238 +#define CALLING_OVERHEAD_PORT_EXTERNAL_TO_INTERNAL 0
1239 +#define CALLING_OVERHEAD_PORT_INTERNAL_TO_EXTERNAL 0
1240 +
1241 +#define CALLING_OVERHEAD_IO_INITIALIZE             0
1242 +#define CALLING_OVERHEAD_IO_OPEN                   0
1243 +#define CALLING_OVERHEAD_IO_CLOSE                  0
1244 +#define CALLING_OVERHEAD_IO_READ                   0
1245 +#define CALLING_OVERHEAD_IO_WRITE                  0
1246 +#define CALLING_OVERHEAD_IO_CONTROL                0
1247 +#define CALLING_OVERHEAD_FATAL_ERROR_OCCURRED      0
1248 +#define CALLING_OVERHEAD_RATE_MONOTONIC_CREATE     0
1249 +#define CALLING_OVERHEAD_RATE_MONOTONIC_IDENT      0
1250 +#define CALLING_OVERHEAD_RATE_MONOTONIC_DELETE     0
1251 +#define CALLING_OVERHEAD_RATE_MONOTONIC_CANCEL     0
1252 +#define CALLING_OVERHEAD_RATE_MONOTONIC_PERIOD     0
1253 +#define CALLING_OVERHEAD_MULTIPROCESSING_ANNOUNCE  0
1254 +
1255 +#ifdef __cplusplus
1256 +}
1257 +#endif
1258 +
1259 +#endif
1260 +/* end of include file */
1261 Index: rtems/c/src/lib/libbsp/powerpc/ec555/include/tm27.h
1262 ===================================================================
1263 --- /dev/null
1264 +++ rtems/c/src/lib/libbsp/powerpc/ec555/include/tm27.h
1265 @@ -0,0 +1,54 @@
1266 +/*
1267 + *  tm27.h
1268 + *
1269 + *  The license and distribution terms for this file may be
1270 + *  found in the file LICENSE in this distribution or at
1271 + *  http://www.rtems.com/license/LICENSE.
1272 + *
1273 + *  $Id: tm27.h,v 1.2 2004/04/23 04:47:38 ralf Exp $
1274 + */
1275 +
1276 +#ifndef _RTEMS_TMTEST27
1277 +#error "This is an RTEMS internal file you must not include directly."
1278 +#endif
1279 +
1280 +#ifndef __tm27_h
1281 +#define __tm27_h
1282 +
1283 +/*
1284 + * Stuff for Time Test 27
1285 + *
1286 + * The following require that IRQ7 be jumpered to ground.  On the SS555,
1287 + * this can be done by shorting together CN5 pin 48 and CN5 pin 50.
1288 + */
1289 +
1290 +#define MUST_WAIT_FOR_INTERRUPT 1
1291 +
1292 +#define Install_tm27_vector( handler )                                 \
1293 +{                                                                      \
1294 +  extern rtems_irq_connect_data tm27IrqData;                            \
1295 +  usiu.siel |= (1 << 17);                                              \
1296 +  usiu.sipend |= (1 << 17);                                            \
1297 +                                                                       \
1298 +  tm27IrqData.hdl = (rtems_irq_hdl)handler;                            \
1299 +  BSP_install_rtems_irq_handler (&tm27IrqData);                                \
1300 +}
1301 +
1302 +#define Cause_tm27_intr()                                              \
1303 +{                                                                      \
1304 +  usiu.siel &= ~(1 << 17);                                             \
1305 +}
1306 +
1307 +#define Clear_tm27_intr()                                              \
1308 +{                                                                      \
1309 +  usiu.siel |= (1 << 17);                                              \
1310 +  usiu.sipend |= (1 << 17);                                            \
1311 +}
1312 +
1313 +#define Lower_tm27_intr()                                              \
1314 +{                                                                      \
1315 +  ppc_cached_irq_mask |= (1 << 17);                                    \
1316 +  usiu.simask = ppc_cached_irq_mask;                                   \
1317 +}
1318 +
1319 +#endif
1320 Index: rtems/c/src/lib/libbsp/powerpc/ec555/irq/irq.h
1321 ===================================================================
1322 --- /dev/null
1323 +++ rtems/c/src/lib/libbsp/powerpc/ec555/irq/irq.h
1324 @@ -0,0 +1,55 @@
1325 +/* irq.h
1326 + *
1327 + *  This include file describe the data structure and the functions implemented
1328 + *  by rtems to write interrupt handlers.
1329 + *
1330 + *
1331 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1332 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1333 + *
1334 + *  Derived from libbsp/powerpc/mbx8xx/irq/irq.h:
1335 + *
1336 + *  CopyRight (C) 1999 valette@crf.canon.fr
1337 + *
1338 + *  This code is heavilly inspired by the public specification of STREAM V2
1339 + *  that can be found at :
1340 + *
1341 + *      <http://www.chorus.com/Documentation/index.html> by following
1342 + *  the STREAM API Specification Document link.
1343 + *
1344 + *  The license and distribution terms for this file may be
1345 + *  found in found in the file LICENSE in this distribution or at
1346 + *  http://www.rtems.com/license/LICENSE.
1347 + *
1348 + *  $Id: irq.h,v 1.2 2004/04/21 10:43:03 ralf Exp $
1349 + */
1350 +
1351 +#ifndef LIBBSP_POWERPC_SS555_IRQ_IRQ_H
1352 +#define LIBBSP_POWERPC_SS555_IRQ_IRQ_H
1353 +
1354 +#include <libcpu/irq.h>
1355 +
1356 +#ifndef ASM
1357 +
1358 +#ifdef __cplusplus
1359 +extern "C" {
1360 +#endif
1361 +
1362 +/*
1363 + * The SS555 has no external interrupt controller chip, so use the standard
1364 + * routines from the CPU-dependent code.
1365 + */
1366 +#define BSP_install_rtems_irq_handler(ptr)     CPU_install_rtems_irq_handler(ptr)
1367 +#define BSP_get_current_rtems_irq_handler(ptr) CPU_get_current_rtems_irq_handler(ptr)
1368 +#define BSP_remove_rtems_irq_handler(ptr)      CPU_remove_rtems_irq_handler(ptr)
1369 +#define BSP_rtems_irq_mngt_set(config)         CPU_rtems_irq_mngt_set(config)
1370 +#define BSP_rtems_irq_mngt_get(config)         CPU_rtems_irq_mngt_get(config)
1371 +#define BSP_rtems_irq_mng_init(cpuId)          CPU_rtems_irq_mng_init(cpuId)
1372 +
1373 +#ifdef __cplusplus
1374 +}
1375 +#endif
1376 +
1377 +#endif /* ASM */
1378 +
1379 +#endif /* LIBBSP_POWERPC_SS555_IRQ_IRQ_H */
1380 Index: rtems/c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c
1381 ===================================================================
1382 --- /dev/null
1383 +++ rtems/c/src/lib/libbsp/powerpc/ec555/startup/bspstart.c
1384 @@ -0,0 +1,201 @@
1385 +/*  bspstart.c
1386 + *
1387 + *  This set of routines starts the application.  It includes application,
1388 + *  board, and monitor specific initialization and configuration.
1389 + *  The generic CPU dependent initialization has been performed
1390 + *  before this routine is invoked.
1391 + *
1392 + *  COPYRIGHT (c) 1989-1998.
1393 + *  On-Line Applications Research Corporation (OAR).
1394 + *
1395 + *  The license and distribution terms for this file may be
1396 + *  found in the file LICENSE in this distribution or at
1397 + *  http://www.rtems.com/license/LICENSE.
1398 + *
1399 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1400 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1401 + *
1402 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/bspstart.c:
1403 + *
1404 + *  Modifications for MBX860:
1405 + *  Copyright (c) 1999, National Research Council of Canada
1406 + *
1407 + *  $Id: bspstart.c,v 1.7 2005/04/26 23:16:21 joel Exp $
1408 + */
1409 +
1410 +#include <string.h>
1411 +
1412 +#include <rtems/libio.h>
1413 +#include <rtems/libcsupport.h>
1414 +#include <rtems/bspIo.h>
1415 +#include <rtems/powerpc/powerpc.h>
1416 +
1417 +#include <libcpu/cpuIdent.h>
1418 +#include <libcpu/spr.h>
1419 +
1420 +#include <bsp/irq.h>
1421 +#include <bsp.h>
1422 +
1423 +SPR_RW(SPRG0)
1424 +SPR_RW(SPRG1)
1425 +
1426 +/*
1427 + *  The original table from the application (in ROM) and our copy of it with
1428 + *  some changes. Configuration is defined in <confdefs.h>. Make sure that
1429 + *  our configuration tables are uninitialized so that they get allocated in
1430 + *  the .bss section (RAM).
1431 + */
1432 +extern rtems_configuration_table Configuration;
1433 +extern unsigned long intrStackPtr;
1434 +rtems_configuration_table  BSP_Configuration;
1435 +
1436 +rtems_cpu_table Cpu_table;
1437 +
1438 +char *rtems_progname;
1439 +
1440 +/*
1441 + *  Use the shared implementations of the following routines.
1442 + *  Look in rtems/c/src/lib/libbsp/shared/bsppost.c and
1443 + *  rtems/c/src/lib/libbsp/shared/bsplibc.c.
1444 + */
1445 +void bsp_postdriver_hook(void);
1446 +void bsp_libc_init( void *, uint32_t, int );
1447 +
1448 +void BSP_panic(char *s)
1449 +{
1450 +  printk("%s PANIC %s\n",_RTEMS_version, s);
1451 +  __asm__ __volatile ("sc");
1452 +}
1453 +
1454 +void _BSP_Fatal_error(unsigned int v)
1455 +{
1456 +  printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
1457 +  __asm__ __volatile ("sc");
1458 +}
1459 +
1460 +/*
1461 + *  bsp_pretasking_hook
1462 + *
1463 + *  Called when RTEMS initialization is complete but before interrupts and
1464 + *  tasking are enabled. Used to setup libc and install any BSP extensions.
1465 + *
1466 + *  Must not use libc (to do io) from here, since drivers are not yet
1467 + *  initialized.
1468 + *
1469 + *  Installed in the rtems_cpu_table defined in
1470 + *  rtems/c/src/exec/score/cpu/powerpc/rtems/new-exceptions/cpu.h by main()
1471 + *  below.  Called from rtems_initialize_executive() defined in
1472 + *  rtems/c/src/exec/sapi/src/init.c
1473 + *
1474 + *  Input parameters: NONE
1475 + *
1476 + *  Output parameters: NONE
1477 + *
1478 + *  Return values: NONE
1479 + */
1480 +void bsp_pretasking_hook(void)
1481 +{
1482 +  /*
1483 +   *  These are assigned addresses in the linkcmds file for the BSP. This
1484 +   *  approach is better than having these defined as manifest constants and
1485 +   *  compiled into the kernel, but it is still not ideal when dealing with
1486 +   *  multiprocessor configuration in which each board as a different memory
1487 +   *  map. A better place for defining these symbols might be the makefiles.
1488 +   *  Consideration should also be given to developing an approach in which
1489 +   *  the kernel and the application can be linked and burned into ROM
1490 +   *  independently of each other.
1491 +   */
1492 +    uint8_t *_HeapStart =
1493 +      (uint8_t *)BSP_Configuration.work_space_start
1494 +           + BSP_Configuration.work_space_size;
1495 +    extern uint8_t _HeapEnd[];
1496 +
1497 +    bsp_libc_init( _HeapStart, _HeapEnd - _HeapStart, 0 );
1498 +
1499 +#ifdef RTEMS_DEBUG
1500 +  rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
1501 +#endif
1502 +}
1503 +
1504 +/*
1505 + *  bsp_start()
1506 + *
1507 + *  Board-specific initialization code. Called from the generic boot_card()
1508 + *  function defined in rtems/c/src/lib/libbsp/shared/main.c. That function
1509 + *  does some of the board independent initialization. It is called from the
1510 + *  SS555 entry point _start() defined in
1511 + *  rtems/c/src/lib/libbsp/powerpc/ss555/startup/start.S
1512 + *
1513 + *  _start() has set up a stack, has zeroed the .bss section, has set up the
1514 + *  .data section from contents stored in ROM, has turned off interrupts,
1515 + *  and placed the processor in the supervisor mode.  boot_card() has left
1516 + *  the processor in that state when bsp_start() was called.
1517 + *
1518 + *  Input parameters: NONE
1519 + *
1520 + *  Output parameters: NONE
1521 + *
1522 + *  Return values: NONE
1523 + */
1524 +void bsp_start(void)
1525 +{
1526 +  extern char _WorkspaceBase[];
1527 +
1528 +  ppc_cpu_id_t myCpu;
1529 +  ppc_cpu_revision_t myCpuRevision;
1530 +  register unsigned char* intrStack;
1531 +
1532 +  /*
1533 +   * Get CPU identification dynamically.  Note that the get_ppc_cpu_type()
1534 +   * function stores the result in global variables so that it can be used
1535 +   * later.
1536 +   */
1537 +  myCpu        = get_ppc_cpu_type();
1538 +  myCpuRevision = get_ppc_cpu_revision();
1539 +
1540 +  /*
1541 +   * Initialize some SPRG registers related to irq handling
1542 +   */
1543 +  intrStack = (((unsigned char*)&intrStackPtr) - PPC_MINIMUM_STACK_FRAME_SIZE);
1544 +  _write_SPRG1((unsigned int)intrStack);
1545 +  /* signal them that we have fixed PR288 - eventually, this should go away */
1546 +  _write_SPRG0(PPC_BSP_HAS_FIXED_PR288);
1547 +
1548 +  /*
1549 +   * Install our own set of exception vectors
1550 +   */
1551 +  initialize_exceptions();
1552 +
1553 +  /*
1554 +   *  Allocate the memory for the RTEMS Work Space.  This can come from
1555 +   *  a variety of places: hard coded address, malloc'ed from outside
1556 +   *  RTEMS world (e.g. simulator or primitive memory manager), or (as
1557 +   *  typically done by stock BSPs) by subtracting the required amount
1558 +   *  of work space from the last physical address on the CPU board.
1559 +   *
1560 +   *  In this case, the memory is not malloc'ed.  It is just
1561 +   *  "pulled from the air".
1562 +   */
1563 +  BSP_Configuration.work_space_start = _WorkspaceBase;
1564 +
1565 +  /*
1566 +   *  initialize the CPU table for this BSP
1567 +   */
1568 +  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
1569 +  Cpu_table.postdriver_hook = bsp_postdriver_hook;
1570 +  if( Cpu_table.interrupt_stack_size < 4 * 1024 )
1571 +      Cpu_table.interrupt_stack_size = 4 * 1024;
1572 +
1573 +  Cpu_table.clicks_per_usec = BSP_CRYSTAL_HZ / 4 / 1000000;
1574 +  Cpu_table.clock_speed = BSP_CLOCK_HZ;        /* for SCI baud rate generator */
1575 +
1576 +  /*
1577 +   * Call this in case we use TERMIOS for console I/O
1578 +   */
1579 +  m5xx_uart_reserve_resources( &BSP_Configuration );
1580 +
1581 +  /*
1582 +   * Initalize RTEMS IRQ system
1583 +   */
1584 +  BSP_rtems_irq_mng_init(0);
1585 +}
1586 Index: rtems/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c
1587 ===================================================================
1588 --- /dev/null
1589 +++ rtems/c/src/lib/libbsp/powerpc/ec555/startup/iss555.c
1590 @@ -0,0 +1,148 @@
1591 +/*
1592 + *  iss555.c
1593 + *
1594 + *  Intec SS555 initialization routines.
1595 + *
1596 + *  SS555 port sponsored by Defence Research and Development Canada - Suffield
1597 + *  Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
1598 + *
1599 + *  Derived from c/src/lib/libbsp/powerpc/mbx8xx/startup/imbx8xx.c:
1600 + *
1601 + *  Copyright (c) 1999, National Research Council of Canada
1602 + *
1603 + *  The license and distribution terms for this file may be
1604 + *  found in the file LICENSE in this distribution or at
1605 + *  http://www.rtems.com/license/LICENSE.
1606 + */
1607 +
1608 +#include <bsp.h>
1609 +
1610 +SPR_RW(ICTRL);
1611 +SPR_RW(DEC);
1612 +SPR_RW(TBWU);
1613 +SPR_RW(TBWL);
1614 +SPR_RO(IMMR);
1615 +SPR_RW(MI_GRA);
1616 +SPR_RW(L2U_GRA);
1617 +SPR_RW(BBCMCR);
1618 +
1619 +/*
1620 + *  Initialize SS555
1621 + */
1622 +void _InitSS555 (void)
1623 +{
1624 +  register uint32_t plprcr, msr;
1625 +
1626 +  /*
1627 +   * Initialize the System Protection Control Register (SYPCR).
1628 +   * The SYPCR can only be written once after Reset.
1629 +   */
1630 +  usiu.sypcr =
1631 +      USIU_SYPCR_SWTC(WATCHDOG_TIMEOUT)        /* set watchdog timeout */
1632 +    | USIU_SYPCR_BMT(0xFF)             /* set bus monitor timeout */
1633 +    | USIU_SYPCR_BME                   /* enable bus monitor */
1634 +    | USIU_SYPCR_SWF                   /* watchdog halted in freeze */
1635 +#if WATCHDOG_TIMEOUT != 0xFFFF
1636 +    | USIU_SYPCR_SWE                   /* enable watchdog */
1637 +#endif
1638 +    | USIU_SYPCR_SWRI                  /* watchdog forces reset */
1639 +    | USIU_SYPCR_SWP;                  /* prescale watchdog by 2048 */
1640 +
1641 +  TICKLE_WATCHDOG();                   /* restart watchdog timer */
1642 +
1643 +  /*
1644 +   * Re-tune the PLL to the desired system clock frequency.
1645 +   */
1646 +  usiu.plprck = USIU_UNLOCK_KEY;       /* unlock PLPRCR */
1647 +  usiu.plprcr =
1648 +      USIU_PLPRCR_TEXPS                        /* assert TEXP always */
1649 +    | USIU_PLPRCR_MF(BSP_CLOCK_HZ / BSP_CRYSTAL_HZ);
1650 +                                       /* PLL multiplication factor */
1651 +  usiu.plprck = 0;                     /* lock PLPRCR */
1652 +
1653 +  while (((plprcr = usiu.plprcr) & USIU_PLPRCR_SPLS) == 0)
1654 +    ;                                  /* wait for PLL to re-lock */
1655 +
1656 +  /*
1657 +   * Enable the timebase and decrementer, then initialize decrementer
1658 +   * register to a large value to guarantee that a decrementer interrupt
1659 +   * will not be generated before the kernel is fully initialized.
1660 +   * Initialize the timebase register to zero.
1661 +   */
1662 +  usiu.tbscrk = USIU_UNLOCK_KEY;
1663 +  usiu.tbscr |= USIU_TBSCR_TBE;                /* enable time base and decrementer */
1664 +  usiu.tbscrk = 0;
1665 +
1666 +  usiu.tbk = USIU_UNLOCK_KEY;
1667 +  _write_DEC(0x7FFFFFFF);
1668 +  _write_TBWU(0x00000000 );
1669 +  _write_TBWL(0x00000000 );
1670 +  usiu.tbk = 0;
1671 +
1672 +  /*
1673 +   * Run the Inter-Module Bus at full speed.
1674 +   */
1675 +  imb.uimb.umcr &= ~UIMB_UMCR_HSPEED;
1676 +
1677 +  /*
1678 +   * Initialize Memory Controller for External RAM
1679 +   *
1680 +   * Initialize the Base and Option Registers (BR0-BR7 and OR0-OR7).  Note
1681 +   * that for all chip selects, ORx should be programmed before BRx.
1682 +   *
1683 +   * If booting from internal flash ROM, configure the external RAM to
1684 +   * extend the internal RAM.  If booting from external RAM, leave it at
1685 +   * zero but set it up appropriately.
1686 +   */
1687 +  extern char int_ram_top[];           /* top of internal ram */
1688 +
1689 +  usiu.memc[0]._or =
1690 +      USIU_MEMC_OR_512K                        /* bank size */
1691 +    | USIU_MEMC_OR_SCY(0)              /* wait states in first beat of burst */
1692 +    | USIU_MEMC_OR_BSCY(0);            /* wait states in subsequent beats */
1693 +
1694 +  usiu.memc[0]._br =
1695 +      USIU_MEMC_BR_BA(_read_IMMR() & IMMR_FLEN
1696 +        ? (uint32_t)int_ram_top : 0)   /* base address */
1697 +    | USIU_MEMC_BR_PS32                        /* 32-bit data bus */
1698 +    | USIU_MEMC_BR_TBDIP               /* toggle bdip */
1699 +    | USIU_MEMC_BR_V;                  /* base register valid */
1700 +
1701 +  /*
1702 +   * Initialize Memory Controller for External CPLD
1703 +   *
1704 +   * The SS555 board includes a CPLD to control on-board features and
1705 +   * off-board devices.  (Configuration taken from Intec's hwhook.c)
1706 +   */
1707 +  usiu.memc[3]._or =
1708 +      USIU_MEMC_OR_16M                 /* bank size */
1709 +    | USIU_MEMC_OR_CSNT                        /* negate CS/WE early */
1710 +    | USIU_MEMC_OR_ACS_HALF            /* assert CS half cycle after address */
1711 +    | USIU_MEMC_OR_SCY(15)             /* wait states in first beat of burst */
1712 +    | USIU_MEMC_OR_TRLX;               /* relaxed timing */
1713 +
1714 +  usiu.memc[3]._br =
1715 +      USIU_MEMC_BR_BA(&cpld)           /* base address */
1716 +    | USIU_MEMC_BR_PS16                        /* 16-bit data bus */
1717 +    | USIU_MEMC_BR_BI                  /* inhibit bursting */
1718 +    | USIU_MEMC_BR_V;                  /* base register valid */
1719 +
1720 +  /*
1721 +   * Disable show cycles and serialization so that burst accesses will work
1722 +   * properly.  A different value, such as 0x0, may be more appropriate for
1723 +   * debugging, but can be set with the debugger, if needed.
1724 +   */
1725 +  _write_ICTRL(0x00000007);
1726 +
1727 +  /*
1728 +   * Set up Burst Buffer Controller (BBC)
1729 +   */
1730 +  _write_BBCMCR(
1731 +      BBCMCR_ETRE                      /* enable exception relocation */
1732 +    | BBCMCR_BE);                      /* enable burst accesses */
1733 +  _isync;
1734 +
1735 +  _CPU_MSR_GET(msr);
1736 +  msr |= MSR_IP;               /* set prefix for exception relocation */
1737 +  _CPU_MSR_SET(msr);
1738 +}
1739 Index: rtems/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds
1740 ===================================================================
1741 --- /dev/null
1742 +++ rtems/c/src/lib/libbsp/powerpc/ec555/startup/linkcmds
1743 @@ -0,0 +1,319 @@
1744 +/*
1745 + * Linker command file for Intec SS555 board
1746 + *
1747 + * When debugging, we assume that the internal flash ROM will be replaced by
1748 + * the external RAM on the SS555 board.  All sections are stacked starting
1749 + * at address zero.  Nothing is placed in the internal RAM, since it's not
1750 + * contiguous with the external SRAM when the external RAM is placed at
1751 + * zero.
1752 + *
1753 + * For final production, we assume that the .text section will be burned
1754 + * into flash ROM starting at address zero.  The .data, .bss, heap, and
1755 + * workspace will reside in RAM, starting at the beginning of the internal
1756 + * RAM.  The system startup code will configure the external RAM to begin
1757 + * where the internal RAM ends, so as to make one large RAM block.
1758 + *
1759 + * Debugging mode is chosen when the RTEMS_DEBUG symbol is defined.  The
1760 + * RTEMS_DEBUG symbol is defined in the bsp_specs file whenever make(1) is
1761 + * invoked with VARIANT=DEBUG.
1762 + *
1763 + *  $Id: linkcmds,v 1.3 2006/03/08 18:50:12 joel Exp $
1764 + */
1765 +
1766 +OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
1767 +OUTPUT_ARCH(powerpc) 
1768 +ENTRY(start)
1769 +
1770 +int_ram_org    = 0x003F9800;           /* base of internal RAM */
1771 +int_ram_top    = 0x00400000;           /* top of internal RAM */
1772 +ext_ram_size   = 0x00080000;           /* size of external RAM */
1773 +
1774 +
1775 +SECTIONS
1776 +{
1777 +  .vectors 0x0:
1778 +  {
1779 +    /*
1780 +     * For the MPC555, we use the compressed vector table format which puts
1781 +     * all of the exception vectors before 0x100.
1782 +     */ 
1783 +    *(.vectors)
1784 +  }
1785 +
1786 +  .text 0x100:
1787 +  {
1788 +    /* Read-only sections, merged into text segment: */
1789 +    
1790 +    text.start = .;
1791 +
1792 +    /* Entry point is the .entry section */
1793 +    *(.entry)
1794 +    *(.entry2)
1795 +
1796 +    /* Actual code */
1797 +    *(.text*)
1798 +
1799 +    /* C++ constructors/destructors */
1800 +    *(.gnu.linkonce.t*)
1801 +            
1802 +    /*  Initialization and finalization code.
1803 +     *
1804 +     *  Various files can provide initialization and finalization functions.
1805 +     *  The bodies of these functions are in .init and .fini sections. We
1806 +     *  accumulate the bodies here, and prepend function prologues from
1807 +     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
1808 +     *  first; ecrtn.o must be linked last. Because these are wildcards, it
1809 +     *  doesn't matter if the user does not actually link against ecrti.o and
1810 +     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
1811 +     *  wildcard also means that it doesn't matter which directory ecrti.o
1812 +     *  and ecrtn.o are in. 
1813 +     */
1814 +    PROVIDE (_init = .);
1815 +    *ecrti.o(.init)
1816 +    *(.init)
1817 +    *ecrtn.o(.init)
1818 +    
1819 +    PROVIDE (_fini = .);
1820 +    *ecrti.o(.fini)
1821 +    *(.fini)
1822 +    *ecrtn.o(.init)
1823 +
1824 +    /* 
1825 +     *  C++ constructors and destructors for static objects.
1826 +     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
1827 +     *  constructor and destructor lists that begin with the list length
1828 +     *  end terminate with a NULL entry.
1829 +     */
1830 +    PROVIDE (__CTOR_LIST__ = .);            
1831 +    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
1832 +    *crtbegin.o(.ctors)
1833 +    *(.ctors)
1834 +    *crtend.o(.ctors)
1835 +    LONG(0)
1836 +    PROVIDE (__CTOR_END__ = .);
1837 +       
1838 +    PROVIDE (__DTOR_LIST__ = .);
1839 +    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
1840 +    *crtbegin.o(.dtors)
1841 +    *(.dtors)
1842 +    *crtend.o(.dtors)
1843 +    LONG(0)
1844 +    PROVIDE (__DTOR_END__ = .);
1845 +       
1846 +    /*
1847 +     * Special FreeBSD sysctl sections.
1848 +     */
1849 +    . = ALIGN (16);
1850 +    __start_set_sysctl_set = .;
1851 +    *(set_sysctl_*);
1852 +    __stop_set_sysctl_set = ABSOLUTE(.);
1853 +    *(set_domain_*);
1854 +    *(set_pseudo_*);
1855 +
1856 +    /* Exception frame info */
1857 +    *(.eh_frame)
1858 +
1859 +    /* Miscellaneous read-only data */
1860 +    _rodata_start = . ;
1861 +    *(.gnu.linkonce.r*)
1862 +    *(.lit)
1863 +    *(.shdata)
1864 +    *(.rodata*)
1865 +    *(.rodata1)
1866 +    *.(eh_frame)
1867 +    *(.descriptors)
1868 +    *(rom_ver)
1869 +    _erodata = .;
1870 +
1871 +    /* Various possible names for the end of the .text section */
1872 +    etext = ALIGN(0x10);
1873 +    _etext = .;
1874 +    _endtext = .;
1875 +    text.end = .;
1876 +    PROVIDE (etext = .);
1877 +    PROVIDE (__etext = .);
1878 +
1879 +    /* 
1880 +     * .data section contents, copied to RAM at system startup. 
1881 +     */
1882 +    . = ALIGN(0x20);
1883 +    data.contents.start = .;
1884 +  }
1885 +  text.size = text.end - text.start;
1886 +
1887 +  /*
1888 +   * If debugging, stack the read/write sections directly after the text
1889 +   * section.  Otherwise, stack the read/write sections starting at base of
1890 +   * internal RAM.
1891 +   */
1892 +  . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;
1893
1894 +  .data : AT (data.contents.start)
1895 +  {
1896 +    data.start = .;
1897 +    
1898 +    *(.data)
1899 +    *(.data.*)
1900 +    *(.data1)
1901 +    
1902 +    PROVIDE (__SDATA_START__ = .);
1903 +    *(.sdata*)
1904 +    *(.gnu.linkonce.d*)
1905 +    *(.gnu.linkonce.s.*)
1906 +    PROVIDE (__SDATA_END__ = .);
1907 +    
1908 +    PROVIDE (__EXCEPT_START__ = .);
1909 +    *(.gcc_except_table)
1910 +    PROVIDE (__EXCEPT_END__ = .);
1911 +    
1912 +    PROVIDE(__GOT_START__ = .);
1913 +    *(.got.plt) 
1914 +    *(.got)
1915 +    PROVIDE(__GOT_END__ = .);
1916 +       
1917 +    *(.got1)
1918 +    
1919 +    PROVIDE (__GOT2_START__ = .);
1920 +    PROVIDE (_GOT2_START_ = .);
1921 +    *(.got2)
1922 +    PROVIDE (__GOT2_END__ = .);
1923 +    PROVIDE (_GOT2_END_ = .);
1924 +       
1925 +    PROVIDE (__FIXUP_START__ = .);
1926 +    PROVIDE (_FIXUP_START_ = .);
1927 +    *(.fixup)
1928 +    PROVIDE (_FIXUP_END_ = .);
1929 +    PROVIDE (__FIXUP_END__ = .);
1930 +
1931 +    /*  We want the small data sections together, so single-instruction
1932 +     *   offsets can access them all.
1933 +     */
1934 +    PROVIDE (__SDATA2_START__ = .);
1935 +    *(.sdata2)
1936 +    *(.gnu.linkonce.s2.*)
1937 +    PROVIDE (__SDATA2_END__ = .);
1938 +
1939 +    data.end = .;
1940 +  }
1941 +  data.size = data.end - data.start;
1942 +       
1943 +  .bss :
1944 +  {
1945 +    bss.start = .;
1946 +       
1947 +    PROVIDE (__SBSS2_START__ = .);
1948 +    *(.sbss2)
1949 +    PROVIDE (__SBSS2_END__ = .);
1950 +       
1951 +    PROVIDE (__SBSS_START__ = .);
1952 +    *(.sbss*)
1953 +    PROVIDE (__SBSS_END__ = .);
1954 +
1955 +    *(.bss .bss* .gnu.linkonce.b*)
1956 +    *(COMMON)
1957 +
1958 +    . = ALIGN(4);
1959 +    bss.end = .;
1960 +  }
1961 +  bss.size = bss.end - bss.start;
1962 +
1963 +  PROVIDE(_end = bss.end);
1964 +
1965 +  /*
1966 +   * Initialization stack
1967 +   */
1968 +  InitStack_start = ALIGN(0x10);
1969 +  . += 0x1000;
1970 +  initStack = .;
1971 +  PROVIDE(initStackPtr = initStack);
1972 +
1973 +  /*
1974 +   * Interrupt stack
1975 +   */
1976 +  IntrStack_start = ALIGN(0x10);
1977 +  . += 0x4000;
1978 +  intrStack = .;
1979 +  PROVIDE(intrStackPtr = intrStack);
1980 +
1981 +  _WorkspaceBase = .;
1982 +  __WorkspaceBase = .;
1983 +       
1984 +  /*
1985 +   * Heap
1986 +   *
1987 +   * The heap is configured at run-time to use all available memory.  It
1988 +   * begins just after the end of the Workspace and continues to the end of
1989 +   * the external RAM.
1990 +   */
1991 +  . = DEFINED(RTEMS_DEBUG) ? 0 + ext_ram_size : int_ram_top + ext_ram_size;
1992 +  _HeapEnd = .;
1993 +  __HeapEnd = .;
1994
1995 +        
1996 +  /* 
1997 +   * Internal I/O devices 
1998 +   */
1999 +  .usiu 0x002FC000:            /* unified system interface unit */
2000 +  {
2001 +    usiu = .;
2002 +  }
2003 +
2004 +  .imb 0x00300000:             /* inter-module bus and devices */
2005 +  {
2006 +    imb = .;
2007 +  }
2008 +
2009 +  .sram 0x00380000:            /* internal SRAM control registers */
2010 +  {
2011 +    sram = .;
2012 +  }
2013 +
2014 +  /*
2015 +   * SS555 external devices managed by on-board CPLD
2016 +   */
2017 +  .cpld 0xFF000000:            /* SS555 external CPLD devices */
2018 +  {
2019 +    cpld = .;
2020 +  }
2021 +
2022 +
2023 +  /* Stabs debugging sections.  */
2024 +  .stab 0 : { *(.stab) }
2025 +  .stabstr 0 : { *(.stabstr) }
2026 +  .stab.excl 0 : { *(.stab.excl) }
2027 +  .stab.exclstr 0 : { *(.stab.exclstr) }
2028 +  .stab.index 0 : { *(.stab.index) }
2029 +  .stab.indexstr 0 : { *(.stab.indexstr) }
2030 +  .comment 0 : { *(.comment) }
2031 +  
2032 +  /* DWARF debug sections.
2033 +     Symbols in the DWARF debugging sections are relative to the beginning
2034 +     of the section so we begin them at 0.  */
2035 +  /* DWARF 1 */
2036 +  .debug          0 : { *(.debug) }
2037 +  .line           0 : { *(.line) }
2038 +  
2039 +  /* GNU DWARF 1 extensions */
2040 +  .debug_srcinfo  0 : { *(.debug_srcinfo) }
2041 +  .debug_sfnames  0 : { *(.debug_sfnames) }
2042 +  
2043 +  /* DWARF 1.1 and DWARF 2 */
2044 +  .debug_aranges  0 : { *(.debug_aranges) }
2045 +  .debug_pubnames 0 : { *(.debug_pubnames) }
2046 +  
2047 +  /* DWARF 2 */
2048 +  .debug_info     0 : { *(.debug_info) }
2049 +  .debug_abbrev   0 : { *(.debug_abbrev) }
2050 +  .debug_line     0 : { *(.debug_line) }
2051 +  .debug_frame    0 : { *(.debug_frame) }
2052 +  .debug_str      0 : { *(.debug_str) }
2053 +  .debug_loc      0 : { *(.debug_loc) }
2054 +  .debug_macinfo  0 : { *(.debug_macinfo) }
2055 +  
2056 +  /* SGI/MIPS DWARF 2 extensions */
2057 +  .debug_weaknames 0 : { *(.debug_weaknames) }
2058 +  .debug_funcnames 0 : { *(.debug_funcnames) }
2059 +  .debug_typenames 0 : { *(.debug_typenames) }
2060 +  .debug_varnames  0 : { *(.debug_varnames) }
2061 +  /* These must appear regardless of  .  */
2062 +}
2063 Index: rtems/c/src/lib/libbsp/powerpc/ec555/startup/start.S
2064 ===================================================================
2065 --- /dev/null
2066 +++ rtems/c/src/lib/libbsp/powerpc/ec555/startup/start.S
2067 @@ -0,0 +1,411 @@
2068 +/*  start.S
2069 + *
2070 + *  This file contains the entry veneer for RTEMS programs on the Intec
2071 + *  SS555 board.  It jumps to the BSP which is responsible for performing
2072 + *  all remaining initialization.
2073 + *
2074 + * This file is based on several others:
2075 + *
2076 + * (1) start360.s from the gen68360 BSP by
2077 + *     W. Eric Norum (eric@skatter.usask.ca)
2078 + *     with the following copyright and license:
2079 + *
2080 + *     COPYRIGHT (c) 1989-1998.
2081 + *     On-Line Applications Research Corporation (OAR).
2082 + *
2083 + *     The license and distribution terms for this file may in
2084 + *     the file LICENSE in this distribution or at
2085 + *     http://www.rtems.com/license/LICENSE.
2086 + *
2087 + * (2) start.s for the eth_comm port by
2088 + *     Jay Monkman (jmonkman@fracsa.com),
2089 + *     which itself is based on the
2090 + *
2091 + * (3) dlentry.s for the Papyrus BSP, written by:
2092 + *     Andrew Bray <andy@i-cubed.co.uk>
2093 + *     with the following copyright and license:
2094 + *
2095 + *     COPYRIGHT (c) 1995 by i-cubed ltd.
2096 + *
2097 + * (4) start860.S for the MBX821/MBX860, written by:
2098 + *     Darlene A. Stewart <darlene.stewart@iit.nrc.ca>
2099 + *     Copyright (c) 1999, National Research Council of Canada
2100 + *
2101 + *     To anyone who acknowledges that this file is provided "AS IS"
2102 + *     without any express or implied warranty:
2103 + *         permission to use, copy, modify, and distribute this file
2104 + *         for any purpose is hereby granted without fee, provided that
2105 + *         the above copyright notice and this notice appears in all
2106 + *         copies, and that the name of i-cubed limited not be used in
2107 + *         advertising or publicity pertaining to distribution of the
2108 + *         software without specific, written prior permission.
2109 + *         i-cubed limited makes no representations about the suitability
2110 + *         of this software for any purpose.
2111 + *
2112 + * (5) Modifications (for MBX8xx) of respective RTEMS files:
2113 + *     Copyright (c) 1999, National Research Council of Canada
2114 + *
2115 + * SS555 port sponsored by Defence Research and Development Canada - Suffield
2116 + * Copyright (C) 2004, Real-Time Systems Inc. (querbach@realtime.bc.ca)
2117 + */
2118 +
2119 +#include <rtems/asm.h>
2120 +#include <rtems/powerpc/registers.h>
2121 +
2122 +/*
2123 + *  The initial stack is set to the top of the internal RAM.
2124 + *
2125 + *  All the entry veneer has to do is to clear the .bss section and copy the
2126 + *  initializers into the .data section.
2127 + */
2128 +
2129 +/*
2130 + *  GDB likes to have debugging information for the entry veneer.
2131 + *  Play compiler and provide some DWARF information.
2132 + *
2133 + *  CHANGE TO SUIT YOUR SETUP!
2134 + */
2135 +
2136 +        .section .entry,"ax",@progbits
2137 +.L_text_b:
2138 +.L_LC1:
2139 +       .previous
2140 +
2141 +.section       .debug_sfnames
2142 +.L_sfnames_b:
2143 +       .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
2144 +       .byte 0
2145 +.L_F0:
2146 +       .byte "start.S"
2147 +       .byte 0
2148 +       .previous
2149 +
2150 +.section       .line
2151 +.L_line_b:
2152 +       .4byte  .L_line_e-.L_line_b
2153 +       .4byte  .L_text_b
2154 +.L_LE1:
2155 +.L_line_last:
2156 +       .4byte  0x0
2157 +       .2byte  0xffff
2158 +       .4byte  .L_text_e-.L_text_b
2159 +.L_line_e:
2160 +       .previous
2161 +
2162 +.section       .debug_srcinfo
2163 +.L_srcinfo_b:
2164 +       .4byte  .L_line_b
2165 +       .4byte  .L_sfnames_b
2166 +       .4byte  .L_text_b
2167 +       .4byte  .L_text_e
2168 +       .4byte  0xffffffff
2169 +       .4byte  .L_LE1-.L_line_b
2170 +       .4byte  .L_F0-.L_sfnames_b
2171 +       .4byte  .L_line_last-.L_line_b
2172 +       .4byte  0xffffffff
2173 +       .previous
2174 +
2175 +.section       .debug_pubnames
2176 +       .4byte  .L_debug_b
2177 +       .4byte  .L_P0
2178 +       .byte "start"
2179 +       .byte 0
2180 +       .4byte  0x0
2181 +       .byte 0
2182 +       .previous
2183 +
2184 +.section       .debug_aranges
2185 +       .4byte  .L_debug_b
2186 +       .4byte  .L_text_b
2187 +       .4byte  .L_text_e-.L_text_b
2188 +       .4byte  0
2189 +       .4byte  0
2190 +       .4byte  0
2191 +       .4byte  0
2192 +       .4byte  0
2193 +       .4byte  0
2194 +       .4byte  0x0
2195 +       .4byte  0x0
2196 +       .previous
2197 +
2198 +.section       .debug
2199 +.L_debug_b:
2200 +.L_D1:
2201 +       .4byte  .L_D1_e-.L_D1
2202 +       .2byte  0x11    /* TAG_compile_unit */
2203 +       .2byte  0x12    /* AT_sibling */
2204 +       .4byte  .L_D2
2205 +       .2byte  0x38    /* AT_name */
2206 +       .byte "start.S"
2207 +       .byte 0
2208 +       .2byte  0x258   /* AT_producer */
2209 +       .byte "GAS 2.5.2"
2210 +       .byte 0
2211 +       .2byte  0x111   /* AT_low_pc */
2212 +       .4byte  .L_text_b
2213 +       .2byte  0x121   /* AT_high_pc */
2214 +       .4byte  .L_text_e
2215 +       .2byte  0x106   /* AT_stmt_list */
2216 +       .4byte  .L_line_b
2217 +       .2byte  0x1b8   /* AT_comp_dir */
2218 +       .byte "rtems/c/src/lib/libbsp/powerpc/ss555/startup/"
2219 +       .byte 0
2220 +       .2byte  0x8006  /* AT_sf_names */
2221 +       .4byte  .L_sfnames_b
2222 +       .2byte  0x8016  /* AT_src_info */
2223 +       .4byte  .L_srcinfo_b
2224 +.L_D1_e:
2225 +.L_P0:
2226 +.L_D3:
2227 +       .4byte  .L_D3_e-.L_D3
2228 +       .2byte  0x6     /* TAG_global_subroutine */
2229 +       .2byte  0x12    /* AT_sibling */
2230 +       .4byte  .L_D4
2231 +       .2byte  0x38    /* AT_name */
2232 +       .byte "start"
2233 +       .byte 0
2234 +       .2byte  0x278   /* AT_prototyped */
2235 +       .byte 0
2236 +       .2byte  0x111   /* AT_low_pc */
2237 +       .4byte  .L_text_b
2238 +       .2byte  0x121   /* AT_high_pc */
2239 +       .4byte  .L_text_e
2240 +       .2byte  0x8041  /* AT_body_begin */
2241 +       .4byte  .L_text_b
2242 +       .2byte  0x8051  /* AT_body_end */
2243 +       .4byte  .L_text_e
2244 +.L_D3_e:
2245 +
2246 +.L_D4:
2247 +       .4byte  .L_D4_e-.L_D4
2248 +       .align 2
2249 +.L_D4_e:
2250 +.L_D2:
2251 +       .previous
2252 +
2253 +/*
2254 + * Tell C's eabi-ctor's that we have an atexit function,
2255 + * and that it is to register __do_global_dtors.
2256 + */
2257 +       EXTERN_PROC(atexit)
2258 +       PUBLIC_VAR(__atexit)
2259 +       .section ".sdata","aw"
2260 +       .align  2
2261 +SYM(__atexit):
2262 +       EXT_PROC_REF(atexit)@fixup
2263 +       .previous
2264 +
2265 +       .section ".fixup","aw"
2266 +       .align  2
2267 +       EXT_SYM_REF(__atexit)
2268 +       .previous
2269 +
2270 +/* That should do it */
2271 +
2272 +/*
2273 + *  Put the entry point in its own section. That way, we can guarantee
2274 + *  to put it first in the .text section in the linker script.
2275 + */
2276 +        .section .entry
2277 +
2278 +        PUBLIC_VAR (start)
2279 +SYM(start):
2280 +        bl      .startup       /* or bl .spin */
2281 +base_addr:
2282 +
2283 +/*
2284 + * Parameters from linker
2285 + */
2286 +stack_top:
2287 +       .long   initStackPtr
2288 +
2289 +toc_pointer:
2290 +        .long   __GOT_START__
2291 +
2292 +bss_length:
2293 +        .long   bss.size
2294 +bss_addr:
2295 +        .long   bss.start
2296 +
2297 +data_length:
2298 +        .long   data.size
2299 +data_addr:
2300 +        .long   data.start
2301 +contents_addr:
2302 +        .long   data.contents.start
2303 +
2304 +PUBLIC_VAR (text_addr)
2305 +text_addr:
2306 +        .long   text.start
2307 +
2308 +PUBLIC_VAR (text_length)
2309 +text_length:
2310 +        .long   text.size
2311 +
2312 +/*
2313 + * Spin, if necessary, to acquire control from debugger (CodeWarrior).
2314 + */
2315 +spin:
2316 +       .long   0x0001
2317 +.spin:
2318 +       lis     r3, spin@ha
2319 +       lwz     r3, spin@l(r3)
2320 +       cmpwi   r3, 0x1
2321 +       beq     .spin
2322 +
2323 +/*
2324 + * Initialization code
2325 + */
2326 +.startup:
2327 +        /* Capture address of linker parameters. */
2328 +        mflr    r3
2329 +
2330 +       /* Set initial stack pointer to end of internal RAM - 56. */
2331 +       lwz     r1, stack_top-base_addr(r3)
2332 +        addi    r1, r1, -56
2333 +
2334 +        /* Initialize essential registers. */
2335 +        bl      initregs
2336 +
2337 +        /* Set TOC pointer */
2338 +        lwz r2, toc_pointer-base_addr(r3)
2339 +
2340 +        /* Initialize the memory mapped MPC555 registers (done in C). */
2341 +        EXTERN_PROC (_InitSS555)
2342 +        bl     PROC (_InitSS555)
2343 +
2344 +        /* Clear the .bss section. */
2345 +        bl      bssclr
2346 +
2347 +       /* Copy initializers into the .data section */
2348 +       bl      datacopy
2349 +
2350 +       /* Enable floating point, since gcc sometimes uses the floating
2351 +        * point registers for data moves, even if the C source code doesn't
2352 +        * include floating point operations.
2353 +        */
2354 +       mfmsr   r0
2355 +       ori     r0, r0, MSR_FP
2356 +       mtmsr   r0
2357 +
2358 +       /* Start system. */
2359 +       lis     r5, environ@ha
2360 +       la      r5,environ@l(r5)        /* environp */
2361 +       li      r4, 0                   /* argv */
2362 +       li      r3, 0                   /* argc */
2363 +        EXTERN_PROC (boot_card)
2364 +        bl       PROC (boot_card)      /* call the first C routine */
2365 +
2366 +        /* We should never return from boot_card, but in case we do ... */
2367 +       /* The next instructions are dependent on your runtime environment. */
2368 +
2369 +stop_here:
2370 +       b       stop_here
2371 +
2372 +/*
2373 + * datacopy - copy initializers into .data section
2374 + */
2375 +datacopy:
2376 +       lis     r3, base_addr@ha                /* point to linker data */
2377 +       addi    r3, r3, base_addr@l
2378 +
2379 +        lwz     r4, contents_addr-base_addr(r3) /* .data contents in ROM */
2380 +        lwz     r5, data_addr-base_addr(r3)     /* .data section in RAM */
2381 +        lwz     r6, data_length-base_addr(r3)   /* length of .data */
2382 +
2383 +        rlwinm. r6, r6, 30, 0x3FFFFFFF          /* form length / 4 */
2384 +        beqlr                                   /* no .data - return */
2385 +
2386 +        mtctr   r6                              /* set ctr reg */
2387 +dc1:
2388 +       lwz     r6, 0(r4)                       /* get word */
2389 +        stw     r6, 0(r5)                       /* store word */
2390 +        addi    r4, r4, 0x4                     /* next source */
2391 +        addi    r5, r5, 0x4                     /* next target */
2392 +        bdnz    dc1                             /* dec counter and loop */
2393 +
2394 +        blr                                     /* return */
2395 +
2396 +/*
2397 + * bssclr - zero out bss
2398 + */
2399 +bssclr:
2400 +       lis     r3, base_addr@ha                /* point to linker data */
2401 +       addi    r3, r3, base_addr@l
2402 +
2403 +        lwz     r4, bss_addr-base_addr(r3)      /* Start of bss */
2404 +        lwz     r5, bss_length-base_addr(r3)    /* Length of bss */
2405 +
2406 +        rlwinm. r5, r5, 30, 0x3FFFFFFF          /* form length/4 */
2407 +        beqlr                                   /* no bss - return */
2408 +
2409 +        mtctr   r5                              /* set ctr reg */
2410 +        li      r5, 0x0000                      /* r5 = 0 */
2411 +clear_bss:
2412 +        stw     r5, 0(r4)                       /* store r6 */
2413 +        addi    r4, r4, 0x4                     /* update r4 */
2414 +        bdnz    clear_bss                       /* dec counter and loop */
2415 +
2416 +        blr                                     /* return */
2417 +
2418 +/*
2419 + * initregs
2420 + *     Initialize the MSR and basic core PowerPC registers
2421 + *
2422 + * Register usage:
2423 + *     r0 - scratch
2424 + */
2425 +initregs:
2426 +       /*
2427 +        * Set the processor for big-endian mode, exceptions vectored to
2428 +        * 0x000n_nnnn, no execution tracing, machine check exceptions
2429 +        * enabled, floating-point not available, supervisor priviledge
2430 +        * level, external interrupts disabled, power management disabled
2431 +        * (normal operation mode).
2432 +        */
2433 +       li      r0, 0x1000      /* MSR_ME */
2434 +       mtmsr   r0              /* Context-synchronizing */
2435 +       isync
2436 +
2437 +       /*
2438 +        * Clear the exception handling registers.
2439 +        */
2440 +       li      r0, 0x0000
2441 +       mtdar   r0
2442 +       mtspr   sprg0, r0
2443 +       mtspr   sprg1, r0
2444 +       mtspr   sprg2, r0
2445 +       mtspr   sprg3, r0
2446 +       mtspr   srr0, r0
2447 +       mtspr   srr1, r0
2448 +
2449 +       mr      r6, r0
2450 +       mr      r7, r0
2451 +       mr      r8, r0
2452 +       mr      r9, r0
2453 +       mr      r10, r0
2454 +       mr      r11, r0
2455 +       mr      r12, r0
2456 +       mr      r13, r0
2457 +       mr      r14, r0
2458 +       mr      r15, r0
2459 +       mr      r16, r0
2460 +       mr      r17, r0
2461 +       mr      r18, r0
2462 +       mr      r19, r0
2463 +       mr      r20, r0
2464 +       mr      r21, r0
2465 +       mr      r22, r0
2466 +       mr      r23, r0
2467 +       mr      r24, r0
2468 +       mr      r25, r0
2469 +       mr      r26, r0
2470 +       mr      r27, r0
2471 +       mr      r28, r0
2472 +       mr      r29, r0
2473 +       mr      r30, r0
2474 +       mr      r31, r0
2475 +
2476 +       blr                     /* return */
2477 +
2478 +.L_text_e:
2479 Index: rtems/c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c
2480 ===================================================================
2481 --- /dev/null
2482 +++ rtems/c/src/lib/libbsp/powerpc/ec555/startup/tm27supp.c
2483 @@ -0,0 +1,29 @@
2484 +/*
2485 + *  Support routines for TM27
2486 + *
2487 + *  $Id: tm27supp.c,v 1.1 2004/04/21 20:24:36 joel Exp $
2488 + */
2489 +
2490 +#include <bsp.h>
2491 +
2492 +void tm27On()                                                          
2493 +{                                                                      
2494 +}                                                                      
2495 +                                                                       
2496 +void tm27Off()                                                         
2497 +{                                                                      
2498 +}                                                                      
2499 +                                                                       
2500 +int tm27IsOn()                                                         
2501 +{                                                                      
2502 +  return 1;                                                            
2503 +}                                                                      
2504 +                                                                       
2505 +rtems_irq_connect_data tm27IrqData = {                                 
2506 +  CPU_USIU_EXT_IRQ_7,                                                  
2507 +  (rtems_irq_hdl)0,                                                    
2508 +  (rtems_irq_enable)tm27On,                                            
2509 +  (rtems_irq_disable)tm27Off,                                          
2510 +  (rtems_irq_is_enabled)tm27IsOn                                       
2511 +};
2512 +
2513 Index: rtems/c/src/lib/libbsp/powerpc/ec555/times
2514 ===================================================================
2515 --- /dev/null
2516 +++ rtems/c/src/lib/libbsp/powerpc/ec555/times
2517 @@ -0,0 +1,189 @@
2518 +#
2519 +#  Timing Test Suite Results for the Intec SS555
2520 +#
2521 +#  $Id: times,v 1.1 2004/04/12 21:52:13 joel Exp $
2522 +#
2523 +
2524 +Board: SS555
2525 +CPU: MPC555
2526 +Clock Speed: 40 MHz
2527 +Memory Configuration: 512k external 2-1-1-1 SRAM
2528 +Wait States: 0
2529 +
2530 +Times Reported in: microseconds
2531 +Timer Source: Timebase register (TMBCLK = (4 MHz crystal / 4) = 1.0 Mhz)
2532 +
2533 +#                          DESCRIPTION                                  A       B
2534 +== =================================================================   ====    ====
2535 +
2536 + 1 rtems_semaphore_create                                               21
2537 +   rtems_semaphore_delete                                               22
2538 +   rtems_semaphore_obtain: available                                     7
2539 +   rtems_semaphore_obtain: not available -- NO_WAIT                      7
2540 +   rtems_semaphore_release: no waiting tasks                            18
2541 +
2542 + 2 rtems_semaphore_obtain: not available -- caller blocks               50
2543 +
2544 + 3 rtems_semaphore_release: task readied -- preempts caller             41
2545 +
2546 + 4 rtems_task_restart: blocked task -- preempts caller                  69
2547 +   rtems_task_restart: ready task -- preempts caller                    67
2548 +   rtems_semaphore_release: task readied -- returns to caller           23
2549 +   rtems_task_create                                                    75
2550 +   rtems_task_start                                                     30
2551 +   rtems_task_restart: suspended task -- returns to caller              37
2552 +   rtems_task_delete: suspended task                                    68
2553 +   rtems_task_restart: ready task -- returns to caller                  38
2554 +   rtems_task_restart: blocked task -- returns to caller                44
2555 +   rtems_task_delete: blocked task                                      70
2556 +
2557 + 5 rtems_task_suspend: calling task                                     40
2558 +   rtems_task_resume: task readied -- preempts caller                   35
2559 +
2560 + 6 rtems_task_restart: calling task                                     46
2561 +   rtems_task_suspend: returns to caller                                16
2562 +   rtems_task_resume: task readied -- returns to caller                 18
2563 +   rtems_task_delete: ready task                                        71
2564 +
2565 + 7 rtems_task_restart: suspended task -- preempts caller                64
2566 +
2567 + 8 rtems_task_set_priority: obtain current priority                     13
2568 +   rtems_task_set_priority: returns to caller                           24
2569 +   rtems_task_mode: obtain current mode                                  4
2570 +   rtems_task_mode: no reschedule                                        5
2571 +   rtems_task_mode: reschedule -- returns to caller                      7
2572 +   rtems_task_mode: reschedule -- preempts caller                       37
2573 +   rtems_task_set_note                                                  13
2574 +   rtems_task_get_note                                                  13
2575 +   rtems_clock_set                                                      27
2576 +   rtems_clock_get                                                       1
2577 +
2578 + 9 rtems_message_queue_create                                           34
2579 +   rtems_message_queue_send: no waiting tasks                           26
2580 +   rtems_message_queue_urgent: no waiting tasks                         26
2581 +   rtems_message_queue_receive: available                               24
2582 +   rtems_message_queue_flush: no messages flushed                       12
2583 +   rtems_message_queue_flush: messages flushed                          15
2584 +   rtems_message_queue_delete                                           26
2585 +
2586 +10 rtems_message_queue_receive: not available -- NO_WAIT                15
2587 +   rtems_message_queue_receive: not available -- caller blocks          52
2588 +
2589 +11 rtems_message_queue_send: task readied -- preempts caller            47
2590 +
2591 +12 rtems_message_queue_send: task readied -- returns to caller          29
2592 +
2593 +13 rtems_message_queue_urgent: task readied -- preempts caller          46
2594 +
2595 +14 rtems_message_queue_urgent: task readied -- returns to caller        29
2596 +
2597 +15 rtems_event_receive: obtain current events                            1
2598 +   rtems_event_receive: not available -- NO_WAIT                        12
2599 +   rtems_event_receive: not available -- caller blocks                  44
2600 +   rtems_event_send: no task readied                                    13
2601 +   rtems_event_receive: available                                       13
2602 +   rtems_event_send: task readied -- returns to caller                  21
2603 +
2604 +16 rtems_event_send: task readied -- preempts caller                    41
2605 +
2606 +17 rtems_task_set_priority: preempts caller                             49
2607 +
2608 +18 rtems_task_delete: calling task                                      95
2609 +
2610 +19 rtems_signal_catch                                                   10
2611 +   rtems_signal_send: returns to caller                                 15
2612 +   rtems_signal_send: signal to self                                    20
2613 +   exit ASR overhead: returns to calling task                           15
2614 +   exit ASR overhead: returns to preempting task                        30
2615 +
2616 +20 rtems_partition_create                                               25
2617 +   rtems_region_create                                                  38
2618 +   rtems_partition_get_buffer: available                                14
2619 +   rtems_partition_get_buffer: not available                            13
2620 +   rtems_partition_return_buffer                                        15
2621 +   rtems_partition_delete                                               16
2622 +   rtems_region_get_segment: available                                  34
2623 +   rtems_region_get_segment: not available -- NO_WAIT                   32
2624 +   rtems_region_return_segment: no waiting tasks                        33
2625 +   rtems_region_get_segment: not available -- caller blocks             68
2626 +   rtems_region_return_segment: task readied -- preempts caller         67
2627 +   rtems_region_return_segment: task readied -- returns to caller       48
2628 +   rtems_region_delete                                                  30
2629 +   rtems_io_initialize                                                   2
2630 +   rtems_io_open                                                         1
2631 +   rtems_io_close                                                        1
2632 +   rtems_io_read                                                         1
2633 +   rtems_io_write                                                        1
2634 +   rtems_io_control                                                      1
2635 +
2636 +21 rtems_task_ident                                                     25
2637 +   rtems_message_queue_ident                                            22
2638 +   rtems_semaphore_ident                                                29
2639 +   rtems_partition_ident                                                22
2640 +   rtems_region_ident                                                   24
2641 +   rtems_port_ident                                                     22
2642 +   rtems_timer_ident                                                    22
2643 +   rtems_rate_monotonic_ident                                           22
2644 +
2645 +22 rtems_message_queue_broadcast: task readied -- returns to caller     33
2646 +   rtems_message_queue_broadcast: no waiting tasks                      20
2647 +   rtems_message_queue_broadcast: task readied -- preempts caller       50
2648 +
2649 +23 rtems_timer_create                                                   13
2650 +   rtems_timer_fire_after: inactive                                     22
2651 +   rtems_timer_fire_after: active                                       24
2652 +   rtems_timer_cancel: active                                           13
2653 +   rtems_timer_cancel: inactive                                         12
2654 +   rtems_timer_reset: inactive                                          21
2655 +   rtems_timer_reset: active                                            22
2656 +   rtems_timer_fire_when: inactive                                      26
2657 +   rtems_timer_fire_when: active                                        26
2658 +   rtems_timer_delete: active                                           18
2659 +   rtems_timer_delete: inactive                                         16
2660 +   rtems_task_wake_when                                                 49
2661 +
2662 +24 rtems_task_wake_after: yield -- returns to caller                    10
2663 +   rtems_task_wake_after: yields -- preempts caller                     36
2664 +
2665 +25 rtems_clock_tick                                                      8
2666 +
2667 +26 _ISR_Disable                                                          1
2668 +   _ISR_Flash                                                            1
2669 +   _ISR_Enable                                                           1
2670 +   _Thread_Disable_dispatch                                              1
2671 +   _Thread_Enable_dispatch                                               7
2672 +   _Thread_Set_state                                                     7
2673 +   _Thread_Disptach (NO FP)                                             32
2674 +   context switch: no floating point contexts                           25
2675 +   context switch: self                                                 11
2676 +   context switch: to another task                                      12
2677 +   fp context switch: restore 1st FP task                               37
2678 +   fp context switch: save idle, restore initialized                    34
2679 +   fp context switch: save idle, restore idle                           48
2680 +   fp context switch: save initialized, restore initialized             34
2681 +   _Thread_Resume                                                        7
2682 +   _Thread_Unblock                                                       6
2683 +   _Thread_Ready                                                         7
2684 +   _Thread_Get                                                           4
2685 +   _Semaphore_Get                                                        2
2686 +   _Thread_Get: invalid id                                               1
2687 +
2688 +27 interrupt entry overhead: returns to interrupted task                13
2689 +   interrupt exit overhead: returns to interrupted task                 11
2690 +   interrupt entry overhead: returns to nested interrupt                12
2691 +   interrupt exit overhead: returns to nested interrupt                 10
2692 +   interrupt entry overhead: returns to preempting task                 12
2693 +   interrupt exit overhead: returns to preempting task                  38
2694 +
2695 +28 rtems_port_create                                                    16
2696 +   rtems_port_external_to_internal                                      11
2697 +   rtems_port_internal_to_external                                      11
2698 +   rtems_port_delete                                                    16
2699 +
2700 +29 rtems_rate_monotonic_create                                          15
2701 +   rtems_rate_monotonic_period: initiate period -- returns to caller    20
2702 +   rtems_rate_monotonic_period: obtain status                           12
2703 +   rtems_rate_monotonic_cancel                                          15
2704 +   rtems_rate_monotonic_delete: inactive                                18
2705 +   rtems_rate_monotonic_delete: active                                  20
2706 +   rtems_rate_monotonic_period: conclude periods -- caller blocks       36
2707 Index: rtems/make/custom/ec555.cfg
2708 ===================================================================
2709 --- /dev/null
2710 +++ rtems/make/custom/ec555.cfg
2711 @@ -0,0 +1,49 @@
2712 +#
2713 +#  Config file for an Intec Automation SS555 MPC555-based card
2714 +#
2715 +#  This file is derived from:
2716 +#
2717 +#  Config file for a PowerPC MPC860-based MBX821-001 card.
2718 +#  Config file for a PowerPC 403 based helas403 card
2719 +#  Config file for MPC860 based Ethernet Comm Board
2720 +#
2721 +
2722 +include $(RTEMS_ROOT)/make/custom/default.cfg
2723 +
2724 +RTEMS_CPU=powerpc
2725 +GCC_CPU_MODEL=505
2726 +RTEMS_CPU_MODEL=mpc555
2727 +
2728 +# This is the actual bsp directory used during the build process.
2729 +RTEMS_BSP_FAMILY=ss555
2730 +
2731 +#  This contains the compiler options necessary to select the CPU model
2732 +#  and (hopefully) optimize for it.
2733 +#
2734 +CPU_CFLAGS = -mcpu=$(GCC_CPU_MODEL) -D$(RTEMS_CPU_MODEL) -D$(RTEMS_BSP_FAMILY)
2735 +
2736 +# Debugging flags:  If we debug with optimization on, single-stepping
2737 +# sometimes looks a little odd, but there won't be any surprises later.
2738 +CFLAGS_DEBUG_V += -O4 -ggdb
2739 +CXXFLAGS_DEBUG_V += -O4 -ggdb
2740 +
2741 +# optimize flag: typically -O, could use -O4 or -fast
2742 +# -O4 is ok for RTEMS
2743 +# NOTE: some level of -O may be actually required by inline assembler
2744 +CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
2745 +CXXFLAGS_OPTIMIZE_V=-O4
2746 +
2747 +define make-exe
2748 +       $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(SS555_LDFLAGS) \
2749 +           -o $(basename $@)_sym.exe $(LINK_OBJS) $(LINK_LIBS)
2750 +       $(NM) -g -n $(basename $@)_sym.exe > $(basename $@).nm
2751 +       cp $(basename $@)_sym.exe $(basename $@).exe 
2752 +       $(STRIP) $(basename $@).exe
2753 +       $(SIZE) $(basename $@)_sym.exe
2754 +endef
2755 +
2756 +# Miscellaneous additions go here
2757 +
2758 +# Override default start file
2759 +START_BASE=
2760 +
2761 Index: rtems/c/src/lib/libbsp/powerpc/ec555/preinstall.am
2762 ===================================================================
2763 --- /dev/null
2764 +++ rtems/c/src/lib/libbsp/powerpc/ec555/preinstall.am
2765 @@ -0,0 +1,58 @@
2766 +## Automatically generated by ampolish3 - Do not edit
2767 +
2768 +if AMPOLISH3
2769 +$(srcdir)/preinstall.am: Makefile.am
2770 +       $(AMPOLISH3) $(srcdir)/Makefile.am > $(srcdir)/preinstall.am
2771 +endif
2772 +
2773 +PREINSTALL_DIRS =
2774 +DISTCLEANFILES += $(PREINSTALL_DIRS)
2775 +
2776 +all-am: $(PREINSTALL_FILES)
2777 +
2778 +PREINSTALL_FILES =
2779 +CLEANFILES = $(PREINSTALL_FILES)
2780 +
2781 +$(PROJECT_LIB)/$(dirstamp):
2782 +       @$(mkdir_p) $(PROJECT_LIB)
2783 +       @: > $(PROJECT_LIB)/$(dirstamp)
2784 +PREINSTALL_DIRS += $(PROJECT_LIB)/$(dirstamp)
2785 +
2786 +$(PROJECT_INCLUDE)/$(dirstamp):
2787 +       @$(mkdir_p) $(PROJECT_INCLUDE)
2788 +       @: > $(PROJECT_INCLUDE)/$(dirstamp)
2789 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/$(dirstamp)
2790 +
2791 +$(PROJECT_LIB)/bsp_specs: bsp_specs $(PROJECT_LIB)/$(dirstamp)
2792 +       $(INSTALL_DATA) $< $(PROJECT_LIB)/bsp_specs
2793 +PREINSTALL_FILES += $(PROJECT_LIB)/bsp_specs
2794 +
2795 +$(PROJECT_INCLUDE)/bsp.h: include/bsp.h $(PROJECT_INCLUDE)/$(dirstamp)
2796 +       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp.h
2797 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp.h
2798 +
2799 +$(PROJECT_INCLUDE)/tm27.h: include/tm27.h $(PROJECT_INCLUDE)/$(dirstamp)
2800 +       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/tm27.h
2801 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/tm27.h
2802 +
2803 +$(PROJECT_INCLUDE)/bspopts.h: include/bspopts.h $(PROJECT_INCLUDE)/$(dirstamp)
2804 +       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bspopts.h
2805 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bspopts.h
2806 +
2807 +$(PROJECT_INCLUDE)/bsp/$(dirstamp):
2808 +       @$(mkdir_p) $(PROJECT_INCLUDE)/bsp
2809 +       @: > $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2810 +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2811 +
2812 +$(PROJECT_INCLUDE)/coverhd.h: include/coverhd.h $(PROJECT_INCLUDE)/$(dirstamp)
2813 +       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/coverhd.h
2814 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/coverhd.h
2815 +
2816 +$(PROJECT_INCLUDE)/bsp/irq.h: irq/irq.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
2817 +       $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/irq.h
2818 +PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/irq.h
2819 +
2820 +$(PROJECT_LIB)/linkcmds: startup/linkcmds $(PROJECT_LIB)/$(dirstamp)
2821 +       $(INSTALL_DATA) $< $(PROJECT_LIB)/linkcmds
2822 +PREINSTALL_FILES += $(PROJECT_LIB)/linkcmds
2823 +