]> git.sur5r.net Git - openocd/commitdiff
selftest wip
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 14 May 2009 10:52:41 +0000 (10:52 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Thu, 14 May 2009 10:52:41 +0000 (10:52 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1783 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/test/selftest.cfg [new file with mode: 0644]

diff --git a/src/target/test/selftest.cfg b/src/target/test/selftest.cfg
new file mode 100644 (file)
index 0000000..d1a00ae
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+add_help_text selftest "run selftest using working ram <tmpfile> <address> <size>"\r
+\r
+proc selftest {tmpfile address size} {\r
+\r
+   for {set i 0} {$i < $size } {set i [expr $i+4]} {\r
+       mww [expr $address+$i] $i\r
+   }\r
+\r
+   for {set i 0} {$i < 10 } {set i [expr $i+1]} {\r
+    puts "Test iteration $i"\r
+    dump_image $tmpfile $address $size\r
+       verify_image $tmpfile $address bin\r
+       load_image $tmpfile $address bin\r
+   }\r
+\r
+}
\ No newline at end of file