Using Intel® System Debugger with OpenOCD*

Using Intel® System Debugger with OpenOCD*

 

Pre-requisites

                    The following pin adapter was used to connect the Intel® System Debugger to the Intel® Quark SoC board:

                    https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/

  • Intel® Quark SoC based target platform.
  • Intel® System Studio installation with “Intel® System Debugger “and “OpenOCD” components.

Linux* Setup

By default, non-root users won’t have access to the JTAG pods connected via USB. You must grant write access to the proper /dev/bus/usb entry every time a device is connected to be able to run OpenOCD using a non-root account. The process can be automated by adding an udev rule. Simply create a text file in the rules directory:

  $ sudo vim /etc/udev/rules.d/99-openocd.rules

The IDs depend on the JTAG device. For example, for the Flyswatter2* and the Olimex-ARM-USB-OCD-H, the rules file must have the following content:

SUBSYSTEM=="usb", ATTR{idVendor}=="0403",

ATTR{idProduct}=="6010", MODE="0666"

 

SUBSYSTEM=="usb", ATTR{idVendor}=="15ba",

ATTR{idProduct}=="002b", MODE="0666"

1.2      Windows Setup

Install the USB drivers for your selected probe.

  1. Connect your probe to your host machine.
  2. Download Zadig* from   http://zadig.akeo.ie/.
  3. Select your probe and install the WinUSB driver for both interfaces (Interface 0 and 1).

1.3      Hardware Setup

 

The figure below shows a recommended setup for debugging.

  1. Host System
  2. USB 2.0 male-male A-B cable
  3. JTAG Probe
  4. ARM-JTAG-20-10 Adapter
  5. JTAG Port
  6. Intel® Galileo Board
  7. Serial Cable to view boot process
  8. Power Supply

 

Note: Flyswatter2* and many JTAG adapters support JTAG and Serial concurrently. If you source a serial cable that connects (7) to (3) as shown above, then you will have JTAG and Serial console data arriving at your host system (1) via USB (2). For example, this cable has been used: http://www.sfcable.com/D935-06.html

1.4      Starting a Debug Session

 

1.4.1      Launch OpenOCD*

  • Go to the place where the OpenOCD* component was installed

Default location:

  • Launch OpenOCD*:
    • For the Flyswatter2 Probe:
      <INSTALL_DIR>\debugger\bin\openocd.exe  -f scripts\interface\ftdi\flyswatter2.cfg -f scripts\board\quark_x10xx_board.cfg
    • For the Olimex JTAG Probe:
      <INSTALL_DIR>\debugger\bin\openocd
      .exe  -f scripts\interface\ftdi\olimex-arm-usb-ocd-h.cfg -f scripts\board\quark_x10xx_board.cfg

Note: The default location for <INSTALL_DIR> is  

  • Intel® System Studio 2015: C:\Program Files (x86)\Intel\System Studio 2015.[y].[xxx]\
  • Intel® System Studio 2016: C:\Program Files (x86)\IntelSWTools\system_studio_2016.[y].[xxx]\
    [y].[xxx] must be replaced with the according product version.
  • Intel® System Studio 2017: C:\Program Files (x86)\IntelSWTools\system_studio_for_windows_2017.x.yyy 

1.4.2      Launch the Intel® System Debugger

 

After you power on the target and launch OpenOCD*

  • Start “start_xdb_gdb_remote.bat/.sh” or

select

  • Click on the “connect icon”  at the upper left corner of the Intel® System Debugger graphical user interface,

It will automatically try to connect to the OpenOCD’ s local host default settings (127.0.0.1:3333),

If you would like to specify a different connection setup please, substitute the desired

<IP ADDRESS> in the console, as follow:

xdb_D> connect “<IP ADDRESS>:3333” servertype=openocd

For more complete information about compiler optimizations, see our Optimization Notice.