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

Makefile compiles but Eclipse can't find platform headers

I followed the Nordic tutorial on wrapping an SDK sample project in a Makefile managed Eclipse project. I used the ble_app_beacon as the project. Eclipse will build the project and I can debug the project. But Eclipse also tries to help me by providing some highlighting of build errors (which are not found by 'make'). The fact that 'make' can build the project is enough to get my working but the fact that Eclipse thinks there are build errors takes away from the benefit of using Eclipse. I've included a screen shot, below. The build output is attached as a file.

Note that I followed the Nordic tutorial which included adding VERBOSE=1 and enabling the capture of the build output back into Eclipse. That tutorial also had me add the referenced source files into virtual folders in the Project Explorer. For example, you can see in the screen shot that components/ble/common/ble_srv_common.c has the key icon in the upper right corner. I can look at the properties of that file and see the header dependencies are what we expect.

But the trouble seems to be that Eclipse is not finding the platform headers which would include the definitions we expect for things such as uint8_t. I would expect those to come from the GNU ARM tools, right? I guess those do not get revealed as output from the build process and, therefore, are not captured back into Eclipse (or something like that).

Do you have any advice on how to get Eclipse satisfied in finding those type of headers in the context of a Makefile managed Eclipse project?

Thanks.

My environment:

  • Mac OSX
  • SDK for nRF52832: PCA10040 (for nRF52832_xxAA)
  • Eclipse Neon V3 IDE for C++ developers (I've read postings that V3 works on OSX)
  • GNU ARM Eclipse Plug-in
  • GNU ARM Tools (6-2017-q1-update)
  • SEGGER JLINK tools

image description

EclipseBuildOutput.txt

Parents
  • Hi,

    The toolchain paths and symbols should be added automatically by the GNU ARM eclipse plugin. You can try to enable CDT Cross Built in Compiler Setting and see if you get the same result. The include directory shown the project view in the screenshot below should pop up if the plugin sees the toolchain path.

    image description

    In addition, Eclipse does not seem to parse the pre-processor symbols from the output, only include paths. Recommend to rebuild your project with the patched makefile.common file included at the end of the tutorial.

Reply
  • Hi,

    The toolchain paths and symbols should be added automatically by the GNU ARM eclipse plugin. You can try to enable CDT Cross Built in Compiler Setting and see if you get the same result. The include directory shown the project view in the screenshot below should pop up if the plugin sees the toolchain path.

    image description

    In addition, Eclipse does not seem to parse the pre-processor symbols from the output, only include paths. Recommend to rebuild your project with the patched makefile.common file included at the end of the tutorial.

Children
No Data
Related