You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This clones the HDMI2USB-misoc-firmware repository, adds the timvideos fpga-support PPA, installs packages required then downloads misoc and its dependencies. Depending on your connection speed this could take a while to download.
37
+
This clones the HDMI2USB-misoc-firmware repository, adds the timvideos
38
+
fpga-support PPA, installs packages required then downloads misoc and its
39
+
dependencies. Depending on your connection speed this could take a while to
40
+
download.
36
41
37
-
## Building the firmware
42
+
## Working with the firmware
38
43
39
-
1. Initalise the environment (required for any of the build/load steps below[2]):
40
-
```
41
-
cd HDMI2USB-misoc-firmware
42
-
source scripts/setup-env.sh
43
-
```
44
+
### 1) Enter the environment
44
45
45
-
2. Build the gateware:
46
-
```
47
-
make gateware
48
-
```
46
+
Before being able to run any of the build steps you must first `enter` the
47
+
development environment.
49
48
50
-
This may fail at the end after it builds the gateware (as it will try to flash the gateware), this is OK, as long as the gateware files have been built:
49
+
Before entering, you should set the type of board you want to use. This is
50
+
done by doing;
51
+
```
52
+
export BOARD=opsis
53
+
```
51
54
52
-
```
53
-
Saving bit stream in "atlys_hdmi2usb-hdmi2usbsoc-atlys.bit".
54
-
Saving bit stream in "atlys_hdmi2usb-hdmi2usbsoc-atlys.bin".
55
-
```
55
+
To do this do the following steps;
56
+
```
57
+
cd HDMI2USB-misoc-firmware
58
+
source scripts/enter-env.sh
59
+
```
56
60
57
-
The built gateware will be in build/misoc/build/.
61
+
Once you source the environment your prompt should change to look something
62
+
like;
63
+
```
64
+
(H2U BOARD=opsis) #
65
+
```
58
66
59
-
3. You've now built the HDMI2USB firmware/gateware. Ensure board has the right pins set before flashing anything, and plug it in:
67
+
FIXME: Add a `make test-env` which verifies the environment is working
68
+
(excpecially that the Xilinx stuff has a proper license stuff).
60
69
61
-
As the HDMI2USB firmware manipulates the EDID information the following jumpers must be removed;
70
+
### 2) Build the gateware
62
71
63
-
```
64
-
JP2/SDA (which connects the EDID lines from J1/HDMI IN to JA/HDMI OUT).
65
-
JP6 and JP7 (which connects the EDID lines from J3/HDMI IN to J2/HDMI OUT).
66
-
```
72
+
Once you have entered the environment, you can build things.
67
73
68
-
* Plug board in using USB PROG port & switch on. If using a VM, ensure the device is passed through.
69
-
* Other USB port is for the HDMI2USB capture. Recommend plugging this in too so you can use/test the device.
70
-
71
-
4. Flash the gateware and firmware - see [1] if using a VM:
74
+
Building the full HDMI2USB gateware takes roughly between 15 minutes and 30
75
+
minutes on a modern fast machine.
72
76
73
-
```
74
-
make load-gateware
75
-
```
76
-
(may need to run several times)
77
+
```
78
+
make gateware
79
+
```
77
80
78
-
5. Load fx2 firmware to enable USB capture:
79
-
```
80
-
make load-fx2
81
-
```
81
+
At the end of running the build command, you should end up with;
82
+
```
83
+
Creating bit map...
84
+
Saving bit stream in "opsis_hdmi2usb-hdmi2usbsoc-opsis.bit".
85
+
Saving bit stream in "opsis_hdmi2usb-hdmi2usbsoc-opsis.bin".
86
+
Bitstream generation is complete.
87
+
Firmware 56008 bytes (9528 bytes left)
88
+
```
82
89
83
-
6. Connect to lm32 softcore to send direct commands to the HDMI2USB such as changing resolution:
84
-
```
85
-
make connect-lm32
86
-
```
87
-
Set a mode/capture - type 'help' and read instructions.
90
+
The built gateware will be in build/misoc/build/.
88
91
89
-
You likely need to enable a video mode, framebuffer & encoder.
92
+
### 3) Configure your board
90
93
91
-
'status' helps to see what the firmware is doing.
94
+
Before loading onto your board, you need to ensure that your board is in the
95
+
correct state.
92
96
93
-
The following commands are an example of what is needed;
94
-
```
95
-
encoder on
96
-
encoder quality 85
97
-
video_matrix connect input1 output0
98
-
video_matrix connect input1 output1
99
-
video_matrix connect input1 encoder
100
-
```
97
+
---
101
98
102
-
7. View the video output on your computer with your preferred tool.
99
+
#### Configuring the Opsis
103
100
104
-
The scripts/view-hdmi2usb.sh script will try and find a suitable tool to display.
105
-
```
106
-
make view
107
-
# or
108
-
scripts/view-hdmi2usb.sh
109
-
```
101
+
To use the Opsis, you need to set the jumpers correctly, connect cables
102
+
correctly and then put the board into JTAG mode.
103
+
104
+
FIXME: Put something here about the Opsis.
105
+
106
+
##### Jumpers Configuration
107
+
108
+
The jumpers as set on the Opsis when it ships work.
109
+
110
+
FIXME: Put picture showing correct jumper configuration.
111
+
112
+
##### Cables
113
+
114
+
The programming computer must be connected to the USB-B port.
115
+
116
+
##### JTAG mode
117
+
118
+
By default the Opsis will boot into HDMI2USB mode. To load gateware onto the
119
+
board it must be switched into JTAG mode.
120
+
121
+
FIXME: Add instructions for switching the Opsis into JTAG mode.
122
+
123
+
- HDMI2USB-mode-switch
124
+
- Connect to console and use fx2 switch command.
110
125
111
126
---
112
127
128
+
#### Configuring the Atlys
129
+
130
+
Before loading the gateware you need to set the jumpers correctly and connect
131
+
the cables correctly.
132
+
133
+
FIXME: Put something here about the Atlys.
134
+
135
+
##### Jumpers Configuration
136
+
137
+
As the HDMI2USB firmware manipulates the EDID information the following jumpers
138
+
must be removed;
139
+
140
+
```
141
+
JP2/SDA (which connects the EDID lines from J1/HDMI IN to JA/HDMI OUT).
142
+
JP6 and JP7 (which connects the EDID lines from J3/HDMI IN to J2/HDMI OUT).
143
+
```
144
+
145
+
##### Cables
146
+
147
+
* Plug board in using `PROG` port & switch on. If using a VM, ensure the
148
+
device is passed through.
149
+
150
+
* The other UART port is for the controlling the firmware. Recommend plugging
151
+
:w
152
+
his in too so you can use/test the device.
153
+
154
+
---
155
+
156
+
### 4) Loading temporarily
157
+
158
+
You can load gateware and firmware onto your device temporarily for testing. If
159
+
you power cycle the device after this step it will go back to the state before
160
+
this step.
161
+
162
+
Load the gateware and firmware - see [1] if using a VM:
163
+
```
164
+
make load-gateware
165
+
```
113
166
114
-
Once everything has been built, get HDMI2USB running again after a power cycle by running this script, possibly multiple times if errors first attempt (does non-build steps above):
0 commit comments