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.2. 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.

News

January 27, 2009

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.

November 25, 2008

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.

October 19, 2008

Uploaded a patch to add 6809 support to newlib 1.15. You can download the newlib sources elsewhere on the web.

September 7, 2008

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.

August 29, 2008

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.

August 25, 2008

Uploaded the latest 6809 simulator sources.

June 15, 2008

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.

About

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.

Features

GCC6809 has been tuned and optimized for writing real-world 6809 programs:

History

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.

Simulation

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:

C Library

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.

License

All of the major components within GCC6809 (GCC, newlib, and the simulator) are released under the GNU General Public License.

Links

GCC 6809

Latest Release
(4.3.2)

C Library

Simulator

Related Pages