| Real-Time Workshop® Embedded Coder™ | ![]() |
For code generation with Real-Time Workshop Embedded Coder software, configure your model for the following options on the Solver pane of the Configuration Parameters dialog box:
Type: fixed-step
Solver: You can select any available solver algorithm.
Tasking mode for periodic sample times: When the model is single-rate, you must select the SingleTasking or Auto mode. Permitted Solver Modes for Real-Time Workshop Embedded Coder Targeted Models indicates permitted solver modes for single-rate and multirate models.
If you use blocks that have a dependency on absolute time in a program, you should properly specify the Application lifespan (days) parameter on the Optimization pane. (See Limitations on the Use of Absolute Time in the Real-Time Workshop documentation for a list of such blocks.) You can use these blocks in applications that run for extremely long periods, with counters that provide accurate and overflow-free absolute time values, provided that you specify a long enough lifespan. If you are designing a program that is intended to run indefinitely, specify Application lifespan (days) as inf. This generates a 64 bit integer counter. For an application whose sample rate is 1000 MHz, a 64 bit counter will not overflow for more than 500 years.
You can use any Simulink blocks in your models, except for blocks not supported by the Embedded-C format, as follows:
MATLAB Fcn block
M-file and Fortran S-functions that are not inlined with TLC
Note that use of certain blocks is not recommended for production code generation for embedded systems. To view a table that summarizes characteristics of blocks in the Simulink block library, execute the following command at the MATLAB command line:
showblockdatatypetable
Refer to the Code Generation Support column of the table and its footnotes, including the footnote "Not recommended for production code."
You can use both inlined and non-inlined S-functions with the Real-Time Workshop Embedded Coder product. However, inlined S-functions are often advantageous in production code generation, for example in implementing device drivers. See Tradeoffs in Device Driver Development in the Developing Embedded Targets document for a discussion of the pros and cons.
![]() | ERT Target Requirements, Restrictions, and Control Files | ERT System Target File and Template Makefiles | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |