Help, Connecting to STR9 using a Wiggler Cable

I have. OpenOCD Rev100, Olimex Wiggler cable, simple STR912 header board.

When try to connect to the STR912, using the cfg file below, it

appears to connect just fine but when I “poll” it always say’s

running… even after halt and registers are always 0.

When I issue the reset command, I get the following error

C:\Program Files\openocd-2006re100\bin>openocd-pp -f configs/arm9v2.cfg

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-09-28 20:00 CEST)

Warning: arm966e.c:122 arm966e_assert_reset(): srst resets test logic, too

Info: server.c:67 add_connection(): accepted ‘telnet’ connection from 0

Warning: arm966e.c:134 arm966e_assert_reset(): srst resets test logic, too

Warning: jtag.c:1039 jtag_read_buffer(): value captured during scan didn’t pass

the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1039 jtag_read_buffer(): value captured during scan didn’t pass

the requested check: captured: 0x1f check_value: 0x01 check_mask: 0x01

Config File

#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface parport

parport_port 0x378

parport_cable wiggler

jtag_speed 0

#use combined on interfaces or targets that can’t set TRST/SRST separately

reset_config trst_and_srst srst_pulls_trst

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 8 0x1 0x1 0xfe

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

#target configuration

daemon_startup reset

#target

#target

target arm966e little run_and_halt 0 arm966e

target_script 0 reset h2294_init.script

run_and_halt_time 0 30

working_area 0 0x40000000 0x40000 nobackup

If you only has one device then there must only be one jtag_device entry

in the config file

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 8 0x1 0x1 0xfe

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

should probably be

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 4 0x1 0xf 0xe

This is the standard entry for a STR710 / STR711 processor.

Regards,

Magnus

Magnus,

Thank you for the reply… I think I had that to begin with

because I started with the Arm7 wiggler example file but

I tried it again and got the error below… Also I got the idea

for the multiple scan chain from a previous post.

http://www.sparkfun.com/cgi-bin/phpbb/v … light=str9

C:\Program Files\openocd-2006re100\bin>openocd-pp -f configs/arm9v2.cfg -d3

Info: openocd.c:82 main(): Open On-Chip Debugger

(2006-09-28 20:00 CEST)

Debug: arm966e.c:252 arm966e_target_command():

chain_pos: 0, variant: arm966e

Debug: jtag.c:1211 jtag_init():

Debug: parport.c:373 parport_init():

requesting privileges for parallel port 0x378…

Debug: parport.c:383 parport_init(): …privileges granted

Debug: parport.c:210 parport_reset(): trst: 0, srst: 0

Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1097 jtag_reset_callback():

Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1097 jtag_reset_callback():

Error: jtag.c:1161 jtag_validate_chain():

Error validating JTAG scan chain, IR mismatch, scan returned 0x29

Next problem is that STR712 is an ARM7TDMI processor so

the target is not:

target arm966e little run_and_halt 0 arm966e

but instead

target arm7tdmi little run_and_halt 0 arm7tdmi

Regards,

Magnus

I am actually using an ARM9, the STR912FW4xx, 120 pin version with

512K flash…

Sorry, I misread it as STR712

Magnus

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 8 0x1 0x1 0xfe

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

The above is fine. The STR9x has three TAP controllers in its JTAG scan chain.

Is this a board you’ve built yourself? Looks like there are communication errors: Warning: jtag.c:1039 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

You could try with jtag_speed 1, to reduce the TCK frequency a bit.

Regards,

Dominic

This is my confg for the str9 and a wiggler

debug options

#debug 3

daemon configuration

telnet_port 4000

gdb_port 2000

parallel interface

interface parport

parport_port 0x378

parport_cable wiggler

jtag_speed 0

use combined on interfaces or targets that can’t set TRST/SRST separately

reset_config srst_only

jtag scan chain (first device being the one closest to TDO)

format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 8 0x1 0x1 0xfe

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

target configuration

target arm966e little run_and_halt 1 arm966e

reset or attach

daemon_startup reset

run_and_halt_time 0 0

working_area <target#> <‘backup’|‘nobackup’>

working_area 0 0x50000000 16384 nobackup

flash stuff

flash bank str9x 0x00000000 0x00080000 0 0 0

then to program a device:

str9x flash_config 4 2 0 0x80000

flash protect 0 0 10 off

flash erase 0 0 2

flash write 0 lcddemo.bin 0x0

Note:

speed 0 works on the wiggler i have, but for the usb devices such as jtagekey a minimum of 1 is required.

reset_halt also works ok on this core as the jtag is not reset with a core reset

The flash programming only currently works with bank 0 as the boot bank (default), i am adding support for configuring the boot bank etc.

Hope this helps

Spen

i am trying to use gnuarm/openocd environment but having a problem with this, i hope you can help?

i am using spen’s config file, OpenOCD reports success downloading but then the board does not do anything. i have tried downloading the example program .d79 file provided by Olimex to make sure it was not some linker problem i had. i also tried building using RIDE free gnu toolchain with same problem.

i’m using Olimex STR9 eval board. the board worked before i downloaded new code to it.

i’m using Olimex ARM-USB-OCD programmer, i modified spen’s openocd file to work with that. also i had to change to ‘target … run_and_init …’ to get it to program successfully.

thanks!

OpenOCD expects a plain binary - .d79 suggests that this is some proprietary format. If you’ve recreated a binary with the GNU toolchain, the output is normally an ELF file, which you have to convert to a plain binary using “objcopy -O binary infile.elf outfile.bin”.

Regards,

Dominic

yes, i am converting the gnu-ld output with objcopy (used makefile modified from James Lynch’s ARM tutorials), and also tried using the ‘.hex’ file made by the RIDE/GNU toolchain. the ‘d79’ was from IAR example provided by Olimex. i took a look at the Hitex/gnu example also, but it seems incomplete for STR9.

perhaps it would be helpful be if someone could post a ‘known good’ simple .bin file that toggles pins on ports 2, 7, 8? my olimex board has STR912FW44X6 chip.

i have working eclipse/gnu/openocd for atmel sam7s using james lynch’s tutorial, now i’m trying to get the STR91 to work!

i can’t verify function with RIDE, because that tool does not support wiggler or arm-usb-ocd.

thanks!

perhaps it would be helpful be if someone could post a ‘known good’ simple .bin file that toggles pins on ports 2, 7, 8? my olimex board has STR912FW44X6 chip.

Did you manage to work it out? I have the same board/chip and I’m trying to program it. Although OpenOCD succesfully writes file to flash, nothing happens. So I need a valid bin file, to check what kind of problem is that. I’d be very grateful if someone could send me a simple example file.