Hi all,

In startup.tcl, ocd_process_reset_inner() there are loops invoking events for
all targets. Like this one:

set targets [target names]
foreach t $targets {
        $t invoke-event reset-assert-pre
}

I need to create an event routine which is aware of a currently processed target. The easiest but awkward solution is to declare an iteration variable as global.
My second idea was to include a target name to the event:

$_TARGETNAME configure -event reset-assert-pre "my_event_procedure $_TARGETNAME"

proc my_event_procedure { t } {
...

Do you know a more elegant solution?

Thanks
    Tom

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to