Difference between revisions of "Hammer How to use Jtag"

From eLinux.org
Jump to: navigation, search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Place holder
+
files needed:
 +
*[[Media:openocd.tar.gz]]
 +
*[[Media:libftd2xx0.4.13.tar.gz]]
  
 +
1) rmmod fdti_sio since the normal ubuntu driver grabs the hardware on plugin
  
7) the path to a successful apex reflash was a long and hard one.
+
2) ubuntu also needs usbfs turned on: mount -t usbfs usbfs /proc/bus/usb (as root)
  
8) started by needing to compile openocd from source.
+
3) extract the libftd2xx files using the following command: tar zxvf libftd2xx0.4.13.tar.gz
  
9) also needed to rmmod fdti_sio since the normal ubuntu driver grabs the hardware on plugin.
+
4) extract the openocd tarball using the command: tar zxvf openocd.tar.gz
  
9a) ubuntu also needs usbfs turned on: mount -t usbfs usbfs /proc/bus/usb (as root)
+
5) copy the fd2xx.h and WinTypes.h files from libftd2xx directory to the openocd/src/jtag/ directory
  
10) to recompile openocd, one must first run ./bootstrap
+
6) copy the libftd2xx.so.0.4.13 file from the libftd2xx directory to /usr/lib directory
  
10a) then ./configure  --enable-ft2232-ftd2xx
+
7) create symlinks for the libftd2xx by using the following commands:
  
10b) then make
+
  cd /usr/lib
 +
  ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4
 +
  ln -s libftd2xx.so.0.4.13 libftd2xx.so.0
 +
  ln -s libftd2xx.so.0.4.13 libftd2xx.so
  
11) but before that you must extract fd2xx.h and WinTypes.h (from libftd2xx0.4.10.tar.gz) to the /openocd/src/jtag/ directory..
+
8) change directory to the openocd source directory
 +
 
 +
9) to recompile openocd, one must first run the command: ./bootstrap
 +
 
 +
10) then configure the build using the command: ./configure  --enable-ft2232_ftd2xx
 +
    NOTE: if you receive an error "configure: exit 77" during the configure process
 +
          please use app-get to install the build-essentials package with the
 +
          following command: apt-get install build-essential
 +
 
 +
I searched and found the following fix: * apt-get install build-essential
 +
 
 +
11) start the build using the command: make
  
 
12) put the resulting openocd executable in a dir with hammer.cfg, hammer.ocd, apex.bin (the orig from the cd)
 
12) put the resulting openocd executable in a dir with hammer.cfg, hammer.ocd, apex.bin (the orig from the cd)
Line 24: Line 41:
 
14) This will load apex into ram & run it. then you can flash the original apex.bin back.
 
14) This will load apex into ram & run it. then you can flash the original apex.bin back.
  
15) it seems that openocd likes to be run as root. This may be ubuntu specific, or I may not know my a$$ from a hole in the ground.
 
 
16) rebuilding apex from source you need to make menuconfig (generates lots of wierd errors if there is no .config)
 
 
17) then select the Samsung S3C2410 platform
 
  
18) then the Tin Can Tools Hammer implementation
+
note: it seems that openocd likes to be run as root.
  
19) Change other stuff as req'd (ie Environment > Regions > 256k+1024k ==> kernel source 1280k+1024k ==> ramdisk image
 
  
20) save changes & make
+
[[Category:TCT-Hammer]]
 +
[[Category:TinCanTools]]

Latest revision as of 14:56, 14 November 2007

files needed:

1) rmmod fdti_sio since the normal ubuntu driver grabs the hardware on plugin

2) ubuntu also needs usbfs turned on: mount -t usbfs usbfs /proc/bus/usb (as root)

3) extract the libftd2xx files using the following command: tar zxvf libftd2xx0.4.13.tar.gz

4) extract the openocd tarball using the command: tar zxvf openocd.tar.gz

5) copy the fd2xx.h and WinTypes.h files from libftd2xx directory to the openocd/src/jtag/ directory

6) copy the libftd2xx.so.0.4.13 file from the libftd2xx directory to /usr/lib directory

7) create symlinks for the libftd2xx by using the following commands:

  cd /usr/lib
  ln -s libftd2xx.so.0.4.13 libftd2xx.so.0.4
  ln -s libftd2xx.so.0.4.13 libftd2xx.so.0
  ln -s libftd2xx.so.0.4.13 libftd2xx.so

8) change directory to the openocd source directory

9) to recompile openocd, one must first run the command: ./bootstrap

10) then configure the build using the command: ./configure --enable-ft2232_ftd2xx

   NOTE: if you receive an error "configure: exit 77" during the configure process
         please use app-get to install the build-essentials package with the 
         following command: apt-get install build-essential

I searched and found the following fix: * apt-get install build-essential

11) start the build using the command: make

12) put the resulting openocd executable in a dir with hammer.cfg, hammer.ocd, apex.bin (the orig from the cd)

13) ./openocd -f hammer.cfg (as root if you are on ubuntu 6.06 LTS)

14) This will load apex into ram & run it. then you can flash the original apex.bin back.


note: it seems that openocd likes to be run as root.