fel-gpio 532 Bytes
Newer Older
1
#!/bin/sh -e
2
3
4
5
6
7
8
9
10
11
12
13
14
15

pio_to_sram=0x2000
sram_to_pio=0x2004

if [ -f fel-pio.bin ]; then
	./fel write 0x2000 fel-pio.bin
else
	./fel write 0x2000 bin/fel-pio.bin
fi

./fel exec $pio_to_sram
./fel read 0x3000 0x228 pio.reg
./pio -i pio.reg print > pio.old
cat pio.old | fgrep -v '<0><0><0><0>'
16

17
18
19
20
21
22
23
while read cmd; do
	./pio -i pio.reg -o pio.reg $cmd
	./fel write 0x3000 pio.reg
	./fel exe 0x2004
	./fel exe 0x2000
	./fel read 0x3000 0x228 pio.reg
	./pio -i pio.reg print > pio.new
24
	diff -U0 pio.old pio.new || true
25
26
	mv -f pio.new pio.old
done