I’d like to include something like this in my config script:

set challenge [riscv authdata_read]
riscv authdata_write [expr $challenge + 1]

Where riscv authdata_read is a command defined in my through a
command_registration struct. I can’t see how I can return the value so that
set sees it, though. Is there an example command I can look at that already
does this? Is it even possible?

Based on
https://github.com/msteveb/jimtcl/blob/master/examples.api/jim_return.c I
tried calling Jim_SetResultInt() in my handler. The value gets set, but
doesn’t seem to be used AFAICT.

If I can’t return a value, can I set a tcl variable somehow in my handler?

Thank you,
Tim
​
------------------------------------------------------------------------------
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
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to