Build Errors Due to Relative Paths for CDF/ARXML Files
Issue
When Simulink models reference the Configuration Description File (CDF) or AUTOSAR XML (ARXML) files using relative paths, building the model from a different folder (for example,changing the current build directory) can result in build-time errors such as:
E0511134: Input file "CDF" is not found.E0511134: Input file "arxml" is not found.E0511134: Input file "file" is not found.E0511134: Input file "in" is not found.E0511134: Input file "Build" is not found.E0511121: Multiple source files are not allowed when both the "-o" option and the "-c" option are specified.
These errors occur because the build system resolves relative paths with respect to the current build folder, which may differ from the original Simulink model location.
Solution
Update the configuration to use absolute paths for the CDF/ARXML files:
In the Simulink model, on the Hardware tab, click Hardware Settings to open the Configuration Parameters dialog box.
Navigate to Target hardware resources > Build options.
Locate the parameter that specifies the CDF/ARXML file path.
Click Browse and select the absolute path to the configuration file.
Click Apply and OK, and then rebuild the model.