From c085b8d6bae4b91d4cc9c0dc7e9ed360aed69fba Mon Sep 17 00:00:00 2001 From: Travis Collins Date: Tue, 11 Dec 2018 17:41:05 -0500 Subject: [PATCH 1/4] Moved default RF config set up Moved default RF config set up outside initial configuration if using the libad9361 --- +adi/+AD9361/Rx.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/+adi/+AD9361/Rx.m b/+adi/+AD9361/Rx.m index c15339f..0a47bd0 100644 --- a/+adi/+AD9361/Rx.m +++ b/+adi/+AD9361/Rx.m @@ -307,6 +307,7 @@ function setupInit(obj) calllib('libad9361','ad9361_set_bb_rate',obj.iioDevPHY,int32(obj.SamplingRate)); else obj.setAttributeLongLong('voltage0','sampling_frequency',obj.SamplingRate,true,4); + obj.setAttributeLongLong('voltage0','rf_bandwidth',obj.RFBandwidth ,strcmp(obj.Type,'Tx')); end if strcmp(obj.GainControlModeChannel0,'manual') obj.setAttributeLongLong('voltage0','hardwaregain',obj.GainChannel0,false); @@ -314,7 +315,6 @@ function setupInit(obj) if strcmp(obj.GainControlModeChannel1,'manual') && (obj.channelCount>2) obj.setAttributeLongLong('voltage1','hardwaregain',obj.GainChannel1,false); end - obj.setAttributeLongLong('voltage0','rf_bandwidth',obj.RFBandwidth ,strcmp(obj.Type,'Tx')); end end From 0f0fd5c970f95328ea4f770c7982046bd3e17012 Mon Sep 17 00:00:00 2001 From: Travis Collins Date: Thu, 3 Jan 2019 15:50:38 -0500 Subject: [PATCH 2/4] Update Makefile to support osx builds Signed-off-by: Travis Collins --- CI/scripts/Makefile | 93 +++++++++++++++++++++++++-------------------- 1 file changed, 51 insertions(+), 42 deletions(-) diff --git a/CI/scripts/Makefile b/CI/scripts/Makefile index c66d753..db5fb86 100644 --- a/CI/scripts/Makefile +++ b/CI/scripts/Makefile @@ -1,7 +1,7 @@ # Usage: -# make +# make MLRELEASE= HDLBRANCH= # Example -# make R2018b hdl_2018_r1 +# make build MLRELEASE=R2018b HDLBRANCH=hdl_2018_r1 ifeq ($(MLRELEASE),) MLRELEASE := R2018b @@ -11,6 +11,19 @@ ifeq ($(HDLBRANCH),) HDLBRANCH := hdl_2018_r1 endif +ifeq ($(OS),Windows_NT) +$(error Build system does not currently support Windows) +else +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Linux) +MLPATH := /usr/local/MATLAB +endif +ifeq ($(UNAME_S),Darwin) +MLPATH := /Applications +MLRELEASE := MATLAB_${MLRELEASE}.app +endif +endif + GITTAG := $(shell git describe --tags HEAD) .ONESHELL: @@ -19,59 +32,55 @@ build: bash build_bsp.sh add_libad9361: - cd ../.. - mkdir deps - cd deps - # Linux - mkdir linux - cd linux - #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 - - wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio-trusty.tar.gz - tar xvf *.tar.gz - mv usr/local/lib/* . - mv usr/local/include ../ - rm -rf usr - rm *.tar.gz - cd .. - # Windows - mkdir win - cd win - wget "https://ci.appveyor.com/api/projects/analogdevicesinc/libad9361-iio/artifacts/libad9361-win64.zip?branch=master" -O lib.zip - unzip lib.zip - mv libad9361-win64/* . - rm -rf libad9361-win64 - rm *.h + cd ../.. ; \ + mkdir deps ; \ + cd deps ; \ + mkdir linux ; \ + cd linux ; \ + wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio-trusty.tar.gz ; \ + tar xvf *.tar.gz ; \ + mv usr/local/lib/* . ; \ + mv usr/local/include ../ ; \ + rm -rf usr ; \ + rm *.tar.gz ; \ + cd .. ; \ + mkdir win ; \ + cd win ; \ + wget "https://ci.appveyor.com/api/projects/analogdevicesinc/libad9361-iio/artifacts/libad9361-win64.zip?branch=master" -O lib.zip ; \ + unzip lib.zip ; \ + mv libad9361-win64/* . ; \ + rm -rf libad9361-win64 ; \ + rm *.h ; \ rm lib.zip test_installer: - cd ../.. - cp *.mltbx test/ - cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m - sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m - /usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runInstallerTests;" + cd ../.. ; \ + cp *.mltbx test/ ; \ + cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m ; \ + sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m ; \ + ${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runInstallerTests;" test: - cd ../.. - cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m - sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m - /usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runTests;" + cd ../.. ; \ + cp hdl_wa_bsp/vendor/AnalogDevices/hdlcoder_board_customization.m test/hdlcoder_board_customization_local.m ; \ + sed -i "s/hdlcoder_board_customization/hdlcoder_board_customization_local/g" test/hdlcoder_board_customization_local.m ; \ + ${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "cd('test');runTests;" test_streaming: - cd ../.. - /usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('test'));addpath(genpath('deps'));hwTestRunner;" + cd ../.. ; \ + ${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('test'));addpath(genpath('deps'));hwTestRunner;" test_modem: - cd ../.. - /usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('hdl_wa_bsp'));cd('targeting_models');addpath(genpath('modem-qpsk'))" + cd ../.. ; \ + ${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "addpath(genpath('hdl_wa_bsp'));cd('targeting_models');addpath(genpath('modem-qpsk'))" gen_tlbx: - /usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "genTlbx;exit();" + ${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "genTlbx;exit();" linter: - /usr/local/MATLAB/$(MLRELEASE)/bin/matlab -nodisplay -r "linter;exit();" + ${MLPATH}/$(MLRELEASE)/bin/matlab -nodisplay -r "linter;exit();" zip: - cd ../.. - mkdir zip + cd ../.. ; \ + mkdir zip ; \ zip -r zip/AnalogDevicesBSP_$(GITTAG).zip deps doc hdl_wa_bsp hil_models targeting_models info.xml LICENSE README.md test/*.log - From d349470c49aa8748e8af9be735b2510b28aea2de Mon Sep 17 00:00:00 2001 From: Travis Collins Date: Thu, 3 Jan 2019 22:34:50 -0500 Subject: [PATCH 3/4] Update liad9361 dependencies to include OSX libraries Signed-off-by: Travis Collins --- CI/scripts/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CI/scripts/Makefile b/CI/scripts/Makefile index db5fb86..78a4ef2 100644 --- a/CI/scripts/Makefile +++ b/CI/scripts/Makefile @@ -44,6 +44,16 @@ add_libad9361: rm -rf usr ; \ rm *.tar.gz ; \ cd .. ; \ + mkdir osx ; \ + cd osx ; \ + wget http://swdownloads.analog.com/cse/travis_builds/master_latest_libad9361-iio-osx_10.12.tar.gz ; \ + tar xvf *.tar.gz ; \ + cd ad9361* ; \ + mv usr/local/lib/ad9361.framework/Versions/Current/ad9361 ../libad9361.dylib ; \ + cd .. ; \ + rm -rf ad9361-*-Darwin ; \ + rm *.tar.gz ; \ + cd .. ; \ mkdir win ; \ cd win ; \ wget "https://ci.appveyor.com/api/projects/analogdevicesinc/libad9361-iio/artifacts/libad9361-win64.zip?branch=master" -O lib.zip ; \ From 6080d4d13d5e1effde6b2f2d1dd75437b3f90877 Mon Sep 17 00:00:00 2001 From: Travis Collins Date: Sun, 6 Jan 2019 17:48:47 -0800 Subject: [PATCH 4/4] Add OSX condition to hardware tests for MW pieces --- test/perf/HardwareTests.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/perf/HardwareTests.m b/test/perf/HardwareTests.m index 9977f5d..f1f00eb 100644 --- a/test/perf/HardwareTests.m +++ b/test/perf/HardwareTests.m @@ -267,6 +267,11 @@ function LTE_R4_Pluto(testCase) function LTE_R4_RFSOM(testCase) + if ismac + % RF SOM is not supported on OSX from MathWorks + assumeFail(testCase); + end + %% Test configs Frequencies = (0.4:0.1:5).*1e9; DeviceTx = @()sdrtx('ADI RF SOM');