|
From: Duane E. <op...@du...> - 2008-09-08 01:16:45
|
[Oops - clicked too soon - this time with attachments]
-Duane.
------------
This is the thing Oyvind and Duane have been going back in forth for a
while about.
Attached is:
1) a small tcl script that contains "new_process_reset" - see below.
2) a patch that adds the underlying functions to openocd so that the
existing C function (target.c) target_process_reset() be written in TCL
{see #1}
Next steps:
(a) people try it - people like it.
(b) remove 'target_process_reset'
(c) merge the new 'tcl function[cleaned up of course] into 'startup.tcl'
(d) arrange for it to be invoked in stead of 'target_process_reset()'
The plan - target_process_reset() instead - invokes some new TCL function.
Right now, I need people to try it (step a) I have limited hardware to
test with.
Details follow.
-Duane.
==================================
How to test, what to use, etc.
a) checkout the latest openocd (ie: HEAD)
b) Apply attached patch. (979)
d) Build openocd in the standard way.
e) Everything should still work in the standard way.
Nothing should have changed :-(
Nothing should be broken :-)
If it is - stop now, do not continue.
Please report the problems directly to the list.
------- NEW STUFF FOLLOWS -------
f) This is where the file "new_reset.tcl" comes in.
For now, place this in your working directory (ie: same place you keep
'openocd.cfg')
Later, (step C above) this new file/function will be merged into
startup.tcl (which is compiled into openocd)
Option 1: I prefer this method (makes it easier to test)
At the GDB or TELNET prompt, type
GDB:
(gdb) mon source new_reset.tcl
TELNET prompt
> source new_reset.tcl
Option 2: This also works.
In your 'openocd.cfg' file - add the line:
source new_reset.tcl
g) Start openocd.
If needed, "source" the new file.
If you need to edit it - (modify, hack, etc) type "source FILENAME"
to load it again - and again and again - till you get it right.
h) At the PROMPT, instead of typing "reset halt" or "reset init"
Type one of these commands instead:
new_process_reset init
or new_process_reset halt
or new_process_reset run
This should - (famous last words) act identically to the 'reset' command.
Right now, the old 'reset' command still exists. No change there.
To use the new command, use "new_process_reset"
Today for testing purposes - both methods exist.
We'll rename/fix that very shortly after we do some experiments with the
different chips.
I've got only a few targets.
Others have -other targets
And you (dear reader) probably have others that I do not have.
|