this line will always repeat get same value, need speed up
retval = armv7a->post_debug_entry(target);
////////////////////////////////////////////////////////////////////////////////////////////////
//read cp15 control register once only for speed up
gedit /root/openocd-0.9.0/src/target/cortex_a.h
in struct cortex_a_common
after code
uint32_t didr;
add new
int first_read_cp15;
gedit /root/openocd-0.9.0/src/target/cortex_a.c
in function cortex_a_debug_entry(struct target *target)
if (armv7a->post_debug_entry)
{
retval = armv7a->post_debug_entry(target);
if (retval != ERROR_OK)
return retval;
}
//change to
if (armv7a->post_debug_entry && cortex_a->first_read_cp15)
{
cortex_a->first_read_cp15 = false;
retval = armv7a->post_debug_entry(target);
if (retval != ERROR_OK)
return retval;
}
in function cortex_a_target_create(struct target *target, Jim_Interp *interp)
after code
cortex_a->armv7a_common.is_armv7r = false;
add new
cortex_a->first_read_cp15 = true;