Problem: warning: "RT" redefined

5 ビュー (過去 30 日間)
Re_Vi
Re_Vi 2011 年 8 月 29 日
Hi
I am using embedded coder to generate a makfile project for a remote linux real-time target. When I add a SFunction block to my model and use the exact code provided in "writting wrapper S-functions" page of the Matlab documentation, I get the following warnings several times from the remote gcc on the target:
warning: "RT" redefined
warning: this is the location of the previous definition
warning: "USE_RTMODEL" redefined
In the generated make-file, RT and USE_RTMODEL are defined twice! I wonder if anyone could help how I can avoid these kind of warnings. Here is some more information:
  • My host is windows and the target is linux
  • I use idelink_ert and Makefile for build format(Matlab R2011a)
  • I use remote_gcc and remoteBuild function to transfer and build the generated code.
Thanks
  2 件のコメント
Kaustubha Govind
Kaustubha Govind 2011 年 8 月 29 日
I'm not familiar with remote_gcc and remoteBuild - are these third-party products (ie, not from MathWorks)? I am not aware of any MathWorks product that can generate makefiles for a Linux target on a Windows host. It looks like the issue is coming from the product that does the Linux makefile generation. Does the Windows makefile generate correctly?
Re_Vi
Re_Vi 2011 年 9 月 1 日
Hi
Remote_gcc could be configured by using xmakefilesetup command. This command and remoteBuild are both form Mathworks(Embedded Coder product). Actually I just followed this tutorial:
http://www.mathworks.se/help/toolbox/ecoder/ug/bszt677-1.html
In my model I have a S-Function block to be used as a wrapper so I could interface some of my C codes with the generated code. The details are in here:
http://www.mathworks.se/help/toolbox/rtw/ug/f53144.html
The problem is when I add this block, code generator mistakenly defines RT and USE_RTMODEL twice in the generated makefile. For example the main line of the makefile is like this:
gcc <some stuff> -D"RT" -D"USE_RTMODEL" <some stuff> -D"RT=" -D"USE_RTMODEL=" <some stuff>
which is seems really stupid!!!
P.S. Names for the code generation products have been changed in R2011a(At least at the shell level since you can see RTW extensions all over the generated code!!!) and that makes it very hard to communicate with those who still use previous releases.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by