forked from MEGA65/mega65-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvivado_wrapper
More file actions
executable file
·52 lines (43 loc) · 1.34 KB
/
Copy pathvivado_wrapper
File metadata and controls
executable file
·52 lines (43 loc) · 1.34 KB
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
#!/bin/bash
# Auto-detect Vivado installation
# Searches common locations and finds the latest version.
# If your installation ends up in another location, add it to
# the search_paths array. For some reason different versions
# install in different locations.
find_vivado() {
local search_paths=(
"/opt/Xilinx/Vivado"
"/opt/Xilinx"
"/opt/Xilinx/2025.2"
"/opt/Xilinx/2025.2/Vivado"
)
# If VIVADODIR is already set and valid, use it
if [ -n "$VIVADODIR" ] && [ -f "$VIVADODIR/settings64.sh" ]; then
echo "$VIVADODIR"
return 0
fi
# Check each path for settings64.sh
for path in "${search_paths[@]}"; do
if [ -f "$path/settings64.sh" ]; then
echo "$path"
return 0
fi
done
return 1
}
VIVADODIR=$(find_vivado)
if [ -z "$VIVADODIR" ]; then
echo "ERROR: Could not find Vivado installation." >&2
echo "Searched in: /opt/Xilinx, /tools/Xilinx, ~/Xilinx" >&2
echo "Set VIVADODIR environment variable to your Vivado installation path." >&2
echo "Example: export VIVADODIR=/opt/Xilinx/Vivado/2024.1" >&2
exit 1
fi
if [ ! -f "$VIVADODIR/settings64.sh" ]; then
echo "ERROR: settings64.sh not found in $VIVADODIR" >&2
exit 1
fi
echo "Using Vivado from: $VIVADODIR" >&2
. "$VIVADODIR/settings64.sh"
echo vivado "$@"
vivado "$@"