Skip to content

Commit

Permalink
bindings/matlab: update build tamplate and build installer for matlab…
Browse files Browse the repository at this point in the history
… 2022b
  • Loading branch information
IonutMuthi authored and AlexandraTrifan committed Jan 8, 2024
1 parent 5832b69 commit d7dbb25
Show file tree
Hide file tree
Showing 7 changed files with 457 additions and 148 deletions.
13 changes: 6 additions & 7 deletions bindings/matlab/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# libm2k-matlab-bindings
[![Generic badge](https://img.shields.io/badge/MATLAB-R2022a-BLUE.svg)](https://shields.io/)
[![Generic badge](https://img.shields.io/badge/MATLAB-R2022b-BLUE.svg)](https://shields.io/)

MATLAB binding for the [libm2k](https://github.com/analogdevicesinc/libm2k) interface library.

Expand All @@ -8,10 +8,9 @@ Documentation is available on [wiki.analog.com](https://wiki.analog.com/universi
## Releases
Always install the latest release for your MATLAB version from the [releases page](https://github.com/analogdevicesinc/libm2k-matlab/releases/latest).

### Latest Development Builds

| Operating System | GitHub master status | MATLAB Release | Installer Package |
|:-------:|:---------------------:|:-------:|:-------------------:|
| Windows 10 | | R2022a | |
| Linux | | R2022a | Must be built from source |
### Latest Release

| Operating System | MATLAB Release | Installer Package |
|:-------:|:-------:|:-------------------:|
| Windows 10 | R2022b |[Matlab Add-On](https://uk.mathworks.com/matlabcentral/fileexchange/74385-libm2k-matlab?s_tid=srchtitle_libm2k_1)|
| Linux | R2022b | [Matlab Add-On](https://uk.mathworks.com/matlabcentral/fileexchange/74385-libm2k-matlab?s_tid=srchtitle_libm2k_1) |
2 changes: 1 addition & 1 deletion bindings/matlab/build_installer.m
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function build_installer()

version = '22.1.2';
version = '22.2.1';
ml = ver('MATLAB');
ml = ml.Release(2:end-1);
arch = computer('arch');
Expand Down
27 changes: 3 additions & 24 deletions bindings/matlab/build_library_win64.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,6 @@
%% Add related headers
h = {};

% h1 = fullfile(hppPath,'m2kcalibration.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'m2kexceptions.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'logger.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'digital','m2kdigital.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'analog','m2kanalogout.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'analog','m2kanalogin.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'m2kcalibration.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'m2khardwaretrigger.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'analog','m2kpowersupply.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'utils','utils.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'utils','enums.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'contextbuilder.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'m2k.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'m2kglobal.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'context.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'digital','enums.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'analog','enums.hpp'); h = [{h1},h(:)'];
% h1 = fullfile(hppPath,'enums.hpp'); h = [{h1},h(:)'];
% % h1 = fullfile(pwd,'libm2k','include','iio.h'); h = [{h1},h(:)'];
% headers = h;

h1 = fullfile(hppPath,'digital','m2kdigital.hpp'); h = [{h1},h(:)'];
h1 = fullfile(hppPath,'digital','enums.hpp'); h = [{h1},h(:)'];

Expand Down Expand Up @@ -80,9 +59,9 @@
% 'DefinedMacros', ["_HAS_CONDITIONAL_EXPLICIT=0"])
% delete definelibm2k.mlx

%% Build library once manually updated
% pkg = definelibm2k_win64;
% build(pkg);
% Build library once manually updated
pkg = definelibm2k_win64;
build(pkg);



Expand Down
557 changes: 444 additions & 113 deletions bindings/matlab/definelibm2k.m

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bindings/matlab/definelibm2k_linux64.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

%% Setup
% Do not edit this setup section.
function libDef = definelibm2k()
function libDef = definelibm2k_linux64()
libDef = clibgen.LibraryDefinition("libm2kData.xml");
%% OutputFolder and Libraries
libDef.OutputFolder = pwd;
Expand Down
4 changes: 2 additions & 2 deletions bindings/matlab/definelibm2k_win64.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

%% Setup
% Do not edit this setup section.
function libDef = definelibm2k()
function libDef = definelibm2k_win64()
libDef = clibgen.LibraryDefinition("libm2kData.xml");
%% OutputFolder and Libraries
libDef.OutputFolder = pwd;
Expand Down Expand Up @@ -37,7 +37,7 @@
"CtxFMCOMMS",... % 0
"CtxM2K",... % 1
"CtxLIDAR",... % 2
"Other",... % 3
% "Other",... % 3
],...
"MATLABName", "clib.libm2k.ContextTypes", ...
"Description", "clib.libm2k.ContextTypes Representation of C++ enumeration ContextTypes."); % Modify help description values as needed.
Expand Down
Binary file added bindings/matlab/libm2k_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d7dbb25

Please sign in to comment.