Looking at the LPC2xxx scripts there is a lot of repetition.

If we step back for a second and try to define what we want
the command line to look like, then I'm thinking something
like the below would be a reasonable syntax:

openocd -c "cpu lpc 2103 -freq 12000 -jtag 1500"

Here is how I figure this could work:

- add a new "proc cpu" to startup.tcl.
- "proc cpu" would read in "base/lpc.cfg", perhaps
lpc.cfg should be in some other directory. By
using "base/" directory instead of "target/" we
define that all the config scripts in "base/" would
conform to the conventions defined for "base/"
directory config scripts.
- we redefine init_targets to have a variable
number of arguments and pass on
the arguments after "lpc" above. Write some
neat tcl proc's to handle options parsing.

-- 
Øyvind Harboe

Can Zylin Consulting help on your project?

US toll free 1-866-980-3434 / International +47 51 87 40 27

http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to