How can I change the rtwbuild option "skipSetupArg"?

조회 수: 3 (최근 30일)
Georg
Georg 2023년 1월 11일
답변: Meet 2023년 3월 10일
The build process (command: rtwbuild('model')) generates a model.bat file in Matlab 2022b. Here is an exemplary content:
set skipSetupArg=%2
if "%skipSetupArg%" NEQ "skip_setup_msvc" (
call "setup_msvc.bat"
)
cd .
if "%1"=="" (nmake -f model.mk all) else (nmake -f model.mk %1)
@if errorlevel 1 goto error_exit
exit /B 0
:error_exit
echo The make command returned an error of %errorlevel%
exit /B 1
The file is then automatically executed with the argument "skip_setup_msvc", skipping the corresponding call "setup_msvc". (The full Command Window output is in the text file in the attachment.)
The subsequent command "nmake -f model.mk all" thereby fails and the build process terminates.
In Matlab 2020b there was (as far as I can tell) no such argument.
Is there an option in Matlab to change the argument "skipSetupArg"?
Thank you!

답변 (1개)

Meet
Meet 2023년 3월 10일
Yes, you can change the argument "skipSetupArg" by modifying the build settings in MATLAB. Follow the steps below:
  1. Open the Simulink model that you want to build.
  2. Click on the "Modeling" tab in the MATLAB ribbon.
  3. In the "Model Settings" section, click on the "Model Settings" button.
  4. In the "Configuration Parameters" dialog box, select "Code Generation" from the left-hand side list.
  5. In the "Code Generation" section, locate the "Custom Code" pane.
  6. In the "Custom Code" pane, find the "Build command" field.
  7. In the "Build command" field, remove the "skip_setup_msvc" argument and any other arguments that you want to change.
  8. Click on the "Apply" button to save the changes.
  9. Click on the "OK" button to close the dialog box.
After you have modified the build settings, MATLAB should generate the model.bat file with the updated build command, which will include your changes to the skipSetupArg argument.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by