uC/OS-II port for the HC11 EVB and EVBU evaluation boards 
using the ImageCraft, ICC11 compiler, V5


Do you have the EVB or the EVBU? Don't know?


EVB:
        Has two 25 pin connectors, one for a host and one
        for a terminal.

        Also requires + and - 12v supply in addition to 5v supply.

        Runs in expanded mode with all I/O available.
        (board includes port replacement unit)


EVBU:
	Has one 25 pin connector.
	
	Only requires one voltage source.
	
	Ports B and C are not available.


EVB Users:

If you have the EVB with only 8k of ram (socket U4 or U5 is empty) 
you are pretty much hosed at this point. Even leaving out a lot of 
the functionality, the code seems to take up a little more than 8k. 
However, you can get another 8k ram pretty cheap and just plug into
the empty socket. I got mine from JDR Microdevices, www.jdr.com, 
part# HM6264LP-70. The $5 shipping will cost more than the part itself.


EVBU Users:

The EVBU has 32k of ram, which is enough, but ports B and C are not
available. Although I have not done so, the EVBU has the necessary 
latch to directly connect a port replacement unit, MC68HC24FN, to 
the address lines to make ports B and C available.


Files for the uC/OS-II port 
(not to be confused with an I/O port):

evectors.h
evectors.c	Used to initialize the pseudo vectors.
		Uncomment the "#define" statement in 
		evectors.h for the appropriate Output 
		Compare register used as defined in includes.h

io_hc11.h	Pointers to the I/O...PORTB, PORTC, etc.

custom.s	Contains the 4 assembly functions described 
		in the book, page 198.

os_cfg.h	Configuration for the OS

os_cpu.h	Contains other compiler and target options

os_cpu_c.c	Contains user definable hooks (functions) 
		and compiler specific stack init function, 
		OSTaskStkInit()

includes.h	defines which output compare to use for clock
		and includes other ".h" files

test.c		contains "main", tasks, and ticker initialization. 
		If you have all of the I/O, uncomment the 
		"PORTC ^= 0x..."In the tasks (and OSTimeTickHook() 
		in os_cpu_c.c) to toggle the PORT C pins.

ucos_ii.h	system definitions

ucos_ii.c	"includes" other OS files



I copied all the files I needed in a separate directory
called "OS" in the ICC directory. Ex: c:\ICC\OS

The files needed are the 11 described above and the OS
files:

        os_core.c
        os_mbox.c
        os_mem.c
        os_q.c
        os_sem.c
        os_task.c
        os_time.c


Using ImageCraft IDE:

1. From the Project menu, create a new project.

2. Add the files to the project:
	custom.s
	evectors.c
	os_cpu_c.c
	test.c
	ucos_ii.c

3. Set the memory for the linker under the Options/Compiler
   menu.

4. Build, download and go!



Notes:

uCos_ii.c "includes" other c files. If you make changes to 
one of those c files, you need to make a change in uCos_ii.c 
(press the spacebar inside the file and hit the backspace key
and save it) so the make utility will re-build that file. 

If you have the EVB with the full 16k of ram, your ram is 
probably addressed into two 8k blocks...0x6000 to 0x7FFF 
and 0xC000 to 0xDFFF. I am not familiar enough with the 
ICC11 linker to get the text section to be in two different
places so I used the "pragma abs_address..."in ucos_ii.c to 
seperate the sections.

If I can be of help in anyway, or if I have made a mistake somewhere,
I can be contacted via email: dhisky@hotmail.com
