Flashing the IFLAT-32 with OpenOCD

Content

The IFLAT-32 is a STM32 development board from iteadstudio. It comes with an STM32F103 ARM Cortex M3 processor, and guess what, Windows support. Since I do not run a copy of Windows, and since I never will, this article describes how to flash the board by using the X-Link JTAG board from the same vendor with Linux.

Regarding this post at iteadstudio.com, the X-Link uses the FT2232 interface (an FTDI chip), and has vendor ID 0x0403 and Product ID 0x6010. One could easily verify this by plugging the X-Link to the USB port, and check for the FT2232 device with “lsusb”. This will show you the vendor and product ID the device uses.

1. Insatalling OpenOCD

When using Ubuntu 11.10, you can install the latest version (0.5.0) of OpenOCD through apt:

apt-get install openocd

If you are not on Ubuntu, or your have an older version, you can download and compile OpenOCD yourself (make sure to have “libftdi” and “libusb” development versions installed). In the directory with the extracted sources do the following:

./configure --enable-ft2232_libftdi
make
sudo make install

2. Check if OpenOCD is Working

OpenOCD (at least 0.5.0) could be used out of the box with X-Link and the IFLAT32. No configuration is needed since for interface we are going to use the “openocd-usb” script provided with the package (it is already configured to uses the above mentioned vendor-/product-ID), and for the board we use the provided “olimex_stm32_h103″ script. To check if everything works, connect the X-Link to the IFLAT32 (make sure, to select 3.3V on the X-Links voltage switch), plug the X-Link to your USB-port, and do NOT power the IFLAT with external power or through its USB port. It will get power supply through the X-Link. Now launch openocd: