powertrain-build/docs/PreProcessorDirectives.md
Henrik Wahlqvist 635045a3f2 Updated documentation
Change-Id: I65c140c3ab156406ba8a6ee18eba60692438e4b4
2024-09-27 10:19:31 +02:00

23 lines
905 B
Markdown

# Pre Processor Directives
powertrain-build uses pre processor directives instead of code switches.
This means that all code is generated, but the compiler chooses what to compile
depending of the settings of the directives.
![vcc_lib_preProcessor.jpg](images/preProcessor.jpg)
## Using Pre Processor Calibration Switches to Switch Signals
For this use the LogicalCodeSwitch block, otherwse you will end up with dead code.
## Code Switches for Signals Consumed in Model
Signals that are produced under a code switche and that are used locally in the model,
need to have a switch on the signal too.
The switch should be the LogicalCodeSwitch.
## Requirements
New pre processor directives, e.g. Vc.Pvc.Demo, must also be defined in a code switch configuration document.
Note that they are defined as, for example, `Vc.Pvc.Demo` in the configuration document and `Vc_Pvc_Demo` in the simulink block.