Tuesday, May 31, 2011

Useful Links for working with OpenOCD

OpenOCD(On-chip Debugger)
1. On-Chip Debugger for windows
version 0.4.0
[http://www.freddiechopin.info/index.php/en/download/category/4-openocd]


2. Nice file to understand the arm compile and flashing process using jtag andopenocd
[http://csd.xen.ssvl.kth.se/csdlive/sites/default/files/projects/ARM%20-%20compile%20and%20flash%20program.pdf]


3. Another useful link for openocd config..
[http://gandalf.arubi.uni-kl.de/avr_projects/arm_projects/openocd_intro/index.html]

Design own jtag interface for Arm controller

step1: Download latest openocd from web [ i used latest 0.4.0]

On-Chip Debugger for windows
version 0.4.0
[http://www.freddiechopin.info/index.php/en/download/category/4-openocd]

step2: Before installing the software remove older versions.
step3: Install the Openocd
step4: Read the user manual carefully and understand about openocd

Ready!!!! now follow the remaining steps

step5: Now run the configuration files which are downloaded along with openocd.
step6: openocd -> interface -> select the .cfg file of your jtag [ i used amonteckey ][amonteckey.cfg]

step7: If you need to configure the above file all you have to do is give the following command
c:\> openocd -f interface/amonteckey.cfg
you should see the messages which states that it detected your jtag and speed etc..
done.

step8: Now run the target configuration!!!
same process like above...
Openocd -> target -> select your target processor [ i used lpcxpresso lpc 1769 cortex m3]

step9: Now run the configuration file, for this you have to use the following command
c:\> openocd -f target/lpc 1769.cfg
oops!!you will get error.........................!!!!!!!!!!!!!!!!!!!!
because you have to run along with above interface command
c:\> openocd -f interface/amonteckey.cfg -f lpc 1769.cfg
this time you will see messages which stating target detected and break points and watch points

step10: Now if you want to flash any file you can still use openocd commands for flashing.......