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. Currently, you can download a stable patch for GCC 4.2.2, or a more recent patch for GCC 4.2.3. In the next several months, GCC 4.3.0 should be released as well. (Older code for the 3.x series can still be downloaded from the SVN archives.

Developers interested in contributing to GCC6809 should contact me and request access to the git source code repository.

News

February 7, 2008

Posted patches for GCC 4.2.2 and GCC 4.2.3.

January 25, 2008

Updated the website for the first time in a long time. Development has been steady in the last 6 months but just not posted as frequently as I would have liked.

There may still be some broken areas on the site; I'm still working on it. Let me know if you find anything wrong.

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

Stable Release
(4.2.2)

Latest Release
(4.2.3)

C Library

Simulator

Related Pages