Problem with "flash" command (OpenOCD 0.6.0)

Hi,

I have OpenOCD 0.6.0 built under cygwin on Windows 7 machine. I am having issues with flash command complaining that it needs more arguments.

Here is what I get in telnet window:

Open On-Chip Debugger

halt

poll

background polling: on

TAP: stm32.cpu (enabled)

target state: halted

target halted due to undefined, current mode: Thread

xPSR: 00000000 pc: 00000000 msp: 00000000

flash probe 0

flash probe 0: command requires more arguments

in procedure ‘flash’

flash protect 0 0 63 off

flash protect 0 0 63 off: command requires more arguments

in procedure ‘flash’

exit

When I just type flash command alone:

flash

flash

flash bank bank_id driver_name base_address size_bytes chip_width_bytes

bus_width_bytes target [driver_options …]

flash banks

flash init

flash list

gdb_flash_program (‘enable’|‘disable’)

mflash mflash bank soc_type base_addr pin_id target

mflash init nand flash : command requires more arguments

in procedure ‘flash’

It appears that it does not see/have correct options (probe, write_image, etc…) compiled in.

Any help is appreciated.

Thanks

It looks as if you have the wrong config file, or a scrambled or corrupted config file, or something.There should be some flash config lines in your target file, e.g. stm32f1x.cfg:

# flash size will be probed
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME

When I comment out those two lines I see your symptoms.

(This under 32-bit Linux.)

Thanks! That was it.

I still have flash write issues like this:

flash write_image blink.elf

no flash bank found for address 0

no flash bank found for address 1cc

wrote 0 bytes from file blink.elf in 0.000000s (nan KiB/s)

But I think it is due to issues with the linker file. Probably does not map it right.

Thanks again.