Using Eclipse with Olimex Arm-usb-tiny JTAG+OpenOCD+lpc2148

Hello to all.

First of all I apologize for my bad English, because this isn’ t my first language.

I bought a evalution board for the development of lpc2148 microntroller by www.embeddedartist.com

Only now I don’t know how flashing the flash.

I use a Olimex jtag of (arm-usb-tiny).

Could you kindly tell me how it works and how to configure openocd to work?

I am still a beginner.

I thank you in advance.

Hi,

this board is already functionnal with openocd.

Once you have configured and installed openocd as it is described in the openocd user manual, you will only have to launch openocd with thr right configuration files for your board.

Inside your openocd directory, you will find an interface directory, a target and a board directory. These config files should be correct for your card.

Good luck !!

Jerome

You can try going through the Tutorial by Jim Lynch with Yagarto setup.

http://www.atmel.com/dyn/resources/prod … source.zip

The install disk that comes with the usb-tiny comes with openocd. It says it’s just install and everything is setup, but that wasn’t the case for me. My manual setup worked properly, I just had to copy the usb-tiny cfg file over from the Olimex install directory, and use the script files from there as well.

How I can flashing the flash of the lpc2148?

With the OpenOCD? How I can do???

I have installed the driver of the jtag provided by the cd-rom of Olimex jtag.

I open Eclipse and open a sample project called lpch_2148 (

I think that it’s for my lpc2148 board )

I build the project and i do "Run/External Tools/OpenOCDTiny (I have the Olimex arm-usb-tiny jtag).

Click to it, I show this:

Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): jtag_speed: 2, 2
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
Error:   ft2232.c:1419 ft2232_init_ftd2xx(): unable to open ftdi device: 2
Error:   ft2232.c:1434 ft2232_init_ftd2xx(): ListDevices: 2

Error:   ft2232.c:1436 ft2232_init_ftd2xx(): 0: Olimex OpenOCD JTAG TINY B
Error:   ft2232.c:1436 ft2232_init_ftd2xx(): 1: @Û/

I have tried to use a external tools to flash my board as “HJTAG” but I receive this error:

Can't open the H-JTAG USB DRIVER Hardware. Please check the connection
```.

How can I fix this problem?

Please help me!

OpenOCD will not recognize just the ARM-USB-TINY if there is no powered target. In order to connect, the ARM-USB-TINY needs to be plugged into the target board, and the target board needs to be powered.

If you’ve already tried that, then I have no idea, as I’m new at this as well.

The target is powered and the JTAG connect, but it don’t work…

Someone knows how can I do?

echelon90:
The target is powered and the JTAG connect, but it don’t work…

Someone knows how can I do?

Only change teh next line in your configuration file:

ft2232_device_desc “Olimex OpenOCD JTAG TINY A”

to

ft2232_device_desc “Olimex OpenOCD JTAG TINY B”

Hello everybody, i have the next problem with my target :cry:

Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported

$URL: http://svn.berlios.de/svnroot/repos/ope … /openocd.c $

Info: options.c:50 configuration_output_handler(): jtag_speed: 100, 100

Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported

Error: ft2232.c:236 ft2232_read(): couldn’t read the requested number of bytes from FT2232 device (0 < 81)

Error: ft2232.c:423 ft2232_send_and_recv(): couldn’t read from FT2232

somebody help me with this?

I’m using Eclipse and the olimex lpc-p2148

Hi,

I encountered the same problem as follows:

Error: ft2232.c:235 ft2232_read(): couldn’t read the requested number of bytes from FT2232 device (0 < 81)

Error: ft2232.c:379 ft2232_send_and_recv(): couldn’t read from FT2232

Has any one got the solution before? Thanks.

Hi there,

i’ve already changed the line

ft2232_device_desc “Olimex OpenOCD JTAG A” to ft2232_device_desc “Olimex OpenOCD JTAG B”

and I’ve the Logomatic powered by an usb connector (just power, data cables are disconnected)

now :

Have you found a solution for this problem?
Error: ft2232.c:235 ft2232_read(): couldn't read the requested number of bytes from FT2232 device (0 < 81)
Error: ft2232.c:379 ft2232_send_and_recv(): couldn't read from FT2232

When I start debugging I get first

Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported
$URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Info:    options.c:50 configuration_output_handler(): jtag_speed: 50, 50
Info:    options.c:50 configuration_output_handler(): Open On-Chip Debugger 1.0 (2008-10-04-10:00) svn:exported

then, after a few seconds, may be ten I get the following

Error: ft2232.c:235 ft2232_read(): couldn't read the requested number of bytes from FT2232 device (0 < 81)
Error: ft2232.c:379 ft2232_send_and_recv(): couldn't read from FT2232

I attached my configuration (HW-, SW-, JTAG-Configuration-circuit, armusbocd.cfg-file)

thanks for your help

grz

my configuration:

Windows 7(Olimex-GCCFD-20081015, ) - ARM-USB-OCD - LogomaticV2(LPC2148)

ARM-USB-OCD Configuration: 5V

Logomatic Power Supply by USB: 3.3V (5V Tolerant)

***Debugger

GDB Debugger

C:\gccfd\codesourcery-arm-2008q1\bin\arm-none-eabi-gdb.exe

GDB command file

.gdbinit (empty file)

__***JTAG circuit diagram:__
                                                         ^ 3V3
                                                         |
                                                         |-----------
                                                         |.-------. |
                                                         --1     2|-|
                                                          |       |
   /TRST---------------------------------------------------3      |
                                                          |       |
   TDI 60--------------------------------------------------5      |
                                                          |       |
   TMS 52--------------------------------------------------7      |
                                                          |       |
   TCK 56--------------------------o-----------------------9      |
                                   |                      |       |
   RTCK 24-----------o-------------)-----------------------11     |
                     |             |                      |       |
   TDO 64------------)-------------)----------------------|13     |
                     |             |                      |       |
   RST---------------)-------------)-----------------------15     |
                     |             |                      |       |
                     |             |                    |--17     |
                     |             |                    | |       |
                     o JMP         |       |------------o--19     |
                     o             |       |              '-------'
                     |             |       |           JTAG Connector
                    .-.           .-.     .|.
                    | |           | |     | |
                    | |3k3        | |27k  | |27k
                    '-'           '-'     '-'
                     |             |       |
                     ----------------------
                     |
                    ===
                    GND                                               |
                                                                     .-.
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

***armusbocd.cfg file

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG B"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
#jtag_speed 2
jtag_speed 50

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst separate
jtag_nsrst_delay 100
jtag_ntrst_delay 100 

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe
ft2232_latency 10

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

#target_script 0 reset oocd_flash2138.script
working_area 0 0x40000000 0x40000 nobackup

#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 0 lpc2000_v2 12000 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Opeen+On-Chip+Debugger

Hello grz,

I am at about the same stage of problem as yourself. I have an Olimex ARM-USB-Tiny-H connected to a LPC2888 board.

I have set up the .cfg file and am certain I have 99% correct.

My problem is as shown below…

"Debug: 86 26 ft2232.c:2023 ft2232_init_libftdi(): ‘ft2232’ interface using libftdi with ‘olimex-jtag’ layout (15ba:002a)

Error: 87 27 ft2232.c:2042 ft2232_init_libftdi(): unable to open ftdi device: device not found

Debug: 88 27 command.c:444 run_command(): Command failed with error code -100

User : 89 27 command.c:646 openocd_jim_vfprintf(): Runtime error, file “lpc2888.cfg”, line 60: "

I know from USBviewer that my ARM-USB-Tiny-H has VID & PID of 0x15ba & 002a.

I have tried a range of device_desc strings including those discussed here.

Can you tell me eactly which FTDI drivers you are usin and where you got them from. I am running on Vista at present so I need X64 drivers that are certified and have the above VID & PID. (This is what I have installed at present.

What is your hardware/OS ?

I am about to try using a Windows 32-bit system or an XP 64-bit OS.

Any other advice?

Ernest