编译过程自定义
交叉编译、代码生成后处理、目标编译过程自定义
自定义编译过程,并根据您的应用程序开发环境和运行时要求自定义编译过程基础结构。控制编译和链接代码需要的文件和标志。
函数
对象
主题
自定义编译过程
- Approaches for Building Code Generated from Simulink Models
Choose CMake, toolchain, or template makefile approach for building generated code. - Template Makefiles and Make Options
Template makefiles that are built into the code generator. - Control Build Process Compiling and Linking
Select whether build process ends after code generation and (for template makefile approach) select template makefile options. - Control Compiler Optimizations
Control compiler optimizations for your makefile at the Simulink® UI level. - 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. - Control Regeneration of Top Model Code
Choose options for regenerating code for the top-level model. - Reduce Build Time for Referenced Models by Using Parallel Builds
Apply parallel builds to reduce build time for large model reference hierarchies. - Use makecfg to Customize Generated Makefiles for S-Functions
Configure makefile generation for the S-function 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. - 转移或共享生成的代码
将生成的代码和工件打包并转移到其他开发环境中。 - Compile Code in Another Development Environment
Relocate generated code and compile in another environment.
自定义编译过程基础结构
- Register Custom Toolchain and Build Executable
Register and use a toolchain to build an executable program. - 使用 STF_make_rtw_hook 文件自定义编译过程
使用自定义
钩子文件中的编译过程钩子机制修改编译过程。STF
_make_rtw_hook.m - Customize Build Process with sl_customization.m
Modify the build process with the build process hook mechanism in a custom sl_customization.m hook file. - Replace STF_rtw_info_hook Supplied Target Data
For custom targets created prior to MATLAB® Release 14, update use of custom
hook for specifying target-specific characteristics.STF
_make_rtw_hook
开发自定义目标
- 自定义目标
创建软件,将 MATLAB 和 Simulink 设计部署到硬件平台。 - 自定义系统目标文件
开发自定义系统目标文件,以满足开发目的并控制代码生成。 - Custom Target Optional Features
Add optional feature support to a custom system target file for compliance with code generation features, such as toolchain compliance and model reference compliance. - Support Toolchain Approach with Custom Target
Add toolchain approach support to a custom system target file for more user-interface controls of the build process. - Support C Function Prototype Control
Add C function prototype control support to a custom system target file for more build process control. - Support Model Referencing
Add model reference support to a custom system target file for model reference builds. - Support Compiler Optimization Level Control
Add compiler optimization level control support to a custom system target file for more build process control. - Support Concurrent Execution of Multiple Tasks
Add multitasking execution support to a custom system target file for multicore target models. - 设备驱动程序
将设备驱动程序用作实时开发项目的一部分。