artik05x: add verify parameter into flash_write
Currently, TizenRt has no way to verify image after write the binary
image in flash memory using openocd. but sometimes, we have to verify
downloaded image file.
This commit adds verify parameter into command of 'flash_write'.
@@ -216,7 +216,7 @@ proc flash_list_partitions { } {
}
add_help_text flash_list_partitions "List partitions"
-proc flash_write { partition file } {
+proc flash_write {partition file {opt ""}} {
prepare_target
set desc [partition_desc $partition]
@@ -229,6 +229,11 @@ proc flash_write { partition file } {
flash_enable_write
load_image $file $start
flash_disable_write
+
+ if { [string compare -nocase $opt "verify"] == 0 } {
+ reset halt
+ verify_image $file $start bin
+ }
}
add_usage_text flash_write "partition file"
add_help_text flash_write "Erase the specified partition and write file to it"
