mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-11-23 17:51:53 +02:00
29 lines
387 B
Bash
Executable File
29 lines
387 B
Bash
Executable File
#!/bin/sh
|
|
|
|
a=${1:-0x10}
|
|
d=${2:-0}
|
|
|
|
|
|
jtag -q <<EOF
|
|
cable milkymist
|
|
detect
|
|
instruction CFG_OUT 000100 BYPASS
|
|
instruction CFG_IN 000101 BYPASS
|
|
pld load fjmem.bit
|
|
initbus fjmem opcode=000010
|
|
frequency 6000000
|
|
detectflash 0
|
|
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
|