Olimex Driver

  
Jtag

This tutorial shows how to use the inexpensive Olimex ARM-USB-OCD-H adapter to debug ESP8266 firmware using VisualGDB and Visual Studio. Before you begin, install VisualGDB 5.0 or later.

Update: our latest ESP8266 toolchain includes an improved OpenOCD port for ESP8266 that is more stable than the xt-ocd tool described here. Please follow this tutorial for detailed instructions on using it.

The availability of different images may vary, most of the time because of driver restriction. Sometimes we provide only testing images. FTDI provide drivers and instructions at their web site, download them and use our ARM-USB-TINY-H PID: 0x002a, VID: 0x15BA to install the drivers. I have LPC1227 board and can't program it with your OpenOCD debugger. Olimex ARM-USB-TINY-H¶. Low-cost and high-speed ARM/ESP32 USB JTAG. Official reference can be found here.

  1. Setup your JTAG connection as described in the basic ESP8266 tutorial, however leave the reset pin unconnected:If you connect the reset pin, the ESP8266 GDB stub will not be able to recognize the core correctly and the debugging won’t work. In order to work around this bug, the reset should be left unconnected and the device should be reset manually (e.g. by plugging it out and back in) before each debugging session.
  2. Start Visual Studio and launch the VisualGDB Embedded Project Wizard:
  3. Uncheck the “bin” checkbox to avoid generating an extra .bin file (ESP8266 debugging plugin will generate a set of .bin files automatically):
  4. Select the ESP8266 toolchain and the device from the list:
  5. In order to keep things simple while testing the JTAG functionality we will use the basic LEDBlink sample that does not involve any WiFi functionality:
  6. On the last page of the wizard select the FT2232-based interface and pick the olimex-tiny-h layout:
  7. The Xtensa OCD Daemon does not support the ARM-USB-OCD-H programmer, however it supports a similar olimex-tiny-h programmer, that has identical hardware, but a different ID. We will now show how to change the ID of the ARM-USB-OCD-H programmer to make it compatible with the Xtensa OCD Daemon. Download and launch USBDriverTool, connect your Olimex programmer and install the FTDI CDM driver for both interfaces:
  8. Ensure that the driver is installed successfully for both interface 00 and 01:
  9. Download, install and launch FT_Prog. Then select “Scan and Parse” to populate the device list:
  10. We will now use FT_Prog to change the product ID of the Olimex USB-OCD-H device. Ensure that the vendor ID is set to 15BA and set the product ID to 002A:
  11. Click the “Program Devices” button:
  12. Finally press the “Program” button to apply the changes:
  13. Once the programming is complete, reconnect the device. As the ID has been changed, the drivers won’t be installed anymore:
  14. Install the FTDI CDM driver for both interfaces and use the FT_Prog tool to find the serial number of the device:
  15. Go back to VisualGDB Embedded Project Wizard and enter the serial number observed in FT_Prog. Also lower the speed to 3MHz:
  16. Press “Finish” to generate the project. Build it with Ctrl-Shift-B:
  17. Now you can start debugging by pressing F5. Observe how VisualGDB programs the SPI FLASH:
  18. Now you can try setting breakpoints in your code. If the debugging does not work, observe the xt-ocd output for information about the encountered problems. Note that the “Error opening probe … trying with ‘A’ suffix” message is normal:
  19. If you have connected the serial port on the ESP8266 device to the serial port of the Olimex ARM-USB-OCD-H like described in this tutorial, you need to install the USB serial port driver in order to view the output from the COM port. Locate the serial port in Device Manager:
  20. Check device properties to find the serial port corresponding to interface 01 (it will have &MI_01 at the end of the last hardware ID):
  21. Start updating the drivers for that COM port and select “Let me pick a list of device drivers”:
  22. Click “Have disk” and specify the FTDI CDM driver directory under the directory where you have extracted USBDriverTool:
  23. Select the USB Serial Port driver from the list:
  24. Finally go to VisualGDB Project Properties and enable the Raw Terminal on the newly installed COM port. Ensure you specify the correct baud rate:
  25. Once the Raw Terminal is enabled, you will see the output from the COM port inside Visual Studio once you start debugging. See this tutorial for an example of reading the output from the COM port.
Joined: Wed. Mar 9, 2005
License
Posted by Buriedcode: Wed. Jun 10, 2020 - 09:30 PM
Total votes: 0

Hi,

I posted this on the olimex forums, and was told I might get more joy here. It's a rather specific problem, so I'll try to include as much info as possible.

Essentially, I cannot program the EEPROM of an Atmeg8535, using my Olimex AVR ISP MKII programmer, and avrdude. I'm actually using the GUI AVRDUDESS but this just builds command lines, so I tried doing it manually, same problem.

Olimex Driver

It programs the flash and fuses just fine, but fails with the EEPROM.

Olimex Usb Driver

- It's avrdude v6.3. I have also tried, v6.1, v5.11, v5.11.1, v5.10 but none of these detected the programmer, and avrdude just timed out.

- Running windows 10.

- Device manager shows the programmer under 'Atmel USB Devices'. Driver provider: libusb-win32. Driver date: 27/01/2016. Driver version: 1.2.6.0

- Programmer works flawlessly with Atmel Studio 6.2 built in 'tools'. I can program/read/verify both the flash and EEPROM every time, and set the fuses (also used this to check if avrdude had actually written to the EEPROM, it hadn't).

This is a good thing as I can use that as backup, and only wanted to get avrdude working with it so I didn't have to install Atmel Studio 6.2 in future when I have to upgrade legacy projects.

I can use it to program/read/verify the flash, and fuses just fine. When trying to program the eeprom, the output is as follows:

OlimexOpenocd

I've obviously blanked out paths and filename.

I erased the chip using Atmel studio, used avrdude to program the flash, and attempt (and fail) to program the EEPROM. Then used Atmel studio to verify flash (correct) but the EEPROM fails to verify, so it seem it doesn't even program the EEPROM at all.

Olimex Mk2 Driver

The actual command to program the EEPROM is:

Olimex Arm-usb-ocd-h Driver

As I said, the programmer works fine with Atmel studio, I just wanted to see if I could use avrdude as a backup. I've searched the forum, and noticed many had issues with getting the write versions to be compatible, and driver problems, but the only problem I've had is this. Any ideas?