Notes for the R1888 build of OpenOCD (this was built on Ubuntu Jaunty) 0) I needed to install some additional packages before I could get things to compile subversion (1.5.4dfsg1-1ubuntu2) libtool (2.2.6a-1ubuntu1) automake1.9 (1.9.6+nogfdl-3ubuntu2) texinfo (4.11.dfsg.1-4) Some of these brought in other packages with them, YMMV depending on whether your system has some or all of these already installed. 1) need either the open source libftdi or the driver supplied by FTDI libftd2xx0.4.16 2) If using the closed source driver you need to put libftd2xx0.4.16.so in /usr/local/lib/ with additional symlinks of /usr/local/lib/libftd2xx.so, /usr/local/lib/libftd2xx.so.0, /usr/lib/libftd2xx.so, and /usr/lib/libftd2xx.so.0 Headers Wintypes.h and ftd2xx.h must go in /usr/local/include 3) The readme.dat file from libftd2xx leaves out the .0 symlinks 4) make sure you have usbfs enabled 5) in general steps 1-8 work ok 6) note that OpenOCD has changed a LOT since R734 and stuff just doesn't work the same anymore. 7) of course none of the readmes's say that you need to patch config.in to remove the check for jtag_minidriver.h, which is allegedly fixed in newer revs. 8) the final binary that the readmes say is in ./src is just a wrapper script and can't be moved. 9) and when you make install it forgets to put symlinks into /usr/lib for libopenocd.so & so.0 10) you do need to "make install" as root openocd, because it puts important documentation and examples where you would never look for them. You also have to build the docs seperately (if you want a pdf, you have to install some oddball pdf maker they don't tell you about till it isn't there.) Once built and installed things still don't quite work. +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Interesting observations about the recent openocd code. There is a lot of documentation, and examples. However, they are somewhat hidden untill you build and install the package, or do some extensive Googling. It also appears that the philosophy has changed markedly from that of the R7xx svn. Brief analogy: Prior to ~R734 openocd was somewhat like a Dremel tool. Easy to use, quick to learn, straight forward. Since then, openocd has evolved into a CNC milling machine. You can do so much more with the new codebase, it's so much more flexible (TCL) and supports many more interfaces (jtag adapters), boards (like the hammer) and targets (like the s3c2410). Back to the machine tool analogy, you can build rocket engines with this thing! But that flexibility has brought along with it complexity and you can't use the simple, easy to use and understand scripts the same way as in the R734 days. You can build rocket engines with this thing!!! BUT I DON'T WANT TO BUILD A ROCKET ENGINE. I just want to dremmel away a little hole in my hammer to peek inside and see what's going on. Given a CNC machine a hacker (who has been effectively using a dremmel for years) would probably kill himself and ruin his workpiece with a CNC mill. Given a dremmel, a CNC machinist would remark "why use this POS, I can make rocket engines with my CNC mill!" 11) Using openocd R1888 12) check out this pdf, it's for the latest rev, but most everything applies: http://openocd.berlios.de/doc/pdf/openocd.pdf 13) You may have to "rmmod fdti_sio" as root since the normal ubuntu driver grabs the hardware on plugin. 14) Some examples of scripts that do useful thing with the hammer. call them as root like this while in the dir containing them: openocd -f flyswatter.cfg -f hammer.cfg -f blinker.ocd Blinks the user led openocd -f flyswatter.cfg -f hammer.cfg -f dump_apex.ocd dumps the bootloader to a file zxcv.bin openocd -f flyswatter.cfg -f hammer.cfg -f erase_check.ocd does an erase check on the flash, this takes a while. openocd -f flyswatter.cfg -f hammer.cfg -f flash_all.ocd erases the whole flash and flashed apex.bin, zImage and rootfs.arm.ext2.gz openocd -f flyswatter.cfg -f hammer.cfg -f flash_apex.ocd erased apex's part of the flash and flashes apex.bin openocd -f flyswatter.cfg -f hammer.cfg -f load_apex.ocd loads apex.bin to address 0x30008000 and verifies it openocd -f flyswatter.cfg -f hammer.cfg -f probe_info.ocd does a flash probe followed by a flash info which prints out the flash state 15) the above method is somewhat different from what the openocd doc's describe, but it is closer to the old R734 way of doing things.