On Wed, Aug 4, 2010 at 9:45 AM, Fredrik Hederstierna
<fredrik.hederstie...@securitas-direct.com> wrote:
> Hi
>
> We've tried to break out several generic parts of our openOCD scripts into
> different script files.
> We then encounter some issues to access global variables.
>
> Example
>
> File main.cfg:
> --------------
>

Isn't the line below missing?

# define as a global variable
global FLASH_CONFIG_SIZE

> set FLASH_CONFIG_SIZE 1


> Then openOCD gives error back that "FLASH_CONFIG_SIZE" is not in global
> scope.
> It seems like main script file is not running in global scope?

I haven't read up on tcl enough, but I believe that the main script is
"just another
proc" and that any variables not defined as global are local.

My usage of tcl is very simple, so I don't know these things offhand...



-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to