fel-gpio 520 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

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>'
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
	diff -U0 pio.old pio.new
	mv -f pio.new pio.old
done