The reasons

First there is no support for interactive commands in  cortex_swjdp.c, 
and ther should not be any.  All commands use a swjdp structure for 
state information. This structure is owned by the target device 
structure, in our case the cortex_m3 target type so that is the natural 
place for the user commands. We might move them to to a shared 
[cortex_dap.c ??] file to support multiple targets and more sofisticated 
ROM Table walking later.
 
They are EXPERIMENTAL  for testing how to talk to more than one AP, I am 
quite sure they will change a lot when someone starts to do serious 
experimentation.
The command names can easily be changed to anything we like, but lets 
see if this is useful at all :)

Regards,
Magnus


Rick Altherr wrote:
>
> On Apr 14, 2009, at 12:13 PM, Magnus Lundin wrote:
>
>> Hi
>>
>> The following patch is a first step towards support for sevaral AP in 
>> one dap.
>>
>> - Adds a apsel variable, corresponding to the corresponding field in 
>> the DP SELECT register, to the swjdap structure.
>> - adds a function swjdp_apselect(swjdp_common_t *swjdp,u8 apsel) to 
>> set this variable.
>> - adds two cortex_m3 interactive commands
>>   cortex_m3 dap #n      Shows the contents of ROM/Debug base register 
>> and AP ID Register
>>   cortex_m3 apsel #n    Configures to use AP #n in subsequent memory 
>> accesses.
>>
>
> Shouldn't these be part of the cortex-swjdp rather than tied to the 
> M3?  Can we rename them to cortex_swjdap dap #n and cortex_swjdap 
> apsel #n?
>

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

Reply via email to