mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-12-19 07:06:16 +02:00
34 lines
463 B
Plaintext
34 lines
463 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
blocks=55
|
||
|
offset=2 # 0 for manufacturer ID (0x89)
|
||
|
|
||
|
|
||
|
hex()
|
||
|
{
|
||
|
( echo obase=16; echo $1; ) | bc -q
|
||
|
}
|
||
|
|
||
|
|
||
|
(
|
||
|
cat <<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
|
||
|
poke 0 0x90
|
||
|
EOF
|
||
|
a=$offset
|
||
|
i=0
|
||
|
while [ $i -le $blocks ]; do
|
||
|
echo peek 0x`hex $a`
|
||
|
a=`expr $a + 128 \* 1024`
|
||
|
i=`expr $i + 1`
|
||
|
done
|
||
|
echo poke 0 0xff
|
||
|
) | jtag -q
|