> Finally, would it be logical to create the dynamic flash banks commands > as subcommands of their relevant target? > > foo.cpu flash bank bank0 ..... # but no <target> arg anymore > foo.cpu bank0 info # presently, it's 'flash info bank0'
First of all: although I'm not able to follow all the changes to the command stuff you are working on, I generally like the result and I'm happy to let you run with it. However, significant changes to the syntax is another matter. Here I need to pay proper attention :-) I think it is important to distinguish between telnet and scripting as a user interface and tcl as a programming model. In >90-98% of all cases there is only a single flash configured. In this case the current form in telnet & scripting with just using a "flash" command without referring to a particular flash chip makes sense. However, we here "flash erase_address" and "flash write_image" are interesting. These flash commands do not operate on any flash chips or banks, but rather figure out which flash chips in the current target that a command goes to. I don't think that it is an improvement to the user experience to require a prefix to the flash command(current target or sole flash in system), even if the tcl programming model is crisper. I have seen that some users feel very strongly about erasing particular banks and sectors and writing to these sectors, rather than using addresses. I have never fully understand why they feel so strongly about going the way of banks instead of addresses, but the fact of the matter is that they do. I also think it is a goal that OpenOCD should ship with high quality board configuration scripts, where a user would not really have any exposure to what a flash or cpu would be named. The user would here happily use the higher level fn's. Perhaps a solution would be to implement high level tcl proc's that present a user friendly way to manipulate flash and to have the c level tcl interface be more clean and address the technical concerns you raised? I.e. rewrite "flash erase_address" and "flash write_image" as tcl proc's? -- Ø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