Build Configuration
Configuration of build settings such as output file name, location, type, language
To control and configure the build process for generating binary code, there are many parameters and settings. These settings control attributes such as the output build type (MEX, lib, dll, or exe) and C versus C++ language. Other build settings enable you to customize the build output according to specific needs, such as readability, performance, and external code integration. You can modify the build options in the code generation configuration object from the app or from the command line. You can create the configuration object by using coder.config
. Open the object in the editing app by using open
. To specify additional build files and flags from inside your function code, use coder.updateBuildInfo
.
함수
객체
coder.MexCodeConfig | Configuration parameters for MEX function generation from MATLAB code |
coder.CodeConfig | Configuration parameters for C/C++ code generation from MATLAB code |
coder.EmbeddedCodeConfig | Configuration parameters for C/C++ code generation from MATLAB code with Embedded Coder |
coder.HardwareImplementation | Hardware-specific configuration parameters for C/C++ code generation from MATLAB code |
coder.hardware | Create hardware board configuration object for C/C++ code generation from MATLAB code |
coder.ReplacementTypes | Configuration parameter to specify custom names for MATLAB built-in data types in C/C++ code generation (R2019b 이후) |
RTW.BuildInfo | Provide information for compiling and linking generated code |
클래스
coder.ExternalDependency | Interface to external code |
target.Alias | Create alternative identifier for target object |
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 (R2019b 이후) |
target.Processor | Provide target processor information |
target.Toolchain | Capture high-level information about toolchain (R2022b 이후) |
네임스페이스
target | Manage target hardware and build tool information |
도움말 항목
Build Configuration Basics
- Configure Build Settings
Configure build configuration parameters at the command line or in the MATLAB® Coder™ app. - Build Process Customization
Control aspects of the build process that occur after code generation but before compilation. - Paths and File Infrastructure Setup
Specify location of custom code. - Share Build Configuration Settings
Export project settings to a code generation configuration object or import the settings into a project. - Specify Configuration Parameters in Command-Line Workflow Interactively
Edit code generation configuration objects interactively. - 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. - Build Process Support for File and Folder Names
Troubleshoot build process errors that occur when file system issues prevent file processing.
Specific Build Options
- Preserve Variable Names in Generated Code
Improve readability of generated C/C++ code by preserving your variable names in the generated code. - How MATLAB Coder Partitions Generated Code
Select file partitioning method. - Change Language Standard Used for Code Generation
The code generator uses the language standard that you specify in the build settings. - Specify Data Types Used in Generated Code
Generate built-in C types or MathWorks® predefined types. - 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
Capture high-level information about CMake-based toolchain and the target hardware it supports. - Constant Input Checking in MEX Functions
Control whether a MEX function checks the value of a constant input argument.
Troubleshooting
- Compiler and Linker Errors
Address common causes of errors that occur during build.