Phillip Musumeci's collection of 68HC11 cross C files
68HC11 GNU C support files
- The hc11f1.h include file defines peripheral
port addresses etc. Note the meticulous type casting used to ensure that
register access is byte--sized (8 bit) or word--sized (16 bit) as required.
Acknowledgements are at the start of the file.
- The conio.h file supplies serial IO routines
int getchar() and void putchar( int ) for
console IO via the 68HC11 SCI peripheral. As it requires little extra
support, a void puts( char * ) routine for printing
strings is also provided.
- The ctype.h file supplies char test functions.
This source code is actually generated by another C program which ensures
that this ctype.h file's functions exactly mimic those available on the
host (in this case, a FreeBSD host).
- The esp_printf.c file provides printf().
This printf was created by Rud Merriam (Compsult, Inc. Houston, Texas,
1991) and features integer only support.
- The stdio.h include file simply includes
hc11f1.h, conio.h, and esp_printf.c.
- This Makefile is what I use for a general cross
compile system running in a web served environment (you probably won't want
this file!).
Other components needed
- GNU C 2.6.3 or 2.7.2 can be used. It is configured with
target=68HC11 and, in the case of my installation,
host=FreeBSD. An example of compiling the compiler is
available in ftp area
ftp://mirriwinni.hn.org/pub/uP/68HC11-cross-compilers --- see
files gcc-2.6.3-6811-FreeBSD210R.install-log
and gcc-2.6.3-6811-FreeBSD-3.1install-log
(most recently, I used GCC 2.6.3);
- The run-time library is written in 6811 machine language (based on
work by Coactive Aesthetics Ltd. who did the GNU C port) --- you get this
when you obtain the patches for GCC from www.coactive.com
(an April 1995 copy is available here at ftp://mirriwinni.hn.org/pub/uP/68HC11-cross-compilers/gcc-6811-fsf.tar.gz);
- This Makefile is what I use to compile the
run-time code;
- This is my crt0.s run-time code;
- This is a copy of Coactive's crt0.s original
run-time code --- they have links into an extensive set of support routines
in the ROM of their board.
- The peep hole optimiser by Christopher W. Fraser (one of the authors
of LCC, a retargetable C compiler system) could also be configured to
improve code efficiency. This is my initial set of rules .