Compiler build tools for Freescale 68hc11, 68hc12, S12, S12X, XGATE

binutils, gcc, newlib


Here you will find source patches and binaries for the build tools binutils, gcc and newlib to build code for various Freescale 68hc11/12/s12x. Stephane Carrez added the support for the 68hc11/12 to gcc and binutils. The tools here are built upon his work but with a faster 32 bit divide and the ability to assemble and link code for the XGATE co-processor.

These tools are actively used to compile code for the Megasquirt ECU on MC9S12C64 and MC9S12XEP100.
We build under Linux or Cygwin.


Compiler users: Pick your operating system and download the precompiled tools.
These zips enable you to compile code for 68hc11/12/9s12x.

2012 versions
Windows zip :
Linux tar.gz : s12buildtools-linux32bit-2012-10-24.tar.gz
OSX tar.gz : s12buildtools-osx-2012-10-24.tar.gz (Be sure to see the README.)

2010 versions
Windows zip :
Linux tar.gz : s12buildtools-linux32bit.tar.gz

Compiler developers: If you need to build the tools for a different platform or wish to develop the tools themselves, download the source zip.
These zips are NOT needed if you just want to compile embedded code.

binutils-2.23 on
gcc-3.3.6 (s12x mod) gcc-3.3.6-s12x-20121024.tar.gz
newlib-1.16.0 (base)
Source building and patch for newlib (2012):

Source patches (2010) :

Known issues
16bit indexed moves with symbols that resolve at link time do not link correctly due to a newly found (Nov 2012) bug in the assembler.
e.g. movw symbol1,x, symbol2,x
gcc doesn't know how to generate this code, so only hand written assembler will be impacted.