1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-15 14:10:38 +02:00

m1rc3/norruption/2/upset: take address and value from command-line; report outcome

This commit is contained in:
Werner Almesberger 2011-10-12 14:42:36 -03:00
parent 36b52a976d
commit d6e1e8be0d

View File

@ -1,4 +1,9 @@
#!/bin/sh #!/bin/sh
a=${1:-0x10}
d=${2:-0}
jtag -q <<EOF jtag -q <<EOF
cable milkymist cable milkymist
detect detect
@ -8,5 +13,16 @@ pld load fjmem.bit
initbus fjmem opcode=000010 initbus fjmem opcode=000010
frequency 6000000 frequency 6000000
detectflash 0 detectflash 0
poke 0x10 0x40 0x10 0 0 0xff peek $a
poke $a 0x40 $a $d
peek $a
poke 0 0xff
peek $a
EOF
cat 1>&2 <<EOF
values read:
- previous value
- status (0x80 = okay, 0x92 = locked)
- resulting value
EOF EOF