diff options
author | Spencer Oliver <spen@spen-soft.co.uk> | 2012-04-27 10:41:45 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2012-04-30 13:06:29 +0000 |
commit | 8002ed268d5936fbf024b09b60eecae00d058bc4 (patch) | |
tree | e0ac47725e08478e04836e01fa4402dbbfe2b624 | |
parent | ff6c3dd13cf6d2cd25e55638ded3b1683958d752 (diff) |
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 <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/597
Tested-by: jenkins
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
-rw-r--r-- | tcl/target/stm32f0x_stlink.cfg | 14 | ||||
-rw-r--r-- | tcl/target/stm32f1x_stlink.cfg | 14 | ||||
-rw-r--r-- | tcl/target/stm32f2x_stlink.cfg | 14 | ||||
-rw-r--r-- | tcl/target/stm32f4x_stlink.cfg | 14 | ||||
-rw-r--r-- | tcl/target/stm32lx_stlink.cfg | 14 |
5 files changed, 55 insertions, 15 deletions
diff --git a/tcl/target/stm32f0x_stlink.cfg b/tcl/target/stm32f0x_stlink.cfg index 56da7ca6..0c5c0109 100644 --- a/tcl/target/stm32f0x_stlink.cfg +++ b/tcl/target/stm32f0x_stlink.cfg @@ -2,9 +2,17 @@ # STM32f0x stlink pseudo target # -set CHIPNAME stm32f0x -set CPUTAPID 0x0BB11477 -set WORKAREASIZE 0x400 +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32f0x +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x0bb11477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x400 +} source [find target/stm32_stlink.cfg] diff --git a/tcl/target/stm32f1x_stlink.cfg b/tcl/target/stm32f1x_stlink.cfg index 67dfb7bc..9faaf6a0 100644 --- a/tcl/target/stm32f1x_stlink.cfg +++ b/tcl/target/stm32f1x_stlink.cfg @@ -2,9 +2,17 @@ # STM32f1x stlink pseudo target # -set CHIPNAME stm32f1x -set CPUTAPID 0x1ba01477 -set WORKAREASIZE 0x4000 +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32f1x +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x1ba01477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x4000 +} source [find target/stm32_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] diff --git a/tcl/target/stm32f4x_stlink.cfg b/tcl/target/stm32f4x_stlink.cfg index ec5fb9e4..2308c51c 100644 --- a/tcl/target/stm32f4x_stlink.cfg +++ b/tcl/target/stm32f4x_stlink.cfg @@ -2,9 +2,17 @@ # STM32f4x stlink pseudo target # -set CHIPNAME stm32f4x -set CPUTAPID 0x2ba01477 -set WORKAREASIZE 0x10000 +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32f4x +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x2ba01477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x10000 +} source [find target/stm32_stlink.cfg] diff --git a/tcl/target/stm32lx_stlink.cfg b/tcl/target/stm32lx_stlink.cfg index e28818f3..f9211d23 100644 --- a/tcl/target/stm32lx_stlink.cfg +++ b/tcl/target/stm32lx_stlink.cfg @@ -2,9 +2,17 @@ # STM32lx stlink pseudo target # -set CHIPNAME stm32lx -set CPUTAPID 0x2ba01477 -set WORKAREASIZE 0x3800 +if { [info exists CHIPNAME] == 0 } { + set CHIPNAME stm32lx +} + +if { [info exists CPUTAPID] == 0 } { + set CPUTAPID 0x2ba01477 +} + +if { [info exists WORKAREASIZE] == 0 } { + set WORKAREASIZE 0x3800 +} source [find target/stm32_stlink.cfg] |