Intel is actively contibuting code base to support opensource system software debug of Intel® Quark SoC and contributing to the Open On-Chip Debugger project (Open On-Chip Debugger).


With OpenOCD* 0.8.0 (OpenOCD - Open On-Chip Debugger - Browse /openocd/0.8.0 at the Intel® Quark SoC X1000 is officially supported.


Required software:


• Linux* host system

• Quark-patched OpenOCD


• Eclipse (Indigo tested) with CDT Plugin Installed (Main + Optional Features)

• Quark Kernel compiled with debug symbols

• Git

Required hardware:


• OpenOCD supported JTAG debugger.


For example:


For a complete set of supporting documentation, please visit the website for your specific JTAG hardware. The board has been tested with the following JTAG debuggers:


• TinCanTools* FLYSWATTER2


• Olimex* ARM-USB-OCD-H


The following pin adapter was used to connect the JTAG debugger to the Quark board:


Patching and building OpenOCD*


To enable Quark support, you must apply a patch to the OpenOCD source code and then build it.



• git

• libtool

• automake


In addition, to use a JTAG pod with an FTDI/FT2232 chip (like the Flyswatter2) you must install the related development library, using a command like:

$ sudo apt-get install libftdi-dev

Check out the OpenOCD source code, create a branch, and apply the Quark patch using the following commands:


$ git clone git:// openocd-code

$ cd openocd-code

Configure and build OpenOCD:


$ ./bootstrap

$ ./configure --enable-ft2232-libftdi --enable-maintainer-mode

$ make

It is not strictly necessary to install OpenOCD. The binary and configuration files can be used from the build/source tree directly if desired. However, it is recommended to perform this additional step:

$ sudo make install

JTAG USB device access


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 a udev rule. Simply create a text file in the rules directory:

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


Example only - The IDs depend on the JTAG device"

SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010",MODE="0666"

SUBSYSTEM=="usb", ATTR{idVendor}=="15ba", ATTR{idProduct}=="002b",MODE="0666"


Launching OpenOCD*

The first step to enable source level debug is to connect your JTAG pod to the board and run OpenOCD selecting the correct interface and board configuration files. The example below uses a Flyswatter2 JTAG debugger.

$ openocd -f interface/flyswatter2.cfg -f board/quark_x10xx_board.cfg


Launching GDB*


GDB documentation is available here:

It is possible to perform source level debug using GDB by connecting to the OpenOCD internal GDB server, which answers on port 3333 by default. OpenOCD must be running as shown in the previous section.

Run GDB and connect to the OpenOCD internal GDB server. Load the debug info of a debug compiled Quark Kernel vmlinux file.


For the kernel built, the commands are:


$ gdb


(gdb) target remote localhost:3333

(gdb) monitor halt

(gdb) symbol-file /PATH/TO/MY_KERNEL_BUILD_DIR/clanton_linux_<version>/work /vmlinux


A detailed whitepaper on how to use GDB* with OpenOCD* targeting debug on Intel® Quark SoC X1000 can be found at