GCC6809 is a port of the free GNU C compiler to the 6809 processor. It has been tested on Linux and Cygwin, and is probably portable to other UNIX-like environments as well. GCC6809 now supports the CoCo hardware platforms as well as generic targets.
GCC6809 is developed in parallel with the mainline, "trunk" version of GCC. Snapshots are periodically made available against released versions of the software as patches. The latest version is a patch against GCC 4.3.3. GCC 4.4.0 is already in progress and the 6809 version of that is looking good.
Developers interested in contributing to GCC6809 should contact me and request access to the git source code repository.
No new code has been posted, although a number of changes are in the works. The GCC 4.3 stream has seen several updates -- bug fixes, performance improvements, and new features -- and so a new release will be posted sometime soon. GCC 4.3.3 is still a very good release and I wouldn't bother upgrading unless you need some of the fixes. I'll post a list of changes along with releasing the code.
GCC 4.4 is still being tested. It runs well in the GCC testsuite, but has some problems compiling some of my applications. I'm beginning to think this isn't a GCC problem, but I'm not sure yet. Still, I'm not planning to post the GCC 4.4 code until I know more.
There is also the latest GCC upstream development -- what will become GCC 4.5. For awhile this was simply broken due to some major changes that were going in, but it is compiling as of last night and seems to run fine.
Just a brief update on things...
GCC 4.3.4 is being worked on by the upstream GCC team. This will be a minor upgrade only, with no real changes to the 6809 code, so whenever it happens, I wouldn't bother if 4.3.3 is working for you. I think 4.3.3 is a very solid release; I have been using it extensively.
GCC 4.4.0 was also recently released upstream. This was a major change to the core GCC. I've been tracking it for many months and the 6809 build seems to work OK. But since I haven't been using it that much, and 4.3.3 works really well, I haven't bothered to do a release of this. The internals of code generation changed so much that I'll have to run benchmarks to see if it's really better or worse. Usually, the .0 version suffers a bit, so I'm going to wait a bit longer.
GCC6809 4.3.3 is now released. As always, see the manual for instructions on how to apply the patch.
GCC 4.3.3 was released by the core GCC developers several weeks ago. I've been merging my codebase with that and should have a GCC6809 4.3.3-1 ready sometime in the next week.
Two user-requested options will be included: -mdret, for specifying that the D register should be used for return values; and -mfar-stack-param, for allowing stack parameters to be passed to far functions.
Do you have a feature request? If so, just let me know. In all likelihood, a GCC 4.3.3-2 release will follow with more additions and bug fixes. GCC 4.4.0 looks to be several months away at the earliest, and the GCC6809 port of that isn't in good shape at the moment, so 4.3.3 will likely have some longevity.
The GCC team is getting ready to release GCC 4.3.3 soon. I wanted you to know that a new release of GCC6809 will be made based on 4.3.3. It is mostly a bug fix release but there are a few performance enhancements as well. More details to be provided once the public release is made.
Uploaded a patch to add 6809 support to newlib 1.15. You can download the newlib sources elsewhere on the web.
Several problems in the distribution of the simulator have been corrected. Apologies to those who had trouble with it! Please try the latest version 0.91 instead. This also has a number of performance enhancements included.
New patch against GCC 4.3.2 available. No major changes to the 6809 support; this just updates the previous patch to build with the recent GCC 4.3.2 release. It does fix one bug relating to the -mabi-version option, which did not work in recent releases.
Uploaded the latest 6809 simulator sources.
New patch against GCC 4.3.1 available. This is mostly a port to the new core GCC, but it also contains a few bug fixes and enhancements.
See the user manual for new information on how to install this properly.
GCC6809 provides a port of the C compiler proper, plus an assembler, linker, and library manager, forming a complete "toolchain". Although the 6809 is not in mainstream use, there are still many designs based on it. Historically, the 6809 was an important processor whose design influenced later processors and which was used in many different applications.
The C compiler is a port of GCC modified to generate 6809 assembly language. GCC is designed to support multiple "backends", and has been ported onto a wide variety of different architectures, such as x86, PowerPC, MIPS, Sparc, etc. The 6809 port is mostly just another backend, although some of the common GCC files have been changed also.
GCC proper only generates assembly language. It relies on separate tools to convert this into a final program. On most GNU systems, this is provided by a set of programs called "binutils". The GNU binutils does not support the 6809, so a third-party package called the ASXXXX Cross Assemblers is being used instead. Some scripts are provided that map between the standard binutils command-line options and the ASXXXX syntax, making it appear as a normal binutils port.
GCC6809 has been tuned and optimized for writing real-world 6809 programs:
GCC6809 has a long history that dates back to the early 1990's. Various people have contributed to the 6809 backend, but it has never been officially accepted into the main GCC distribution.
In 2005, I began creating a free operating system for pinball machines based on the 6809. It was originally developed in assembly language with elaborate macros, but this quickly became unmanageable and I looked for something better. I found all of the various 6809 bits that were floating around the 'net, began updating them to the latest GCC versions, fixing bugs, and improving performance. The result is what you see today.
I've also provided a portable 6809 simulator that can be used to run test programs. It is named 'm6809-run' and is a based on a version originally written by Arto Salmi. It has been enhanced with the following features:
Althought not well tested, there is a port of newlib to the 6809, which provides the standard C library functions. It is based on newlib 1.15.
The I/O routines builtin to the C library target the simulation environment and the CoCo hardware. Support for other hardware may be added in the future.