On 02.05.2011 23:07, Peter Stuge wrote:
>> I think most of the scripts show how to work with openOCD but you
>> will need to override some functions to make them fit your needs.
> It's a huge usability deficiency. :\
I don't think so. The provided scripts work out of the box and are working.

But I sometimes have special needs that don't fit into the default use
cases, so I am uses to modify my scripts, or just override some functions.

Let me make an example:
The default debugging scenario is you have an application (a .elf file)
which you want to load to your freshly reset target and debug it. You
take the openOCD scripts and are ready to go. They reset your target,
prepare memory controllers and you just have to download and debug using
openOCD and GDB. This is the default scenario and I think it works with
most of the scripts out there. Some with more resets, some with less.
Maybe some scripts drop out of this picture, but that's another story.

In my case I usually have two special cases where
1. I just want to re-download my target and "soft-reset" the CPU by
bringing it to reset state by just modifying some registers, adjusting
PC and some other registers. The is not the default use case and very
special, so I modify the scripts. One could argue why I just don't use
"reset init" in between the sessions, but this has some chip internal
reasons that are not always visible / documented.
2. I have a hardware that is running some stuff from flash and runs a
fieldbus system that should not get disturbed while I am attaching to
the target. In this case I just don't use the board scripts, but only
the target scripts and write my own reset or omit it completely. With
this non-invasive attach I can now prepare some stuff and way for crash
/ breakpoint hit or other stuff during long term tests with sporadic
failures.

Both cases are usually not done by our customers debugging their
applications and are very special to our low-level microcontroller
developers and so I thinks this justifies needing to adjust scripts to
special needs.

I agree that the default scripts should have everything ready for the
casual user.

Regards,
Michael
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to