r1062 - in developers/werner: . notes

werner at sita.openmoko.org werner at sita.openmoko.org
Wed Feb 21 00:19:05 CET 2007


Author: werner
Date: 2007-02-21 00:19:02 +0100 (Wed, 21 Feb 2007)
New Revision: 1062

Added:
   developers/werner/notes/
   developers/werner/notes/openocd
Log:
My OpenOCD setup and usage notes.



Added: developers/werner/notes/openocd
===================================================================
--- developers/werner/notes/openocd	2007-02-20 20:38:52 UTC (rev 1061)
+++ developers/werner/notes/openocd	2007-02-20 23:19:02 UTC (rev 1062)
@@ -0,0 +1,75 @@
+# Quick OpenOCD setup and usage notes (for JTAGkey - will need updating for
+# 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.8.tar.gz
+tar xfz libftdi-0.8.tar.gz
+cd libftdi-0.8
+automake
+autoconf
+./configure
+make
+# ignore the error when trying to make the documentation
+make install
+ldconfig
+
+# Build openocd (don't need to do this if you already have it)
+
+cd $OMDIR
+svn -r 130 co svn://svn.berlios.de/openocd/trunk openocd
+cd openocd
+./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 <<EOF >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-jtagkey.patch
+patch -p1 -s <openocd-jtagkey.patch
+
+# Run openocd
+
+openocd &
+
+# If it doesn't come up, check
+# http://wiki.openmoko.org/wiki/OpenOCD#Known_Bugs_and_Troubleshooting
+
+# Get the low-level initializer
+
+cd $OMDIR
+wget http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.bin
+
+# Build a version of u-boot that can boot from JTAG
+# WARNING: you need to undo this if you want to build one that boots from NAND !
+
+echo 'PLATFORM_RELFLAGS += -DBUILD_FOR_RAM' >> u-boot/board/neo1973/config.tmp
+make -C u-boot ARCH=arm
+
+
+###  USAGE  ###################################################################
+
+telnet localhost 4444
+script u-boot.ocd





More information about the commitlog mailing list