This document contains information for those interested
in modifying the C source code of the VM, in particular
for cross-compilation to the H8300 microcontroller.

For further details of how to build the source see the file
GUIDELINES.

Cross-compiler for Unix
-----------------------
There are instructions for setting up a cross-compilation environment
at http://h8300-hms.sourceforge.net/ including both a binary and a
build-your-own option.  They work flawlessly in Linux and on cygwin
(which is a unix-like environment for Windows). This site uses the
most recent versions of the GNU utilities and has improvements on
the h8300 cross-compilation environment.

You can download the various packages required from
http://www.gnu.org/order/ftp.html

newlib is available at: ftp://sources.redhat.com/pub/newlib/index.html

Create Makefile.config containing:

  BINDIR=/usr/local/bin
  BINPREFIX=h8300-hitachi-hms-


Cross-compiler for CygWin 1.3.2
-------------------------------
Download and install Cygwin from http://sources.redhat.com/cygwin/

Go to http://h8300-hms.sourceforge.net/ and follow the
instructions for building the tools yourself.

You can download the various packages GNU required from
http://www.gnu.org/order/ftp.html

newlib is available at: ftp://sources.redhat.com/pub/newlib/index.html

If you follow the instructions verbatim you will have to modify
Makefile.config in the lejos root directory to point BINDIR at
/usr/local/bin.

Following this procedure will provide you with the most up
to date versions of the tools.

Note 1: the cygwin make is called make not gmake.

Note 2: binutils failed to correctly configure on a later version
of cygwin. The file binutils-2.11.2/objdir/libiberty/config.h had
to be modified to #define HAVE_SYS_ERRLIST.
 	


