How to configure EHB-CB to support TargetLink models

TargetLink from DSpace is a code generator that generates C code from MathWorks® Simulink®/Stateflow® models.

TargetLink provides a custom block library where the blocks have additional information required for code generation.

TargetLink Library Screenshot from Simulink
Figure 1. Screenshot of TargetLink library (opened in Simulink)

Through its generic support for Simulink libraries, EHANDBOOK Container-Build also supports the custom blocks of the TargetLink custom block library.

TargetLink Library Screenshot from EHANDBOOK
Figure 2. Screenshot of TargetLink library (opened in EHANDBOOK)

TargetLink blocks can both be part of the generated SVG graphics embedded in the documentation text (left side) as well as part of interactive models (right side).

To support the rendering of TargetLink blocks in EHANDBOOK, the following configurations have to be applied:

  1. Ensure that the directory containing the TargetLink library tllib.slx is added to the list of paths passed to EHANDBOOK Container-Build via -simlib or -simlibfile option

  2. Ensure to use a connection to MATLAB during EHANDBOOK Container-Build execution. This is required to generate graphics for TargetLink blocks.

  3. (Optional, but recommended): Provide a view configuration such that the inner dertails of library blocks that are based on subsystems are hidden. Refer to details described here.

If custom libraries based on the standard TargetLink library are used, the directories containing them also have to be added to the list of Simulink libraries and passed via the '-simlib' or -simlibfile option.