Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Code Analysis(Error on "far" directive to force far call)
Code Analysis [message #1709808] Thu, 01 October 2015 05:21 Go to next message
Eclipse UserFriend
Hello,

I am using one of a TI compilers for one of their DSP.

In Eclipse Kepler, the "far" directive before a function or a variable generates an error in the editor :
far int function (int)
{
}
far Var var;

How could I notify to eclipse that this word is not an error

Same thing with the "interrupt" directive :
interrupt void timer1_srv (void)

Many thanks in advance for your suggestions.
Re: Code Analysis [message #1710001 is a reply to message #1709808] Fri, 02 October 2015 10:31 Go to previous messageGo to next message
Eclipse UserFriend
Hello Gilbert,
If it is just for the editor and code analysis, you can try to define "far" to nothing in the projects path and symbols settings
Re: Code Analysis [message #1710030 is a reply to message #1709808] Fri, 02 October 2015 14:38 Go to previous messageGo to next message
Eclipse UserFriend
Click 'Properties' on the project directory, go to C/C++ General, Paths and Symbols.
Select the #Symbols page then click Add. Add a symbol, e.g. __ECLIPSE__ and set a value for it e.g. 1.

Then, add to your code conditional macros:

#if defined(__ECLIPSE__)
#define far
#endif

Eclipse parser will ignore the attributes, but the real compiler will see it.

I'm using a similar method to change code for Doxygen, by defining __DOXYGEN__ in the Doxygen control file.
Re: Code Analysis [message #1710164 is a reply to message #1710030] Mon, 05 October 2015 03:20 Go to previous message
Eclipse UserFriend
Hello Tauno Voipio,

Thank you very much for your help !!!
It's now working properly. I've no more "bug" flying in the vertical ruler. Smile
With best regards,
Gilbert.
Previous Topic:Start a new project/code
Next Topic:breakpoints ignored
Goto Forum:
  


Current Time: Mon Apr 28 15:44:44 EDT 2025

Powered by FUDForum. Page generated in 0.02889 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top