- Check file permissions:Ensure that you have the necessary permissions to access and modify the files in the specified directory. Make sure the file “PMSM_1_th.c” is not set to read-only.
- Close any open files:If you have the file “PMSM_1_th.c” or any related files open in another application or editor, close them and retry the build process. Sometimes, file access errors can occur if a file is already opened in another program.
- Clean the build artifacts:Manually delete the contents of the “PMSM_1_rti1104” directory. This will remove any previously generated build artifacts. Then, try building the model again.
- Restart MATLAB and Simulink:If the above steps do not resolve the issue, try restarting MATLAB and Simulink. Sometimes, restarting the software can help resolve temporary file access issues.
Facing error while building a model for Dspace
조회 수: 24 (최근 30일)
이전 댓글 표시
Hello,
I have created a simulink model for Dspace DS1104.
when trying to build the model getting the following error, can you please tell me what the issue here:
The call to rti1104_make_rtw_hook, during the before_tlc hook generated the following error:
RTITH_CODEGEN: Failed to open file .\pmsm_1_rti1104\pmsm_1_th.c. File access error, file is possibly read-only.
The build process will terminate as a result.
RTITH_CODEGEN: Failed to open file .\pmsm_1_rti1104\pmsm_1_th.c. File access error, file is possibly read-only.
Component: Simulink | Category: Block error
and if i try to build the model using "rti_build('PMSM_1')" command it show below messege:
Starting build procedure with RTI 7.4 (RTI1104, 02-May-2015)
Model: "PMSM_1" (D:\Bhupesh\PMSM\PMSM_1.slx)
----------------------------------------------------------------------
*** Using configuration set : "Configuration"
*** Working directory : "D:\Bhupesh\PMSM"
*** Initializing code generation
### Starting Simulink Coder build procedure for model: PMSM_1
### Generating code into build folder: D:\Bhupesh\PMSM\PMSM_1_rti1104
*** Skipping confirmation of 'RTI Task Configuration' dialog.
----------------------------------------------------------------------
RTITH_CODEGEN: Failed to open file .\PMSM_1_rti1104\PMSM_1_th.c. File access error, file is possibly read-only.
----------------------------------------------------------------------
*** Stopped RTI build procedure for model: PMSM_1.
----------------------------------------------------------------------
Code generation failed for model 'PMSM_1'.
Reason: The call to rti1104_make_rtw_hook, during the before_tlc hook generated the following error:
RTITH_CODEGEN: Failed to open file .\PMSM_1_rti1104\PMSM_1_th.c. File access error, file is possibly read-only.
The build process will terminate as a result..
ans =
9
댓글 수: 0
답변 (1개)
Nithin Kumar
2023년 8월 25일
Hi Bhupesh,
I understand that you are facing an error while building the model for Dspace DS1104.
The provided error message suggests that there is a file access error while trying to open the file “PMSM_1_th.c” in the directory “\PMSM_1_rti1104\”. It indicates that the file may be read-only, causing the build process to terminate.
To resolve this issue, kindly refer to the following steps:
For more information regarding the errors while building the models in Simulink, kindly refer to the following documentation:
I hope this answer helps you.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!