Jason Gallicchio wrote: [lots of comments about tcl ish things]

First, remember this:  OpenOCD uses JIM TCL - which is not "Main Stream 
Tcl/Tk".
JimTCL can be embedded in a "rom" target - something main stream Tcl/TK 
cannot do.
This 'embedded feature' is some what helpful for some users of OpenOCD.

Jason> Are you doing some special pre-processing before passing it to 
TCL so that openocd-specific commands don't need the semicolon (to 
maintain backward compatibility?)

There are some odd things happening, if JimTCL does not recognize a 
command - an "unknown" function is called - which then tries to execute 
the old commands using the "openocd" rules.

As you can see this has created a nasty "two headed monster" which is at 
times - problematic.

jason> There seems to be a mishmash of conventions:
jason> set i 8;   # This works
jason> set i 8    # Does not work
jason> poll;   # This works
jason> poll   # This also works

Yea, because "set" is a TCL command, and "poll" is a OpenOCD command 
that still exists in the old way of doing things.
Today - we gave a monster with two heads.

jason> Multiple line if and while statements don't work like they do in 
tclsh. 

First remember: Repeating the above -  Jim/TCL - is not MainStream TCL ...

Second: While I don't see a fix anytime soon - I do think the current 
action is a *BUG* - it should have given some type of syntax error. In 
many ways, a human typed command is thought to be "completely self 
contained on the single line".

One day - perhaps all the old OpenOCD commands will become JIM ... and 
JIM will handle raw user input - and then multi-line typed commands will 
work.

You can however, put your functions in a "foo.tcl" and "source foo.tcl" 
instead.


-Duane.

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to