
Simulink Customize A2l
Customize A2L (ASAP2) files generated from Simulink models using coder.asap2 and...
Install
npx skills add matlab/simulink-agentic-toolkit --skill simulink-customize-a2l -g -a claude-code -y- Repository
- matlab/simulink-agentic-toolkit1.3k
- Category
- Engineering
- Updated
- 6d ago
- License
- See repository
- Context cost
- Mediumabout 2,447 tokens
- Runs scripts
- No, instructions only
What it does
Customize A2L (ASAP2) files generated from Simulink models using coder.asap2 and coder.mapping APIs. Use this skill when adding COMPU_METHODs, creating GROUPs, converting STD_AXIS to COM_AXIS, adding BIT_OPERATIONs, creating VARIANT_CODING, excluding measurements or struct elements, removing DEFAULT_EVENT_LIST, or any A2L customization for calibration tool compatibility (INCA, CANape). Also use when the user mentions ASAP2, ECU calibration data, A2L export.
Customize A2L Files
Customize A2L (ASAP2) files generated from Simulink models using the coder.asap2 and coder.mapping APIs, avoiding silent errors and undocumented pitfalls.
When to Use
- Adding or modifying COMPU_METHODs (LINEAR, RAT_FUNC, TAB_VERB, IDENTICAL)
- Creating or modifying GROUPs in the A2L file
- Converting STD_AXIS to COM_AXIS for lookup tables
- Adding BIT_OPERATION (LEFT_SHIFT, RIGHT_SHIFT, SIGN_EXTEND) to measurements
- Creating VARIANT_CODING (VarCriterion, VarCharacteristic)
- Excluding inports, outports, or struct elements from the A2L
- Removing DEFAULT_EVENT_LIST or other IF_DATA blocks
- Any customization passed via
CustomEcuDescriptionstocoder.asap2.export
When NOT to Use
- Reading or parsing existing A2L files (use Vehicle Network Toolbox
a2lfile) - Configuring XCP/CAN transport layers
- Setting up Simulink model code generation (storage classes, data dictionaries)
- General Embedded Coder build workflows without A2L customization
Core Workflow
Decision: Direct export vs. customization workflow
- No element customization needed (only configuration like excluding struct elements or DEFAULT_EVENT_LIST): call
coder.asap2.exportdirectly with name-value options. NogetEcuDescriptionsneeded. - Element customization needed (adding/modifying/deleting measurements, characteristics, groups, etc.): use the full
getEcuDescriptions→ customize → export workflow.
% === Path A: Config-only (no element changes) ===
load_system(modelName);
slbuild(modelName);
coder.asap2.export(modelName, SupportStructureElements=false, IncludeDefaultEventList=false);
% === Path B: Element customization ===
load_system(modelName);
slbuild(modelName);
% 1. Create ECU descriptions, pass ALL configuration options here
descObj = coder.asap2.getEcuDescriptions(modelName, ...
SupportStructureElements=false, ...
IncludeDefaultEventList=false);
