powertrain-build/docs/target_link/custom_code_block.md
Henrik Wahlqvist 1f388f1d2d Add docs about TargetLink
Change-Id: I027ec3815c741022d3860820e8ac8c521506c1c8
2024-10-04 10:00:48 +02:00

1.0 KiB

TargetLink Custom Code Blocks


[TOC]

The Custom Code Block

The custom code block enables to easily insert custom written snippets of c code.

Make sure to use a proper code review, as it is easy to cause underflow and overflow errors. The usage of Polyspace Code Prover is advised.

It could also be an idea to run Polyspace bugfinder.

Sharing the C Code

By deploying the generated c code from the custom code blocks to a common folder, it can be shared between simulink models (similarily to shared TargetLink functions).

Read the Manual

There are some docs in the TargetLink documentation DSPace docs under: Custom Code Blocks.

Also, there is a demo model, in the MATLAB Command Window, enter tl_demos custom_blocks.

Header Files

Include Statements in Custom Code blocks should not be used, but replaced by "AddFile" blocks.

This complies to MISRA rule 19.1. Include directives which says that only preprocessor directives or comments may be placed before include directives.