This directory contains troubleshooting tips for the AutoDRIVE Simulink API, which can help debug build/runtime errors, and assist in installing the necessary dependencies and setting up the correct configuration.
Some of the examples require code generation, which may lead to build errors if not installed.
Some of the examples require GPU code generation, which may lead to build errors if not installed properly.
The MEX compiler setup is version-specific and can lead to version-mismatch errors if not installed properly.
Download and install the MATLAB Support for MinGW-w64 C/C++/Fortran Compiler support package. This can also be done using MATLAB Add-On Explorer.
Setup the GPU MEX compiler by following the steps below:
-
Install Microsoft Visual Studio with
Desktop development with C++workload selected [Tested with Visual Studio 2019 (V16.11.49)] -
Install NVIDIA CUDA [Tested with CUDA 11.8 (V11.8.89)]
Note
It is important to install CUDA after installing Visual Studio so that CUDA can configure Visual Studio settings during installation.
-
Setup the MEX Compiler by running
mex -setup Candmex -setup C++in MATLAB Command Window and selectingMicrosoft Visual C++ 2019 (C)as the compiler. -
Set the Simulink build process toolchain to
NVIDIA CUDA (w/Microsoft Visual C++ 2019) | nmake(selectingAutomatically locate an installed toolchainshould choose this already)






