Sharing the entire error message for reference
### Invoking Target Language Compiler on DCMotor_Test_PWM_LF_Unity.rtw
### Using System Target File: C:\Program Files\MATLAB\R2021b\toolbox\sldrt\rtw\sldrt.tlc
### Loading TLC function libraries
### Initial pass through model to cache user defined code
### Caching model source code
### Writing source file DCMotor_Test_PWM_LF_Unity_tgtconn.c
### Writing header file DCMotor_Test_PWM_LF_Unity_types.h
### Writing source file DCMotor_Test_PWM_LF_Unity.c
### Writing header file DCMotor_Test_PWM_LF_Unity.h
### Writing header file rtwtypes.h
### Writing header file multiword_types.h
.
### Writing header file zero_crossing_types.h
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing header file rt_nonfinite.h
### Writing source file rt_nonfinite.c
### Writing header file rtGetNaN.h
.
### Writing source file rtGetNaN.c
### Writing header file DCMotor_Test_PWM_LF_Unity_private.h
### Writing header file rtmodel.h
### Writing source file DCMotor_Test_PWM_LF_Unity_data.c
### Writing header file rt_defines.h
### TLC code generation complete.
### Generating TLC interface API.
### Creating data type transition file DCMotor_Test_PWM_LF_Unity_dt.h
Warning:Matching "From" for "Goto" 'DCMotor_Test_PWM_LF_Unity/Goto3' not found
Top model targets built:
Model Action Rebuild Reason
=====================================================================================
DCMotor_Test_PWM_LF_Unity Failed Code generation information file does not exist.
0 of 1 models built (0 models already up to date)
Build duration: 0h 0m 6.582s
Error:Dot indexing is not supported for variables of this type.