Arm-Usb-Ocd and Ocd H Manual
Arm-Usb-Ocd and Ocd H Manual
Arm-Usb-Ocd and Ocd H Manual
USER’S MANUAL
Document revision D, July 2015
DISCLAIMER
© 2015 Olimex Ltd. Olimex®, logo and combinations thereof, are registered trademarks of Olimex Ltd.
Other product names may be trademarks of others and the rights belong to their respective owners.
The information in this document is provided in connection with Olimex products. No license, express
or implied or otherwise, to any intellectual property right is granted by this document or in connection
with the sale of Olimex products.
The hardware designs of the devices, subjects of this manual, are proprietary. The design files would not be
distributed nor shared with the end customer.
The products described in this manual are intended to work with open source software.
It is possible that the pictures in this manual differ from the latest revision of the board.
The product described in this document is subject to continuous development and improvements. All
particulars of the product and its use contained in this document are given by OLIMEX in good faith.
However all warranties implied or expressed including but not limited to implied warranties of
merchantability or fitness for purpose are excluded. This document is intended only to assist the reader in the
use of the product. OLIMEX Ltd. shall not be liable for any loss 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 development, demonstration, or evaluation purposes only
and is not considered by OLIMEX to be a finished end-product fit for general consumer use. Persons
handling the product must have electronics training and observe good engineering practice standards. As
such, the goods being provided are not intended to be complete in terms of required design-, marketing-,
and/or manufacturing-related protective considerations, including product safety and environmental
measures typically found in end products that incorporate such semiconductor components or circuit boards.
Olimex currently deals with a variety of customers for products, and therefore our arrangement with the user
is not exclusive. Olimex assumes no liability for applications assistance, customer product design, software
performance, or infringement of patents or services described herein.
Page 2 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Table of Contents
DISCLAIMER............................................................................................................. 2
CHAPTER 1: OVERVIEW........................................................................................5
1. Introduction to the chapter.................................................................................5
1.1 Features.............................................................................................................. 5
1.2 Functional description and purpose of the board.......................................... 6
1.3 What is OpenOCD?...........................................................................................6
1.4 Comparison of Olimex OpenOCD debuggers................................................ 7
CHAPTER 2: DEVICE DESCRIPTION..................................................................9
2. Introduction to the chapter.................................................................................9
2.1 Status LED......................................................................................................... 9
2.2 Ports and connectors.........................................................................................9
2.2.1 USB type B connector....................................................................................................................................9
2.2.2 JTAG connector............................................................................................................................................10
2.2.3 RS232 connector...........................................................................................................................................11
2.2.4 Power out barrel jack...................................................................................................................................11
CHAPTER 3: SETTING UP ARM-USB-OCD.......................................................13
3. Introduction to the chapter...............................................................................13
3.1 Basic system setup........................................................................................... 13
3.2 Detailed hardware setup................................................................................. 13
3.2.1 Enabling SWD interface for ARM-USB-OCD.......................................................................................... 14
3.3 Detailed software setup...................................................................................14
3.3.1 Getting OpenOCD........................................................................................................................................15
3.3.2 Drivers and driver installation....................................................................................................................16
3.3.3 Driver installation in Windows................................................................................................................... 17
3.3.4 Driver installation in Linux.........................................................................................................................19
3.3.5 Driver installation in MAC OS X............................................................................................................... 19
3.3.6 How to uninstall and clean-up previously installed drivers.....................................................................20
3.4 Basic OpenOCD connection........................................................................... 21
3.4.1 Simple target connection via FTDI drivers................................................................................................21
3.4.2 Simple target connection via LibUSB drivers........................................................................................... 22
3.4.3 Simple SWD target connection with ARM-JTAG-SWD.......................................................................... 23
3.5 Advanced OpenOCD practices.......................................................................23
3.5.1 Using multiple ARM-USB-OCD interfaces................................................................................................23
3.5.2 Changing the VID and 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 Suite (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 manual
Page 4 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
CHAPTER 1: OVERVIEW
ARM-USB-OCD and ARM-USB-OCD-H are very similar 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 applies for both debuggers, unless it is specifically stated otherwise.
1.1 Features
The debuggers have the following features:
Page 5 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Both debuggers are able to power your target board via the JTAG.
Both debuggers can power the target board via a DC power plug. The ARM-USB-OCD-H always
provides up to 5V of voltage to the target via the plug, while the ARM-USB-OCD can be
configured to provide 9V or 12V.
The Olimex OpenOCD debuggers can also be used for other applications (except ARM
microcontroller debugging) as long as the software allows it. We have seen Olimex OpenOCD
debuggers used for flash memory programming (“flashrom” utility software) and Atmel AVR
debugging (“AVReAL” and “AVRdude” software tools). Yet, while these applications of ARM-
USB-OCD are possible, we do not provide any support regarding such use.
Please note that Olimex OpenOCD debuggers have NO hardware support for “Serial Wire Debug”
interface. An adapter extending the SWD functionality is sold separately. The adapter is called
ARM-JTAG-SWD.
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 helps provide the right kind of electrical signaling to the target being debugged.
These are required since the debug host (on which OpenOCD runs) won’t usually have native
support for such signaling, or the connector needed to hook up to the target.
Page 6 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
TINY and OCD debuggers are comparable in speed but the OCD design works with lower-voltage
targets, can provide power to the target via a barrel jack and has a virtual serial port included –
suitable for personal computers that lack a native COM port.
(*)The OCD debuggers have a DC barrel jack suitable for powering the target autonomously from the JTAG
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 JTAG 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 still wondering which one you should get: ARM-USB-TINY-H is perfectly fine for
home use, research and development. ARM-USB-OCD-H is the better choice for professional 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. All four types of OpenOCD debuggers have the same vendor ID.
However, each of the debugger series listed above has own product ID. These IDs might be seen in
the table below:
You might need the IDs in several cases but mainly when you want to wipe the drivers with a third
party program.
Page 7 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
1.5 Organization
Each section in this document covers a separate topic, organized as follow:
– 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 quickly setting up the board and the needed software
– Chapter 4 is a frequently asked questions section
– Chapter 5 features a set of useful links, warranty info and purchase locations
Page 8 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
There is only 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 responsible for the selection
of the voltage output available at the barrel jack – either 5V(by default), 9V or 12V. ARM-USB-
OCD-H lacks such jumpers since it can provide only 5V to the target.
You would most likely need a suitable cable to connect the debugger to your personal computer.
The cable should be USB A-B type. You might find a cable like that in the Olimex web-shop or any
electronics store nearby.
The USB communication is handled by an FTDI chip inside the box. The drivers required are FTDI
ones with modified VID and PID numbers to fit the Olimex own VID and PID.
Page 9 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
There is a small mark over the connector that indicates where the first pin is located. It might be
difficult to spot it at first glance (because of the casing) so please also consider that the cable that
comes with the debugger has the first wire colored in red.
The pinout of the JTAG connector is shown in the next table (#3):
Pins 1 and 2 of the JTAG connector are voltage reference that probes if the target is already
powered by another source. If it is not, the ARM-USB-OCD would attempt to power it by 5V at pin
19 of the connector. Please note that the USB standard allows limited amount of power. Powering
the board from the debugger is not always reliable (especially if the target board has a lot of power-
hungry peripherals). It is recommended to use external power supply 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 sold
separately. This adapter does not provide SWD capabilities (look for ARM-JTAG-SWD for such an
expansion). The ARM-JTAG-20-10 adapter can be used with debuggers manufactured by other
companies as long as they follow the standard 20-pin JTAG layout suggested by ARM Holdings.
Page 10 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Do not provide power to the DC barrel jack! This is not a power input!
An extension cable that fits the barrel jack is included in the package. It has a total length of 30
centimeters. The cable can be used between the barrel jack of the debugger and the barrel jack of
the target board.
The DC barrel jack has a 2.0mm thick inner pin and 6.3mm hole diameter. The inner pin carries the
positive voltage. The corresponding power supply plug (or female jack) that fits the above DC
barrel has 2.1mm hole diameter and 5.5mm outer diameter. The cable which is included in the
package of the debugger has such female jacks at both ends.
The voltage available at the power out barrel jack depends on the exact product you have! The
voltage available at the PWR_OUT barrel jack might vary ARM-USB-OCD or ARM-USB-OCD-H.
By default both debugger designs can provide 5V DC to the PWR_OUT jack. However, ARM-
USB-OCD has two jumpers that can enable 9V DC voltage output or 12V DC voltage output. The
power supply jumpers are on right side of the 2×10 pin JTAG connector.
A typical connection using the DC barrel jack is shown on the next page:
Page 11 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Page 12 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
You can find the guidelines to use ARM-USB-OCD and the similar Olimex products below.
Consider the information as a basis for operation – there are whole books written on any of the sub-
chapters.
Make sure to check the online resources for further reading. Such might be found at our wiki site.
Usually, setting up the hardware is a pretty straight-forward – “plug the cables” type of installation.
Setting up the software and the drivers properly, might provide more of a challenge.
You need to ensure that the target is supported in the software you are going to use and also that the
target has a JTAG interface (unless you also have ARM-JTAG-SWD adapter). It is recommended to
do so before the purchase of the debugger.
SWD interface is supported only if you use the additional adapter mentioned in sub-chapter “3.5
Rowley Crossworks for ARM”.
The software options might be further limited by the hardware you might use for your desired task.
The ARM-USB-OCD comes with a ribbon extension cable. It has two 20-pin female-female
connectors in 2.54mm (0.1'') pitch. The connectors are placed at both end of the cable. Using the
cable you can connect the debugger to a target board with a 20-pin male connector with the same
pin pitch. The processor of the target board should have a standard JTAG programming and
debugging interface (IEEE 1149.1 Standard Test Access Port and Boundary-Scan Architecture). If it
has a smaller connector (1.27mm, 0.05'' pitch) you might use the ARM-JTAG-20-10 adapter.
Please note ARM-USB-OCD hardware design does NOT support SWD (Serial Wire Debug)
interface. Extension adapter for SWD might be purchased separately. The product name of the
adapter is “ARM-JTAG-SWD”.
Page 13 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
There are whole families of low-density microcontrollers that have only SWD interface. ARM-
USB-OCD can't be used out-of-the-box with such targets! Make sure your microconontroller's
datasheet specifically mentions it has JTAG interface.
When aiming to use ARM-USB-OCD for SWD-only targets please refer to the hardware and
software notes about SWD.
The additional adapter for 10-pin 1.27mm connector is also sold separately.
The additional tools mentioned above might be found at the following links:
1. USB-A-B-CABLE: https://www.olimex.com/Products/Components/Cables/USB-A-B-CABLE/
2. ARM-JTAG-SWD: https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-SWD/
3. ARM-JTAG-20-10: https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/
i.e. connect the SWD adapter directly to the programmer with no cable in-between them!
The typical usage of ARM-USB-OCD is within an open-source environment. However, despite that
the unit is sold under the “OpenOCD” tag and its OpenOCD compatibility, the ARM-USB-OCD
debugger has far wider software support. Most of the commercial integrated development
environments had already sensed the potential behind the cheap and wide-spread OpenOCD
debuggers and had implemented ways of the interacting with such debuggers in their products.
Some of the popular commercial IDEs that work fine with ARM-USB-OCD are IAR EW for ARM
and Rowley Crossworks for ARM. The debugger also works with the free CooCox IDE.
Please note that the instructions below might not be accurate by the time of reading. OpenOCD is a
community-driven open source project and things might change drastically between release version.
It is always advisable to refer to the official documentation of OpenOCD for latest instructions.
There are a such instructions on the OpenOCD web-site.
Page 14 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
If you are using Windows I recommend you to download an already compiled package for
OpenOCD. You can get it from here:
https://www.olimex.com/Products/ARM/JTAG/_resources/OpenOCD-OLIMEX-WINDOWS.zip
Frequently updated and ready-to-use packages might also be found at Freddie Chopin's web site:
http://www.freddiechopin.info/. Download the latest version and extract it and you are good to go!
If you decide to go with an already compiled OpenOCD package skip to next chapter where the
driver installation is detailed. If you are going to compile the OpenOCD yourself continue reading
below.
If you wish to compile OpenOCD under Windows you would need a proper software tool to
compile the sources. Since you can't use most Linux tools (which were used during the creating of
OpenOCD) directly in Windows you would need a tool that provides essential Linux tools under
Windows. Most people use Cygwin for such purposes – it is available for download here:
http://www.cygwin.com/. You would need to install the proper packages and then the compilation
would be just like in the Linux instructions below.
It is easier to compile the latest sources for OpenOCD under Linux. You need to get the sources
from the master branch here: http://git.code.sf.net/p/openocd/code. Usually the repository might be
checked out using a Git client. The code below shows how to get a git client, install it, then
checkout the sources then checkout a specific version:
cd ~
sudo apt-get install git libtool automake texinfo
git clone http://git.code.sf.net/p/openocd/code openocd-code
cd openocd
git tag -l
git checkout v0.6.0
After that you would need to set proper configuration options. The two main paths are – compile for
FTDI drivers support or compile for LibUSB support.
Please 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 default.
Page 15 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
./bootstrap
./configure --enable-ftdi --enable-ft2232_ftd2xx
make
make install
./bootstrap
./configure --enable-maintainer-mode --enable-ft2232_libftdi
make
sudo make install
After the OpenOCD is ready (no matter if you compiled it or downloaded it ready) you would need
drivers for the debugger.
There are a number of drivers available for the debugger. This is because the original drivers are
written and distributed by FTDI (a Scottish company) and they are considered proprietary piece of
software. Because the initial idea of the OpenOCD is to be fully open source (as its name indicates)
people decided to release and maintain open drivers (not proprietary). That is why there are also a
number of such drivers suitable for ARM-USB-OCD. The drivers are related to the integrated
development environment that you are going to use (or the lack of such, e.g. if you decide to work
only with OpenOCD). Some IDEs requires specific set of drivers.
Please note that some Windows, MAC and Linux distributions might provide automatic driver
update feature – this might cause the download and install of wrong FTDI drivers. Please ensure
that automatic driver updates had been disabled temporarily.
Page 16 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
After you plug ARM-USB-OCD-H for the first time and you open ''Windows Device Manager'' you
should see two entries under ''Other devices'' like shown below:
The driver installation in Windows would depend on which version of OpenOCD you are using.
There is a difference in the driver installation 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 also depends on the environment you are aiming at. Some IDEs
support communication only with LibUSB drivers, others only with FTDI drivers.
It is recommended to use a piece of software which simplifies the drivers installation (or the change
of drivers) It is called Zadig.
http://zadig.akeo.ie/
After installation of the program plug ARM-USB-OCD to the computer and you should see the
device in the drop down menu with the interfaces populated, as well as the VID and PID boxes. If
they don't get populated go to Options → List All Devices. After that select the WinUSB driver and
click either the big “Install Driver” button or the “Reinstall Driver” button for each interface. The
reinstall button replaces the install button if some old driver associated with the debugger was left
over.
Page 17 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
If Zadig doesn't do the job or you are using OpenOCD version prior to 0.8.0 the more robust
method is to download an archive with the drivers and point the Windows Device Manager to it
manually. Links to those resources might be found at the end of this chapter!
Do not let Windows search for drivers automatically! After choosing the manual install, point the
driver updater to the folder where the driver archive was extracted. Upon successful installation you
would probably need to repeat the whole process until all unrecognized entries in Windows Device
Manager disappear. This usually means that the whole procedure is done four times.
The package of LibUSB drivers (suitable for OpenOCD versions prior to 0.9.0) for manual install
might be found here: https://www.olimex.com/Products/ARM/JTAG/_resources/DRIVERS-(libusb-
1.2.2.0-CDM20808).zip
Package of FTDI drivers for automatic or manual install might be found here here:
https://www.olimex.com/Products/ARM/JTAG/_resources/OLIMEX-FTDI-drivers-2-12-04.zip
Page 18 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
The RS232 interface might need specifically the FTDI drivers to work properly.
If you can't install the drivers on a new Windows systems there might "driver signature
enforcement" enabled by default. You would have to disable it since our device drivers are not
digitally signed by Microsoft. Instructions how to do it might be easily found online.
Now Ubuntu should recognize the programmer when it is plugged in. But, by default it requires root
privileges to use. Therefore, we need to set up a udev rule to change the permissions. This rule
assigns the device to the plugdev group – which was introduced in Linux for hot-pluggable devices
– and then gives the group read and write access. Make sure your user is in the plugdev group; my
user was in it by default.
The Olimex vendor and product IDs are part of the driver (VID/PID) and you have to find the right
IDs from table 2 (above in this manual). For ARM-USB-OCD-H those are:
PID: 0×002b
VID: 0×15BA
Now you should be ready to use the debugger. I recommend you to try the basic OpenOCD
connection described in chapter 3.3 below in this document.
Install the drivers normally (normal OS X software package installation). The Olimex vendor and
product IDs are part of the driver (VID/PID) and you have to find the right IDs from table 2 (above
in this manual). For ARM-USB-OCD-H those are:
Page 19 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
If you want to have the option to use console port at the same time as you JTAG delete the whole
section of "Olimex OpenOCD JTAG A". (https://rowley.zendesk.com/entries/109072-getting-jtag-
and-serial-port-to-work-under-mac-os-x-using-an-olimex-arm-usb-ocd)
You can either reboot or unload and reload the kernel extension
Now you should see the JTAG come up in the /dev/ folder as /dev/tty.usbserial-OLWVXN1LB
and /dev/cu.usbserial-OLWVXN1LB.
It is time to install the D2XX drivers for OpenOCD to use the JTAG programmer. You can
download the drivers from http://www.ftdichip.com/Drivers/D2XX.htm
After downloading the drivers you have install them by hand. If you have looked at other guides
how to install the drivers they are most probably wrong. The directory structure of the driver
package changes frequently so you might need to first find the files. This guide works for driver
version 1.2.2. Use command line (terminal) to do the following:
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
Before you proceed you should again ensure that your Windows configuration does not allow auto-
updates and driver updates from Internet! Else after you uninstall the drivers, they would magically
get installed again!
Once you have stopped Windows from automatically installing drivers you might proceed with the
usage of the FTClean – disconnect all USB devices, run the FTClean.exe, provide the proper VID
and PID (which might be seen in table 2), and, finally, click ''Clean'' button. You will be prompted
few times to agree that you aware of what the program does and after it the drivers associated with
the device should be gone.
Page 20 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
You are now free to install drivers starting right from the beginning.
After that you might want to create a script for simple programming or to establish a telnet
connection for debugging purposes. You can also configure a graphical environment (like IAR EW
for ARM) to establish a connection to the GDB.
Debugging might also be performed by sending direct commands to the board. After establishing
the basic connection described below you can open new terminal and run a telnet connection. The
telnet would accept commands on port 4444. More info might be found here:
https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_TELNET.pdf
openocd-x64-0.8.0.exe -f ./interface/ftdi/olimex-arm-usb-ocd-h.cfg -f
./target/stm32f1x.cfg
Note that you need to have navigated to the folder where the executable is located or to write the
full path to the executable. The typical successful response of this command would end like:
Info: JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part:
Page 21 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part:
0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06418041 (mfg: 0x020, part:
0x6418, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Page 22 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
The easiest way to determine the serial number in Linux is to use “lsusb -v” and then identify the
port and the “iSerial” property in the detailed information.
The easiest way to determine the serial number in Windows is to check the properties of the
interface in the “Windows Device Manager”. In “Details” tab select “Parent” category from the
drop-down menu. Refer to the screenshot on the next page!
If you have trouble identifying the serial number you might want to use third party USB analyzer
program.
Page 23 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
For example, if we want to use two ARM-USB-OCD-H (with serial numbers “OLWWV0SZ” and
“OLXZY1SP”) to the same computer we need to make two files “olimex-arm-usb-ocd-h1.cfg” and
“olimex-arm-usb-ocd-h2.cfg” we would need to include the following:
-olimex-arm-usb-ocd-h1.cfg-
interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H 1"
ftdi_vid_pid 0x15ba 0x002b
ftdi_serial OLWWV0SZ
-olimex-arm-usb-ocd-h2.cfg-
interface ftdi
ftdi_device_desc "Olimex OpenOCD JTAG ARM-USB-OCD-H 2"
ftdi_vid_pid 0x15ba 0x002b
ftdi_serial OLXZY1SP
Page 24 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
There is a software way to change the VID and PID and the firmware information. It doesn't require
additional hardware tools.
Remember that changing the PID (product ID) would also require to change the definitions in the
drivers and the script in OpenOCD. Changing the VID and PID requires new drivers!
To change any of the FTDI information on ARM-USB-OCD you would need a program called
MPROG which might be found here: http://www.ftdichip.com/Support/Utilities/MProg3.5.zip
MPROG works only with D2XX drivers. For Windows users: please go to “Windows Device
Manager” and uninstall and delete all drivers associated with ARM-USB-OCD (you might need to
do it multiple times; you might need to disable automatic driver update and installation) until there
are simply two unrecognized interfaces listed. Then download the FTD2XX drivers (from here:
https://www.olimex.com/Products/ARM/JTAG/_resources/driver-ftd2xx.zip), extract them
somewhere and point manually the installer to that location.
1. You need to be sure that you are using FTDI D2XX drivers (not libUSB, not WinUSB, etc).
2. Start MProg
3. Select the FT223H tab in the list in the right part of the interface
4. Under "Programming Options", near the bottom, remove the tick "Only Program Blank Devices".
5. Click "Scan and Parse". If no device shows up – you are not using D2XX drivers. Read above.
6. Click "Edit mode" - until you save the original template the program would not allow you to edit
anything
7. Edit the PID
8. Click "Program All Existing Devices".
At this point, if you are using Windows, the debugger would disappear from the list in “Windows
Device Manager”. Use Zadig or edit the inf files to make the required drivers (just replace the old
PID with the new PID).
Please note that IAR Embedded Workbench is a commercial product not available for free use.
However, there are packages with either time-limited functionality or size-limited binary code
which may be used for evaluation purposes of the described configuration.
Page 25 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Please visit:
http://www.iar.com
,and get the desired product. Installation guide should be available inside the package.
OpenOCD server needs a configuration file upon startup. The default is 'openocd.cnf' so do not get
upset if you start 'openocd-libftdi.exe' and end up with an error message. A typical solution is to
override the search for the configuration file and provide one or more configuration files with
different names. For your convenience configuration files are divided into 2 types, one to configure
the JTAG interface being used and another to configure the target processor.
Interface configuration files for the supported JTAG adapters are placed inside the directory of
OpenOCD executable. Sample target configuration scripts are located in the 'OpenOCD\tcl\target'
directory.
It is recommended to use FTDI drivers with Rowley Crossworks. However, it can work with
either LibUSB or FTDI drivers.
Crossworks supports the ARM-JTAG-SWD adapter which, as mentioned, extends the debugger's
hardware capabilities. ARM-JTAG-SWD provides a SWD interface in addition to the JTAG one
available by the default.
There is profile for ARM-USB-OCD in Crossworks – it works with both ARM-USB-OCD and
ARM-USB-OCD-H. The ready-to-use configuration also works fine for a SWD setup – a debugger
with ARM-JTAG-SWD. If you experience disconnects you might increase the “JTAG Clock
Divider” from 1 to 2 or 4.
If you want to use "Generic FTD2232" target interface you have to do as follows:
Right-click on a blank space in the targets window and select "New Target Interface > Generic
FT2232 Device". Right-click on the new target interface and select "Properties" - set the following
properties:
PID: 0×002b
VID: 0×15ba
The correct VID and PID for your device might be found in table 2 in case you missed it. The SWD
interface via ARM-JTAG-SWD might require different manual settings compared to the JTAG
ones.
Page 27 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
There is built-in support for Olimex OpenOCD tools. To make them work together install the
drivers as explained in ''3.2.2 Drivers and driver installation'' and edit the debug configuration of the
project to match the debugger. Please note that CooCox uses FTDI drivers. The LibUSB and the
WinUSB drivers will NOT work with CooCox IDE.
Click Debug - > Debug Configuration and set the settings in the following order:
Adapter: Olimex-Open OCD, Port: JTAG, Max Clock – 500K Hz, Startup – check Run to main,
Reset Mode: SYSRESETREQ; Disable the Semi-hosting since it isn't stable yet; Enable caching for
faster debugging; the host address for the GDB is local host e.g. 127.0.0.1 and the port is 2009.
The package is primarily meant to be used by people who own an Olimex OpenOCD debugger and
one of the supported Olimex boards. It might be a very helpful software package for the OpenOCD
beginners.
Page 28 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
ARM-USB-TINY
ARM-USB-TINY-H
ARM-USB-OCD
ARM-USB-OCD-H
LPC-H2294
LPC-L2294
LPC-P2378
SAM7-EX256
SAM7-MT256
SAM7-P256
STM32-E407
STM32-H103
STM32-P103
STM32-H107
STM32-P107
STM32-H407
STM32-P207
The package is not often updated and it might be a good idea to build own environment (with the
latest versions of the Open-Source tools used in Olimex ODS) once you get the idea!
Unfortunately, Olimex is unable to provide any support for the Olimex ODS (we can't give you any
custom configurations, neither makefiles, neither additional examples). Olimex ODS it is meant to
be used only as a reference in your efforts to configure own environment.
Page 29 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Q: Does your JTAG connector layout differ from the JTAG connector layout of other debuggers?
A: No. It is the standard 20-pin ARM JTAG layout.
Q: I have downloaded the latest version of OpenOCD but there is no configuration for my target.
Send me one please.
A: We commit or forward everything we have done directly to the OpenOCD repositories. If you
can't find a suitable cfg there – you are out of luck. You either have write it yourself or ask politely
somebody at the OpenOCD community to do it for you.
Q: I can't write proper makefile for my board under your Eclipse-like IDE. Can you please write it
for me?
A: No. That's the bad (good?) side of open software – it is a community effort – everybody has to
write and commit something. You learn something in the end, however.
Q: I have LPC1227 board and can't program it with your OpenOCD debugger. What do I do wrong?
A: LPC1227 lacks JTAG according to the microcontroller's datasheet. The board can be
programmed only via SWD (Serial Wire Debug) interface. Olimex OpenOCD debuggers have
JTAG by default. You would need an additional adapter – ARM-JTAG-SWD.
Q: Howdy, guys. I can't program my MSP430 and PIC16 boards with your robust debugger. I need
help ASAP.
A: Technically, it is possible to program targets different than ARM using our OpenOCD debugger.
Practically, almost all users use the debugger for ARM programming and only ARM targets are
officially supported. There is a reason that the prefix in the name of the debugger is 'ARM-'.
Page 30 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
A,
Initial release All
01.09.14
A lot of updates regarding the support of
the ARM-JTAG-SWD in OpenOCD 0.9.0
B,
Fixed the description of the power jack 13, 14, 18, 20
04.02.15
Improved the description of the
additional female-female plug cable
Added information on how to run multiple
C, debuggers in the same computers 23,24
10.04.15 Added information on how to change the 25
VID and the PID of the device
D, Improved the information about the
26, 27
15.07.15 Crossworks installation
A lot of documents, old work, examples and know-how documentation might be found at the wiki
articles of the debuggers:
https://www.olimex.com/wiki/ARM-USB-OCD-H
https://www.olimex.com/wiki/ARM-USB-OCD
https://www.olimex.com/wiki/ARM-USB-TINY-H
https://www.olimex.com/wiki/ARM-USB-TINY
Page 31 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Web addresses:
ARM-USB-OCD-H – https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD-H/
ARM-USB-OCD – https://www.olimex.com/Products/ARM/JTAG/ARM-USB-OCD/
ARM-USB-TINY-H – https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY-H/
ARM-USB-TINY – https://www.olimex.com/Products/ARM/JTAG/ARM-USB-TINY/
ARM-JTAG-20-10 – https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/
ARM-JTAG-SWD – https://www.olimex.com/Products/ARM/JTAG/ARM-JTAG-SWD/
USB-A-B-CABLE – https://www.olimex.com/Products/Components/Cables/USB-A-B-CABLE/
How to purchase?
You can purchase directly from our web shop or from any of our distributors. List of distributors:
https://www.olimex.com/Distributors.
Page 32 of 33
OLIMEX© 2015 ARM-USB-OCD user's manual
Please consider reading the paragraph below about the warranty of Olimex products.
During development work it is not unlikely that you can burn your programmer
or development board. This is normal, we also do development work and we have
damaged A LOT of programmers and boards during our daily job so we know how it
works. If our board/programmer has worked fine then stopped, please check if
you didn't apply over voltage by mistake, or shorted something in your target
board where the programmer was connected etc. Sometimes boards might get
damaged by ESD shock voltage or if you spill coffee on them during your work
when they are powered.
Please note that warranty do not cover problems caused by improper use,
shorts, over-voltages, ESD shock etc.
If the board has warranty label it should be not broken. Broken labels void
the warranty, same applies for boards modified by the customer, for instance
soldering additional components or removing components – such boards will be
not be a subject of our warranty.
When we receive the board we will check and if the problem is caused due to
our fault and we will repair/replace the faulty hardware free of charge,
otherwise we can quote price of the repair.
Note that all shipping back and forth have to be covered by the customer.
Before you ship anything back you need to ask for RMA. When you ship back
please attach to it your shipping address, phone, e-mail, RMA# and brief
description of the problem. All boards should be sent back in antistatic
package and well packed to prevent damages during the transport.
Page 33 of 33