Contenido principal

La traducción de esta página aún no se ha actualizado a la versión más reciente. Haga clic aquí para ver la última versión en inglés.

Configuración de compilación

Configuración de los parámetros de compilación, como el nombre del archivo de salida, la ubicación, el tipo y el lenguaje

Para controlar y configurar el proceso de compilación para la generación de código binario, existen muchos parámetros y ajustes. Estos ajustes controlan atributos como el tipo de compilación de salida (MEX, lib, dll o exe) y el lenguaje C frente a C++. Otros ajustes de compilación permiten personalizar la salida de compilación en función de necesidades específicas, como la legibilidad, el rendimiento y la integración de código externo. Puede modificar las opciones de compilación en el objeto de configuración de generación de código desde la app o desde la línea de comandos. Puede crear el objeto de configuración mediante coder.config. Abra el objeto en la app de edición con open. Para especificar archivos de compilación adicionales e indicadores desde dentro de su código de función, use coder.updateBuildInfo.

Funciones

expandir todo

coder.configCreate code generation configuration objects
coder.updateBuildInfoUpdate RTW.BuildInfo build information object
target.addAdd target object to internal database
target.clearClear all target objects from internal database (Desde R2023a)
target.createCreate target object
target.exportExport target object data
target.getRetrieve target objects from internal database
target.removeRemove target object from internal database
target.updateUpdate target objects in internal database (Desde R2023a)
target.upgradeUpgrade existing definitions of hardware devices
addCompileFlagsAdd compiler options to build information
addDefinesAdd preprocessor macro definitions to build information
addIncludeFilesAdd include files to build information
addIncludePathsAdd include paths to build information
addLinkFlagsAdd link options to build information
addLinkObjectsAdd link objects to build information
addNonBuildFilesAdd nonbuild-related files to build information
addPreincludeFilesAdd preinclude files to build information (Desde R2024a)
addSourceFilesAdd source files to build information
addSourcePathsAdd source paths to build information
addUndefinesAdd undefine preprocessor directives to build information (Desde R2024a)
removeIncludePathsRemove include paths from build information (Desde R2023b)
removeSourceFilesRemove source files from build information object (Desde R2021b)
removeUndefinesRemove undefine preprocessor macros from build information (Desde R2024a)
findBuildArgFind a specific build argument in build information
findIncludeFilesFind and add include (header) files to build information
getBuildArgsGet build arguments from build information
getCompileFlagsGet compiler options from build information
getDefinesGet preprocessor macro definitions from build information
getFullFileListGet list of files from build information
getIncludeFilesGet include files from build information
getIncludePathsGet include paths from build information
getLinkFlagsGet link options from build information
getNonBuildFilesGet nonbuild-related files from build information
getPreincludeFilesGet preinclude files from build information (Desde R2024a)
getSourceFilesGet source files from build information
getSourcePathsGet source paths from build information
getUndefinesFrom build information, get preprocessor macros to undefine (Desde R2024a)
setTargetProvidesMainDisable inclusion of code generator provided (generated or static) main.c source file during build
updateFilePathsAndExtensionsUpdate files in build information with missing paths and file extensions
updateFileSeparatorUpdate file separator character for file lists in build information

Objetos

coder.MexCodeConfigConfiguration parameters for MEX function generation from MATLAB code
coder.CodeConfigConfiguration parameters for C/C++ code generation from MATLAB code
coder.EmbeddedCodeConfigConfiguration parameters for C/C++ code generation from MATLAB code with Embedded Coder
coder.HardwareImplementationHardware-specific configuration parameters for C/C++ code generation from MATLAB code
coder.hardwareCreate hardware board configuration object for C/C++ code generation from MATLAB code
coder.ReplacementTypesConfiguration parameter to specify custom names for MATLAB built-in data types in C/C++ code generation
RTW.BuildInfoProvide information for compiling and linking generated code

Clases

coder.ExternalDependencyInterface to external code
target.AliasCreate alternative identifier for target object
target.CMakeSpecify CMake installation for building generated code (Desde R2022b)
target.CMakeBuilder Configure how CMake builds generated code (Desde R2022b)
target.CMakeBuildTypeDescribe CMake build type or build configuration (Desde R2022b)
target.CMakeCacheEntryConfigure a CMake cache entry (Desde R2022b)
target.EnvironmentConfigurationConfigure system environment for toolchain (Desde R2022b)
target.HardwareComponentSupportDescribe support for a hardware component (Desde R2022b)
target.LanguageImplementationProvide C and C++ compiler implementation details
target.ObjectBase class for target types
target.ProcessorProvide target processor information
target.ToolchainCapture high-level information about toolchain (Desde R2022b)

Espacios de nombres

targetManage target hardware and build tool information

Temas

Conceptos básicos de la configuración de compilación

Opciones de compilación específicas

Resolución de problemas

Ejemplos destacados