OLIMEX ARM-USB-OCD-H User manual

ARM-USB-OCD-H, ARM-USB-OCD
OLIMEX OPENOCD ARM JTAG DEBUGGERS
USER’S MANUAL
Document revision D, Ju y 2015
A boards produced by O imex LTD are ROHS comp iant

OLIMEX© 2015 ARM-USB-OCD user's manua
DISCLAIMER
© 2015 O imex Ltd. O imex®, ogo and combinations thereof, are registered trademarks of O imex Ltd.
Other product names may be trademarks of others and the rights be ong to their respective owners.
The information in this doc ment is provided in connection with Olimex prod cts. No license, express
or implied or otherwise, to any intellect al property right is granted by this doc ment or in connection
with the sale of Olimex prod cts.
The hardware designs of the devices, subjects of this manua , are proprietary. The design fi es wou d not be
distributed nor shared with the end customer.
The products described in this manua are intended to work with open source software.
It is possib e that the pictures in this manua differ from the atest revision of the board.
The product described in this document is subject to continuous deve opment and improvements. A
particu ars of the product and its use contained in this document are given by OLIMEX in good faith.
However a warranties imp ied or expressed inc uding but not imited to imp ied warranties of
merchantabi ity or fitness for purpose are exc uded. This document is intended on y to assist the reader in the
use of the product. OLIMEX Ltd. sha not be iab e for any oss or damage arising from the use of any
information in this document or any error or omission in such information or any incorrect use of the
product.
This product is intended for use for engineering deve opment, demonstration, or eva uation purposes on y
and is not considered by OLIMEX to be a finished end-product fit for genera consumer use. Persons
hand ing the product must have e ectronics training and observe good engineering practice standards. As
such, the goods being provided are not intended to be comp ete in terms of required design-, marketing-,
and/or manufacturing-re ated protective considerations, inc uding product safety and environmenta
measures typica y found in end products that incorporate such semiconductor components or circuit boards.
O imex current y dea s with a variety of customers for products, and therefore our arrangement with the user
is not exc usive. O imex assumes no iabi ity for app ications assistance, customer product design, software
performance, or infringement of patents or services described herein.
THERE IS NO WARRANTY FOR THE DESIGN MATERIALS AND THE
COMPONENTS USED TO CREATE ARM-USB-OCD-H OR ARM-USB-OCD. THEY
ARE CONSIDERED SUITABLE ONLY FOR THE RESPECTIVE PRODUCTS.
Page 2 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
Table of Contents
DISCLAIMER ............................................................................................................. 2
CHAPTER 1: OVERVIEW ........................................................................................ 5
1. Introd ction to the chapter ................................................................................. 5
1.1 Feat res .............................................................................................................. 5
1.2 F nctional description and p rpose of the board .......................................... 6
1.3 What is OpenOCD? ........................................................................................... 6
1.4 Comparison of Olimex OpenOCD deb ggers ................................................ 7
CHAPTER 2: DEVICE DESCRIPTION .................................................................. 9
2. Introd ction to the chapter ................................................................................. 9
2.1 Stat s LED ......................................................................................................... 9
2.2 Ports and connectors ......................................................................................... 9
2.2.1 USB type B co ector .................................................................................................................................... 9
2.2.2 JTAG co ector ............................................................................................................................................ 10
2.2.3 RS232 co ector ........................................................................................................................................... 11
2.2.4 Power out barrel jack ................................................................................................................................... 11
CHAPTER 3: SETTING UP ARM-USB-OCD ....................................................... 13
3. Introd ction to the chapter ............................................................................... 13
3.1 Basic system set p ........................................................................................... 13
3.2 Detailed hardware set p ................................................................................. 13
3.2.1 E abli g SWD i terface for ARM-USB-OCD .......................................................................................... 14
3.3 Detailed software set p ................................................................................... 14
3.3.1 Getti g Ope OCD ........................................................................................................................................ 15
3.3.2 Drivers a d driver i stallatio .................................................................................................................... 16
3.3.3 Driver i stallatio i Wi dows ................................................................................................................... 17
3.3.4 Driver i stallatio i Li ux ......................................................................................................................... 19
3.3.5 Driver i stallatio i MAC OS X ............................................................................................................... 19
3.3.6 How to u i stall a d clea -up previously i stalled drivers ..................................................................... 20
3.4 Basic OpenOCD connection ........................................................................... 21
3.4.1 Simple target co ectio via FTDI drivers ................................................................................................ 21
3.4.2 Simple target co ectio via LibUSB drivers ........................................................................................... 22
3.4.3 Simple SWD target co ectio with ARM-JTAG-SWD .......................................................................... 23
3.5 Advanced OpenOCD practices ....................................................................... 23
3.5.1 Usi g multiple ARM-USB-OCD i terfaces ................................................................................................ 23
3.5.2 Cha gi g the VID a d PID of the debugger .............................................................................................. 25
3.6 IAR Embedded Workbench for ARM ........................................................... 25
3.7 Rowley Crossworks for ARM ......................................................................... 26
3.8 CooCox IDE ..................................................................................................... 28
3.9 Olimex Open Development S ite (ODS) package ........................................ 28
3.10 Other software tools ...................................................................................... 29
CHAPTER 4: FREQUENTLY ASKED QUESTIONS .......................................... 30
Page 3 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
CHAPTER 5: REVISION HISTORY AND SUPPORT ........................................ 31
5. Introd ction to the chapter ............................................................................... 31
5.1 Doc ment revision ........................................................................................... 31
5.2 Usef l web links and p rchase codes ............................................................. 31
5.3 Prod ct s pport ............................................................................................... 33
Page 4 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
CHAPTER 1: OVERVIEW
1. I troductio to the chapter
Thank you for choosing an OpenOCD debugger manufactured by OLIMEX LTD. This document
provides information about two of the ARM debuggers manufactured by OLIMEX LTD – ARM-
USB-OCD and ARM-USB-OCD-H.
ARM-USB-OCD and ARM-USB-OCD-H are very simi ar in features and hardware design.
Because of that when one of them is mentioned in this document it is safe to assume that the
information app ies for both debuggers, un ess it is specifica y stated otherwise.
1.1 Features
The debuggers have the fo owing features:
•Debug a ARM microcontro ers with JTAG interface supported by OpenOCD
•Use ARM's standard 2×10 pin JTAG connector
•Support ARM targets working in vo tage range 2.00V – 5.00V (1.65V – 5.00V for ARM-
USB-OCD-H)
•Supported by the open-source community and OpenOCD debugger software
•Automatic powering via the JTAG to your target board with up to 200mA at 5V
•Ab e to power a target board via a standard DC barre jack; cab e for the externa powering
inc uded – 2.1×5.5×14mm fema e connectors at both ends
•Down oadab e Windows insta er for fu featured and open source too s as a ternative to the
commercia ARM deve opment packages: GCC C compi er, OpenOCD debugger and
Ec ipse IDE.
•Work with IAR EW for ARM via GDB server
•Work with Row ey Crossworks IDE
•Work with CooCox IDE
•Supported in Windows, Linux and Mac
•Dimensions (50×40)mm ~ (2×1.6)" + 20 cm ~ (8") JTAG cab e – ribbon cab e inc uded
ARM-USB-OCD-H has these specific features over the ARM-USB-OCD:
•High speed USB 2.0 with ower atency time, RTCK adaptive JTAG c ock up to 30Mhz and
higher throughput achieve x3-x5 times faster programming speed than ARM-USB-OCD
•Works with ower vo tage targets (down to 1.65V); the ARM-USB-OCD can't debug targets
working at vo tage eve s ower than 2V.
ARM-USB-OCD has this specific feature over ARM-USB-OCD-H:
•A jumper that a ows you to change the vo tage provided to the target. It can power 5V, 9V
or 12V targets; ARM-USB-OCD-H can provide on y 5V to the target.
Page 5 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
1.2 Fu ctio al descriptio a d purpose of the board
A programmer/debugger is an inseparab e part of an active deve opment process that invo ves ARM
microcontro ers. ARM-USB-OCD is a USB FT2232-based ARM JTAG programmer/debugger that
is contro ed by a PC via OpenOCD under Windows, Linux or MAC OS. The ARM-USB-OCD
programmer/debugger is used for hardware and software deve opment on ARM microcontro ers
(MCUs) which via JTAG interface.
Both debuggers are ab e to power your target board via the JTAG.
Both debuggers can power the target board via a DC power p ug. The ARM-USB-OCD-H a ways
provides up to 5V of vo tage to the target via the p ug, whi e the ARM-USB-OCD can be
configured to provide 9V or 12V.
The O imex OpenOCD debuggers can a so be used for other app ications (except ARM
microcontro er debugging) as ong as the software a ows it. We have seen O imex OpenOCD
debuggers used for f ash memory programming (“f ashrom” uti ity software) and Atme AVR
debugging (“AVReAL” and “AVRdude” software too s). Yet, whi e these app ications of ARM-
USB-OCD are possib e, we do not provide any support regarding such use.
P ease note that O imex OpenOCD debuggers have NO hardware support for “Seria Wire Debug”
interface. An adapter extending the SWD functiona ity is so d separate y. The adapter is ca ed
ARM-JTAG-SWD.
1.3 What is Ope OCD?
OpenOCD was created by Dominic Rath as part of a 2005 dip oma thesis written at the University
of App ied Sciences Augsburg (http://www.hs-augsburg.de). Since that time, the project has grown
into an active open-source project, supported by a diverse community of software and hardware
deve opers from around the wor d.
The Open On-Chip Debugger (OpenOCD) aims to provide debugging, in-system programming and
boundary-scan testing for embedded target devices.
It does so with the assistance of a debug adapter, which in our case is the ARM-USB-OCD
debugger which he ps provide the right kind of e ectrica signa ing to the target being debugged.
These are required since the debug host (on which OpenOCD runs) won’t usua y have native
support for such signa ing, or the connector needed to hook up to the target.
Page 6 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
1.4 Compariso of Olimex Ope OCD debuggers
The main difference between ARM-USB-OCD and ARM-USB-OCD-H is the revision of the FTDI
chip inside – it is a most a ways recommended to get the -H version since it it much faster (the same
app ies for ARM-USB-TINY and ARM-USB-TINY-H).
TINY and OCD debuggers are comparab e in speed but the OCD design works with ower-vo tage
targets, can provide power to the target via a barre jack and has a virtua seria port inc uded –
suitab e for persona computers that ack a native COM port.
Table 1. Olimex OpenOCD debuggers, comparison of features
ARM-USB-TINY ARM-USB-TINY-H ARM-USB-OCD ARM-USB-OCD-H
FTDI chip FT2232C FT2232H FT2232C FT2232H
Relative debu in
speed SLOWER FASTER SLOWER FASTER
Additional power
option(*) NO NO YES, 5V-9V-12V YES, 5V
Additional VCP(**) NO NO YES YES
Tar et volta e
ran e 2.00V – 5.00V 2.00V – 5.00V 2.00V – 5.00V 1.65V – 5.0V
(*)The OCD debuggers have a DC barrel jack suitable for powering the target autonomously from the TAG
connector. An extension cable that fits the barrel jack is included in the package. The ARM-USB-OCD can
provide 5V or 9V or 12V (controlled via jumper), while ARM-USB-OCD-H can only provide 5V. This feature
is useful when you want to power the target board without establishing the TAG connection.
(**) Additional virtual COM port – the debugger might be used as convertor of a serial communication to
USB one. A good addition for newer computer systems that lack built-in COM port.
In case you are sti wondering which one you shou d get: ARM-USB-TINY-H is perfect y fine for
home use, research and deve opment. ARM-USB-OCD-H is the better choice for professiona use
and for chain programming of target devices.
Another difference between the devices is the product identification number which is different for
each different set of debuggers. A four types of OpenOCD debuggers have the same vendor ID.
However, each of the debugger series isted above has own product ID. These IDs might be seen in
the tab e be ow:
Table 2. Olimex OpenOCD debuggers, FTDI vendor and product IDs
ARM-USB-TINY ARM-USB-TINY-H ARM-USB-OCD ARM-USB-OCD-H
VID (VENDOR ID) 0×15BA 0×15BA 0×15BA 0×15BA
PID (PRODUCT ID) 0×0004 0×002a 0×0003 0×002b
You might need the IDs in severa cases but main y when you want to wipe the drivers with a third
party program.
Page 7 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
1.5 Orga izatio
Each section in this document covers a separate topic, organized as fo ow:
–Chapter 1 is an overview of the board usage and features
–Chapter 2 provides information about the connectors and the status LEDs
–Chapter 3 provides a guide for quick y setting up the board and the needed software
–Chapter 4 is a frequent y asked questions section
–Chapter 5 features a set of usefu inks, warranty info and purchase ocations
Page 8 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
CHAPTER 2: DEVICE DESCRIPTION
2. I troductio to the chapter
This chapter features exp anation of the interfaces visib e to the user. Most of the time those wou d
be the on y parts of the debugger that the user wou d manipu ate or make contact with.
There is on y one major difference in the appearance of ARM-USB-OCD and ARM-USB-OCD-H –
the first has two jumpers near the JTAG connector. These jumpers are responsib e for the se ection
of the vo tage output avai ab e at the barre jack – either 5V(by defau t), 9V or 12V. ARM-USB-
OCD-H acks such jumpers since it can provide on y 5V to the target.
2.1 Status LED
The debugger has one doub e co or (red/green) LED on the top. Upon USB connection the LED
might power up. However, it is main y meant to indicate programming/debugging in progress. The
red LED shou d b ink when you have an on-going operation (read, write).
2.2 Ports a d co ectors
The user can free y access the USB and the JTAG connector avai ab e. The pinouts and the usage of
those are discussed be ow.
2.2.1 USB type B co ector
The USB type B connector fo ows the USB 2.0 specification. The connector itse f ooks ike this:
You wou d most ike y need a suitab e cab e to connect the debugger to your persona computer.
The cab e shou d be USB A-B type. You might find a cab e ike that in the O imex web-shop or any
e ectronics store nearby.
The USB communication is hand ed by an FTDI chip inside the box. The drivers required are FTDI
ones with modified VID and PID numbers to fit the O imex own VID and PID.
Page 9 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
2.2.2 JTAG co ector
The JTAG connector is a 20-pin ma e one. It has the standard ARM JTAG 20 at 2.54mm (0.1'')
pitch, specified by IEEE 1149.1. There is a fema e-fema e ribbon cab e inc uded in the box of
ARM-USB-OCDfor easier connection to the target board.
There is a sma mark over the connector that indicates where the first pin is ocated. It might be
difficu t to spot it at first g ance (because of the casing) so p ease a so consider that the cab e that
comes with the debugger has the first wire co ored in red.
The pinout of the JTAG connector is shown in the next tab e (#3):
Table 3. TAG connector pinout
PIN # Si nal name PIN # Si nal name
1 VREF 2 VREF
3 TTRST_N 4 GND
5 TTDI 6 GND
7 TTMS 8 GND
9 TTCK 10 GND
11 TRTCK 12 GND
13 TTDO 14 GND
15 TSRST_N 16 GND
17 NOT CONNECTED 18 GND
19 TARGET SUPPLY 20 GND
Pins 1 and 2 of the JTAG connector are vo tage reference that probes if the target is a ready
powered by another source. If it is not, the ARM-USB-OCD wou d attempt to power it by 5V at pin
19 of the connector. P ease note that the USB standard a ows imited amount of power. Powering
the board from the debugger is not a ways re iab e (especia y if the target board has a ot of power-
hungry periphera s). It is recommended to use externa power supp y for bigger target boards.
If instead of the standard 20-pin 2.54mm (0.1'') JTAG connector your board has the mini version –
the 10-pin 1.27mm (0.05'') – then you might use the ARM-JTAG-20-10 adapter which is so d
separate y. This adapter does not provide SWD capabi ities ( ook for ARM-JTAG-SWD for such an
expansion). The ARM-JTAG-20-10 adapter can be used with debuggers manufactured by other
companies as ong as they fo ow the standard 20-pin JTAG ayout suggested by ARM Ho dings.
Page 10 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
2.2.3 RS232 connector
After the drivers are proper y insta ed ARM-USB-OCD creates a separate virtua COM port which
acts as a standard COM port. You can access it by the DB9 RS232 ma e connector. The RS232
function works simu taneous y with the JTAG interface and functions.
Table 4. RS232 male connector
Pin # Si nal Name
1 RS232 DCD
2 RS232 RX
3 RS232 TX
4 RS232 DTR
5 GND
6 RS232 DSR
7 RS232 RTS
8 RS232 CTS
9 Not connected
2.2.4 Power o t barrel jack
The debugger has a center-positive DC barre jack. It provides DC vo tage output. This option is
especia y he pfu if you just want to power your target board without estab ishing a JTAG
connection. The power supp y avai ab e at the barre jack is taken from the USB type B.
Do not provide power to the DC barrel jack! This is not a power inp t!
An extension cab e that fits the barre jack is inc uded in the package. It has a tota ength of 30
centimeters. The cab e can be used between the barre jack of the debugger and the barre jack of
the target board.
The DC barre jack has a 2.0mm thick inner pin and 6.3mm ho e diameter. The inner pin carries the
positive vo tage. The corresponding power supp y p ug (or fema e jack) that fits the above DC
barre has 2.1mm ho e diameter and 5.5mm outer diameter. The cab e which is inc uded in the
package of the debugger has such fema e jacks at both ends.
The vo tage avai ab e at the power out barre jack depends on the exact product you have! The
vo tage avai ab e at the PWR_OUT barre jack might vary ARM-USB-OCD or ARM-USB-OCD-H.
By defau t both debugger designs can provide 5V DC to the PWR_OUT jack. However, ARM-
USB-OCD has two jumpers that can enab e 9V DC vo tage output or 12V DC vo tage output. The
power supp y jumpers are on right side of the 2×10 pin JTAG connector.
- If both jumpers are open the output vo tage is 12VDC
- If right jumper is c osed the output vo tage is 9VDC
- If eft jumper is c osed the output vo tage is 5VDC (this is the defau t setting)
A typica connection using the DC barre jack is shown on the next page:
Page 11 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
Page 12 of 33
ARM-USB-OCD-H powering LPC-P11C24 (via the PWR_OUT jack).

OLIMEX© 2015 ARM-USB-OCD user's manua
CHAPTER 3: SETTING UP ARM-USB-OCD
3. I troductio to the chapter
More detai s about the standard connection routine of O imex ARM-USB-OCD and your target via
the most often used deve opment environments.
You can find the guide ines to use ARM-USB-OCD and the simi ar O imex products be ow.
Consider the information as a basis for operation – there are who e books written on any of the sub-
chapters.
Make sure to check the on ine resources for further reading. Such might be found at our wiki site.
3.1 Basic system setup
Genera y, to be ab e to use ARM-USB-OCD you need a target board or microcontro er and a
persona computer.
Usua y, setting up the hardware is a pretty straight-forward – “p ug the cab es” type of insta ation.
Setting up the software and the drivers proper y, might provide more of a cha enge.
You need to ensure that the target is supported in the software you are going to use and a so that the
target has a JTAG interface (un ess you a so have ARM-JTAG-SWD adapter). It is recommended to
do so before the purchase of the debugger.
SWD interface is supported on y if you use the additiona adapter mentioned in sub-chapter “3.5
Row ey Crossworks for ARM”.
3.2 Detailed hardware setup
The required hardware for successfu connection might vary depending on the target board and
chip.
The software options might be further imited by the hardware you might use for your desired task.
The ARM-USB-OCD comes with a ribbon extension cab e. It has two 20-pin fema e-fema e
connectors in 2.54mm (0.1'') pitch. The connectors are p aced at both end of the cab e. Using the
cab e you can connect the debugger to a target board with a 20-pin ma e connector with the same
pin pitch. The processor of the target board shou d have a standard JTAG programming and
debugging interface (IEEE 1149.1 Standard Test Access Port and Boundary-Scan Architecture). If it
has a sma er connector (1.27mm, 0.05'' pitch) you might use the ARM-JTAG-20-10 adapter.
The debugger comes without USB type A – USB type B cab e.
P ease note ARM-USB-OCD hardware design does NOT support SWD (Seria Wire Debug)
interface. Extension adapter for SWD might be purchased separate y. The product name of the
adapter is “ARM-JTAG-SWD”.
Page 13 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
There are who e fami ies of ow-density microcontro ers that have on y SWD interface. ARM-
USB-OCD can't be used out-of-the-box with such targets! Make sure your microconontro er's
datasheet specifica y mentions it has JTAG interface.
When aiming to use ARM-USB-OCD for SWD-on y targets p ease refer to the hardware and
software notes about SWD.
The additiona adapter for 10-pin 1.27mm connector is a so so d separate y.
The additiona too s mentioned above might be found at the fo owing inks:
1. USB-A-B-CABLE: https://www.o imex.com/Products/Components/Cab es/USB-A-B-CABLE/
2. ARM-JTAG-SWD: https://www.o imex.com/Products/ARM/JTAG/ARM-JTAG-SWD/
3. ARM-JTAG-20-10: https://www.o imex.com/Products/ARM/JTAG/ARM-JTAG-20-10/
3.2.1 E abli g SWD i terface for ARM-USB-OCD
ARM-USB-OCD debuggers acks SWD interface by hardware design but such can be added. You
can use the ARM-JTAG-SWD adapter to enab e the SWD interface of ARM-USB-OCD debuggers.
Connect the adapter to O imex programmers in the fo owing way:
JTAG debugger – SWD interface – JTAG ribbon cab e – Target;
i.e. connect the SWD adapter direct y to the programmer with no cab e in-between them!
3.3 Detailed software setup
ARM-USB-OCD might be used with a wide range of software too s. Customers have reported
successfu usage of ARM-USB-OCD under Windows, Linux and Mac.
The typica usage of ARM-USB-OCD is within an open-source environment. However, despite that
the unit is so d under the “OpenOCD” tag and its OpenOCD compatibi ity, the ARM-USB-OCD
debugger has far wider software support. Most of the commercia integrated deve opment
environments had a ready sensed the potentia behind the cheap and wide-spread OpenOCD
debuggers and had imp emented ways of the interacting with such debuggers in their products.
Some of the popu ar commercia IDEs that work fine with ARM-USB-OCD are IAR EW for ARM
and Row ey Crossworks for ARM. The debugger a so works with the free CooCox IDE.
P ease note that the instructions be ow might not be accurate by the time of reading. OpenOCD is a
community-driven open source project and things might change drastica y between re ease version.
It is a ways advisab e to refer to the officia documentation of OpenOCD for atest instructions.
There are a such instructions on the OpenOCD web-site.
Page 14 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
3.3.1 Getting OpenOCD
You can either down oad a ready package or compi e OpenOCD from sources. The first choice is
faster but the second option a ows you to customize the OpenOCD and use a specific
configuration. One of the most important parts of such a compi ation is the point where you se ect
what drivers wou d be expected from OpenOCD – FTDI or LibUSB.
If you are a beginner it is recommended to get an a ready compi ed OpenOCD package.
If you are using Windows I recommend you to down oad an a ready compi ed package for
OpenOCD. You can get it from here:
https://www.o imex.com/Products/ARM/JTAG/_resources/OpenOCD-OLIMEX-WINDOWS.zip
Frequent y updated and ready-to-use packages might a so be found at Freddie Chopin's web site:
http://www.freddiechopin.info/. Down oad the atest version and extract it and you are good to go!
If you want to use a ready package under Linux try with:
sudo apt- et install openocd
If you decide to go with an a ready compi ed OpenOCD package skip to next chapter where the
driver insta ation is detai ed. If you are going to compi e the OpenOCD yourse f continue reading
be ow.
If you wish to compi e OpenOCD under Windows you wou d need a proper software too to
compi e the sources. Since you can't use most Linux too s (which were used during the creating of
OpenOCD) direct y in Windows you wou d need a too that provides essentia Linux too s under
Windows. Most peop e use Cygwin for such purposes – it is avai ab e for down oad here:
http://www.cygwin.com/. You wou d need to insta the proper packages and then the compi ation
wou d be just ike in the Linux instructions be ow.
It is easier to compi e the atest sources for OpenOCD under Linux. You need to get the sources
from the master branch here: http://git.code.sf.net/p/openocd/code. Usua y the repository might be
checked out using a Git c ient. The code be ow shows how to get a git c ient, insta it, then
checkout the sources then checkout a specific version:
cd ~
sudo apt- et install it libtool automake texinfo
it clone http:// it.code.sf.net/p/openocd/code openocd-code
cd openocd
it ta -l
it checkout v0.6.0
After that you wou d need to set proper configuration options. The two main paths are – compi e for
FTDI drivers support or compi e for LibUSB support.
P ease note that since OpenOCD 0.8.0 FTDI drivers are recommended! It was quite the opposite
before 0.8.0 when LibUSB drivers were suggested as defau t.
Page 15 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
If you are going for FTDI driver support:
./bootstrap
./confi ure --enable-ftdi --enable-ft2232_ftd2xx
make
make install
If you are going for the LibUSB driver support:
./bootstrap
./confi ure --enable-maintainer-mode --enable-ft2232_libftdi
make
sudo make install
After the OpenOCD is ready (no matter if you compi ed it or down oaded it ready) you wou d need
drivers for the debugger.
3.3.2 Drivers a d driver i stallatio
ARM-USB-OCD requires the insta ation of drivers to be ab e to operate proper y.
There are a number of drivers avai ab e for the debugger. This is because the origina drivers are
written and distributed by FTDI (a Scottish company) and they are considered proprietary piece of
software. Because the initia idea of the OpenOCD is to be fu y open source (as its name indicates)
peop e decided to re ease and maintain open drivers (not proprietary). That is why there are a so a
number of such drivers suitab e for ARM-USB-OCD. The drivers are re ated to the integrated
deve opment environment that you are going to use (or the ack of such, e.g. if you decide to work
on y with OpenOCD). Some IDEs requires specific set of drivers.
P ease note that some Windows, MAC and Linux distributions might provide automatic driver
update feature – this might cause the down oad and insta of wrong FTDI drivers. P ease ensure
that automatic driver updates had been disab ed temporari y.
Page 16 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
3.3.3 Driver installation in Windows
Before attempting any driver insta ation under Windows you wou d need to ensure that no drivers
are present when the too is p ugged in the computer. Open “Windows Device Manager” and ensure
that there are no drivers present when the debugger is p ugged to the computer. If Windows
automatica y insta s drivers after you p ug the too to the computer – you wou d need to uninsta
them and disab e the automatic driver insta ation temporari y. For newer Windows versions you
wou d a so need to disab e the “Driver Signature Verification” which is enab ed by defau t. It
prevents the insta ation of any unsigned drivers to your system.
After you p ug ARM-USB-OCD-H for the first time and you open ''Windows Device Manager'' you
shou d see two entries under ''Other devices'' ike shown be ow:
The driver insta ation in Windows wou d depend on which version of OpenOCD you are using.
There is a difference in the driver insta ation if you are using OpenOCD 0.8.0 or newer and if you
are using versions prior to OpenOCD 0.8.0.
The driver that you have to use a so depends on the environment you are aiming at. Some IDEs
support communication on y with LibUSB drivers, others on y with FTDI drivers.
It is recommended to use a piece of software which simp ifies the drivers insta ation (or the change
of drivers) It is ca ed Zadig.
The Zadig program might be down oaded from here:
http://zadig.akeo.ie/
After insta ation of the program p ug ARM-USB-OCD to the computer and you shou d see the
device in the drop down menu with the interfaces popu ated, as we as the VID and PID boxes. If
they don't get popu ated go to Options → List A Devices. After that se ect the WinUSB driver and
c ick either the big “Insta Driver” button or the “Reinsta Driver” button for each interface. The
reinsta button rep aces the insta button if some o d driver associated with the debugger was eft
over.
Refer to the picture on the next page.
Page 17 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
If Zadig doesn't do the job or you are using OpenOCD version prior to 0.8.0 the more robust
method is to down oad an archive with the drivers and point the Windows Device Manager to it
manua y. Links to those resources might be found at the end of this chapter!
Do not et Windows search for drivers automatica y! After choosing the manua insta , point the
driver updater to the fo der where the driver archive was extracted. Upon successfu insta ation you
wou d probab y need to repeat the who e process unti a unrecognized entries in Windows Device
Manager disappear. This usua y means that the who e procedure is done four times.
The package of LibUSB drivers (suitab e for OpenOCD versions prior to 0.9.0) for manua insta
might be found here: https://www.o imex.com/Products/ARM/JTAG/_resources/DRIVERS-( ibusb-
1.2.2.0-CDM20808).zip
Package of FTDI drivers for automatic or manua insta might be found here here:
https://www.o imex.com/Products/ARM/JTAG/_resources/OLIMEX-FTDI-drivers-2-12-04.zip
Page 18 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
The RS232 interface might need specifica y the FTDI drivers to work proper y.
If you can't insta the drivers on a new Windows systems there might "driver signature
enforcement" enab ed by defau t. You wou d have to disab e it since our device drivers are not
digita y signed by Microsoft. Instructions how to do it might be easi y found on ine.
3.3.4 Driver installation in Lin x
Newer kerne s have FTDI drivers ready-to-use. If that is not your case first you need to down oad
the drivers – you can get the FTDI drivers from their web site. A ternative y you can use apt-get ike
this:
sudo apt- et install libftdi-dev libftdi1
Now Ubuntu shou d recognize the programmer when it is p ugged in. But, by defau t it requires root
privi eges to use. Therefore, we need to set up a udev ru e to change the permissions. This ru e
assigns the device to the p ugdev group – which was introduced in Linux for hot-p uggab e devices
– and then gives the group read and write access. Make sure your user is in the p ugdev group; my
user was in it by defau t.
Create a fi e /etc/udev/ru es.d/o imex-arm-usb-ocd-h.ru es
Put this sing e ine in the fi e:
The O imex vendor and product IDs are part of the driver (VID/PID) and you have to find the right
IDs from tab e 2 (above in this manua ). For ARM-USB-OCD-H those are:
PID: 0×002b
VID: 0×15BA
SUBSYSTEM=="usb", ACTION=="add", ATTRS{idProduct}=="002b",
ATTRS{idVendor}=="15ba", MODE="664", GROUP="plu dev"
Now you shou d be ready to use the debugger. I recommend you to try the basic OpenOCD
connection described in chapter 3.3 be ow in this document.
3.3.5 Driver installation in MAC OS X
You need to down oad the Virtua Com Port (VCP) drivers for the FTDI chip of the JTAG
programmer. You can find the drivers at the FTDI web page:
http://www.ftdichip.com/Drivers/VCP.htm.
Insta the drivers norma y (norma OS X software package insta ation). The O imex vendor and
product IDs are part of the driver (VID/PID) and you have to find the right IDs from tab e 2 (above
in this manua ). For ARM-USB-OCD-H those are:
PID: 0×002b (43)
Page 19 of 33

OLIMEX© 2015 ARM-USB-OCD user's manua
VID: 0×15BA (5562)
You wou d need to edit FTDI driver p ist fi e
(/System/Library/Extensions/FTDIUSBSeria Driver.kext/Contents/Info.p ist) and put the right
PID/VID in decima . You might want to use a ca cu ator for the conversion (hex to decima ). Search
for "O imex OpenOCD JTAG B" and edit the <integer> fie ds after the keys idProduct (PID) and
idVendor (VID). Remember you need to have root privi eges to edit the fi e.
If you want to have the option to use conso e port at the same time as you JTAG de ete the who e
section of "O imex OpenOCD JTAG A". (https://row ey.zendesk.com/entries/109072-getting-jtag-
and-seria -port-to-work-under-mac-os-x-using-an-o imex-arm-usb-ocd)
You can either reboot or un oad and re oad the kerne extension
sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver
sudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver
Now you shou d see the JTAG come up in the /dev/ fo der as /dev/tty.usbseria -OLWVXN1LB
and /dev/cu.usbseria -OLWVXN1LB.
It is time to insta the D2XX drivers for OpenOCD to use the JTAG programmer. You can
down oad the drivers from http://www.ftdichip.com/Drivers/D2XX.htm
After down oading the drivers you have insta them by hand. If you have ooked at other guides
how to insta the drivers they are most probab y wrong. The directory structure of the driver
package changes frequent y so you might need to first find the fi es. This guide works for driver
version 1.2.2. Use command ine (termina ) to do the fo owing:
sudo cp /Volumes/release/D2XX/bin/10.5-10.7/libftd2xx.1.2.2.dylib
/usr/local/lib
sudo ln -sf /usr/local/lib/libftd2xx.1.2.2.dylib /usr/local/lib/libftd2xx.dylib
sudo cp ls /Volumes/release/D2XX/bin/ftd2xx.h /usr/local/include
sudo cp /Volumes/release/D2XX/bin/WinTypes.h /usr/local/include
3.3.6 How to u i stall a d clea -up previously i stalled drivers
FTDI provides a Windows-compatib e too for this seeming y easy task. It might be found in the
Uti ities section of their web-site. We usua y use a uti ity ca ed FTC ean for testing purposes. It
might be down oaded from here: http://www.ftdichip.com/Support/Uti ities/FTC ean.zip
Before you proceed you shou d again ensure that your Windows configuration does not a ow auto-
updates and driver updates from Internet! E se after you uninsta the drivers, they wou d magica y
get insta ed again!
Once you have stopped Windows from automatica y insta ing drivers you might proceed with the
usage of the FTC ean – disconnect a USB devices, run the FTC ean.exe, provide the proper VID
and PID (which might be seen in tab e 2), and, fina y, c ick ''C ean'' button. You wi be prompted
few times to agree that you aware of what the program does and after it the drivers associated with
the device shou d be gone.
Page 20 of 33
This manual suits for next models
1
Table of contents