Re: [Openocd-development] [Fwd: tcl questions.]

2009-09-01 Thread Duane Ellis
michal smulski wrote: > When I run this code: > > set CONFIG_SYS_HZ_CLOCK16500 > global CONFIG_SYS_HZ_CLOCK > > proc showAmbaPLL {} { > global CONFIG_SYS_HZ_CLOCK > puts [format "CONFIG_SYS_HZ_CLOCK %d" $CONFIG_SYS_HZ_CLOCK] > } > > I get this message: > Runtime error,

Re: [Openocd-development] [Fwd: tcl questions.]

2009-08-31 Thread michal smulski
When I run this code: set CONFIG_SYS_HZ_CLOCK16500 global CONFIG_SYS_HZ_CLOCK proc showAmbaPLL {} { global CONFIG_SYS_HZ_CLOCK puts [format "CONFIG_SYS_HZ_CLOCK %d" $CONFIG_SYS_HZ_CLOCK] } I get this message: Runtime error, file "t.tcl", line 198: can't read "

Re: [Openocd-development] [Fwd: tcl questions.]

2009-08-31 Thread Duane Ellis
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

[Openocd-development] [Fwd: tcl questions.]

2009-08-30 Thread michal smulski
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. 2. H