How to fix Simulink c code generator case sensitivity issue?

1 回表示 (過去 30 日間)
Christian Edgar
Christian Edgar 2024 年 11 月 8 日
回答済み: Govind KM 2024 年 11 月 13 日
I am trying to include a c file in Simulink. In Configuration Parameters -> Simulation Target I have added the appropriate files and headers. When I selece Validate custom code Simulink returns what I guess is a compiler error:
libcpp: Can't open input file ..\\slprj\\_slcc\\koazhuz13p6xrvzw4cvuy\\slcc_interface_koazhuz13p6xrvzw4cvuy.c
I believe this is due to case sensitivity, as the actual folder name is kOazhUz13p6xRVzW4CvUY and if I rename it to the lower case i.e. koazhuz13p6xrvzw4cvuy the compiler seems to get further before throwing another error. Is there a way I can get Simulink to stop generating case variable folder names or otherwise fix this issue? Thanks!
  1 件のコメント
Govind KM
Govind KM 2024 年 11 月 8 日
@Christian Edgar What is the error that pops up after renaming the folder to lowercase?

サインインしてコメントする。

回答 (1 件)

Govind KM
Govind KM 2024 年 11 月 13 日
i had a similiar issue when using custom C files to generate code for my model in Simulink. A workaround for me was to move all included source and header files to a subdirectory inside the custom code generation folder.
Some other possible workarounds are:
  • Renaming the code files/folders to lowercase.
  • Avoid using custom folders for cache and code generation.
More information on managing build process folders can be found here:
Hope this is helpful!

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by