Hi @Ojasvi,
Hello,
Thank you for providing the detailed description of your workflow. Please find below some guidance for each of your questions.
1. Importing a MATLAB/Simulink project into S32 Design Studio
For an MBDT application, MATLAB/Simulink should remain the main environment used to configure the model and generate the application code. After generating the code from the Simulink model, the generated project can be imported into S32 Design Studio when further inspection, debugging, or development from S32 Design Studio is required.
Since the exact workflow may depend on the MBDT and RTD versions being used, could you please also confirm your MBDT for S32K3 version and MATLAB version?
If you are currently encountering errors when importing a generated project into S32 Design Studio, please also share the project that is not working on your side. This would help us reproduce the issue and identify the source of the configuration errors.
2. Reusing configuration between .mex files
The .mex file represents the S32 Configuration Tools project configuration, including the configured components and their settings. Rather than manually recreating each peripheral configuration in a new project, we generally recommend starting from the existing configuration/project when the target device and software dependencies are compatible.
Directly copying individual content between two .mex files is not necessarily equivalent to migrating the complete configuration, since the configuration can depend on the selected device, RTD version, S32 Configuration Tools version, and available components.
Could you please provide some additional details about your use case? In particular, are you trying to move the configuration between two projects targeting the same S32K344 and using the same RTD version, or are you migrating the configuration to a different RTD/S32 Configuration Tools version?
3. GPIO / Port / DIO configuration
The behavior you described is related to the different purposes of the Pins Tool, Port component, and DIO component.
Configuring a pin in the Pins Tool defines the pin routing/muxing and associated pin properties. The corresponding pin configuration also needs to be represented in the Port component. If the pin is intended to be accessed by the application through the AUTOSAR DIO driver, a corresponding DioChannel must additionally be configured in the DIO component.
Therefore, adding a pin in the Pins/Port configuration does not automatically mean that a DIO channel will be created for that pin. These configurations have different purposes, and the DIO configuration explicitly defines the GPIO channels that are exposed through the DIO driver.
For additional information and examples, please refer to the following MBDT Community articles:
These articles describe the recommended configuration flow and the relationship between the Pins Tool, Port component, and DIO component.
If your configuration already follows these steps but the generated code does not reflect the expected configuration, please share the relevant .mex file or, preferably, a minimal project that reproduces the behavior. We can then review the configuration and investigate the issue further.
Regards,
Dragos