DIYEFI.org Forum
http://forum.diyefi.org/

Compiling 68hc1x Tools the Easy Way
http://forum.diyefi.org/viewtopic.php?f=24&t=70
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 http://computer-ss.com/downloads.php?cat_id=1&download_id=1.
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.

-Sean

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

export PATH=$INSTALLDIR/bin:$PATH

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 info@powerEFI.com"
echo "Press enter to continue"
read

# 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-
export INSTALLDIR=$ROOTDIR/tools

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 \
--program-prefix=m6812-elf-

make

make install

# Further steps require the binutils we just built
export PATH=$INSTALLDIR/bin:$PATH

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 \
--enable-languages=c,c++
make
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 \
--program-prefix=m6811-elf-
make
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 \
--program-prefix=m6812-elf-
make
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
http://www.phpbb.com/