On Tue, Nov 10, 2009 at 6:32 PM, Freddie Chopin <freddie_cho...@op.pl> wrote: > Øyvind Harboe pisze: >> >> You mean that "reset_config" should ignore any previous invocations >> of "reset_config", right? > > Exactly, moreover - if that's not out of sense for particular case - other > commands could follow: jtag_speed, jtag_khz (this two already do), > jtag_xxx_delay, work areas, flash banks, etc. This way in the target config > files there would be a safe-default, and if someone wishes he/she can > override that setting with anything else, not touching the target config > file. > >> It's such a marginal benefit(IMHO) and it precludes target files >> being useful standalone. I think *preventing* target config files >> from being used standalone is the wrong way to go. Sometimes >> all that is needed is a generic target config and it's not necessary >> to configure the specific flash or DRAM, etc. on the board. > > That's exactly what I think - standalone config files are GREAT! Don't kill > them with trivial problems like "this is not target specific".
I tried to win over David, but have failed so far. My main worry is that reset_config is too clever, whereas David wants to have a mechanism to communicate config settings from target to board script. How about the following: reset_config without args returns the current settings and reset_config only sets the configuration according to the arguments passed in. so the target would define: reset_config xxx yy zz dd => this is the target's default/minimum requirements the board would use the default settings(if it wants to): eval "reset_config [reset_config] jtag_gates_clk" => add gating of jtag clock option as the board somehow requires that. Ignore the ugly tcl syntax, if you can. If my tcl braincells were active, I could probably come up with something prettier. The idea is that reset_config will never use the previous settings unless those previous settings are explicitly refed into the reset_config as arguments... This way it's possible to look at a reset_config line in a board script and have some clue about what the configuration will be set to afterwards + target config scripts could be useful standalone. -- Øyvind Harboe 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