생성 코드의 빌드 프로세스 구성하기
응용 사례에 따라 C/C++ 소스 코드 생성 후(단, 컴파일 전)에 발생하는 빌드 프로세스의 특정 측면을 제어하고자 할 수 있습니다. MATLAB® 코드 내부에서 추가 빌드 파일과 플래그를 지정하려면 coder.updateBuildInfo 함수를 사용하십시오. 또는 작업 공간에서 RTW.BuildInfo 객체를 만들고 이와 연관된 객체 함수를 사용하여 빌드 옵션을 지정하십시오. 외부 코드 통합을 처리하거나 동일한 빌드 정보를 사용하는 함수가 여러 개 있는 경우 coder.ExternalDependency 클래스를 사용하여 빌드 프로세스를 사용자 지정하십시오.
타깃 하드웨어와 빌드 툴 정보를 관리하려면 target 네임스페이스의 클래스를 사용하십시오. 예를 들어, 코드 생성을 위한 새 타깃 하드웨어를 등록하거나, 외부 모드 및 PIL(Processor-in-the-Loop) 시뮬레이션을 위한 연결 대상을 설정하거나, 개발 컴퓨터에서 생성 코드를 빌드하기 위한 사용자 지정 CMake 툴체인 정의를 생성합니다.
함수
객체
RTW.BuildInfo | 생성 코드를 컴파일하고 링크하기 위한 정보 제공 |
클래스
coder.ExternalDependency | Interface to external code |
target.Alias | Create alternative identifier for target object |
target.BuildTool | Describe build tool (R2023a 이후) |
target.BuildToolType | Describe build tool type (R2023a 이후) |
target.CMake | Specify CMake installation for building generated code (R2022b 이후) |
target.CMakeBuilder | Configure how CMake builds generated code (R2022b 이후) |
target.CMakeBuildType | Describe CMake build type or build configuration (R2022b 이후) |
target.CMakeCacheEntry | Configure a CMake cache entry (R2022b 이후) |
target.EnvironmentConfiguration | Configure system environment for toolchain (R2022b 이후) |
target.HardwareComponentSupport | Describe support for a hardware component (R2022b 이후) |
target.LanguageImplementation | Provide C and C++ compiler implementation details |
target.Object | Base class for target types |
target.Processor | Provide target processor information |
target.Toolchain | Capture high-level information about toolchain (R2022b 이후) |
네임스페이스
target | 타깃 하드웨어 및 빌드 툴 정보 관리 |
도움말 항목
- Build Process Customization
Control aspects of the build process that occur after code generation but before compilation.
- C Compiler Considerations for Signed Integer Overflows
For accurate results from signed integer C operations, the C compiler must preserve wrap-on-overflow behavior.
- Requirements for Signed Integer Representation
Compile generated code on a target that uses a two’s complement representation for signed integer values.
- Register New Hardware Devices
Extend the range of supported hardware by registering new devices.
- Configure CMake Build Process
Specify CMake toolchain definition for building generated code.
- Create Custom CMake Toolchain Definition
CMake is a third-party, open-source tool for build process management.
- 컴파일러 및 링커 오류
빌드 중에 발생하는 오류의 일반적인 원인을 해결합니다.
