GCC-M68k Binaries for Win95/NT
==============================

Release 6 : Initial Release
---------------------------

Introduction
------------

This zip file contains a version of GNU C/C++ which compiles for the 
Motorola 68k series of processors. The compiler is based on a copy 
of the Experimental GNU Compiler System(EGCS) V1.1.2 source code which 
is particularly suited to the building Win32 hosted ColdFire 
cross-compilers. This compiler whilst complete in not fully tested and 
as such MAY contain bugs although none are known at this time. If you 
downloaded a release of my compiler prior to Release 4 please read 
UPGRADE.TXT for some important information. I created this release to 
save the world's dwindling supply of disk space and processing power, 
relieve the extreme boredom of watching a compiler compile and 
generally turn some decent tech. into a reasonably workable 
solution....that doesn't cost $2000!

David Fiddes - 22nd April 1999
Edinburgh, Scotland, UK


What's New
----------

 - EGCS-1.1.2 and GNU Binutils-2.9.1 based compiler
 - 6 months of ColdFire code generation bug fixes including:
    - large > 64k C struct code gen error
    - duplicate accesses to volatile pointers with -O0
    - bad assembly of mul[us] intructions
    - shift a 64 bit long long 8 bits to the left bug
 - Experimental support for ColdFire MAC assembly (-mmac)
   (thanks to Linus Nordberg [linus.nordberg@canit.se])
 - Experimental support for ColdFire hardware divide assembly (-mhwdiv)
 - New example demonstrating the MAC instructions
   (5206e and 5307 users only)
 - Updated to support Cygwin Beta 20.1

Contact
-------

Whilst I welcome contact particularly if you have a suggestion, nag 
or require help contacting me personally is not necessarily the best
way to get help.

If you are a Motorola ColdFire user then I highly recommend that you
join the ColdFire Mailing List at http://www.wildrice.com/coldfire/
There are a lot of GCC-M68k users on the list who can help you. I also
tend to answer quieries there much more quickly than personal emails
because it stands more chance of helping more people.

If you have a general GNU cross-compiler query particularly if you use
a platform other than Win32 or Linux then you should try the 
crossgcc mailing list. Send a message to crossgcc-request@cygnus.com
with "subscribe crossgcc <your email address>" as the only line in the 
message. There are web archives of the list at
http://www.cygnus.com/ml/crossgcc/

If you don't fit into either of the above feel free to contact me with 
any suggestions, nags or help.

email: D.J@fiddes.surfaid.org

Web Address: http://www.users.surfaid.org/~fiddes/coldfire/


Updates
-------

I have set up an announcement only mailing list which will contain 
news of updates and new versions of this compiler. To subscribe just
send a blank message to coldfire-gcc-subscribe@fiddes.surfaid.org. To
remove yourself from the list send a blank message to
coldfire-gcc-unsubscribe@fiddes.surfaid.org


Basic Disclaimer
----------------

 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY 
 OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT    
 LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR    
 FITNESS FOR A PARTICULAR PURPOSE.                              

 This software is covered by the GNU public licence see licence.txt
 for details.

 The only exception to this are the example programs and header files
 contained in the gcc-m68k/examples directory which you may use
 as you see fit.


Installation
------------

Installation of the compiler is fairly straight forward.

1). Unzip the "install kit" into an empty directory. This gives you the
basic installer and decompression programs.

2). Download and copy the main compiler archives to this directory. If
you're just installing ColdFire support that will just be gcc-m68k-
R6.tar.bz2 if you have opted for extra libraries make sure you get these
too. 

3). Run the install program by specifying the "root" directory that you wish to install to:
   e.g. "install c:\coldfire"

4). The installer will create the specified directory, add the
appropriate entries to the registry to allow the Cygwin "Virtual Unix"
to operate, a start-up batch file and decompress the compiler. When it
has finished it will rename the original archives to .installed so that
it doesn't overwrite things if you run the program twice by accident.

5). Setup the compiler environment by running "c:\coldfire\setenv.bat"
(you'll need to do this every time you use the compiler). Move to the
c:\coldfire\gcc-m68k\examples directory and type:

  make

This will build a series of ColdFire example programs which should build
without any warnings or error messages. I'd recommend doing this even if
you don't plan on compiling for the ColdFire as it checks that the
installation has worked OK.

If you use something other than a SBC5206 you have to specify the VARIANT
environment variable:

  make VARIANT=sbc5307

Then have great fun downloading the .X files to your SBC5204/SBC5206/SBC5307
eval boards. The examples by default link to SREC format. For greater speed
when using network downloads(recommended) use the sbc5206.ld linker script
rather than the sbc5206-srec.ld by specifying LINKER_SCRIPT=sbc5206.ld when
compiling.

6). (option) Download and install the Cygnus Cygwin Beta 20.1 toolset
to provide a complete set of unix style development tools. Also, copy
the newest cygwinb1.dll from the /bin directory of either this compiler
or the Cygwin toolset to your windows/system directory and delete or
rename all the other cygwinb1.dll files on your system. Nothing will
work if you forget this.


Documentation
-------------

The compiler comes with a variety of different types of documentation. You
can use either plain HTML, MS HTMLHelp or Postscript user manuals for the
compiler and C library. For the latest documentation always check the web 
site at:

http://www.users.surfaid.org/~fiddes/coldfire/


Rebuilding
----------

I used to say "If you want to rebuild the toolset then you're mad..." in
this section. In the past few months with the release of the Cygnus Cygwin
Beta 20.1 toolkit it has become significantly easier to build Win32
cross-compilers. It's still a difficult and slow process though. 
A complete guide on how to build Win32 and Linux cross-compilers can be
found on the web site.

This build was compiled from:

  binutils-2.9.1
  EGCS 1.1.2
  newlib-1.8.1
  some ColdFire bug fix patches(in the gcc-m68k/patches directory)

using Cygnus Cygwin Beta 20.1 from http://sourceware.cygnus.com/cygwin/


Future Plans
------------

Retire from the compiler building business so I can concentrate on the
real job of programming my ColdFire system.... RTEMS 4.0.0 supports the
ColdFire processor the next release of RTEMS, 4.1.0, will have a generic
ColdFire Board Support Package complete with full ethernet support. A
pre-release version of the BSP can be found on the web site.


Acknowledgements
----------------

My original release(s) of gcc for the ColdFire we're pretty much 100% my
effort but Release 3 through 6 owe a lot to these people:

Rod Barman - General ColdFire GCC fixer-upper in previous releases
Mumit Khan - Who has put in a huge amount of effort in making sure that EGCS works under Win32
Mike Gruber - For helping debug EGCS ColdFire support with me
Geoffroy Montel - For assisting with debugging my compiler building procedure and other CF stuff
Paul Breed - For helping fix all sorts of problems particularly stdin using libdbug.a
Linus Norbert - For tracking down and fixing the problem with "float" numbers and adding MAC support to the GNU assembler
Dave Miller - For helping fix a problem with invalid byte move's to address regs in EGCS
Rick Haubenstricker - For debugging my build instructions
Mark Powell - For digging out all sorts of ColdFire bugs
Rolf Fielder - For fixing many bugs in the tools


Jeff Law and all the other clever people on the EGCS project(http://www.cygnus.com/egcs/)
Geoff Noer and all the other clever people on the GNU-win32
project(http://sourceware.cygnus.com/cygwin/)
Joel Sherrill - for helping out with the compiler and for RTEMS.

The guy's at Motorola in Austin,TX and Scotland(;-) who will no doubt
pour over this latest "freebie" to abuse their chips.


Everyone on the ColdFire Mailing List
(http://www.wildrice.com/coldfire/) for hanging out and talking about a
pretty nifty piece of silicon. Without these guys this release would not 
have happened.

All the hundreds of people who have emailed me over the past 2 years (!)
with queries, help, suggestions, etc.