why embedded coder report "fatal error: cstring: No such file or directory" when i trying to build the code

21 Ansichten (letzte 30 Tage)
i am using byte packing block from simulink realtime blockset, and for code generation it will automaticly add #include <cstring> to the header file. once i am trying to compile the code, the simulink reports the "fatal error: cstring: No such file or directory" error and stops compiling.
i am tring to add <csting> into the include directory under the "simulation target" tab under Model Configuration, but i still have this issue.
is there any way to walk around this issue? how can i tell the compiler it should go to the dedicated directory to refer the <csting> ?
please let me know if you have any throught. thank you

Antworten (1)

Govind KM
Govind KM am 6 Sep. 2024
From the question categories, I assume you are building code to deploy to TI C2000 board and encountering the specified error.
  • The “Byte Packing” block from “Simulink Real-Time” library is not supported for TI C2000. It is recommended to switch to using the “Byte Pack” block from the “Embedded Coder” library from the “Embedded Coder/Embedded Targets/Host Communication” path.
  • In case you are compiling the code using MinGW, this issue could be due to an incomplete installation of the compiler. Try installing the MinGW compiler using the Add-On Explorer, or one of the other supported ways listed on the MinGW File Exchange page: https://www.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-fortran-compiler
Hope this resolves the issue.

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by