tcl: add SPDX tag
[fw/openocd] / tcl / test / selftest.cfg
1 # SPDX-License-Identifier: GPL-2.0-or-later
2
3 add_help_text selftest "run selftest using working ram <tmpfile> <address> <size>"
4
5 proc selftest {tmpfile address size} {
6
7    for {set i 0} {$i < $size } {set i [expr {$i+4}]} {
8        mww [expr {$address+$i}] $i
9    }
10
11    for {set i 0} {$i < 10 } {set i [expr {$i+1}]} {
12     echo "Test iteration $i"
13     dump_image $tmpfile $address $size
14         verify_image $tmpfile $address bin
15         load_image $tmpfile $address bin
16    }
17
18 }