[EMAIL PROTECTED] (Andrew Greenberg) writes:
> ... and so you could be the first! :) Please do let us know.
Ok, here's what I have now, won't wait until I have the FreeRTOS stuff done.
Below are my notes on what it takes to get to the point of having gdb talking
to an LPC2148 target through an Olimex USB JTAG interface.
Note that I'm running Debian 'unstable', and I have a fairly rich build
environment installed. You may need to iterate some installing more packages
to flesh out the build dependencies.. take notes about what you have to add,
and I'll be happy to incorporate them when I get around to stuffing this on
my wiki. Should be fairly easy, since my "notes" are loaded with the actual
commands I issued in cut'n'paste form. I've already used these to get the
toolchain up on a second machine here (one each i386 and amd64), so I'm pretty
sure they'll work if you have the right build deps installed.
Enjoy!
Bdale
2007.07.24
- try it "my way", with some hints from the notes at http://www.gnuarm.org/
Make sure /opt can grow by 700meg+, plus need ~2G for sources and build tree!
Fetch upstream bits, and populate a Dist/ directory
export MYSRCPATH=/home/bdale/src/cross-tools
export MYPREFIX=/opt/cross
mkdir -p $MYSRCPATH/Dist
cd $MYSRCPATH/Dist
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-4.2.1.tar.bz2
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.2.1/gcc-4.2.1.tar.bz2.sig
gpg --verify gcc-4.2.1.tar.bz2.sig
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2
wget ftp://ftp.gnu.org/gnu/binutils/binutils-2.17.tar.bz2.sig
gpg --verify binutils-2.17.tar.bz2.sig
wget ftp://ftp.gnu.org/gnu/gdb/gdb-6.6.tar.bz2
wget ftp://ftp.gnu.org/gnu/gdb/gdb-6.6.tar.bz2.sig
gpg --verify gdb-6.6.tar.bz2.sig
wget ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz
wget http://www.gnuarm.com/t-arm-elf
Unpack upstream bits, and prepare build environment. Resurrecting the
"one-tree" script would make this more efficient, but compile cycles are
cheap enough that it's probably not worth worrying about...
cd $MYSRCPATH
tar xvjf Dist/binutils-2.17.tar.bz2
tar xvjf Dist/gcc-4.2.1.tar.bz2
tar xvjf Dist/gdb-6.6.tar.bz2
tar xvzf Dist/newlib-1.15.0.tar.gz
cp Dist/t-arm-elf gcc-4.2.1/gcc/config/arm/t-arm-elf
Resolve build dependencies (incomplete)
sudo apt-get install texinfo
Build it all...
mkdir -p $MYSRCPATH/target/arm-elf/binutils
cd $MYSRCPATH/target/arm-elf/binutils
../../../binutils-2.17/configure \
--target=arm-elf --prefix=$MYPREFIX \
--enable-interwork --enable-multilib --with-float=soft
make all
sudo make install
export PATH=$PATH:$MYPREFIX/bin
mkdir -p $MYSRCPATH/target/arm-elf/gcc
cd $MYSRCPATH/target/arm-elf/gcc
# following must be run as root to allow dir creation in /opt/cross!
sudo ../../../gcc-4.2.1/configure \
--target=arm-elf --prefix=$MYPREFIX --enable-interwork \
--enable-multilib --with-float=soft \
--enable-languages="c,c++" --with-newlib \
--with-headers=../../../newlib-1.15.0/newlib/libc/include
make all-gcc
sudo make install-gcc
mkdir -p $MYSRCPATH/target/arm-elf/newlib
cd $MYSRCPATH/target/arm-elf/newlib
../../../newlib-1.15.0/configure --target=arm-elf --prefix=$MYPREFIX \
--enable-interwork --enable-multilib --with-float=soft
make all
# pass PATH into sudo environment so /opt/cross/bin is included
sudo env PATH=$PATH make install
cd $MYSRCPATH/target/arm-elf/gcc
make all
sudo make install
mkdir -p $MYSRCPATH/target/arm-elf/gdb
cd $MYSRCPATH/target/arm-elf/gdb
../../../gdb-6.6/configure --target=arm-elf --prefix=$MYPREFIX \
--enable-interwork --enable-multilib --with-float=soft
make all
sudo make install
- get the Olimex USB jtag dongle working with the Debian openocd package
mkdir -p $MYSRCPATH/jtag
cd $MYSRCPATH/jtag
sudo apt-get install openocd
# create lpc2xxx_armusbocd.cfg containing content found below, which
# was copied from somewhere I neglected to make note of, and may not
# be *entirely* correct for this target yet!
# power up target board, *then* the Olimex USB jtag widget, then run:
sudo openocd -f ./lpc2xxx_armusbocd.cfg
telnet localhost
poll
halt
poll
- take gdb for a quick test drive
cd $MYSRCPATH/jtag
# create init.gdb file containing
target remote localhost:
# monitor arm7_9 sw_bkpts enable
monitor poll
a