On Thursday 22 October 2009, Øyvind Harboe wrote:
> I'm thinking about adding these two fn's to target->type. It would
> provide a polymorphic interface on top of which we can implement
> general mrc/mcr commands.
> 
> Do we need anything but cp15? If not, then cpnum could be
> omitted.

I'd include cpnum ... and wrap the params in a struct :)



>       /* Read coprocessor - arm specific. Default implementation returns 
> error. */
>       int (*mrc)(struct target_s *target, int cpnum, uint32_t op1, uint32_t
> op2, uint32_t CRn, uint32_t CRm, uint32_t *value);
> 
>       /* Write coprocessor. Default implementation returns error.  */
>       int (*mrc)(struct target_s *target, int cpnum, uint32_t op1, uint32_t
> op2, uint32_t CRn, uint32_t CRm, uint32_t value);

These would be methods in the armv4_5 struct yes?  The thing
that should be core-ARM-for-everything-except-Cortex-M?


> Regarding command syntax, since we're omitting the register
> to/from argument we're not 100% compatible with the machine code
> syntax anyway.

It should be a conceptual "Tcl register" ... :)

 
> For the mrc(read) operation, I was thinking about having the register
> read returned as a Tcl result, so one could do:
> 
> set result [mrc x y ...]
> 
> 
> I want the commands to be tcl friendly, on top of which we can implement
> tcl wrappers for humans.

Why need a wrapper?  If you return the value, it'll be printed...
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to