str710 - openocd beginner trying calls to flash not work

Hi Guys,

I’ve just downloaded openocd to use with the olimex wiggler on the str710.

I’m using open openocd-2006re115-setup-rc01 on winxp sp2.

I cant seem to get it to write the flash and it doesn’t seem to want to call a target script from the cfg file, heres my cfg (i know i probably don’t need as big a delays as i’ve got in it but i wouldn’t have thought that a problem)

telnet_port 4444

gdb_port 3333

#interface

interface parport

parport_port 0x378

parport_cable wiggler

jtag_speed 0

jtag_nsrst_delay 100

jtag_ntrst_delay 100

reset_config srst_only

jtag_device 4 0x1 0xf 0xe

daemon_startup reset

target arm7tdmi little run_and_halt 0 arm7tdmi

run_and_halt_time 0 1000

working_area 0 0x2000C000 0x4000 nobackup

#flash bank <chip_width> <bus_width>

flash bank str7x 0x40000000 0x00040000 0 0 STR71x 0

wait_halt

poll

flash banks

flash info 0

flash probe 0

flash erase_check 0

flash erase 0 0 7

flash write 0 LCD.img 0

#target_script 0 reset Myscript.script

It doesn’t seem to erase the flash and program it (it says command not found) and if i uncomment my script line it doesn’t seem to run it.

Log file:

Info: configuration.c:50 configuration_output_handler(): Command wait_halt not found

Info: configuration.c:50 configuration_output_handler(): Command poll not found

Info: configuration.c:50 configuration_output_handler(): Command banks not found

Info: configuration.c:50 configuration_output_handler(): Command info not found

Info: configuration.c:50 configuration_output_handler(): Command probe not found

Info: configuration.c:50 configuration_output_handler(): Command erase_check not found

Info: configuration.c:50 configuration_output_handler(): Command erase not found

Info: configuration.c:50 configuration_output_handler(): Command write not found

Debug: jtag.c:1210 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:1096 jtag_reset_callback():

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

Debug: jtag.c:1096 jtag_reset_callback():

Debug: openocd.c:100 main(): jtag init complete

Debug: arm7_9_common.c:656 arm7_9_assert_reset(): target->state: unknown

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

Debug: jtag.c:1096 jtag_reset_callback():

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

Debug: jtag.c:1096 jtag_reset_callback():

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

Debug: jtag.c:1096 jtag_reset_callback():

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

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

Debug: arm7_9_common.c:722 arm7_9_deassert_reset(): target->state: reset

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

Debug: jtag.c:1096 jtag_reset_callback():

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

Debug: openocd.c:104 main(): target init complete

Debug: openocd.c:108 main(): flash init complete

Debug: gdb_server.c:1347 gdb_init(): gdb service for target arm7tdmi at port 3333

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

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

Debug: jtag.c:1096 jtag_reset_callback():

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:838 arm7_9_halt(): target->state: running

Debug: embeddedice.c:253 embeddedice_write_reg(): 9: 0xffffffff

Debug: embeddedice.c:253 embeddedice_write_reg(): 11: 0xffffffff

Debug: embeddedice.c:253 embeddedice_write_reg(): 12: 0x00000100

Debug: embeddedice.c:253 embeddedice_write_reg(): 13: 0x000000f7

Debug: embeddedice.c:157 embeddedice_read_reg_w_check(): 1

Debug: arm7_9_common.c:620 arm7_9_poll(): DBGACK set, dbg_state->value: 0x9

Debug: embeddedice.c:253 embeddedice_write_reg(): 0: 0x00000005

Debug: embeddedice.c:253 embeddedice_write_reg(): 12: 0x00000000

Debug: arm7_9_common.c:944 arm7_9_debug_entry(): target entered debug from ARM state

Debug: arm7_9_common.c:976 arm7_9_debug_entry(): target entered debug state in User mode

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r0: 0x00002710

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r1: 0x00001ba2

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r2: 0x00000935

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r3: 0x00002709

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r4: 0x0c908e04

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r5: 0x00508281

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r6: 0x00b3dc24

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r7: 0x90113403

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r8: 0x290c44c6

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r9: 0x00098848

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r10: 0x200001e4

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r11: 0x200001ec

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r12: 0x200001f0

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r13: 0x200001dc

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r14: 0x00000750

Debug: arm7_9_common.c:1005 arm7_9_debug_entry(): r15: 0x00000d40

Debug: arm7_9_common.c:1011 arm7_9_debug_entry(): entered debug state at PC 0xd40

Debug: target.c:442 target_call_event_callbacks(): target event 0

Any help greatfully appreciated

Regards

Giles

you need to call run_and_init, eg.

in your main config file

target arm7tdmi little run_and_init 0 arm7tdmi

target_script 0 reset Myscript.script

Regards

Spen

wonderful that worked a treat thanks