forked from lerwys/Installation_instructions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFPGA_TOOLS_log
406 lines (258 loc) · 10.7 KB
/
FPGA_TOOLS_log
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
--------------------------------------------------------
Xilinx Installation Instructions:
1 - Install ISE Xilinx
-> Set environment variables
2 - vim ~/.bashrc
LM32_TOOLS=/opt/gcc-lm32/bin
XILINX=/opt/Xilinx/13.4/ISE_DS
export XILINX
HOST_PLATFORM=lin64
export HOST_PLATFORM
XILINX_BIN=${XILINX}/ISE/bin/${HOST_PLATFORM}
export XILINX_BIN
PATH=${PATH}:${XILINX_BIN}:${LM32_TOOLS}
#XILINX_EDK=${XILINX}/ISE/EDK
#export XILINX_EDK
XILINX_CSE_TCL=${XILINX}/ISE/cse/tcl
#XILINX_CSE_TCL=/usr/lib/tclx8.4/
export XILINX_CSE_TCL
#export LD_PRELOAD="/usr/local/lib/libusb-driver.so"
export XKEYSYMDB=/usr/share/X11/XKeysymDB
export DISPLAY=:0
-> save and exit (:wq)
-> Install Xilinx Cable drivers
3 - sudo apt-get install git-core gitk git-gui libusb-dev build-essential libc6-dev-i386 fxload
-> Go to a folder at your preference. You must have write
permissions!
4 - cd ~
-> Clone the repository
5 - git clone git://git.zerfleddert.de/usb-driver
7 - cd usb-driver
8 - make
9 - sudo ./setup_pcusb /opt/Xilinx/13.4/ISE_DS/ISE/
-> Optional! Make the installed library to be load before any others (Isn't there a better way?)
11 - echo "export LD_PRELOAD=/usr/local/lib/libusb-driver.so" >> $XILINX/settings64.sh
or export the variable by "hand"
11.1 - vim ~/.bashrc
11.2 - export LD_PRELOAD=/usr/local/lib/libusb-driver.so
-> save and exit (:wq)
12 - Don't forget to source the settings32.sh (32-bit systems),
settings64.sh (64-bit systems) or the ~/.bashrc file
depending on where you put the environment variable.
-> . /opt/Xilinx/13.4/ISE_DS/settings64.sh or
-> . /opt/Xilinx/13.4/ISE_DS/settings32.sh or
-> . ~/.bashrc
=========THE STEPS BELOW DO NOT WORK!=========
-> In order to license ISE with a USB Dongle it is necessary to
install the FLEX ID usb drivers (based on http://www.bluevirus.ch/?blog_sel%5B0%5D=52):
-> Installing Alien (Conveert to .rpm to .deb packages)
12 - sudo apt-get install alien
-> This rpm package used chkconfig in order to control system services
13 - sudo apt-get install chkconfig
-> Unpack rpm package
14 - sudo alien -g -c aksusbd-redhat-1.14-3.i386.rpm
15 - cd aksusbd-redhat-1.14
-> Rename the debian folder as we are going to build the debian
package with dpkg -b not running the rules script!
16 - sudo mv debian/ DEBIAN/
-> Modify the DEBIAN/control file to adhere to the specified format
17 - sudo vim DEBIAN/control
> Remove the empty line after Maintainer:
> change i386 to amd64 after Architecture
> Delete remaining content of the line that starts with Depends
> Add a line with a version number like Version: 8.6.0
> Make sure that there is an empty line at the end of the document
-> Move the aksusbd init script from etc/rc.d/init.d/ to etc/init.d/
18 - sudo mv etc/{rc.d/init.d,}
-> Change write permissions temporarily
19 - sudo chmod +w etc/init.d/aksusbd
-> Source the correct function library. In Ubuntu it is located at
/lib/lsb/init-functions.
20 - vim etc/init.d/aksusbd
-> Change the following line:
9 . /etc/rc.d/init.d/functions
to
9 . /lib/lsb/init-functions
-> save and exit (:wq)
-> Restore permissions
21 - sudo chmod -w etc/init.d/aksusbd
-> Modify the preinst script that blocks the installation.
just comment out the section:
22 - sudo vim DEBIAN/preinst
> if [ ! -e /etc/redhat-release ] ; then
> echo "ERROR This package can only be installed in Redhat Linux ! "
> false
> else
...
> fi
-> It will look like this:
> #if [ ! -e /etc/redhat-release ] ; then
> # echo "ERROR This package can only be installed in Redhat Linux ! "
> # false
> #else
...
> # fi
-> change the path to the aksusbd init script in all debian scripts.
23 -
for file in DEBIAN/{preinst,postinst,prerm}; do
sudo sed -i -e 's|/etc/rc.d/init.d/|/etc/init.d/|g' $file
done
-> Remove invalid characters in aksusb script
24 - sudo sed -i.bak -e 's|$\"\(.*\)\"|\"\1\"|g' etc/init.d/aksusbd
25 - sudo sed -i.bak -e 's|$(\(.*\))|\`\1\`|g' etc/init.d/aksusbd
-> Trying to use the lsb_functions
-> cd /op hange daemon to start_daemon, failure to log_failure_msg and success to log_success_msg
-> Make the scripts (postinst preinst prerm) executables
24 - sudo chmod +x DEBIAN/{postinst,preinst,prerm}
-> Build the package
-> Symlink insserv binary as aksusbd is looking at the wrong place.
is there a better way to fix this?
25 - sudo ln -s /usr/lib/insserv/insserv /sbin/insserv
-> Create lock directories if nonexistent
26 - sudo vim etc/init.d/aksusbd
-> Add the following:
# Create var/lock/subsys directory
if [ ! -d /var/lock/subsys ]; then
mkdir /var/lock/subsys
fi
-> just before the following:
# See how we were called.
case "$1" in
start)
...
-> save and exit (:wq)
-> Intall FLEXId utilities from
http://www.globes.com/support/fnp_utilities_download.htm#downloads.
-> Copy the lmutil, lmadmin and lmgrd to /usr/local/sbin
25 - tar xvf lmutil_x64_lsb.tar.gz
26 - tar xvf lmgrd_x64_lsb.tar.gz
27 - sudo cp lmutil lmgrd lmadmin-i86_lsb-11_11_0_0.bin /usr/local/sbin/
-> Make lmadmin executable
28 - sudo chmod +x /usr/local/sbin/lmadmin-i86_lsb-11_11_0_0.bin
-> Symlink to lmadmin
29 - sudo ln -s lmadmin-i86_lsb-11_11_0_0.bin /usr/local/sbin/lmadmin
-> Run lmadmin
30 - /usr/local/sbin/lmadmin
31 - sudo dpkg -b aksusbd-redhat-1.14
-> Install it!
32 - sudo dpkg -i aksusbd-redhat-1.14.deb
=========THE STEPS ABOVE DO NOT WORK!=========
-> There is a workaround for this issue.
See local file Xilinx_Install/Xilinx Issues
--------------------------------------------------------
Installing Ubunutu Terminal Instructions:
Source: http://strdoc.com/comment/417
-> Install minicom
1 - sudo apt-get install minicom
-> Find the name your serial port
2 - dmesg | grep tty
-> in the output look for something like "ttyUSB0".
My output was something like this:
[ 0.000000] console [tty0] enabled
[ 3.815470] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 3.948477] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 4.004167] 0000:00:03.3: ttyS4 at I/O 0xecb8 (irq = 17) is a 16550A
[195933.979161] usb 4-1: cp210x converter now attached to ttyUSB0
[196991.760206] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
[199153.839153] usb 4-1: cp210x converter now attached to ttyUSB0
-> This means the device correspond to my serial port is ttyUSB0.
-> Configure minicom
3 - sudo minicom -s
-> Use the keyboard keys to select the menu item Serial port setup.
-> Enter A to change the Serial Device to /dev/ttyUSB0,
and then enter E to change the line speed to 9600 8N1
-> Using arrow keys, select Save setup as dfl
-> Select Exit from Minicom.
-> Next time, from the terminal, you only need to run
"sudo minicom" in order to start the terminal application.
--------------------------------------------------------
Linux Chipscope Installation Instructions:
Source:
http://xlnx.lithium.com/t5/Installation-and-Licensing/
ISE-12-1-Linux-Installs/td-p/69399
-> On Ubuntu (specifically), calling the chipscope (analyzer)
by the command line issues an error:
"
...
/opt/Xilinx/13.4/ISE_DS/ISE/bin/lin64/unwrapped/analyzer: 74:
/opt/Xilinx/13.4/ISE_DS/ISE/bin/lin64/unwrapped/cs_common.sh:
XIL_DIRS[1]=/opt/Xilinx/13.4/ISE_DS/ISE/: not found
...
"
-> Along with others of the same kind.
-> The problem resides on the interpreter called within the script
(#!/bin/sh). As on Ubunutu sh points to dash and not to bash,
inconsistencies will appear. To fix the issue you have to
reconfigure ubunutu to use bash instead of dash (just changing
the shebang to #!/bin/bash did not work for me).
-> Issue the following command:
1 -sudo dpkg-reconfigure dash
-> Selects no when prompted. This should solve the issue
--------------------------------------------------------
HDL make Installation Instructions:
-> Put hdlmake in a directory listed in PATH, for example:
1 - sudo ln -s <PATH_TO_HDLMAKE> /usr/bin/hdlmake
-> Generate the makefiles
2 - hdlmake --ise-proj --make-ise
-> Build it! Synthetize. You may the time command in order to
verify how much time was spent during synthesis. Additionally,
we redirect the stdout and stderr to a file. Otherwise, it
wouldn't be possible to analyse the output log.
3 - time make local > synth_output.txt 2>&1
--------------------------------------------------------
Cross Compiling for LM32:
-> Install missing libraries
1 - sudo apt-get install apt-get install lib32z1
2 - sudo mkdir /opt/gcc-lm32
3 - sudo tar xvf <path_to_lm32_gcc>.tar.xz
-> Run specific makefile or add the CROSS_COMPILE environment variable as follows:
4 - CROSS_COMPILE="<path_to_lm32_gcc_toolchain>/bin/lm32-elf-"
--------------------------------------------------------
UrJTAG for debug:
-> Install missing libraries (libusb should be installed as well.
See "Xilinx Installation Instructions for more)
1 - sudo apt-get install libftdi-dev
-> Download d2xx drivers (the libftdi-dev did not include
header files for me)
2 - wget http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx1.1.12.tar.gz (for 64-bit linux)
3 - tar xvzf libftd2xx1.1.12.tar.gz
4 - mv release libftd2xx1.1.12
5 - cd libftd2xx1.1.12
-> Copy the header files to specified location
6 - sudo cp ftd2xx.h /usr/local/include/
7 - sudo cp WinTypes.h /usr/local/include/
-> Change its perimission
8 - sudo chmod a+r /usr/local/include/ftd2xx.h /usr/local/include/WinTypes.h
-> Download UrJTAG
9 - wget http://sourceforge.net/projects/urjtag/files/
-> Install it
10 - tar xzvf urjtag-x.y.tar.gz
11 - cd urjtag-x.y
12 - ./configure
13 - make && make install
-> If anything goes wrong, check the documetation in
http://urjtag.org/book/_compilation_and_installation.html
--------------------------------------------------------
General Tools Installation
-> Icarus Verilog Simulator
1 - sudo apt-get install iverilog
-> Install GTKwave
2 - sudo apt-get install gtkwave
--------------------------------------------------------
Known issues: from http://wienker.org/blog/?p=188 (old)
Error: Error: /bin/bash: gmake: command not found
Solution: sudo ln -s /usr/bin/make /usr/bin/gmake
Error: error while loading shared libraries: libXm.so.3
Error2: error while loading shared libraries: libXm.so.4
Solution: sudo apt-get install motif-client
Solution2: sudo apt-get install libmotif4
Error: error while loading shared libraries: libstdc++.so.5
Solution: sudo apt-get install libstdc++5
Error: Wind/U X-toolkit Error: wuDisplay: Can't open display
Solution: export DISPLAY=:0
Error: Wind/U Error (248): Failed to connect to the registry on server
thinkpad Cannot register service: RPC: Unable to receive;
errno = Connection refused
Solution: sudo apt-get install portmap
Error: Warning!!: XKEYSYMDB environment variable is set to a wrong location
Solution: export XKEYSYMDB=/usr/share/X11/XKeysymDB