Skip to content

Commit

Permalink
Kevin Bortis <[email protected]> fix worksize
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.berlios.de/openocd/trunk@2419 b42882b7-edfa-0310-969c-e2dbd0fdcd60
  • Loading branch information
oharboe committed Jun 29, 2009
1 parent 3d95512 commit f8cc725
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tcl/board/olimex_stm32_h103.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]

10 changes: 9 additions & 1 deletion tcl/target/stm32.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f8cc725

Please sign in to comment.