On 08/04/2010 12:45 AM, Fredrik Hederstierna wrote: > 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? > Because if I change variable declaration in "main.cfg" to explicit set > global namespace, it works!? Yeah, I've noticed that too. Intuitively, you would expect vars in the main config file to automatically be global, but apparently the contents of main is just another procedure, so declare all vars used elsewhere as global. This is true even for procedures defined within the main config file; i.e., when you invoke that procedure from the command line after OpenOCD has started, a var will be undefined if it was not declared as global in the main body, even though it's the same file.
On the subject of Jim-Tcl and its shortcomings... the 'binary' procedure is not implemented, so there's no way to write a text string into memory. Wanted to write a kernel command line to memory in my boot_linux procedure. Mike _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development