View unanswered posts | View active topics It is currently Thu May 25, 2017 7:15 pm



Reply to topic  [ 2 posts ] 
Compiling 68hc1x Tools the Easy Way 
Author Message
LQFP144 - On Top Of The Game
User avatar

Joined: Mon Feb 11, 2008 10:52 pm
Posts: 549
Location: Arizona
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

_________________
You snooze, you lose!


Mon Feb 25, 2008 6:31 pm
Profile YIM
DIP8 - Involved

Joined: Fri Jun 06, 2008 3:46 pm
Posts: 29
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.


Sat Jun 07, 2008 2:56 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.