On 04.11.2017 22:40, Andreas Fritiofson wrote:
On Sat, Nov 4, 2017 at 10:13 PM, Tomas Vanek
<[email protected] <mailto:[email protected]>>
wrote:
On 04.11.2017 21:53, Andreas Fritiofson wrote:
Why isn't the corresponding target always passed to the Tcl event
handler (in target_handle_event)? Seems like a handler would
always need that if it's doing more than echoing something.
Odd... How does the current handlers work if there's more than
one target? I.e. those that simply do mww etc. in the handler. Is
the "current target" somehow always pointing to the relevant
target when the handler is executing? If yes, well you could use
that, if not then all stock handlers are broken.
No, my tests show the current target is unchanged during event
handling. Lot of target handlers work with current target
regardless of the target they was invoked from.
So that means they are broken? How would fixing it using my suggestion
above sound? Passing the target name to the handlers, always, and
rewriting all handlers to use $t mww and so on.
I would not call them broken. Just limited to one target. And on
multicores it may work when using common registers.
Passing the target would break all event definitions - including these
in private user configs.
At least there are some invoking target aware definitions:
tcl/target/imx6.cfg:$_TARGETNAME configure -event reset-assert-post
"imx6_dbginit $_TARGETNAME"
tcl/target/omap4460.cfg:$_TARGETNAME configure -event reset-assert
"$_TARGETNAME mww phys $PRM_RSTCTRL 0x1"
tcl/target/altera_fpgasoc.cfg:$_TARGETNAME1 configure -event
reset-assert-post "cycv_dbginit $_TARGETNAME1"
tcl/target/altera_fpgasoc.cfg:#$_TARGETNAME2 configure -event
reset-assert-post "cycv_dbginit $_TARGETNAME2"
tcl/target/imx51.cfg:$_TARGETNAME configure -event reset-assert-post
"imx51_dbginit $_TARGETNAME"
tcl/target/imx53.cfg:$_TARGETNAME configure -event reset-assert-post
"imx53_dbginit $_TARGETNAME"
tcl/target/omap3530.cfg:$_TARGETNAME configure -event reset-assert
"$_TARGETNAME mww $PRM_RSTCTRL 2"
tcl/target/omap3530.cfg:$_TARGETNAME configure -event reset-assert-post
"omap3_dbginit $_TARGETNAME"
tcl/target/armada370.cfg:$_TARGETNAME configure -event reset-assert-post
"armada370_dbginit $_TARGETNAME"
tcl/target/omap4430.cfg:$_TARGETNAME configure -event reset-assert
"$_TARGETNAME mww phys $PRM_RSTCTRL 0x1"
tcl/board/lubbock.cfg:$_TARGETNAME configure -event reset-init
"lubbock_init $_TARGETNAME"
(11 of total 235)
Probably the way to go...
------------------------------------------------------------------------------
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