michal smulski wrote:
> When I run this code:
>
> set CONFIG_SYS_HZ_CLOCK 165000000
> 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 "CONFIG_SYS_HZ_CLOCK": no such variable
> in procedure 'showAmbaPLL' called at file "command.c", line 473
>
>
> What am I doing wrong?
>
Not sure, it works for me as follows (below are cut & paste directly
from my cygwin terminal)
==== my openocd.cfg =====
[NOTE: I am not configuring taps, or anything]
du...@desk ~/ocd/bare
$ cat openocd.cfg
source [find interface/olimex-jtag-tiny.cfg]
telnet_port 4444
gdb_port 3333
==== my simple 't.tcl' =========
du...@desk ~/ocd/bare
$ cat t.tcl
set CONFIG_SYS_HZ_CLOCK 16500000
global CONFIG_SYS_HZ_CLOCK
proc duane {} {
global CONFIG_SYS_HZ_CLOCK
puts [format "The value is %d" $CONFIG_SYS_HZ_CLOCK]
}
du...@desk ~/ocd/bare
$
====== telnet session=======
Open On-Chip Debugger
> source t.tcl
>
> info globals CONFIG_SYS_HZ_CLOCK
CONFIG_SYS_HZ_CLOCK
> info globals
CONFIG_SYS_HZ_CLOCK ocd_cpu_list ocd_helptext jim_libpath ocd_HOSTOS
jim_interac
tive
>
> duane
The value is 16500000
> exit
Connection to host lost.
du...@desk ~
$
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development