フィルターのクリア

Code generation with Embedded Coder

3 ビュー (過去 30 日間)
Akshaya
Akshaya 2023 年 9 月 7 日
コメント済み: Akshaya 2023 年 9 月 7 日
Hello,
I am using Embedded Coder for generating C/C++ code for the first time. However, to start with easy, I created a simple simulink model to find sum of two number. After the model, has been created, I tried to convert the model to C code using Embedded Coder. However, during this process, even though MATLAB is generating some .h and .c files, I am still missing the logic for sum of two numbers in the generated C code.
Am I missing something? Please find the scrrensshot attached.
Looking forward to your reply. Thanks in advance! :)

回答 (1 件)

Michael
Michael 2023 年 9 月 7 日
I think this is an issue of the block reduction optimization.
In the configuration parameters move to Simulation Target --> ... (Advanced parameters) and disable the "Block reduction". Then you get functionality in your code even for such simple models.
  2 件のコメント
Akshaya
Akshaya 2023 年 9 月 7 日
Thanks for the quick response! It works! :)
Akshaya
Akshaya 2023 年 9 月 7 日
Hi,
Just as a next step, I was about to create an executable for TI Hercules board, which MATLAB supports.
However, I wanted to know if we need to specify path for the compiler for TI?
I got the following error during the process.

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

Community Treasure Hunt

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

Start Hunting!

Translated by