сделано расширенное эхо в консоли по кнопку

This commit is contained in:
Razvalyaev 2025-06-09 22:44:49 +03:00
parent 63ce872689
commit 59b4f9cffc
3 changed files with 58 additions and 41 deletions

View File

@ -86,49 +86,50 @@ IF %compil_mode%==[debug] (set debug= -g)
::------START COMPILING-------
echo Compiling...
if "%5"=="echo_enable" (
echo Compiling...
echo ===========================
echo INCLUDES:
echo USER:
for %%f in (%includes_USER%) do (
echo %%f
)
echo INTERNAL:
for %%f in (%includes_MCU%) do (
echo %%f
)
for %%f in (%includes_WRAPPER%) do (
echo %%f
)
echo ===========================
echo INCLUDES:
echo USER:
for %%f in (%includes_USER%) do (
echo %%f
)
echo INTERNAL:
for %%f in (%includes_MCU%) do (
echo %%f
)
for %%f in (%includes_WRAPPER%) do (
echo %%f
)
echo ===========================
echo SOURCES:
echo USER:
for %%f in (%code_USER%) do (
echo %%f
)
echo INTERNAL:
for %%f in (%code_WRAPPER%) do (
echo %%f
)
for %%f in (%code_MCU_Sim%) do (
echo %%f
)
for %%f in (%code_MCU%) do (
echo %%f
)
echo ===========================
echo SOURCES:
echo USER:
for %%f in (%code_USER%) do (
echo %%f
)
echo INTERNAL:
for %%f in (%code_WRAPPER%) do (
echo %%f
)
for %%f in (%code_MCU_Sim%) do (
echo %%f
)
for %%f in (%code_MCU%) do (
echo %%f
)
echo ===========================
echo DEFINES:
echo USER:
for %%d in (%defines_USER%) do (
echo %%d
)
echo INTERNAL:
for %%f in (%defines_WRAPPER%) do (
echo %%f
echo ===========================
echo DEFINES:
echo USER:
for %%d in (%defines_USER%) do (
echo %%d
)
echo INTERNAL:
for %%f in (%defines_WRAPPER%) do (
echo %%f
)
)
echo ===========================
echo MODE: %compil_mode%

Binary file not shown.

View File

@ -5,6 +5,10 @@ close;
Ts = 0.00001;
delete("*.mexw64")
delete("*.mexw64.pdb")
delete(".\MCU_Wrapper\Outputs\*.*");
% Флаг режима отладки
definesArg = buildDefinesString();
definesUserArg = parseDefinesMaskText();
@ -15,9 +19,11 @@ paramNames = get_param(gcbh, 'MaskNames');
inxDebug = find(strcmp(paramNames, 'enableDebug'));
idxExtConsole = find(strcmp(paramNames, 'extConsol'));
idxFullOutput = find(strcmp(paramNames, 'fullOutput'));
isDebug = maskValues{inxDebug};
isExtConsole = maskValues{idxExtConsole};
isFullOutput = maskValues{idxFullOutput};
if strcmpi(isDebug, 'on')
modeArg = "debug";
@ -25,17 +31,27 @@ else
modeArg = "release";
end
if strcmpi(isFullOutput, 'on')
echoArg = 'echo_enable';
else
echoArg = 'echo_disable';
end
[includesArg, codeArg] = make_mex_arguments('incTable', 'srcTable');
set_param(gcb, 'consoleOutput', '');
% Вызов батника с двумя параметрами: includes и code
cmd = sprintf('.\\MCU_Wrapper\\run_mex.bat "%s" "%s" "%s" %s', includesArg, codeArg, definesAllArg, modeArg);
cmd = sprintf('.\\MCU_Wrapper\\run_mex.bat "%s" "%s" "%s" %s %s', includesArg, codeArg, definesAllArg, modeArg, echoArg);
if(strcmpi(isExtConsole, 'on'))
cmdout = runBatAndShowOutput(cmd);
else
[status, cmdout]= system(cmd);
end
% Сохраним вывод в параметр маски с именем 'consoleOutput'
set_param(gcb, 'consoleOutput', cmdout);