이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
코드 컴파일 사용자 지정
빌드 프로세스의 사용자 지정 컴파일
지원되는 빌드 툴을 설치하면 코드 생성 후 실행 가능한 코드를 생성하는 빌드 프로세스를 구성할 수 있습니다. 빌드 프로세스의 컴파일 단계를 사용자 지정할 수 있습니다.
타깃 프레임워크를 사용하여 다음을 수행할 수 있습니다.
사용자 지정 CMake 툴체인 정의를 만듭니다.
사용자 지정 makefile 기반 툴체인을 정의하고 등록합니다.
ToolchainInfo
객체를 사용하여 사용자 지정 makefile 기반 툴체인을 등록해 사용할 수도 있습니다.
템플릿 makefile 접근 방법의 경우, 함께 제공되는 탬플릿 makefile을 사용자 지정하십시오.
CMake, ToolchainInfo
및 템플릿 makefile 접근 방법의 경우:
코드 생성 후 명령을 만들고 실행합니다.
빌드 프로세스의 특정 지점에서 후크 메서드를 생성하고 적용합니다.
S-Function 코드의 컴파일을 구성합니다.
네임스페이스
target | Manage target hardware and build tool information |
클래스
객체
함수
도움말 항목
컴파일러
- Select and Configure C or C++ Compiler
Consider programming language compliance for generated code and select a compiler for the build process. - Control Compiler Optimizations
Control compiler optimizations for your makefile at the Simulink® UI level. - Troubleshoot Compiler Issues
Identify and fix issues that prevent compiler operation in the build process. - Control Build Process Compiling and Linking
Select whether build process ends after code generation and (for template makefile approach) select template makefile options.
라이브러리 이름 및 위치
- Control Library Location and Naming During Build
Choose the location for precompiled, non-precompiled, and model reference libraries and select the file extension that the build process applies to libraries.
타깃 프레임워크를 사용한 CMake 및 Makefile 기반 툴체인
- Create Custom CMake Toolchain Definition
CMake is a third-party, open-source tool for build process management. - Build Code in Windows Subsystem for Linux
Use CMake in WSL environment to build generated code. - Define Custom Makefile-Based Toolchains Using Target Framework
Define and register custom makefile-based toolchains. - Build Generated Code Remotely
Create a connection and build generated code on a remote computer. - Build and Execute Generated Code Remotely
Create an SSH connection, use it to build generated code on a remote computer, and then reuse it to execute the generated code remotely.
ToolchainInfo
를 사용한 makefile 기반 툴체인
- Custom Toolchain Registration
Register third-party software build tools for creating executables and libraries. - Register Custom Toolchain and Build Executable
Register and use a toolchain to build an executable program. - Troubleshooting Custom Toolchain Validation
Troubleshoot validation errors.
템플릿 makefile 접근 방식
- Template Makefiles and Make Options
Template makefiles that are built into the code generator. - Customize Template Makefiles
Develop a custom template makefile to control the build process.
고급 기법
- Customize Post-Code-Generation Build Processing
Modify the build process with a post-code-generation command and (optionally) use build information objects to augment this process. - Customize Build Process with STF_make_rtw_hook File
Modify the build process with the build process hook mechanism in a custom
hook file.STF
_make_rtw_hook.m - Customize Build Process with sl_customization.m
Modify the build process with the build process hook mechanism in a customsl_customization.m
hook file. - Use makecfg to Customize Generated Makefiles for S-Functions
Configure makefile generation for the S-function build process.