]> git.sur5r.net Git - openocd/blob - src/flash/startup.tcl
allow 'flash_banks' command to give GDB output
[openocd] / src / flash / startup.tcl
1 # Defines basic Tcl procs for OpenOCD flash module
2
3 # Show flash in human readable form
4 # This is an example of a human readable form of a low level fn
5 proc flash_banks {} {
6         set i 0
7         set result ""
8         foreach {a} [ocd_flash banks] {
9                 if {$i > 0} {
10                         set result "$result\n"
11                 }
12                 set result [format "$result#%d: %s at 0x%08x, size 0x%08x, buswidth %d, chipwidth %d" $i $a(name) $a(base) $a(size) $a(bus_width) $a(chip_width)]
13                 set i [expr $i+1]
14         }
15         return $result
16 }