"Unresolved symbols found" at parsing. Symbols supposed to be included from a header file

I have made a Stateflow diagram with two states. One of the transition is "after(d1,CLK)" d1 is a constant which is supposed to be declared outside Simulink, somehow included from a header file. That makes sense if you use "Real time workshop" to generate code. As it is now, every time I parse the chart I get "Unresolved symbols found" complaining about d1. I have seen it is possible to use constants outside Simulink. I just don't know how to do it. Can somebody help?

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 11월 7일
You need to add the header to the Simulation Target->Custom Code->Header File pane of the model Configuration Parameters window. See Integrating Custom C Code for Nonlibrary Charts for Simulation.

댓글 수: 2

You were right. I was confused about where to put my header file.
There is one place for my model in
Tools->Real-Time Workshop->Options->Custom Code
and then another place for a Chart. In the chart window select
Tools->Open Simulation Target->Target Options
The former is for code-generation only. The latter is used during simulation.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by