michal smulski wrote:
I have a couple questions about tcl:
1. How do you make variables defined as global (see c100regs.tcl &
c100helper.tcl) visible in procedures? I would like to reuse defines in
c100regs.tcl. Otherwise, I need to define them every time I want to use
them. I tried 'global' but it does not work.

Take a look at: ${openocd}/tcl/chip/atmel/at91/aic.tcl - there are numerous examples. You basically need to say "GLOBAL" everywhere... even at the "level0" (global) scope area.

2. How to I transfer register (say cpsr or r0) to a tcl variable
(similar to memory -> tcl in mmw())?
Not done yet :-( - that needs to be added to OpenOCD's version of TCL.

If you are interested in doing this work, I can help point to the path through the code.

3. I can't add comments wth # at the same line as the tcl command. This
is not a big deal but it would be nice to have.
This is a parsing problem with the way this version of  Tcl works.
Understand that "JimTCL" is a very stripped down and self contained Tcl implementation.
Thanks,
Michal
------------------------------------------------------------------------

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to