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

nRF52 project in Eclipse doesn't see makefile defines

Hey all,

I followed Vidar's excellent tutorial, and it works! I can compile without errors. However, when I try to walk through the project in Eclipse (the blinky example), a bunch of stuff is grayed out (for example:

#if LEDS_NUMBER > 0
static const uint8_t m_board_led_list[LEDS_NUMBER] = LEDS_LIST;
#endif

...is grayed out.

LEDS_NUMBER is defined in the makefile, and I followed the instructions for changing the CDT GCC Build Output Parser string. No joy.

If I define the LEDS_NUMBER explicitly in main.c, I get an error saying that it's been defined twice, because, well, it has been defined twice.

How do I make Eclipse see the makefile defines?

Parents
  • Hi, if you look at the GCC tutorial, devzone.nordicsemi.com/.../, under the chapter, Enable auto discovery of symbols, include paths and compiler settings, there is a description of the problem (Vidar told me that he thinks this is the problem). New patched makefile.common files are included in the bottom of the tutorial.

  • Hi Stian,

    I'm sorry, I should have been more clear--the GCC tutorial is the one I referenced in my post. I'd already followed the instructions under the Enable auto discovery chapter, and grabbed the patched makefile.common before posting to this forum. Here are some screenshots:

    CDT GCC Built-in Compile Settings Cross ARM

    CDT GCC Build Output Parser

    I've been through the tutorial three times, and can't figure out where I went wrong.

    Note that it compiles fine. No errors. The problem is that the defines in the makefile (not the makefile.common, but the makefile in ./examples/ble_peripheral/experimental_ble_app_eddystone/pca10040/s132/armgcc) aren't recognized by Eclipse. This makes Eclipse pretty useless as an IDE.

Reply
  • Hi Stian,

    I'm sorry, I should have been more clear--the GCC tutorial is the one I referenced in my post. I'd already followed the instructions under the Enable auto discovery chapter, and grabbed the patched makefile.common before posting to this forum. Here are some screenshots:

    CDT GCC Built-in Compile Settings Cross ARM

    CDT GCC Build Output Parser

    I've been through the tutorial three times, and can't figure out where I went wrong.

    Note that it compiles fine. No errors. The problem is that the defines in the makefile (not the makefile.common, but the makefile in ./examples/ble_peripheral/experimental_ble_app_eddystone/pca10040/s132/armgcc) aren't recognized by Eclipse. This makes Eclipse pretty useless as an IDE.

Children
No Data
Related