Werner's Miscellanea
Sign in or create your account | Project List | Help
Werner's Miscellanea Commit Details
Date: | 2011-10-14 11:09:13 (12 years 1 month ago) |
---|---|
Author: | Werner Almesberger |
Commit: | e0f8fc0a0675ddbee18830821af00f49741cd026 |
Message: | m1rc3/norruption/2/dumplock: dump NOR locks (untested) |
Files: |
m1rc3/norruption/2/dumplock (1 diff) |
Change Details
m1rc3/norruption/2/dumplock | ||
---|---|---|
1 | #!/bin/sh | |
2 | ||
3 | blocks=55 | |
4 | offset=2 # 0 for manufacturer ID (0x89) | |
5 | ||
6 | ||
7 | hex() | |
8 | { | |
9 | ( echo obase=16; echo $1; ) | bc -q | |
10 | } | |
11 | ||
12 | ||
13 | ( | |
14 | cat <<EOF | |
15 | cable milkymist | |
16 | detect | |
17 | instruction CFG_OUT 000100 BYPASS | |
18 | instruction CFG_IN 000101 BYPASS | |
19 | pld load fjmem.bit | |
20 | initbus fjmem opcode=000010 | |
21 | frequency 6000000 | |
22 | detectflash 0 | |
23 | poke 0 0x90 | |
24 | EOF | |
25 | a=$offset | |
26 | i=0 | |
27 | while [ $i -le $blocks ]; do | |
28 | echo peek 0x`hex $a` | |
29 | a=`expr $a + 128 \* 1024` | |
30 | i=`expr $i + 1` | |
31 | done | |
32 | echo poke 0 0xff | |
33 | ) | jtag -q |
Branches:
master