On 03/02/11 17:33, Mathias K. wrote:
Hello,
i think it's better to fix ahbap_debugport_init. I have the same wrong
default AP on cortex_r4.
/* Default MEM-AP setup.
*
* REVISIT AP #0 may be an inappropriate default for this.
* Should we probe, or take a hint from the caller?
* Presumably we can ignore the possibility of multiple APs.
*/
dap->apsel = !0;
dap_ap_select(dap, 0);
Hi Mathias,
I think these are different issues... this default is fine for A9.
At a high level, I think it makes sense for functions to be explicit
about selecting an AP... I don't see any advantage to a "default".
More specifically, my patch solves two bugs:
* cortex_a9_init_debug_access(): this can be called at any time by the
user (through "dbginit"), so the correct AP needs to be selected
explicitly. It also gets called after reset -- if it's a warm reset,
then ahbap_debugport_init() won't get called, so the wrong AP could
be selected.
* cortex_a9_step(): again, after warm reset, the wrong AP might be
selected. This also unifies _halt(), _resume(), etc. in terms of AP
behaviour.
Cheers,
-- Aaron
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development