SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By rgl
#163338
Hi @all,

i'm using a linux box with one programmer (olimex-arm-usb-ocd) to program different targets (currently LM3S2948 or STM32F205).
As of today i manually start openocd (0.7.0) with the corresponding target file on the linux box and after that automatically copy the file to be programmed from my development machine to the linux box and program it via the telnet interface.

I would like to start openocd automatically and tell it which processor i'm currently using during runtime. Is there any way to do this?

Thanks and best regards,
Ralf
By motopic
#163371
I am not a OpenOCD expert, but from reading the manual, you want to wrap OpenOCD with another tool like perl, python, ruby, tcl, etc. Tcl support is built into OpenOCD. I'd use Lua cause I think Lua is great. Use java even. Or an IDE like jEdit can be programmed to run tools.
OpenOCD doesn't have a interactive configuration mode, just commandline params and config files.

Because OpenOCD reads its configs when it starts. Its not really a start me up app, then load a config, repeat.

But you can emulate this with a script. Use the script to manage your configs and setup, then manage the starting and stopping of OpenOCD via the wrapper.

Be sure and share your work, it sounds like such a good opensource project I bet theres one out there already.
By rgl
#163468
I think i will try to use different telnet/gdb ports and xinetd to start openocd with the corresponding config files.
I keep you posted.

Best regards,
Ralf