Compiling referenced model problem
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi all
I am having issues while generating C code for a simulink file containing a referenced model. Basically, I can compile either referenced model (MyBattModel) stand alone or the parent simulink file (TestBench2/MySoX0) (with the referenced model commented) with no issues. The error occurs when I put them together. These are some details about my implementation.
- Simulating the blocks with simulink works.
- I am enforcing the same configuration on both parent and referenced model by means of a DataDictionary (.sldd) file.
- The code is being generated for an ARM cortex-M processor. I have used the embedded coder (ert.tlc) or the generic real time target (grt.tlc) with similar error.
- C code seems to be generated and it seems to be logical. However, due to the error, I wonder about the correctness of the code.
Some details about the error below. What am I missing here? Thanks for any help
### Starting serial model reference code generation build
### Checking the status of model reference code generation target for model 'MyBattModel' used in 'MySoX0'
### Model reference code generation target (MyBattModel.c) for model MyBattModel must be recompiled because either MyBattModel.c has changed since the last build, or it has never been compiled.
### Starting build procedure for: MyBattModel
### Generating code and artifacts to 'Model specific' folder structure
Warning: Ignoring settings in the tunable parameters table for model 'MyBattModel' because it
references or is referenced by another model. Run tunablevars2parameterobjects to create
parameter objects with the storage class information from the tunable parameters table.
### Code for the model reference code generation target for model MyBattModel is up to date because no functional changes were found in the referenced model.
### Using toolchain: GNU Tools for ARM Embedded Processors
### 'C:\Repositories\CompileMe\slprj\ert\MyBattModel\MyBattModel.mk' is up to date
MW_GNU_ARM_TOOLS_PATH = C:/PROGRA~3/MATLAB/SUPPOR~1/R2020b/3P778C~1.INS/GNUARM~1.INS/win/bin
### Successful completion of code generation for: MyBattModel
### Starting build procedure for: MySoX0
### Generating code and artifacts to 'Model specific' folder structure
### Generating code into build folder: C:\Repositories\CompileMe\MySoX0_ert_rtw
Warning: The data types for blocks inside the subsystem 'TestBench2/MySoX' are
under-specified. Simulink is using a heuristic to select the data types for these blocks. This
could lead to inconsistency between the behavior of the code generated for that subsystem
using 'Build Subsystem', and the behavior in the full model. Consider setting the
'Underspecified data types' parameter specified in the 'Data Validity' Group of the
'Diagnostics' tab of the Configuration Parameters dialog to 'warning' or 'error' in order to
see a list of relevant blocks
### Invoking Target Language Compiler on MySoX0.rtw
### Using System Target File: C:\Program Files\MATLAB\R2020b\rtw\c\ert\ert.tlc
### Loading TLC function libraries
......
### Generating TLC interface API for custom data
.
### Initial pass through model to cache user defined code
.
### Caching model source code
.............................................
### Writing header file MySoX0_types.h
### Writing header file MySoX0.h
.
### Writing source file MySoX0.c
### Writing header file MySoX0_private.h
### Writing source file ert_main.c
### TLC code generation complete.
### Creating HTML report file MySoX0_codegen_rpt.html
### Build procedure for MySoX0 aborted due to an error.
Build Summary
Top model targets built:
Model Action Rebuild Reason
==================================================================
MySoX0 Failed Code generation information file does not exist.
0 of 2 models built (1 models already up to date)
Build duration: 0h 0m 10.336s
Error using rtwbuild
The first input to exist must be a string scalar or character vector.
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!