Hi Øyvind, Michael and others,

Øyvind Harboe wrote:
> You can choose the type of reset by the argument to reset
> 
> "reset init" *always* executes the init script
> "reset halt" *always* executes a reset halt.
> 
> What we are discussing is the case without any arguments "reset".
> I'd like it to always do a "reset init".

Well, it is really a matter of discussion and also matter of point of view, 
whether
this would be an expected behavior (expected by the user). I would say rather 
not.

Reset is reset, it literally means to reset the target, nothing more.
So if reset_mode is retired, I believe that the default behavior of reset 
command
should be as plain as pressing a button which pulls the reset line - that is, 
"reset run",
just a plain reset. If user needs to init the target, (s)he shall issue "reset 
init" command.

My belief is that commands shall be constructed so that they:
a) look logically and resemble the thing they really do
b) are convenient for the user
Fist a, then b, not otherwise.

And remember - we have Tcl now, so if anyone is not fine with typing "reset 
init",
there is always a possibility to define Tcl proc for this (or even override it 
- this shall be possible in Tcl).

In general, I agree that the default behavior of reset command (unless 
overridden by custom Tcl proc)
shall be fixed, as reset_mode adds unnecessary confusion.

Note: Other logical possibility for reset command without parameters would be 
to do either "reset run"
or "reset [run_and_]halt" depending on current state of the target - i.e. leave 
it running or halted after the reset,
this might also be an expected behavior, probably more expected than "reset 
init", IMHO.

Best regards,

   Pavel

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

Reply via email to