- Download files:
from http://www.erwinrol.com/index.php?opensource/bdm.php
mpc8xx-0.0.3.tar.gz
mpc8xx-0.0.3-gdb-6.1.1-p0.patch.gz
from http://ftp.gnu.org/gnu/gdb/
gdb-6.1.1.tar.gz
- Create build directory:
# cd ....
# mkdir gdb_mpc8xx
# cd gdb_mpc8xx
- Build libmpc8xx:
# tar xvzf ..../mpc8xx-0.0.3.tar.gz
# cd libmpc8xx
** replace malloc.h by stdlib.h in libmpc8xx/mpc8xxflash.c
** remove sys/io.h from libmpc8xx/lptbdm.c
** replace ioperm by i386_set_ioperm in libmpc8xx/lptbdm.c
** double line 480 (pvr = mpc8xx_get_spr( .. ) in libmpc8xx/mpc8xxspr.c
# ./configure
# gmake
- Test libmpc8xx:
** connect BDM interface to LPT0
# example/mpc8xx 0 2 0
The output of mpx8xx should contain:
Target cpu PVR=0x00500000 PARTNUM=0x21 MASKNUM=0x01 REV_NUM=0x0001
- Install libmpc8xx:
# gmake install
- Build GDB for MPC8XX:
# cd ..../gdb_mpc8xx
# tar xvzf ..../gdb-6.1.1.tar.bz2
# patch < ..../mpc8xx-0.0.3-gdb-6.1.1-p0.patch
# mv mpcbdm.h mpcbdm.c gdb-6.1.1/gdb
# rm mpcbdm.?.orig
# cd gdb-6.1.1
# ./configure --target=powerpc-linux --enable-mpc8xx \
--with-mpc8xx-lib-dir=/usr/local/lib \
--with-mpc8xx-include-dir=/usr/local/include
** remove "wait.h" and "sys/io.h" includes from gdb/mpcbdm.c
# gmake (ignore warnings)
- Test GDB:
# gdb/gdb -x ..../cc1000.gdb_init
gdb> x/16i 0xfff00100
gdb> quit
cc1000.gdb_init contains the adapter and memory initialization for the CC1000.
- Install GDB:
# gmake install
gdb gets renamed to 'powerpc-linux-gdb' during install