From: Paul F. <fer...@gm...> - 2015-02-23 07:18:56
|
Hi, On Mon, Feb 23, 2015 at 06:18:50AM +0100, Markus Korber wrote: > I'm not even sure if the emulator soft reset is executed correctly. How can I > check this? What else could I try? To check you can pass -d3 to openocd or use "debug_level 3" command. Then see if the target tap is enabled by using "targets" command. If it's not enabled, run "jtag tapenable am335x.dap". Then to reset run "am335x.cpu arp_reset assert 0; am335x.cpu arp_reset deassert 0" or something similar. A deeper investigation pending. Please try this patch (apply manually, it's a bit garbled): diff --git a/src/target/register.c b/src/target/register.c index 42b3b8b..5b24f9c 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -75,6 +75,9 @@ struct reg_cache **register_get_last_cache_p(struct reg_cache **first) /** Marks the contents of the register cache as invalid (and clean). */ void register_cache_invalidate(struct reg_cache *cache) { + if (!cache) + return; + struct reg *reg = cache->reg_list; for (unsigned n = cache->num_regs; n != 0; n--, reg++) { diff --git a/src/target/target.c b/src/target/target.c index 9f12704..d408c56 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -4764,10 +4764,6 @@ static int jim_target_reset(Jim_Interp *interp, int argc, Jim_Obj *const *argv) struct target *target = Jim_CmdPrivData(goi.interp); if (!target->tap->enabled) return jim_target_tap_disabled(interp); - if (!(target_was_examined(target))) { - LOG_ERROR("Target not examined yet"); - return ERROR_TARGET_NOT_EXAMINED; - } if (!target->type->assert_reset || !target->type->deassert_reset) { Jim_SetResultFormatted(interp, "No target-specific reset for %s", > What does "Target not examined yet" mean? Examination is basically a procedure to configure the target CPU and OpenOCD to work in debug mode. -- Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software! mailto:fer...@gm... |