Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:21 Go to next message
Gilbert Bombrun is currently offline Gilbert BombrunFriend
Messages: 2
Registered: October 2015
Junior Member
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 14: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 18:38 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 742
Registered: August 2014
Senior Member
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.


--

Tauno Voipio
Re: Code Analysis [message #1710164 is a reply to message #1710030] Mon, 05 October 2015 07:20 Go to previous message
Gilbert Bombrun is currently offline Gilbert BombrunFriend
Messages: 2
Registered: October 2015
Junior Member
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: Fri Sep 20 13:59:43 GMT 2024

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

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

Back to the top