On 29 July 2011 11:45, Jie Zhang <[email protected]> wrote:
> Hi,
>
> OpenOCD uses script command to execute config file passed through "-f"
> option. script command is defined as a function
>
> proc script {filename} {
>        source [find $filename]
> }
>
> Thus when executing the config file, global variables defined in that
> config file is not global any more. If I define a global variable
>
> set foo 1
>
> in target config file, then trying to read its value by
>
> obj = Jim_GetGlobalVariableStr (interp, "foo", 0);
> Jim_GetLong(interp, obj, &foo);
>

use global, eg.
global foo
set foo 1

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

Reply via email to