*
* file: README - 11/28/98
*
* Port of uC/OS-II to the SparcLite processor for the Fujitsu 832 Evaluation Board
* Written by Brad Denniston, Viewpoint Engineering (bradd@vpeng.com)
* Based on the MIPs port of uC/OS by Philip Bunce (pjb@carmel.com).
* Based on the ARM port of uC/OS by Marco Graziano (marcog@crl.com).
*

		 Sparc Lite Multi-tasking RTOS

This is a very small, simple Multi-tasking RTOS based on Jean LaBrosse's uC/OS-II.
uC/OS-II is a real-time kernel written by Jean J. Labrosse for the x86
processor and published in the magazine "Embedded Systems Programming" in 1992.

The description and source code for this kernel appears in Jean's book,
   
  "MicroC/OS-II, The Real-Time Kernel", distributed by:
	Publishers Group West
	P.O. Box 8843
	Emeryville, CA  94662
	ISBN 0-87930-543-6
 
The book contains all of the source code for uC/OS-II, descriptions of its features, and an excellent general introduction to the concepts of real-time operating systems.

Be sure that you get the accompanying diskette, it'll save a lot of typing! 

Note the following modification for SPARC chips:
On page 200, sentence 2 of Jean's book "it is assumed that all processor registers are saved onto the interrupt task's stack". This is not true for a SPARC machine because the registers are in sets that are retained in the CPU. When an interrupt occurs the interrupt response code must walk back the current window pointer back up the register sets and save every set of registers to the stack. This register architecture works great for C-like programs that use lots of small functions but it is an inefficient design for multi-tasking. The upshot is that we cannot use an INT for macros OS_TASK_SW and OSIntCtxSw. We must call a leaf routine to perform a context switch.
 
This distribution contains the uC/OS-II Board Support Package (BSP) for the SparcLite 
processor on a Fujitsu 832 Evaluation Board. To use this version of uC/OS, you need a Fujitsu 832 Evaluation Board and the GNU development software. Fujitsu makefile organization depends on the following directory structure:
c:\slite
        \prom	/* monitor code */
        \sw
           \gnulib	/* debugger code */
   	       \programs
                    \ucos	/* operating system code */
                        \832		/* chip code */
                             \832ek		/* board code */
			\lib
			    libucos2.a	/* os library from directory src */
			    libbsp.a	/* bsp from directory 832 */
                       	\src			/* uC/OS-II source code 
			\testcases		/* multiple directories */
			\...

Create directory ucos and install the code in this distribution. Add the uC/OS-II source code to directory ucos and build a library named Libucos2.a. Put the library into directory ucos\lib. Chip specific code (the BSP) is in the 832 chip subdirectory.
This code handles interrupts and task switching. Support code for the 832 evaluation 
board is in the 832EV board subdirectory of the chip directory. Board code sets up 
the interrupt controller and timer chips.

Test and example programs are in subdirectories of the ucos directory. 

To run any of the test programs:

- Connect two serial cables from the host computer to the evaluation board. 
  Follow Fujitsu directions for connecting the GNU debugger and test the
  connection.

- Start Microsoft Hyperterm (or better yet, terminal.exe from Windows 3.1) and connect 
  it to the second evaluation board serial port. 

- Enter any test program directory. For this example use 'looptime'.

- 'make' the program.

- 'd' is a batch command that starts the debugger

- Minimize the debugger and adjust so you can also see the hyperterm output

- At the debugger menu bar select 'Gdb' and 'Read script'

- Enter 'looptime.cmd'

- When loading ends, use the 'Enter' key to get the gnu> prompt

- Enter 'c' to continue but do not hit 'Enter' yet.

- Place the mouse cursor over the Hyperterm display, hit 'Enter' and left click.
  This immediately puts the focus onto the Hyperterm window which will not scroll
  unless it has the focus.

- Most of the tests run without stopping.  To stop execution use the very small
  black reset button on the evaluation board. The debugger will be blocked waiting
  for I/O from the board. You must use Ctrl-Alt-Del to get the task manager which
  allows you to kill the debugger.

Enjoy,

Brad Denniston


Disclaimer: This software is released "AS IS" and the authors do not assume any
liability arising out of this program or use thereof.


