"Unknown command" openocd-0.2.0 [SOLVED]

Hi, I am trying to set up single makefile target to write flash memory of lpc2148 on

64bit Linux host.

I am able to connect to openocd daemon. In console when I issue commands:

> reset 
> halt
> flash write_image erase main.bin 0 bin

everything goes ok right now, but problems start when I try to issue the same commands when starting openocd daemon. The command like this:

$ openocd -f $interface -f $target -c "reset" -c "flash write_image erase main.bin 0 bin"

or

$ openocd -f $interface -f $target -f $flash_script

ends with following error:

Open On-Chip Debugger 0.2.0 (2009-07-26-00:21) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
1 kHz
RCLK - adaptive
1000 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
Runtime error, file "command.c", line 469:
    Unknown command: reset
make: *** [program] Error 1

I am using

  • openocd-0.2.0

  • ubuntu 9.04 64bit

  • gnuarm-4.3.2 build from sources

Could somebody interested help me to solve this out?

Finally I got it! There should be a ‘init’ command before any other command is issued, to wait for server to start running.

-c "init" \
-c "reset" \
...

Thanks for sharing!

This has also solved my problem of executing a proc from console.