diff options
author | Roman D <me@iamroman.org> | 2013-01-10 12:31:45 +0400 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-01-14 10:25:55 +0000 |
commit | 7ae9154846f6e268c4fbc0c237c1b2c6301da2ce (patch) | |
tree | c583cd91c12028e761fd4d390e50f3b0881c3735 /tcl | |
parent | 76afadeb7b4e428c1543b4f5218aa253bdd85e40 (diff) | |
download | riscv-openocd-7ae9154846f6e268c4fbc0c237c1b2c6301da2ce.zip riscv-openocd-7ae9154846f6e268c4fbc0c237c1b2c6301da2ce.tar.gz riscv-openocd-7ae9154846f6e268c4fbc0c237c1b2c6301da2ce.tar.bz2 |
flash: EFM32 flash implementation
Limited (no page unprotect, no block writes) implementation of EFM32
flash support. Verified with EFM32 development kit and STLink V2 adapter
using SWD.
Change-Id: I3db2054d9aa628a1fe4814430425db3c9959c71c
Signed-off-by: Roman D <me@iamroman.org>
Reviewed-on: http://openocd.zylin.com/1106
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'tcl')
-rw-r--r-- | tcl/target/efm32_stlink.cfg | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tcl/target/efm32_stlink.cfg b/tcl/target/efm32_stlink.cfg new file mode 100644 index 0000000..9ef4845 --- /dev/null +++ b/tcl/target/efm32_stlink.cfg @@ -0,0 +1,38 @@ +# +# efm32 stlink pseudo target +# + +if { [info exists CHIPNAME] } { + set _CHIPNAME $CHIPNAME +} else { + set _CHIPNAME efm32 +} + +# Work-area is a space in RAM used for flash programming +# By default use 16kB +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x4000 +} + +if { [info exists CPUTAPID] } { + set _CPUTAPID $CPUTAPID +} else { + set _CPUTAPID 0x2ba01477 +} + +# EFM32 MCUs only support SW interface +set _TRANSPORT hla_swd + +transport select $_TRANSPORT + +hla newtap $_CHIPNAME cpu -expected-id $_CPUTAPID + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME hla_target -chain-position $_TARGETNAME + +$_TARGETNAME configure -work-area-phys 0x10000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 + +set _FLASHNAME $_CHIPNAME.flash +flash bank $_FLASHNAME efm32 0 0 0 0 $_TARGETNAME |