aboutsummaryrefslogtreecommitdiff
path: root/tcl
diff options
context:
space:
mode:
authorGeorge Harris <george@luminairecoffee.com>2012-08-16 17:53:32 -0700
committerFreddie Chopin <freddie.chopin@gmail.com>2012-09-26 16:17:42 +0000
commit516719b6b8ac35c14396f9a0cbdc355be4e45c10 (patch)
tree0d814e03920fe7f1253af49728561ea794f908f6 /tcl
parent15e19011eae841ca4688f1a6053a4d76419bf10e (diff)
downloadriscv-openocd-516719b6b8ac35c14396f9a0cbdc355be4e45c10.zip
riscv-openocd-516719b6b8ac35c14396f9a0cbdc355be4e45c10.tar.gz
riscv-openocd-516719b6b8ac35c14396f9a0cbdc355be4e45c10.tar.bz2
Added SPIFI flash driver, algorithms, and docs
Added a flash driver designed to allow program/erase of memory-mapped SPI flash chips for LPC43xx/LPC18xx family micros. This driver includes three algorithms - erase, write, and SPIFI peripheral initialization (to allow memory-mapped access after a reset). The driver has been added to the flash driver table (drivers.c), and the OpenOCD documentation has been updated to include the flash driver configuration command. Change-Id: I79f4ff8f1f07de4e5f2fe4f8c23aeb903f868514 Signed-off-by: George Harris <george@luminairecoffee.com> Reviewed-on: http://openocd.zylin.com/783 Tested-by: jenkins Reviewed-by: Aurelien Jacobs <aurel@gnuage.org> Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
Diffstat (limited to 'tcl')
-rw-r--r--tcl/board/lpc4350_spifi_generic.cfg18
1 files changed, 18 insertions, 0 deletions
diff --git a/tcl/board/lpc4350_spifi_generic.cfg b/tcl/board/lpc4350_spifi_generic.cfg
new file mode 100644
index 0000000..a529c19
--- /dev/null
+++ b/tcl/board/lpc4350_spifi_generic.cfg
@@ -0,0 +1,18 @@
+#
+# Generic LPC4350 board w/ SPIFI flash.
+# This config file is intended as an example of how to
+# use the lpcspifi flash driver, but it should be functional
+# for most LPC4350 boards utilizing SPIFI flash.
+
+set CHIPNAME lpc4350
+
+source [find target/lpc4350.cfg]
+
+#A large working area greatly reduces flash write times
+set _WORKAREASIZE 0x2000
+
+$_CHIPNAME.m4 configure -work-area-phys 0x10000000 -work-area-size $_WORKAREASIZE
+
+#Configure the flash bank; 0x14000000 is the base address for
+#lpc43xx/lpc18xx family micros.
+flash bank SPIFI_FLASH lpcspifi 0x14000000 0 0 0 $_CHIPNAME.m4