pre-release 1.03

This commit is contained in:
2025-06-28 16:20:28 +03:00
parent 1aa3c5b955
commit 041322a62e
8 changed files with 29 additions and 6 deletions

View File

@@ -2,12 +2,24 @@
function install_my_library()
libDir = fileparts(mfilename('fullpath'));
% Путь к файлу-флагу, указывающему, что установка уже была
flagFile = fullfile(libDir, '.library_installed.mat');
% Если библиотека уже установлена просто выходим
if isfile(flagFile)
return;
end
% 1. Добавляем библиотеку и m-файлы в путь
addpath(fullfile(libDir, 'lib'));
addpath(fullfile(libDir, 'm'));
savepath;
% 3. Обновляем Library Browser
% 2. Обновляем Library Browser
rehash;
sl_refresh_customizations;
% 3. Сохраняем флаг установки
installedOn = datetime('now');
save(flagFile, 'installedOn');
end

Binary file not shown.

View File

@@ -6,7 +6,8 @@ classdef mainConfig
blockPath = gcb;
mask = Simulink.Mask.get(blockPath);
wrapParamToExport = {'wrapperPath', 'enableDebug', 'mcuClk', ...
'threadCycles', 'enableThreading', 'enableDeinit'};
'threadCycles', 'enableThreading', 'enableDeinit', ...
'periphPath'};
portParamToExport = {'inNumb', ...
'in_port_1_name', 'in_port_1_width', ...
'in_port_2_name', 'in_port_2_width', ...
@@ -103,6 +104,8 @@ classdef mainConfig
end
mcuMask.disp(0, 'Конфигурация успешно импортирована.');
mcuMask.periphUpdate();
end
end

View File

@@ -324,6 +324,9 @@ classdef mcuMask
start(t);
end
function v = getMyLibVersion()
v = 'pre-1.03';
end
end
end

View File

@@ -265,7 +265,11 @@ function definesWrapperArg = addDefineByParam(definesWrapperArg, paramName, val_
newDefine = '';
end
else
newDefine = ['-D"' def_name '__EQ__' val '"'];
if strcmp(param.Alias, '')
newDefine = ['-D"' def_name '"'];
else
newDefine = ['-D"' def_name '__EQ__' val '"'];
end
end

View File

@@ -632,7 +632,7 @@ classdef periphConfig
end
end
callback = sprintf('periphConfig.periphParamCallback("%s");', paramName);
callback = sprintf('try periphConfig.periphParamCallback("%s"); catch end', paramName);
param.Callback = callback;
end