Hi Jonathan,
Quick solution:
Dwnload my pre-compiled version and unzip:
http://gcc-hcs12.com/downloads/GNU%20Development%20Tool%20Chain/LINUX/DEB/GNU%20Development%20Tool%20Chain%20-%20Extracted%20DEB.zip
Open a shell run bash and run: export PATH="$HOME/Desktop/GNU
Development Tool Chain - Extracted DEB/usr/bin:$PATH"
and while remaining in the same bash shell go to
HCS12_16_FLASH_BANCKED and run "make clean; make"
====================
Details:
I've downloaded Ubuntu 8.10 CD Live and used 'sudo apt-get install
binutils-m68hc1x gcc-m68hc1x gdb-m68hc1x newlib-m68hc1x' ...
I have got the same warnings:
HCS12_16_FLASH_BANCKED:
make
m68hc11-gcc -m68hc12 -mshort -mlong-calls -g -Os -Wall -Wmissing-
prototypes -Wno-char-subscripts -fomit-frame-pointer -msoft-reg-
count=0 -mauto-incdec -I. -I./includes -c -o main.o main.c
m68hc11-gcc -m68hc12 -mshort -mlong-calls -g -Os -Wall -Wmissing-
prototypes -Wno-char-subscripts -fomit-frame-pointer -msoft-reg-
count=0 -mauto-incdec -I. -I./includes -c -o startup.o startup.c
m68hc11-gcc -m68hc12 -mshort -mlong-calls -g -Os -Wall -Wmissing-
prototypes -Wno-char-subscripts -fomit-frame-pointer -msoft-reg-
count=0 -mauto-incdec -I. -I./includes -c -o interrupts.o
interrupts.c
m68hc11-gcc -m68hc12 -mshort -mlong-calls -Wl,-T,ld.x -o main.elf
main.o startup.o interrupts.o -lc -lbcc -lc
main.o: In function `.Letext0':
*main.c:(.text+0x4096): warning: reference to a banked address
[39:8000] in the normal address space at 4096
main.c:(.text+0x40b0): warning: reference to a banked address
[39:8001] in the normal address space at 40b0
main.c:(.text+0x40ca): warning: reference to a banked address
[39:8002] in the normal address space at 40ca
main.c:(.text+0x40e4): warning: reference to a banked address
[39:8012] in the normal address space at 40e4
main.c:(.text+0x4101): warning: reference to a banked address
[39:8013] in the normal address space at 4101
main.c:(.text+0x411b): warning: reference to a banked address
[39:8014] in the normal address space at 411b
*m68hc12-objdump -htS main.elf >main.lst
m68hc12-objcopy --output-target=srec --srec-len=0x20 --change-
addresses 0xffff0000 main.elf main.s19 ; cp main.s19 000.s19 ; cp
main.s19 .000.s19 ;
There should be something wrong with the linker ...
When I use Ubuntu 7.04 or our CENTOS and patch the gcc and compile
from scratch using x86-GCC 3.4.6 everything is fine (below), but as
soon as I come to Ubuntu 8.04 and its x86-GCC 4.2.4 I get the above
problems ...
sudo apt-get install build-essential
sudo apt-get purge binutils-m68hc1x gcc-m68hc1x gdb-m68hc1x newlib-
m68hc1x
# now run the attached commands (use bash)
export GCC_HCS12_TEMP_PATH='/tmp/navid'
export GCC_HCS12_DOWNLAOD_URL='
http://gcc-hcs12.com/downloads/GNU
%20Development%20Tool%20Chain/LINUX/SOURCE%20CODES.zip'
mkdir "$GCC_HCS12_TEMP_PATH"
cd "$GCC_HCS12_TEMP_PATH"
export GCC_HCS12_INSTALLATION_PATH="$GCC_HCS12_TEMP_PATH/gnu-hcs12/
usr"
export GCC_HC123_PROGRAM_PREFIX='m6812-elf-'
export PATH="$GCC_HCS12_INSTALLATION_PATH/bin:$PATH"
wget "$GCC_HCS12_DOWNLAOD_URL"
unzip SOURCE\ CODES.zip
rm -f SOURCE\ CODES.zip
mv SOURCE\ CODES GNU-HCS12-SRC
cd GNU-HCS12-SRC
gzip -d binutils-2.15-m68hc1x-20040801.diffs.gz
tar xvzf binutils-2.15.tar.gz
mv binutils-2.15 binutils-2.15-m68hc1x
cd binutils-2.15-m68hc1x
patch -p1 < ../binutils-2.15-m68hc1x-20040801.diffs
sh ./configure --target=m6812-elf --program-
prefix="$GCC_HC123_PROGRAM_PREFIX" --
prefix="$GCC_HCS12_INSTALLATION_PATH"
make
make install
export PATH=$GCC_HCS12_INSTALLATION_PATH/bin:$PATH
cd ..
gzip -d gcc-3.3.5-m68hc1x-20050515.diffs.gz
tar xvzf gcc-3.3.5.tar.gz
mv gcc-3.3.5 gcc-3.3.5-m68hc1x
cd gcc-3.3.5-m68hc1x
patch -p1 < ../gcc-3.3.5-m68hc1x-20050515.diffs
sh ./configure --target=m6812-elf --program-
prefix="$GCC_HC123_PROGRAM_PREFIX" --
prefix="$GCC_HCS12_INSTALLATION_PATH" --enable-languages=c,c++
make
make install
export PATH=$GCC_HCS12_INSTALLATION_PATH/bin:$PATH
cd gcc
make
make install
export PATH=$GCC_HCS12_INSTALLATION_PATH/bin:$PATH
cd ./../../
gzip -d gdb-6.2-m68hc1x-20040829.diffs.gz
tar xvzf gdb-6.2.tar.gz
mv gdb-6.2 gdb-6.2-m68hc1x
cd gdb-6.2-m68hc1x
patch -p1 < ../gdb-6.2-m68hc1x-20040829.diffs
sh ./configure --target=m6811-elf --program-
prefix="$GCC_HC123_PROGRAM_PREFIX" --
prefix="$GCC_HCS12_INSTALLATION_PATH"
make
make install
export PATH=$GCC_HCS12_INSTALLATION_PATH/bin:$PATH
cd ..
gzip -d newlib-1.12.0-m68hc1x-20040801.diffs.gz
tar xvzf newlib-1.12.0.tar.gz
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 --program-
prefix="$GCC_HC123_PROGRAM_PREFIX" --
prefix="$GCC_HCS12_INSTALLATION_PATH"
make CFLAGS="-g -Os -Wall"
make install
export PATH=$GCC_HCS12_INSTALLATION_PATH/bin:$PATH
cd ./../../
# after everything is done, download
http://gcc-hcs12.com/downloads/HCS12_16_FLASH_BANCKED.zip
and make sure to change the followings in the MAKEFILE
CC=/tmp/navid/gnu-hcs12/usr/bin/m6812-elf-gcc
AS=/tmp/navid/gnu-hcs12/usr/bin/m6812-elf-as
AR=/tmp/navid/gnu-hcs12/usr/bin/m6812-elf-ar
OC=/tmp/navid/gnu-hcs12/usr/bin/m6812-elf-objcopy
OD=/tmp/navid/gnu-hcs12/usr/bin/m6812-elf-objdump
then try "make clean; make" everything should work fine ...
Navid