This post describes the steps needed to make NGX’s 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 use this JTAG with OpenOCD there is scarce resource in the internet.
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.
Steps needed for Windows:
- Plug-In the JTAG to a available USB connector
- Download libusb-win32
- Extract libusb-win32 to a folder and run “inf-wizard.exe”
- Select “USB Serial Converter A” and install driver
- Download and install OpenOCD
- Attach the JTAG probe to your target ARM board and poweron the target board
- Create a openocd configurations file (see at the end)
- Run openocd.exe –f
- Run putty or telnet and connect to port localhost:4444
After this the target board will respond to JTAG commands which can be issued through the telnet session.
For GDB debugging, you need a cross compiled GDB(arm-none-eabi-gdb).
After launching arm-none-eabi-gdb.exe run target remote localhost:3333 to start remote debugging.
You can execute low level JTAG commands from GDB by using monitor command.
Flashing can be done using the following commands:
reset halt sleep 200 wait_halt flash probe 0 flash info 0 flash write_image erase unlock sleep 200 reset run
OpenOCD configuration file:
# openocd configurations telnet_port 4444 # gdb configuration gdb_port 3333 # cpu configuration source [find target/lpc1768.cfg] # interface configuration interface ft2232 ft2232_vid_pid 0x0403 0x6010 ft2232_device_desc "NGX JTAG" ft2232_layout "oocdlink" ft2232_latency 2