Hi Arthur, the bottom line:
- These paths are there because you configured MATLAB Coder to produce C code with runtime error checks. If you change the configuration (set the config parameter "RuntimeChecks" to false) the paths would disappear.
- These paths dont' need to be accessible on the target platform. If you see how they are used, they are only used to print an error message for you (see rtErrorReportLocation() function in the generated yourproject_rtwutil.c file).
Details: In MATLAB programming language, there are many operations that can fail with an error. For instance, indexing into a 3x1 array with an index value of 10 causes an error. When MATLAB Coder converts MATLAB source to C, it has a choice, what to do with those erroneous situations. It can either ignore those (assume that errors would never happen) or introduce runtime checking code that checks for those errors and prints some mesage.
You (the user) control what coder is going to do. For that, there is a config parameter:
cfg = coder.config('lib');
cfg.RuntimeErrors = true;
If you elect to genreate code with runtime checks, there will be error reporting functions in the file whose name ends with "_rtwutil.c" in the generated code. Those functions are called to check for various errors, and all these functions, when an error condition is true, they print to console the location of the source MATLAB code that is associated with the error, and then call abort().
Take a look at the _rtwutil.c file, it is self-explanatory, and you'll see how the absolute paths are used there.