diff options
Diffstat (limited to 'chip/lm4/openocd/lm4x_cmds.tcl')
-rw-r--r-- | chip/lm4/openocd/lm4x_cmds.tcl | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/chip/lm4/openocd/lm4x_cmds.tcl b/chip/lm4/openocd/lm4x_cmds.tcl index 9a3630552d..3f1c93e29a 100644 --- a/chip/lm4/openocd/lm4x_cmds.tcl +++ b/chip/lm4/openocd/lm4x_cmds.tcl @@ -7,14 +7,10 @@ # Program internal flash proc flash_lm4 {path offset size} { - set firstsect [expr {$offset / 1024}]; - set lastsect [expr {($offset + $size) / 1024 - 1}]; - reset init; - flash erase_sector internal $firstsect $lastsect; - # Note erase_sector silently fails sometimes; see crosbug.com/p/8632 - # Dump a few words as a diagnostic for whether erase succeeded - mdw 0 16 - flash write_image $path $offset; + #set firstsect [expr {$offset / 1024}]; + #set lastsect [expr {($offset + $size) / 1024 - 1}]; + reset halt; + flash write_image erase $path $offset; reset } |