# Quick OpenOCD setup and usage notes (for JTAGkey and debug v2) ### SETUP ################################################################### # Build libftdi (don't need to do this if you already have a recent version) cd $OMDIR wget http://www.intra2net.com/de/produkte/opensource/ftdi/TGZ/libftdi-0.9.tar.gz tar xfz libftdi-0.9.tar.gz cd libftdi-0.9 automake autoconf ./configure make # ignore the error when trying to make the documentation make install ldconfig # Build openocd cd $OMDIR svn -r 137 co svn://svn.berlios.de/openocd/trunk openocd cd openocd patch -p1 -s <$OMDIR/openmoko/developers/werner/openocd-multiple-usb-ids.patch ./bootstrap # enable parport_dev and ft2232, so that we stay compatible with the wiggler. # use libftdi since we don't want no binary-only code. ./configure --enable-parport_ppdev --enable-ft2232_libftdi make make install # Convenience script to load u-boot via JTAG, then run it. # Remove the "resume" at the end if you prefer u-boot to be stopped. cat <u-boot.ocd reset halt wait_halt load_binary ../lowlevel_foo.bin 0 bp 0x33f80000 4 hw resume wait_halt load_binary ../u-boot/u-boot.bin 0x33f80000 # takes about one minute resume EOF # Get the config file. (JTAGkey version) wget http://people.openmoko.org/laforge/misc/openocd.cfg wget http://people.openmoko.org/werner/openocd-ft2232.patch patch -p1 -s