File tree 3 files changed +43
-2
lines changed
3 files changed +43
-2
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,20 @@ function check_import {
87
87
fi
88
88
}
89
89
90
+ function check_import_version {
91
+ MODULE=$1
92
+ EXPECT_VERSION=$2
93
+ ACTUAL_VERSION=$( python3 -c " import $MODULE ; print($MODULE .__version__)" )
94
+ if echo " $ACTUAL_VERSION " | grep -q $EXPECT_VERSION > /dev/null; then
95
+ echo " $MODULE found at $ACTUAL_VERSION "
96
+ return 0
97
+ else
98
+ echo " $MODULE (version $EXPECT_VERSION ) *NOT* found!"
99
+ echo " Please try running the $SETUP_DIR /get-env.sh script again."
100
+ return 1
101
+ fi
102
+ }
103
+
90
104
# Install and setup conda for downloading packages
91
105
echo " "
92
106
echo " Checking modules from conda"
@@ -118,8 +132,10 @@ check_version sdcc $SDCC_VERSION || return 1
118
132
check_version openocd 0.10.0-dev || return 1
119
133
120
134
# hexfile for embedding the Cypress FX2 firmware.
121
- check_import hexfile
135
+ check_import_version hexfile $HEXFILE_VERSION
122
136
137
+ # Tool for changing the mode (JTAG/Serial/etc) of HDMI2USB boards
138
+ check_import_version hdmi2usb.modeswitch $HDMI2USB_MODESWITCH_VERSION
123
139
# git submodules
124
140
echo " "
125
141
echo " Checking git submodules"
Original file line number Diff line number Diff line change @@ -121,6 +121,20 @@ function check_import {
121
121
fi
122
122
}
123
123
124
+ function check_import_version {
125
+ MODULE=$1
126
+ EXPECT_VERSION=$2
127
+ ACTUAL_VERSION=$( python3 -c " import $MODULE ; print($MODULE .__version__)" )
128
+ if echo " $ACTUAL_VERSION " | grep -q $EXPECT_VERSION > /dev/null; then
129
+ echo " $MODULE found at $ACTUAL_VERSION "
130
+ return 0
131
+ else
132
+ echo " $MODULE (version $EXPECT_VERSION ) *NOT* found!"
133
+ echo " Please try running the $SETUP_DIR /get-env.sh script again."
134
+ return 1
135
+ fi
136
+ }
137
+
124
138
# Install and setup conda for downloading packages
125
139
echo " "
126
140
echo " Install modules from conda"
@@ -166,7 +180,13 @@ check_version openocd 0.10.0-dev
166
180
(
167
181
pip install --upgrade git+https://github.com/mithro/hexfile.git
168
182
)
169
- check_import hexfile
183
+ check_import_version hexfile $HEXFILE_VERSION
184
+
185
+ # Tool for changing the mode (JTAG/Serial/etc) of HDMI2USB boards
186
+ (
187
+ pip install --upgrade git+https://github.com/timvideos/HDMI2USB-mode-switch.git
188
+ )
189
+ check_import_version hdmi2usb.modeswitch $HDMI2USB_MODESWITCH_VERSION
170
190
171
191
# git submodules
172
192
echo " "
Original file line number Diff line number Diff line change @@ -8,6 +8,11 @@ BUILD_DIR=$TOP_DIR/build
8
8
THIRD_DIR=$TOP_DIR /third_party
9
9
CONDA_DIR=$BUILD_DIR /conda
10
10
11
+ # Python module versions
12
+ HDMI2USB_MODESWITCH_VERSION=0.0.0
13
+ HEXFILE_VERSION=0.1
14
+
15
+ # Conda package versions
11
16
BINUTILS_VERSION=2.26
12
17
GCC_VERSION=4.9.3
13
18
SDCC_VERSION=3.5.0
You can’t perform that action at this time.
0 commit comments