Unable to flash write

Every time I run the command “flash write_image main.hex” I always get the same error

flash write_image main.hex: command requires more arguments

I thought that is all what is required. Am I missing something?

Strange, the filename is the only required argument for write_image.

What version of openocd are you using?

Cheers

Spen