SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By xyz100

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 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.

By hsutherl
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:
Code: Select all
# flash size will be probed
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.)
By xyz100
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.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]