Compiling 68hc1x Tools the Easy Way
Page 1 of 1

Author:  SleepyKeys [ Mon Feb 25, 2008 6:31 pm ]
Post subject:  Compiling 68hc1x Tools the Easy Way

Getting the 68hc1x compile/debug tools on some OS distributions can be a bit of work. After getting every thing sorted out I built a down-loadable package along with a bash quick-install script. The script will build and install

* GNU Binutils 2.15
* GCC 3.3.6
* GDB 6.4
* Newlib 1.12.0

1.Download and extract the sources
2.From the command prompt run the quick-install script (sh quick-install).

Please note the the 68hc1x tools are configured for the MC9S12 processor family. If you need 68hc11 support you must modify the quick-install script.


Author:  austinbob [ Sat Jun 07, 2008 2:56 pm ]
Post subject:  Re: Compiling 68hc1x Tools the Easy Way

Thank you for the download you provided. I was finally able to get the tool chain to compile successfully on my redhat 9 linux.

However I had to make one change to your quick-install script before I could get it to work...

After the make install for binutils I had to add the following line to your quick-install script


The above line is required so that the new binutils can be used for the rest of the builds.

Here is your modified script that worked for me...

#! /bin/bash

echo "This script was created to help you build the m68hc11/12 tools needed to compile FreeEMS code."
echo "Questions/Comments Please email"
echo "Press enter to continue"

# Some nice defines
export ROOTDIR=`pwd`
export BINUTILS=binutils-2.15
export GCC=gcc-3.3.6
export GDB=gdb-6.4
export NEWLIB=newlib-1.12.0
export TARGET=m6812-elf
export PROGRAM_PREFIX=m6812-elf-

mv binutils-2.15 binutils-2.15-m68hc1x
cd binutils-2.15-m68hc1x
patch -p1 < ../binutils-2.15-m68hc1x-20040801.diffs

cd binutils-2.15-m68hc1x
sh ./configure --target=m6812-elf \
--prefix=$INSTALLDIR \


make install

# Further steps require the binutils we just built

cd ..
mv gcc-3.3.6 gcc-3.3.6-m68hc1x
cd gcc-3.3.6-m68hc1x
patch -p1 < ../gcc-3.3.6-m68hc1x-20060122.diffs

sh ./configure --target=m6812-elf \
--program-prefix=m6812-elf- \
--prefix=$INSTALLDIR \
make install

cd ..
mv gdb-6.4 gdb-6.4-m68hc1x
cd gdb-6.4-m68hc1x
patch -p1 < ../gdb-6.4-m68hc1x-20060122.diffs

sh ./configure --target=m6811-elf \
--prefix=$INSTALLDIR \
make install

cd ..

mv newlib-1.12.0 newlib-1.12.0-m68hc1x
cd newlib-1.12.0-m68hc1x
patch -p1 < ../newlib-1.12.0-m68hc1x-20040801.diffs

cd ..
mkdir build-newlib
cd build-newlib
sh ../newlib-1.12.0-m68hc1x/configure \
--disable-newlib-io-float --disable-newlib-multithread \
--target=m6812-elf \
--prefix=$INSTALLDIR \
make install

echo "Remember to set
BIN = /tools/bin
PREFIX = m6812-elf-
in Makefile"

Thanks again. I could not get it to work using the GNU 68hc11/12 downloads. But your download worked for me with the above small addition.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB® Forum Software © phpBB Group