This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_MODULE_ENABLED and Eclipse don't play well

The NRF_MODULE_ENABLED macro does not play well with Eclipse.  I've tried enabling all Modules in the Symbols section of Eclipse but still it does not enable any module utlizing the NRF_MODULE_ENABLED(x) macro.  Has anyone gotten this to work?  Its quite annoying that this is only an issue with SDK 15.  I'm using Eclipse 4.6.3

Thanks guys,

Parents
  • it does not enable any module utlizing the NRF_MODULE_ENABLED(x) macro

    Could you give some more detail on what you mean by that?

    Is the build not working?

    Is it just the syntax highlighting and/or code browsing not working?

    Something else?

    SES is a rather awful IDE

    I wouldn't go that far - even though I do mostly prefer Eclipse.

  • The compiler correctly evaluate all symbols, this is just an Eclipse error.  If i define NRF_MODULE_ENABLE_ALL as a symbol in eclipse, this should enable all modules from Eclipse's perspective while the compiler only includes the ones defined in sdk_config.h.   However for some reason Eclipse cannot evaluate the NRF_MODULE_ENABLED(x) correctly.  It doesn't recognize the symbols are defined and greys out all source code prepending with that macro (which is most of them)

  • I'd say that this is one of the areas in which Eclipse is "rather awful".

    I've struggled with this before with other SDKs - Eclipse often seems to randomly forget, and needs a load of faffing about with opening & closing the project, rebuilding the index, etc, etc.

    ISTR that there was some obscure setting needed to make make the "active/inactive" highlighting work properly based on defined symbols.

    Might've been about taking the settings from the current active configuration ...

    Naturally, the default was not the behaviour one would expect.

    EDIT

    To be fair, I have also seen people complaining about similar stuff in a VisualStudio-based IDE

Reply
  • I'd say that this is one of the areas in which Eclipse is "rather awful".

    I've struggled with this before with other SDKs - Eclipse often seems to randomly forget, and needs a load of faffing about with opening & closing the project, rebuilding the index, etc, etc.

    ISTR that there was some obscure setting needed to make make the "active/inactive" highlighting work properly based on defined symbols.

    Might've been about taking the settings from the current active configuration ...

    Naturally, the default was not the behaviour one would expect.

    EDIT

    To be fair, I have also seen people complaining about similar stuff in a VisualStudio-based IDE

Children
No Data
Related