Re: [Openocd-development] Methods on targets

2009-11-12 Thread Duane Ellis
Øyvind Harboe wrote: > Here is an idea: > > make mdw/mww family of commands a method on the > target. > > foo.cpu mdw => returns array > Those exist now (mdw, mdb, mdh) and are intended to display to a human, nicely formated as hex data An array version also exists. The foo.cpu mem2array - T

Re: [Openocd-development] Methods on targets

2009-11-11 Thread Øyvind Harboe
On Thu, Nov 12, 2009 at 12:14 AM, David Brownell wrote: > On Wednesday 11 November 2009, Řyvind Harboe wrote: >> > And what happened to that more standard Tcl model I mentioned a >> > while back ... a series of interpreters, with the current target >> > object at the front of the series, and more

Re: [Openocd-development] Methods on targets

2009-11-11 Thread David Brownell
On Wednesday 11 November 2009, Zach Welch wrote: > > > On the other hand ... for big things, it's best to avoid > > turning fuzzy ideas into C.  There's a risk of tha fuzziness > > getting committed, and then getting hard to remove. > > Ah, but with git, it can be committed!  Refrain from pushing

Re: [Openocd-development] Methods on targets

2009-11-11 Thread David Brownell
On Wednesday 11 November 2009, Øyvind Harboe wrote: > > And what happened to that more standard Tcl model I mentioned a > > while back ... a series of interpreters, with the current target > > object at the front of the series, and more global stuff back at > > the end? > > I don't understand this

Re: [Openocd-development] Methods on targets

2009-11-11 Thread Øyvind Harboe
On Wed, Nov 11, 2009 at 11:26 PM, David Brownell wrote: > On Wednesday 11 November 2009, Zach Welch wrote: >> Please restate this in the form of a problem that needs solving. >> You have stated a solution.  What was the original problem? >> Are there other possible solutions?  How does this solve

Re: [Openocd-development] Methods on targets

2009-11-11 Thread Zach Welch
On Wed, 2009-11-11 at 15:26 -0700, David Brownell wrote: > On Wednesday 11 November 2009, Zach Welch wrote: > > Please restate this in the form of a problem that needs solving. > > You have stated a solution. What was the original problem? > > Are there other possible solutions? How does this sol

Re: [Openocd-development] Methods on targets

2009-11-11 Thread David Brownell
On Wednesday 11 November 2009, Zach Welch wrote: > Please restate this in the form of a problem that needs solving. > You have stated a solution.  What was the original problem? > Are there other possible solutions?  How does this solve it better than > other alternatives? And what happened to tha

Re: [Openocd-development] Methods on targets

2009-11-11 Thread Øyvind Harboe
On Wed, Nov 11, 2009 at 11:00 PM, Zach Welch wrote: > On Wed, 2009-11-11 at 21:49 +0100, Øyvind Harboe wrote: >> Here is an idea: >> >> make mdw/mww family of commands a method on the >> target. >> >> foo.cpu mdw => returns array >> >> write a small mdw proc in Tcl that invokes the above method >>

Re: [Openocd-development] Methods on targets

2009-11-11 Thread Zach Welch
On Wed, 2009-11-11 at 21:49 +0100, Øyvind Harboe wrote: > Here is an idea: > > make mdw/mww family of commands a method on the > target. > > foo.cpu mdw => returns array > > write a small mdw proc in Tcl that invokes the above method > on the currently active target. > > Consider the mrc/mcr ca

[Openocd-development] Methods on targets

2009-11-11 Thread Øyvind Harboe
Here is an idea: make mdw/mww family of commands a method on the target. foo.cpu mdw => returns array write a small mdw proc in Tcl that invokes the above method on the currently active target. Consider the mrc/mcr case. If we treat it in the same way, then we're in "c land" when we're trying t