According to Keil C51, the following is valid:
static void kernel(void) small interrupt 1 using 2
{
/* do stuff */
}
According to the Eclipse indexer, however, it isn't. We can make the following definitions to help the case:
#define small /*small*/
#define interrupt /*interrupt*/
But unfortunately, we can't redefine the reserved keyword 'using' and it would be silly to redefine the numbers 1 or 2.
Is there a way to get the Eclipse indexer to parse ancient 8051 code in order to reap the benefits of a modern IDE? Is there an alternative to Eclipse that can offer an efficient way to navigate through such a C project? Something with an equivalent "Open Call Hierarchy" function?
You can redefine the problematic keywords for the CDT indexer only. When the indexer is running, the symbol
__CDT_PARSER__
is defined. When compillation is running this symbol won't be defined. So you can do something like:Or you can have a macro replacing the function definition:
and then