diff options
author | Andreas Färber <afaerber@suse.de> | 2016-04-17 19:26:30 +0200 |
---|---|---|
committer | Freddie Chopin <freddie.chopin@gmail.com> | 2016-05-05 07:50:59 +0100 |
commit | 44d2c7b416fe3efe57a168dd58690b4e8d4effe0 (patch) | |
tree | 61ea685f9339df5c9a16e179959dead59ad553ba /tcl | |
parent | edf2cdc80babc2b475fd6e3079ece72d6449f2de (diff) | |
download | riscv-openocd-44d2c7b416fe3efe57a168dd58690b4e8d4effe0.zip riscv-openocd-44d2c7b416fe3efe57a168dd58690b4e8d4effe0.tar.gz riscv-openocd-44d2c7b416fe3efe57a168dd58690b4e8d4effe0.tar.bz2 |
flash/nor: Add Infineon XMC1000 flash driver
The XMC1000 family uses a very different flash interface from XMC4000.
Tested on XMC 2Go and XMC1100 Boot Kit.
Change-Id: I3edaed420ef1c0fb89fdf221022c8b04163d41b3
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3418
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Tested-by: jenkins
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/board/xmc-2go.cfg | 1 | ||||
-rw-r--r-- | tcl/board/xmc1100-boot-kit.cfg | 1 | ||||
-rw-r--r-- | tcl/target/xmc1xxx.cfg | 13 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tcl/board/xmc-2go.cfg b/tcl/board/xmc-2go.cfg index 6644263..90dbf43 100644 --- a/tcl/board/xmc-2go.cfg +++ b/tcl/board/xmc-2go.cfg @@ -9,6 +9,7 @@ source [find interface/jlink.cfg] transport select swd set CHIPNAME xmc1100 +set WORKAREASIZE 0x4000 source [find target/xmc1xxx.cfg] reset_config srst_only srst_nogate diff --git a/tcl/board/xmc1100-boot-kit.cfg b/tcl/board/xmc1100-boot-kit.cfg index 4c83fd3..5e7c607 100644 --- a/tcl/board/xmc1100-boot-kit.cfg +++ b/tcl/board/xmc1100-boot-kit.cfg @@ -9,6 +9,7 @@ source [find interface/jlink.cfg] transport select swd set CHIPNAME xmc1100 +set WORKAREASIZE 0x4000 source [find target/xmc1xxx.cfg] reset_config srst_only srst_nogate diff --git a/tcl/target/xmc1xxx.cfg b/tcl/target/xmc1xxx.cfg index 0a0e47e..d3123c4 100644 --- a/tcl/target/xmc1xxx.cfg +++ b/tcl/target/xmc1xxx.cfg @@ -24,4 +24,17 @@ swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPU_SWD_TAPID set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME cortex_m -endian little -chain-position $_TARGETNAME +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x4000 +} + +$_TARGETNAME configure -work-area-phys 0x20000000 \ + -work-area-size $_WORKAREASIZE \ + -work-area-backup 0 + +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME xmc1xxx 0x10000000 0 0 0 $_TARGETNAME + adapter_khz 1000 |