]> git.sur5r.net Git - openocd/commitdiff
cfg: correct pic32mx config typo's
authorSpencer Oliver <spen@spen-soft.co.uk>
Mon, 12 Mar 2012 20:11:29 +0000 (20:11 +0000)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 14 Mar 2012 20:30:45 +0000 (20:30 +0000)
Change-Id: Ibe5b6b0efefc7cfc75d789eb7e9c7ee239526ae2
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-on: http://openocd.zylin.com/508
Tested-by: jenkins
tcl/target/pic32mx.cfg

index 5e64cb84dd654fbd0b73ab0be265bd7b8b4f0672..598c905cf49e4fdde71b3f9d70e0b2ceb6217247 100644 (file)
@@ -40,7 +40,7 @@ target create $_TARGETNAME mips_m4k -endian $_ENDIAN -chain-position $_TARGETNAM
 #
 
 global _PIC32MX_DATASIZE
-global _PIC32MX_PROGSIZE
+global _WORKAREASIZE
 set _PIC32MX_DATASIZE 0x800
 set _PIC32MX_PROGSIZE [expr ($_WORKAREASIZE - $_PIC32MX_DATASIZE)]
 
@@ -52,16 +52,16 @@ $_TARGETNAME configure -event reset-init {
        #
 
        global _PIC32MX_DATASIZE
-       global _PIC32MX_PROGSIZE
+       global _WORKAREASIZE
 
        # BMXCON
        mww 0xbf882000 0x001f0040
-       # BMXDKPBA: 2k kernel data @ 0xa0000800
+       # BMXDKPBA: 2k kernel data @ 0xa0000000
        mww 0xbf882010 $_PIC32MX_DATASIZE
-       # BMXDUDBA: 16k kernel program @ 0xa0000800
-       mww 0xbf882020 $_PIC32MX_PROGSIZE
-       # BMXDUPBA: 0k user program
-       mww 0xbf882030 $_PIC32MX_PROGSIZE
+       # BMXDUDBA: 14k kernel program @ 0xa0000800 - (BMXDUDBA - BMXDKPBA)
+       mww 0xbf882020 $_WORKAREASIZE
+       # BMXDUPBA: 0k user program - (BMXDUPBA - BMXDUDBA)
+       mww 0xbf882030 $_WORKAREASIZE
 }
 
 set _FLASHNAME $_CHIPNAME.flash0