openocd/tcl
Tomas Vanek c4d4c32a50 flash Kinetis: implement automatic bank creation based on device probe
Kinetis flash driver services huge number of MCU types. They have
one, two or four flash banks with option of FlexNVM. It would
require ~36 config files just for Kx series, more for KLx, KVx and KE1x.

The change implements alternative approach:
- configuration file creates just one pflash bank (common for all devices)
- when a device is probed, additional pflash or flexnvm banks are created
based on flash layout of the connected MCU
- created banks have names with optional numbering e.g. kx.pflash0 kx.pflash1
kx.flexnvm0 kx.flexnvm1
- the first bank gets renamed if numbering is used

Automatic bank creation is enabled by tcl command 'kinetis create_banks'.

Used solution has a drawback: other banks than pflash0 are not accessible
until pflash0 is probed. Fortunately gdb attach and standard programming
accesses banks in right sequence.

Change-Id: I5b9037cbefdb8a4176b7715fbcc3af4da4c1ab60
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-on: http://openocd.zylin.com/3925
Tested-by: jenkins
Reviewed-by: Joakim Nohlgård <joakim.nohlgard@eistec.se>
Reviewed-by: Freddie Chopin <freddie.chopin@gmail.com>
2017-06-17 12:01:45 +01:00
..
board tcl/board: Add STMicroelectronics STM32F7 Nucleo config 2017-04-24 22:46:38 +01:00
chip Fix a typo. 2013-07-07 13:00:59 +00:00
cpld tcl/cpld: add config file for Altera 5M570Z CPLD (MAXV family) 2017-05-09 21:41:46 +01:00
cpu/arm Move TCL script files -- Step 2 of 2: 2009-05-27 06:49:24 +00:00
fpga tcl/fpga: add config file for Altera 10M50 FPGA (MAX10 family) 2016-08-14 02:05:18 +01:00
interface imx_gpio: add mmap based jtag interface for IMX processors 2017-05-31 08:16:17 +01:00
target flash Kinetis: implement automatic bank creation based on device probe 2017-06-17 12:01:45 +01:00
test TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00
tools tcl/board: add Linksys WAG200G config 2016-10-17 09:16:33 +01:00
bitsbytes.tcl TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00
mem_helper.tcl tcl: add mrb command to mem_helper.tcl 2016-07-17 22:36:47 +01:00
memory.tcl target: add "phys" argument to mem2array, array2mem 2016-08-09 14:32:12 +01:00
mmr_helpers.tcl TCL scripts: replace "puts" with "echo" 2010-11-09 08:12:51 +01:00