OpenOCD and Olimex STR-P711

I am new to OpenOCD and am trying to get it to program the above

board correctly. My setup in Windows XP + OpenOCD 2007re141. I have

loaded the giveio.sys which is loaded OK.

I am using an Olimex ARM-JTag (Wiggler compatible) on LPT1.

I have an elf file which loads and runs perfectly with EWARM,

but I would like to start using OpenOCD (and gcc as soon as

I can get OpenOCD working).

My config file is:


telnet_port 4444

gdb_port 3333

interface parport

parport_port 0x378

parport_cable wiggler

jtag_speed 0

reset_config trst_and_srst srst_pulls_trst

jtag_device 4 0x1 0xf 0xe

daemon_startup reset

target arm7tdmi little run_and_init 0 arm7tdmi

run_and_halt_time 0 30

target_script 0 reset flash.script

working_area 0 0x2000C000 0x10000 nobackup

flash bank str7x 0x40000000 0x00040000 0 0 STR71x 0

(based on Mark Thomas’ file)


flash.script is:


arm7_9 dcc_downloads enable

wait_halt

sleep 10

poll

flash probe 0

flash erase 0 0 9

flash write 0 main.elf 0x0

reset run

sleep 10

shutdown


OpenOCD reports:


Info: openocd.c:86 main(): Open On-Chip Debugger (2007-04-16 19:30 CEST)

Warning: arm7_9_common.c:685 arm7_9_assert_reset(): srst resets test logic, too

Info: target.c:227 target_init_handler(): executing reset script ‘openocd_str710_flash.script’

Info: configuration.c:50 configuration_output_handler(): dcc downloads are enabled

Info: configuration.c:50 configuration_output_handler(): waiting for target halted…

Info: configuration.c:50 configuration_output_handler(): target halted

Info: configuration.c:50 configuration_output_handler(): target state: halted

Info: configuration.c:50 configuration_output_handler(): target halted in ARM state due to debug request, current mode: Supervisor

Info: configuration.c:50 configuration_output_handler(): cpsr: 0x600000d3 pc: 0x4000062c

Info: configuration.c:50 configuration_output_handler(): flash ‘str7x’ found at 0x40000000

Info: configuration.c:50 configuration_output_handler(): erased sectors 0 through 9 on flash bank 0 in 5s 984375us

Info: configuration.c:50 configuration_output_handler(): wrote file main.elf to flash bank 0 at offset 0x00000000 in 1s 531250us

Warning: arm7_9_common.c:685 arm7_9_assert_reset(): srst resets test logic, too


Everything looks OK, but the board is now stuffed. The two LEDs

light up slightly, but the board is otherwise dead. I have been trying

for over a week to get OpenOCD to load this binary correctly and have

Googled myself silly and tried every combination of parameters I

can think of. In short: I’m stuck…

Can anyone help?

Thanks

Jeremy

just a guess, but you would probably need to program a binary image and not an elf file. use arm-elf-objcopy or maybe just be objcopy if using GCC to convert the elf to binary. if you are using a different toolchain then it may be something else.

Ben

Newer versions support elf via:

flash write 0 main.elf 0x0 elf

or if type is not given will try to autodetect.

You will have to get the latest svn version for this support though.

Regards

Spen

Thanks! I can now load the bin file! Now for gcc…