Øyvind Harboe a écrit :
>> 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.

Which is a good thing.

> 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 second that: a prefix should not be required. Rather, the semantics of 
the flash commands should adapt to the presence or absence of the 
prefix... and the number of configured devices. If there is only one 
device configured, the prefix should not matter at all. If there are 
several devices, then non-prefixed commands should only use addresses, 
while prefixed commands would be able to use addresses *or* sectors.

> 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 think they do because in >90-98% of all cases :) the choice and use of 
a FLASH device is governed by the device sector architecture, e.g. using 
a specific sector for environment and specific others for code, etc. 
People who want to twiddle with the flash thus tend to think in terms of 
sectors.

Amicalement,
-- 
Albert.
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to