On 28/07/2011, at 9:52 PM, Spencer Oliver wrote:
> From: Spencer Oliver <[email protected]>
>
> Issue warning when the old cmd is used and redirect to new supported one.
> These deprecated cmds will be removed at some point.
>
> Signed-off-by: Spencer Oliver <[email protected]>
> ---
> src/flash/startup.tcl | 11 +++++++++++
> 1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/src/flash/startup.tcl b/src/flash/startup.tcl
> index 6cb7d8e..5f40e64 100644
> --- a/src/flash/startup.tcl
> +++ b/src/flash/startup.tcl
> @@ -1,2 +1,13 @@
> # Defines basic Tcl procs for OpenOCD flash module
>
> +# ease migration to updated flash driver
> +proc stm32x args {
> + echo "DEPRECATED! use 'stm32f1x $args' not 'stm32x $args'"
> + eval stm32f1x $args
> +}
> +
> +proc stm32f2xxx args {
> + echo "DEPRECATED! use 'stm32f2x $args' not 'stm32f2xxx $args'"
> + eval stm32f2x $args
> +}
I don't know what parameters may be passed to these procs, but if they could
contain
spaces, quotes or braces this could cause unexpected behaviour.
You might consider using the more correct form:
proc stm32f2xxx args {
echo "DEPRECATED! use 'stm32f2x $args' not 'stm32f2xxx $args'"
tailcall stm32f2x {*}$args
}
Cheers,
Steve
--
µWeb: Embedded Web Framework - http://uweb.workware.net.au/
WorkWare Systems Pty Ltd
W: www.workware.net.au P: +61 434 921 300
E: [email protected] F: +61 7 3391 6002
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development