I have uploaded a series of patches for review: http://openocd.zylin.com/694

This code should be applicable also for arm966e core,
but I have no hardware to test changes so I don't touch it.

If anyone interested, I have a tcl module to ease access to CP15 registers
from scripts/console.

Regards,
Alex.

2012/6/4 Alexander Osipenko <[email protected]>

>
> 2012/6/3 Øyvind Harboe <[email protected]>
>
>> On Sun, Jun 3, 2012 at 6:27 PM, Alexander Osipenko <[email protected]>wrote:
>>
>>> Hello again,
>>>
>>> I'm still trying to return a value from "arm946e cp15" command to the
>>> calling script.
>>>
>>> I was not able to identify code patterns of return values 
>>> ​​fromCOMMAND_HANDLER()
>>> to the script engine.
>>>
>>
>> You're correct. COMMAND_HANDLER() just prints out various information and
>> you can detect success/failure from Tcl.
>>
>> Tcl commands have a well defined return value in addition to the
>> success/failure exception state.
>>
>
> Thank you for clarification.
>
>
>>
>>
>>
>>>
>>>
>>> I guess to change the behavior of existing command, the other way
>>> is to add new "arm946e_cp15" for example, command.
>>> Which will be preferrable?
>>>
>>
>> I guess we'll need both kinds of commands in some cases, but I think it
>> makes sense to switch some to tcl only.
>>
> For display purposes a wrapper command might be implemented with more
> descriptive output.
> It would be nice such wrappers to be defined inside "arm946e" command
> chain.
>
> Is there a way to define a procedure in the specific command chain ?
>
>
>>
>> Perhaps you can try the "mcr/mrc" commands? Does that work for your
>> architecture?
>>
>
> mcr/mrc is reported as not implemented for arm946e.
> I will try to look inside.
>
>
> One more problem (I'm almost sure it's a bug really) - the incorrect
> setting of
> cmd_ctx->current_target when processing
> $_TARGETNAME.cpu arm946e cp15 ...
>
> It is quite clear in my configuration with two 946 cores, chained together.
>
> I noticed that the 'command' $_TARGETNAME.cpu is executed without
> affecting the the  "current_target" field.
> I have previously described the problem -
> http://thread.gmane.org/gmane.comp.debugging.openocd.devel/20860
> and now I see, that neither command sets the "target" field correctly.
>
> This leads to very unclear code in my reset and init processing with
> excessive usage of "targets" command.
>
> I would be very grateful for any discussion and suggestions.
>
>
>> --
>> Øyvind Harboe - Can Zylin Consulting help on your project?
>> US toll free 1-866-980-3434
>> http://www.zylin.com/
>>
>>
> Regards,
> Alex.
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to