Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit 22a2ace

Browse files
authored
Merge pull request #29 from analogdevicesinc/dev
Merge OSX build updates
2 parents feae538 + 6080d4d commit 22a2ace

File tree

3 files changed

+67
-43
lines changed

3 files changed

+67
-43
lines changed

+adi/+AD9361/Rx.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,14 +307,14 @@ function setupInit(obj)
307307
calllib('libad9361','ad9361_set_bb_rate',obj.iioDevPHY,int32(obj.SamplingRate));
308308
else
309309
obj.setAttributeLongLong('voltage0','sampling_frequency',obj.SamplingRate,true,4);
310+
obj.setAttributeLongLong('voltage0','rf_bandwidth',obj.RFBandwidth ,strcmp(obj.Type,'Tx'));
310311
end
311312
if strcmp(obj.GainControlModeChannel0,'manual')
312313
obj.setAttributeLongLong('voltage0','hardwaregain',obj.GainChannel0,false);
313314
end
314315
if strcmp(obj.GainControlModeChannel1,'manual') && (obj.channelCount>2)
315316
obj.setAttributeLongLong('voltage1','hardwaregain',obj.GainChannel1,false);
316317
end
317-
obj.setAttributeLongLong('voltage0','rf_bandwidth',obj.RFBandwidth ,strcmp(obj.Type,'Tx'));
318318
end
319319

320320
end

CI/scripts/Makefile

Lines changed: 61 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Usage:
2-
# make <MATLAB release version ex: R2018b> <HDL git branch ex: hdl_2018_r1>
2+
# make <target> MLRELEASE=<MATLAB release version ex: R2018b> HDLBRANCH=<HDL git branch ex: hdl_2018_r1>
33
# Example
4-
# make R2018b hdl_2018_r1
4+
# make build MLRELEASE=R2018b HDLBRANCH=hdl_2018_r1
55

66
ifeq ($(MLRELEASE),)
77
MLRELEASE := R2018b
@@ -11,6 +11,19 @@ ifeq ($(HDLBRANCH),)
1111
HDLBRANCH := hdl_2018_r1
1212
endif
1313

14+
ifeq ($(OS),Windows_NT)
15+
$(error Build system does not currently support Windows)
16+
else
17+
UNAME_S := $(shell uname -s)
18+
ifeq ($(UNAME_S),Linux)
19+
MLPATH := /usr/local/MATLAB
20+
endif
21+
ifeq ($(UNAME_S),Darwin)
22+
MLPATH := /Applications
23+
MLRELEASE := MATLAB_${MLRELEASE}.app
24+
endif
25+
endif
26+
1427
GITTAG := $(shell git describe --tags HEAD)
1528

1629
.ONESHELL:
@@ -19,59 +32,65 @@ build:
1932
bash build_bsp.sh
2033

2134
add_libad9361:
22-
cd ../..
23-
mkdir deps
24-
cd deps
25-
# Linux
26-
mkdir linux
27-
cd linux
28-
#curl --silent "https://api.github.com/repos/analogdevicesinc/libad9361-iio/releases/latest" | jq -r ".assets[] | select(.name | test(\"${spruce_type}\")) | .browser_download_url" | grep tar.gz | wget -i -
29-
wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio-trusty.tar.gz
30-
tar xvf *.tar.gz
31-
mv usr/local/lib/* .
32-
mv usr/local/include ../
33-
rm -rf usr
34-
rm *.tar.gz
35-
cd ..
36-
# Windows
37-
mkdir win
38-
cd win
39-
wget "https://ci.appveyor.com/api/projects/analogdevicesinc/libad9361-iio/artifacts/libad9361-win64.zip?branch=master" -O lib.zip
40-
unzip lib.zip
41-
mv libad9361-win64/* .
42-
rm -rf libad9361-win64
43-
rm *.h
35+
cd ../.. ; \
36+
mkdir deps ; \
37+
cd deps ; \
38+
mkdir linux ; \
39+
cd linux ; \
40+
wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio-trusty.tar.gz ; \
41+
tar xvf *.tar.gz ; \
42+
mv usr/local/lib/* . ; \
43+
mv usr/local/include ../ ; \
44+
rm -rf usr ; \
45+
rm *.tar.gz ; \
46+
cd .. ; \
47+
mkdir osx ; \
48+
cd osx ; \
49+
wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio-osx_10.12.tar.gz ; \
50+
tar xvf *.tar.gz ; \
51+
cd ad9361* ; \
52+
mv usr/local/lib/ad9361.framework/Versions/Current/ad9361 ../libad9361.dylib ; \
53+
cd .. ; \
54+
rm -rf ad9361-*-Darwin ; \
55+
rm *.tar.gz ; \
56+
cd .. ; \
57+
mkdir win ; \
58+
cd win ; \
59+
wget "https://ci.appveyor.com/api/projects/analogdevicesinc/libad9361-iio/artifacts/libad9361-win64.zip?branch=master" -O lib.zip ; \
60+
unzip lib.zip ; \
61+
mv libad9361-win64/* . ; \
62+
rm -rf libad9361-win64 ; \
63+
rm *.h ; \
4464
rm lib.zip
4565

4666
test_installer:
47-
cd ../..
48-
cp *.mltbx test/
49-
cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m
50-
sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m
51-
/usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runInstallerTests;"
67+
cd ../.. ; \
68+
cp *.mltbx test/ ; \
69+
cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m ; \
70+
sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m ; \
71+
${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runInstallerTests;"
5272

5373
test:
54-
cd ../..
55-
cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m
56-
sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m
57-
/usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runTests;"
74+
cd ../.. ; \
75+
cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m ; \
76+
sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m ; \
77+
${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runTests;"
5878

5979
test_streaming:
60-
cd ../..
61-
/usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('test'));addpath(genpath('deps'));hwTestRunner;"
80+
cd ../.. ; \
81+
${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('test'));addpath(genpath('deps'));hwTestRunner;"
6282

6383
test_modem:
64-
cd ../..
65-
/usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('hdl_wa_bsp'));cd('targeting_models');addpath(genpath('modem-qpsk'))"
84+
cd ../.. ; \
85+
${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('hdl_wa_bsp'));cd('targeting_models');addpath(genpath('modem-qpsk'))"
6686

6787
gen_tlbx:
68-
/usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "genTlbx;exit();"
88+
${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "genTlbx;exit();"
6989

7090
linter:
71-
/usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "linter;exit();"
91+
${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "linter;exit();"
7292

7393
zip:
74-
cd ../..
75-
mkdir zip
94+
cd ../.. ; \
95+
mkdir zip ; \
7696
zip -r zip/AnalogDevicesBSP_$(GITTAG).zip deps doc hdl_wa_bsp hil_models targeting_models info.xml LICENSE README.md test/*.log
77-

test/perf/HardwareTests.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ function LTE_R4_Pluto(testCase)
267267

268268
function LTE_R4_RFSOM(testCase)
269269

270+
if ismac
271+
% RF SOM is not supported on OSX from MathWorks
272+
assumeFail(testCase);
273+
end
274+
270275
%% Test configs
271276
Frequencies = (0.4:0.1:5).*1e9;
272277
DeviceTx = @()sdrtx('ADI RF SOM');

0 commit comments

Comments
 (0)