{"id":8,"date":"2011-05-22T06:04:00","date_gmt":"2011-05-22T13:04:00","guid":{"rendered":"http:\/\/samueldotj.com\/blog\/?p=8"},"modified":"2013-08-26T10:56:17","modified_gmt":"2013-08-26T17:56:17","slug":"openocd-and-ngx-usb-arm-jtag","status":"publish","type":"post","link":"http:\/\/samueldotj.com\/blog\/openocd-and-ngx-usb-arm-jtag\/","title":{"rendered":"OpenOCD and NGX USB ARM JTAG"},"content":{"rendered":"<div id=\"attachment_75\" style=\"width: 160px\" class=\"wp-caption alignright\"><a href=\"http:\/\/samueldotj.com\/blog\/wp-content\/uploads\/2011\/05\/usb_jtag1.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-75\" src=\"http:\/\/samueldotj.com\/blog\/wp-content\/uploads\/2011\/05\/usb_jtag1-150x150.jpg\" alt=\"NGX\u2019s USB ARM JTAG\" width=\"150\" height=\"150\" class=\"size-thumbnail wp-image-75\" \/><\/a><p id=\"caption-attachment-75\" class=\"wp-caption-text\">NGX\u2019s USB ARM JTAG<\/p><\/div>\n<p>This post describes the steps needed to make <a href=\"http:\/\/shop.ngxtechnologies.com\/product_info.php?cPath=26&#038;products_id=30\">NGX\u2019s USB ARM JTAG<\/a> to work with <a href=\"http:\/\/openocd.berlios.de\/web\/\">OpenOCD <\/a>in windows 7. This <a href=\"http:\/\/en.wikipedia.org\/wiki\/Joint_Test_Action_Group\">JTAG <\/a>is compatible with <a href=\"http:\/\/www.coocox.org\/Colink.htm\">colink <\/a>JTAG and works with<a href=\"http:\/\/www.iar.com\/\"> IAR Workbench<\/a> and <a href=\"http:\/\/www.keil.com\/uvision\/\">Keil uVision<\/a>. To use with these IDEs there is a well defined methods\/plug-ins available in the product page and in internet. However to use this JTAG with OpenOCD there is scarce resource in the internet.<\/p>\n<p>OpenOCD can be used to low level debugging, source level debugging (through GDB) and can be used for flashing. OpenOCD exposes a command line interface which can be accessed through telnet. It also provides remote GDB server which also can be reached through TCP connection.<\/p>\n<p>Steps needed for Windows:<\/p>\n<ol>\n<li>Plug-In the JTAG to a available USB connector<\/li>\n<li>Download <a href=\"http:\/\/sourceforge.net\/projects\/libusb-win32\/files\/\">libusb-win32<\/a><\/li>\n<li>Extract libusb-win32 to a folder and run \u201cinf-wizard.exe\u201d<\/li>\n<li>Select \u201cUSB Serial Converter A\u201d and install driver<\/li>\n<li>Download and install <a href=\"http:\/\/www.freddiechopin.info\/index.php\/en\/download\/category\/4-openocd\">OpenOCD<\/a><\/li>\n<li>Attach the JTAG probe to your target ARM board and poweron the target board<\/li>\n<li>Create a openocd configurations file (see at the end)<\/li>\n<li>Run openocd.exe \u2013f<\/li>\n<li>Run putty or telnet and connect to port localhost:4444<\/li>\n<\/ol>\n<p>After this the target board will respond to JTAG commands which can be issued through the telnet session.<\/p>\n<p>For GDB debugging, you need a cross compiled GDB(<a href=\"http:\/\/www.codesourcery.com\/sgpp\/lite\/arm\/portal\/subscription?@template=lite\">arm-none-eabi-gdb<\/a>).<br \/>\nAfter launching\u00a0arm-none-eabi-gdb.exe run <strong>target remote localhost:3333<\/strong> to start remote debugging.<br \/>\nYou can execute low level JTAG commands from GDB by using <strong>monitor<\/strong> command.<\/p>\n<p>Flashing can be done using the following commands:<br \/>\n[shell]<br \/>\nreset<br \/>\nhalt<br \/>\nsleep 200<br \/>\nwait_halt<br \/>\nflash probe 0<br \/>\nflash info 0<br \/>\nflash write_image erase unlock<br \/>\nsleep 200<br \/>\nreset run<br \/>\n[\/shell]<\/p>\n<p>OpenOCD configuration file:<br \/>\n[shell]<br \/>\n# openocd configurations<br \/>\ntelnet_port 4444<\/p>\n<p># gdb configuration<br \/>\ngdb_port 3333<\/p>\n<p># cpu configuration<br \/>\nsource [find target\/lpc1768.cfg]<\/p>\n<p># interface configuration<br \/>\ninterface ft2232<br \/>\nft2232_vid_pid 0x0403 0x6010<br \/>\nft2232_device_desc &#8220;NGX JTAG&#8221;<br \/>\nft2232_layout &#8220;oocdlink&#8221;<br \/>\nft2232_latency 2<br \/>\n[\/shell]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post describes the steps needed to make NGX\u2019s USB ARM JTAG to work with OpenOCD in windows 7. This JTAG is compatible with colink JTAG and works with IAR Workbench and Keil uVision. To use with these IDEs there is a well defined methods\/plug-ins available in the product page and in internet. However to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,10,18],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-c","category-compiler","category-debugger"],"_links":{"self":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":2,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":76,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions\/76"}],"wp:attachment":[{"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/samueldotj.com\/blog\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}