diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-29 22:08:34 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-29 22:08:34 +0000 |
commit | f8cc725e0ea36803095a74d921f73b36e2e6112b (patch) | |
tree | 3c9328d9a5102a6ca0212957635392c28c1413e6 /tcl | |
parent | 3d9551241b9b9c68206e393af2b74607240c1563 (diff) | |
download | openocd_libswd-f8cc725e0ea36803095a74d921f73b36e2e6112b.tar.gz openocd_libswd-f8cc725e0ea36803095a74d921f73b36e2e6112b.tar.bz2 openocd_libswd-f8cc725e0ea36803095a74d921f73b36e2e6112b.tar.xz openocd_libswd-f8cc725e0ea36803095a74d921f73b36e2e6112b.zip |
Kevin Bortis <stm32@bortis.ch> fix worksize
git-svn-id: svn://svn.berlios.de/openocd/trunk@2419 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/board/olimex_stm32_h103.cfg | 3 | ||||
-rw-r--r-- | tcl/target/stm32.cfg | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tcl/board/olimex_stm32_h103.cfg b/tcl/board/olimex_stm32_h103.cfg index fadf1755..de1fa8bf 100644 --- a/tcl/board/olimex_stm32_h103.cfg +++ b/tcl/board/olimex_stm32_h103.cfg @@ -4,5 +4,8 @@ # http://olimex.com/dev/stm32-h103.html # +#Set flash size to 128k for STM32103RB device +set WORKAREASIZE 0x20000 + source [find target/stm32.cfg] diff --git a/tcl/target/stm32.cfg b/tcl/target/stm32.cfg index 2fe17850..61ae562f 100644 --- a/tcl/target/stm32.cfg +++ b/tcl/target/stm32.cfg @@ -12,6 +12,14 @@ if { [info exists ENDIAN] } { set _ENDIAN little } +#Checking if user had set the work-area-size for the chip +#If not, the value will be set to 16k +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x4000 +} + # jtag speed jtag_khz 500 @@ -50,7 +58,7 @@ jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1 -expected-id $_BS set _TARGETNAME [format "%s.cpu" $_CHIPNAME] target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME -$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0 +$_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 flash bank stm32x 0 0 0 0 0 |