Code generation error with incompatible types
14 views (last 30 days)
Show older comments
When I build my code generation files, I receive the following error during the compile stage of the build process:
ctc E210: ["D:/Platform/PRJ/0900_System/02_configout/rte/SH00/XXX/Model/Detect/TrackFeat.c" 10655/92] "u16Id" is not a member name
ctc E333: ["D:/Platform/PRJ/0900_System/02_configout/rte/SH00/XXX/Model/Detect/TrackFeat.c" 10655/46] incompatible types at assignment
I think generated code is wrong. It should be changed like the commneted out part
/* Outputs for IfAction SubSystem: '<S254>/NoHiLo' incorporates:
* ActionPort: '<S257>/ActionPort'
*/
/* BusAssignment: '<S257>/Bus Assignment' */
rtb_bUpTrack.bSelTrack.bLoHi = SF_TrackFeat_B.bTrackSetOld.bTrack[0].bLife.u16Id;
//rtb_bUpTrack.bSelTrack.bLoHi = SF_TrackFeat_B.bTrackSetOld.bTrack[0].bLoHi; <- It should be chnaged like this.
/* End of Outputs for SubSystem: '<S254>/NoHiLo' */
Please refer to the picture below for related model
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1352669/image.png)
0 Comments
Answers (1)
Animesh
on 1 Sep 2023
My understanding is that you ran into an error during code generation and were able to identify the cause.
I will not be able to explain why this error occurred to you because you have not provided the necessary model.
You can try compiling the code manually after making the required changes in the code using the .bat created in the generated code folder.
To read more about Generated Code Compilation, please refer to the following documentation :- https://www.mathworks.com/help/ecoder/executable-program-generation-and-verification.html
0 Comments
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!