Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Sebastian_B_
Beginner
155 Views

Eclipse Build Ouptut Parser

Hi,

it seems that Eclipse is giving the wrong information about what defines are set.

Steps to reproduce:

Open the Hello World example with ISSM.

Open the zephyr/include/misc/printk.h file and you will find this code:

#ifdef CONFIG_PRINTK
extern void printk(const char *fmt, ...);
#else
static inline void printk(const char *fmt, ...)
{
    ARG_UNUSED(fmt);
}
#endif

 

Expected results:

Eclipse should darken the background colour of the lines

static inline void printk(const char *fmt, ...)
{
    ARG_UNUSED(fmt);
}

to indicate that this code has been ifdef'd out.

Actual result:

This code is darkened instead:

extern void printk(const char *fmt, ...);

Opening autoconf.h shows that CONFIG_PRINTK is defined, so Eclipse is giving the wrong indication
about the source code.

Why is Eclipse doing this and how can I fix this?

0 Kudos
1 Reply
Alice_H_Intel
Employee
155 Views

Hello,

The darken area only related to the #ifdef or #ifndef that the function you used. For the '#ifdef' function, eclipse will darken the first expression. Otherwise, the 'else' condition will be darken when the ''#ifndef is used. 

Hope this can reply your question.

Alice

Reply