add 'flash list', rewrite 'flash banks'

Rename the existing 'flash banks' implementation as 'flash list', and
replace the broken 'flash_banks' TCL wrapper with a new command handler.

Adds documentation for the new 'flash list' command in the user guide.
This commit is contained in:
Zachary T Welch
2009-12-06 21:30:21 -08:00
parent 2bc4dee7e6
commit 30a6e683b8
3 changed files with 37 additions and 23 deletions

View File

@@ -1,16 +1,2 @@
# Defines basic Tcl procs for OpenOCD flash module
# Show flash in human readable form
# This is an example of a human readable form of a low level fn
proc flash_banks {} {
set i 0
set result ""
foreach {a} [ocd_flash banks] {
if {$i > 0} {
set result "$result\n"
}
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)]
set i [expr $i+1]
}
return $result
}