Configuring MCAL Modules Using DaVinci
This topic explains how to configure AUTOSAR MCAL modules with Vector DaVinci Configurator and prepare those configurations for MCAL code generation. The primary value of this workflow is design-time validation: you define pin usage, peripheral behavior, and module capabilities up front so that generated code enforces those decisions consistently across targets and projects. Using DaVinci as the configuration front end reduces integration risk by surfacing configuration conflicts before you generate or integrate code into your Simulink models.
This topic applies to multiple MCAL modules, including Port, DIO, ADC, and related peripherals. The same configuration workflow applies regardless of the specific module you configure.
Launching DaVinci Configurator
This section outlines the basic steps to start DaVinci Configurator, create an ECU project, and make MCAL modules available for configuration. For more information, refer to the DaVinci user guide.
Launching DaVinci Configurator
Navigate to the DaVinci installation directory:
Double-click DaVinciCFG.exe to launch the tool.
When prompted with the startup disclaimer or warning, click I accept to proceed.
The DaVinci Configurator SIP.MCAL workspace opens and is ready for use.
Creating a New ECU Project
Perform these steps to create a new ECU project:
Click File and then click New ECU Project.
In the General Settings dialog:
Enter a valid project name (must start with a letter:
[a–zA–Z].Specify or browse to the project folder location.
Click Next through the project structure window.
In the Target Selection window, choose the target MCU family and variant.
Click Finish to create the ECU project.
After project creation, options such as Save,
Import, Export, and
Close become enabled. The project name and path
appear in the DaVinci title bar, and a corresponding .dpa project
file is created in the selected project directory.
Making MCAL Modules Visible in DaVinci
Before MCAL modules (Port, DIO, ADC, etc.) appear in DaVinci, their definition files must be available:
Locate the DaVinci BSWMD directory in the installation path.
Create module-specific subfolders if they do not already exist (for example,
Port,Dio,Adc).Copy the corresponding:
PDF (Parameter Definition File)
BSWMDT (BSW Module Description Template)
files from the MCAL package into the appropriate module folders.
CDF (Configuration Description File)
Captures the user-defined configuration
Restart DaVinci Configurator to allow the tool to discover the new modules.
Ensure that only one PDF per module variant is present in the BSWMD folder. Multiple PDFs for the same module cause DaVinci to report configuration conflicts.
Adding MCAL Modules to the ECU Project
In the ECU Project View, add the required MCAL modules (for example, Port, DIO, ADC, MCU).
Each selected module appears in the Basic Editor tree.
Expand the module containers to access configuration parameters.
MCAL Configuration
MCAL configuration relies on standardized AUTOSAR files:
PDF (Parameter Definition File): Defines configuration parameters and constraints
BSWMDT (BSW Module Description Template): Describes generator behavior and code structure
CDF (Configuration Description File): Captures the user-defined configuration
These artifacts collectively define what code can be generated and how it behaves.
Editing Module Configuration
Use the Basic Editor to configure module-specific parameters, for example:
Port module
Pin direction, mode (GPIO / alternate function), electrical characteristics
DIO module
Channel, port, and channel group mappings
ADC module
Conversion groups, trigger sources, notification callbacks
DaVinci performs structural validation during editing and highlights invalid or inconsistent parameter combinations.
Saving and Exporting Configuration
Save the ECU project regularly to persist configuration changes.
Export the configuration when ready:
Select Export to generate AUTOSAR XML (CDF) files.
Use the exported CDF as input to the MCAL configuration generator for code generation.
Validation and Error Handling
Key characteristics of the workflow:
Configuration errors are detected early, before compilation
Disabled APIs are excluded at the preprocessor level
Generated macros reflect symbolic names defined in the configuration tool
This approach improves portability, maintainability, and confidence in the generated MCAL integration.
See Also
Getting Started with MCAL DIO Blocks on Renesas RH850 Microcontrollers | Code Interfaces for SIL and PIL