aboutsummaryrefslogtreecommitdiff
path: root/fpga.wiki
blob: 96b64c9216e487069e2e627fa10af9b3200d42d3 (plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Information om åtmomst av Lysators FPGA från ARM-sidan.

/lib/firmware fpga.dtbo

{{{sh
dtc -O dtb -o fpga.dtbo -b 0 -@ fpga.dts
}}}

{{{sh
mount -t configfs configfs /config
# /sys/kernel/config

mkdir /config/device-tree/overlays/test
echo fpga.dtbo > /config/device-tree/overlays/test/path

echo 1 > /sys/class/leds/fpga_led2/brightness
}}}

Demonstration/SoC_FPGA/DE10_Stardard_GHRD/fpga.dts

=== Send file ===
{{{sh
#!/bin/sh

sudo -l || exit 1

tmp=$(mktemp)
echo -n "$1 " | sudo tee /dev/ttyUSB0
base64 "$1" > $tmp
cat $tmp | wc -c | sudo tee /dev/ttyUSB0
cat $tmp |sudo tee /dev/ttyUSB0
md5sum "$1"
}}}

=== Recv file ===
{{{sh
#!/bin/sh
IFS=' ' filename bytes 
dd bs=1 count=$bytes | base64 --decode > $filename
md5sum $filename
}}}