pre-release 1.03
This commit is contained in:
parent
1aa3c5b955
commit
041322a62e
Binary file not shown.
@ -2,12 +2,24 @@
|
|||||||
function install_my_library()
|
function install_my_library()
|
||||||
libDir = fileparts(mfilename('fullpath'));
|
libDir = fileparts(mfilename('fullpath'));
|
||||||
|
|
||||||
|
% Путь к файлу-флагу, указывающему, что установка уже была
|
||||||
|
flagFile = fullfile(libDir, '.library_installed.mat');
|
||||||
|
|
||||||
|
% Если библиотека уже установлена — просто выходим
|
||||||
|
if isfile(flagFile)
|
||||||
|
return;
|
||||||
|
end
|
||||||
|
|
||||||
% 1. Добавляем библиотеку и m-файлы в путь
|
% 1. Добавляем библиотеку и m-файлы в путь
|
||||||
addpath(fullfile(libDir, 'lib'));
|
addpath(fullfile(libDir, 'lib'));
|
||||||
addpath(fullfile(libDir, 'm'));
|
addpath(fullfile(libDir, 'm'));
|
||||||
savepath;
|
savepath;
|
||||||
|
|
||||||
% 3. Обновляем Library Browser
|
% 2. Обновляем Library Browser
|
||||||
rehash;
|
rehash;
|
||||||
sl_refresh_customizations;
|
sl_refresh_customizations;
|
||||||
|
|
||||||
|
% 3. Сохраняем флаг установки
|
||||||
|
installedOn = datetime('now');
|
||||||
|
save(flagFile, 'installedOn');
|
||||||
end
|
end
|
||||||
|
Binary file not shown.
@ -6,7 +6,8 @@ classdef mainConfig
|
|||||||
blockPath = gcb;
|
blockPath = gcb;
|
||||||
mask = Simulink.Mask.get(blockPath);
|
mask = Simulink.Mask.get(blockPath);
|
||||||
wrapParamToExport = {'wrapperPath', 'enableDebug', 'mcuClk', ...
|
wrapParamToExport = {'wrapperPath', 'enableDebug', 'mcuClk', ...
|
||||||
'threadCycles', 'enableThreading', 'enableDeinit'};
|
'threadCycles', 'enableThreading', 'enableDeinit', ...
|
||||||
|
'periphPath'};
|
||||||
portParamToExport = {'inNumb', ...
|
portParamToExport = {'inNumb', ...
|
||||||
'in_port_1_name', 'in_port_1_width', ...
|
'in_port_1_name', 'in_port_1_width', ...
|
||||||
'in_port_2_name', 'in_port_2_width', ...
|
'in_port_2_name', 'in_port_2_width', ...
|
||||||
@ -103,6 +104,8 @@ classdef mainConfig
|
|||||||
end
|
end
|
||||||
|
|
||||||
mcuMask.disp(0, 'Конфигурация успешно импортирована.');
|
mcuMask.disp(0, 'Конфигурация успешно импортирована.');
|
||||||
|
|
||||||
|
mcuMask.periphUpdate();
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -324,6 +324,9 @@ classdef mcuMask
|
|||||||
start(t);
|
start(t);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function v = getMyLibVersion()
|
||||||
|
v = 'pre-1.03';
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
@ -265,7 +265,11 @@ function definesWrapperArg = addDefineByParam(definesWrapperArg, paramName, val_
|
|||||||
newDefine = '';
|
newDefine = '';
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
newDefine = ['-D"' def_name '__EQ__' val '"'];
|
if strcmp(param.Alias, '')
|
||||||
|
newDefine = ['-D"' def_name '"'];
|
||||||
|
else
|
||||||
|
newDefine = ['-D"' def_name '__EQ__' val '"'];
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -632,7 +632,7 @@ classdef periphConfig
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
callback = sprintf('periphConfig.periphParamCallback("%s");', paramName);
|
callback = sprintf('try periphConfig.periphParamCallback("%s"); catch end', paramName);
|
||||||
param.Callback = callback;
|
param.Callback = callback;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<deployment-project plugin="plugin.toolbox" plugin-version="1.0">
|
<deployment-project plugin="plugin.toolbox" plugin-version="1.0">
|
||||||
<configuration build-checksum="1424241104" file="F:\Work\Projects\MATLAB\mcu_matlab_lib\mcuwrapper.prj" location="F:\Work\Projects\MATLAB\mcu_matlab_lib" name="mcuwrapper" target="target.toolbox" target-name="Package Toolbox">
|
<configuration build-checksum="1391118035" file="F:\Work\Projects\MATLAB\mcu_matlab_lib\mcuwrapper.prj" location="F:\Work\Projects\MATLAB\mcu_matlab_lib" name="mcuwrapper" target="target.toolbox" target-name="Package Toolbox">
|
||||||
<param.appname>MCU Wrapper</param.appname>
|
<param.appname>MCU Wrapper</param.appname>
|
||||||
<param.authnamewatermark>Razvalyaev</param.authnamewatermark>
|
<param.authnamewatermark>Razvalyaev</param.authnamewatermark>
|
||||||
<param.email>wot890089@mail.ru</param.email>
|
<param.email>wot890089@mail.ru</param.email>
|
||||||
@ -7,7 +7,7 @@
|
|||||||
<param.summary>Library for run MCU program in Simulink</param.summary>
|
<param.summary>Library for run MCU program in Simulink</param.summary>
|
||||||
<param.description />
|
<param.description />
|
||||||
<param.screenshot />
|
<param.screenshot />
|
||||||
<param.version>1.02</param.version>
|
<param.version>1.03</param.version>
|
||||||
<param.output>${PROJECT_ROOT}\MCU Wrapper.mltbx</param.output>
|
<param.output>${PROJECT_ROOT}\MCU Wrapper.mltbx</param.output>
|
||||||
<param.products.name />
|
<param.products.name />
|
||||||
<param.products.id />
|
<param.products.id />
|
||||||
@ -84,6 +84,7 @@
|
|||||||
<file>${PROJECT_ROOT}\McuLib</file>
|
<file>${PROJECT_ROOT}\McuLib</file>
|
||||||
</fileset.rootdir>
|
</fileset.rootdir>
|
||||||
<fileset.rootfiles>
|
<fileset.rootfiles>
|
||||||
|
<file>${PROJECT_ROOT}\McuLib\.library_installed.mat</file>
|
||||||
<file>${PROJECT_ROOT}\McuLib\install_my_library.m</file>
|
<file>${PROJECT_ROOT}\McuLib\install_my_library.m</file>
|
||||||
<file>${PROJECT_ROOT}\McuLib\lib</file>
|
<file>${PROJECT_ROOT}\McuLib\lib</file>
|
||||||
<file>${PROJECT_ROOT}\McuLib\m</file>
|
<file>${PROJECT_ROOT}\McuLib\m</file>
|
||||||
|
Loading…
Reference in New Issue
Block a user