Hi,
We have recently developed an OpenOCD plugin for the CodeBlocks IDE. However, irrespective of the IDE used I just wanted to pick some brains on programmatic control of OpenOCD.
At the moment, I have a settings dialog which generates an openocd.cfg file, with all the necessary options. I also add in some tcl routines for programming… e.g
progflash{} {
flash write_image erase debug/myfile.elf
}
When the debugger is clicked, or the program button is clicked, OpenOCD is launched with that script.
I establish a socket connection to the TCL machine interface (used to use the telnet one but TCl designed for machine interface?), and can send commands like ‘halt’ and ‘progflash’.
However, at the moment I have redirected OpenOCD’s output into a window in the IDE, and parse the output for ‘wrote’ to tell the IDE that OpenOCD has finished programming. Not really a nice way of doing it.
Is there a way to get status information back from the TCL machine interface, to tell me pass/fail instead of parsing the OpenOCD output.
Perhaps something like…
progflash{} {
set result [flash write_image erase debug/myfile.elf]
return $r
}
And then a read on the TCL socket should give result?
Many Thanks,
Martin.