Predefined Configurations
As described in section Configuration, you can select a predefined configuration and use it for checking your code.
The predefined configurations currently available are:
MonkeyProof Coding Standard for MATLAB
A generic and complete set of configurations that reflects the MonkeyProof Coding Standard for MATLAB created in agreement with renowned companies that use CC4M. The standard references the following configurations that cover specific elements of the compelte standard: - Layout - Configuration that covers all checks related to the layout of the code. - Naming - Configuration that covers all checks related to naming conventions. - Security - Configuration that covers all checks related to potential security issues. - Testability - Configuration that covers all checks related to the testability of the code.
Coder compatibility
Use this configuration to help you identify parts of your code that are (potentially) not Coder-compatible - or might result in different behaviour.
M-code that is not Coder-compatible cannot be used to generate C or C++ code. The coding standards document for this is available on our website.
TargetLink_Compatibility
Use this configuration to help you identify parts of your code that are (potentially) not compatible with code generation using dSPACE TargetLink version 2023-B.
M-code that is compatible cannot be used to generate C or C++ code. The coding standards document for this is under a separate license.
MATLAB Compiler compatibility
Use this configuration to help you identify parts of your code that are (potentially) not Compiler-compatible - or might result in different behaviour.
M-code that is not Compiler-compatible cannot be used for deployment of your code. The coding standards document for this is available on our website.
MAB
The latest MAB (Mathworks Advisory Board) coding standards (previously MAAB) incorporate the modeling rules of JMAAB v5.1 and MAAB v3.0.
Also see the Mathworks. The MAB coding standards are for the usage of MATLAB, Simulink, Stateflow and Embedded Coder. The standards for MATLAB are configured in this predefined set of configurations.
MISRA
MISRA AC ACG version 1.0 compliance configuration. For more information see https://misra.org.uk/product/misra-ac-agc/ and https://misra.org.uk/misra-autocode/.
JMAAB
The JMAAB (Japan MATLAB Automotive Advisory Board) has developed a set of coding standards mostly for Simulink models.
After installing the CC4M toolbox, the predefined configuration MonkeyProof MATLAB Coding Standard becomes active.
If you want to open one of these configurations, switch to Predefined on the Configuration tab of the CC4M GUI, select the configuration of your choice and click Open and the Configuration Editor opens. If you want to save the configuration, the Save button will be disabled, because it is not allowed to save configuration files in the folder for predefined configurations. You will have to save the file in a different location, with Save as. The configuration file is then considered a Custom configuration.
You can obtain a list of all available configurations by using
configFiles = listPredefinedConfigurations()
which returns a cell array of all predefined configurations shipped with CC4M.
From the MATLAB command window a predefined configuration can be activated by using
monkeyproof.cc4m.activateConfigurationFile('MonkeyProof MATLAB Coding Standard')
(with MonkeyProof MATLAB Coding Standard
the name of the predefined
configuration set) and a configuration will open in the Configuration
Editor by using
monkeyproof.cc4m.openConfigurationFile('MonkeyProof MATLAB Coding Standard')