From 8002ed268d5936fbf024b09b60eecae00d058bc4 Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Fri, 27 Apr 2012 10:41:45 +0100 Subject: cfg: allow stm32discovery parameter override This enable the user or board config to override the parameters passed to stm32_stlink.cfg. Required to fix a incorrect working area bug with the stm32vldiscovery. Change-Id: I40a4f7913ff37d577d44b1f23befccf0317080a1 Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/597 Tested-by: jenkins Reviewed-by: Freddie Chopin --- tcl/target/stm32f2x_stlink.cfg | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'tcl/target/stm32f2x_stlink.cfg') diff --git a/tcl/target/stm32f2x_stlink.cfg b/tcl/target/stm32f2x_stlink.cfg index 9c4e6fec..d46ae7c4 100644 --- a/tcl/target/stm32f2x_stlink.cfg +++ b/tcl/target/stm32f2x_stlink.cfg @@ -2,9 +2,17 @@ # STM32f2x stlink pseudo target # -set CHIPNAME stm32f2x -set CPUTAPID 0x2ba01477 -set WORKAREASIZE 0x10000 +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32f2x +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x2ba01477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x10000 +} source [find target/stm32_stlink.cfg] -- cgit v1.2.3-18-g5258