My Simulink model uses native Simulink blocks within multiple atomic subsystems that are defined as reusable functions with unique file names. When I auto-code my model, the native Simulink blocks get auto-coded as in-lined functions within the atomic subsystem's auto-generated function file. The problem comes when another atomic subsystem also uses this same native Simulink block, but, this time, the MATLAB Coder placed just a function call out to the code that is now in-lined within the other atomic subsystem's reusable function. This creates a dependency between the two subsystems' functions and the order in which they are compiled. Is there a setting either on the native Simulink block or within the model code generation configuration parameters that will allow me to specifify exactly how I want the native Simulink blocks to be auto-coded. I would like to have them coded as reusable functions within their own uniqe files which can be called by my other code.
MATLAB: Can I modify how a native Simulink block is auto-coded
code generationmatlab codersimulink
Related Question
- How to define an Atomic subsystem(Nonreusable function) as static function in code generation in Embedded coder.
- Are atomic subsystems that have reusable function packaging not made reusable when used within enabled subsystems
- Simulink Library Code Generation
- How to Generate separate function from different simulink subsystem. I am using Matlab 2017a. Normally in simulink all the subsystem blocks will be combined after generating code. Can anyone suggest. How to Generate separate function from diffe
Best Answer