This is an automated email from Gerrit.

Andreas Färber ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2862

-- gerrit

commit 2207faa6323c08cb389bf15848fec3ffef0c4203
Author: Andreas Färber <[email protected]>
Date:   Sat Jun 27 21:53:17 2015 +0200

    tcl/target: Enhance Cypress FM3 work area configuration
    
    fm3.cfg current hardcodes SRAM location and size with no way to override.
    It appears that this is the combined SRAM0 + SRAM1, which seems to grow
    symmetrically around 0x20000000.
    
    Implement this as a Tcl expression, configurable via $WORKAREASIZE.
    
    Entirely untested, found by review.
    
    Change-Id: I4650702f221c57e8686ac3a9b9bc33b9eca2ff47
    Signed-off-by: Andreas Färber <[email protected]>

diff --git a/tcl/target/fm3.cfg b/tcl/target/fm3.cfg
index e2d78d1..f7ad6d3 100644
--- a/tcl/target/fm3.cfg
+++ b/tcl/target/fm3.cfg
@@ -35,8 +35,16 @@ swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 
0xf -expected-id $_CPU
 set _TARGETNAME $_CHIPNAME.cpu
 target create $_TARGETNAME cortex_m -endian $_ENDIAN -chain-position 
$_TARGETNAME
 
-# MB9BF506 has 64kB of SRAM on its main system bus 
-$_TARGETNAME configure -work-area-phys 0x1FFF8000 -work-area-size 0x10000 
-work-area-backup 0
+# MB9BF506 has 64kB of SRAM on its main system bus
+if { [info exists WORKAREASIZE] } {
+       set _WORKAREASIZE $WORKAREASIZE
+} else {
+       set _WORKAREASIZE 0x10000
+}
+
+# SRAM0 below 0x20000000, SRAM1 above
+$_TARGETNAME configure -work-area-phys [expr 0x20000000 - $_WORKAREASIZE / 2] \
+                       -work-area-size $_WORKAREASIZE -work-area-backup 0
 
 # MB9BF506 has 512kB internal FLASH 
 

-- 

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to