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
  • There are global defines in Makefile which Eclipse cannot parse and so it doesn't understand them. If you want them to be visible within Eclipse IDE you need to provision them manually into the project (and then change manually each time you change them in the Makefile). Don't ask me how this is done in detail, I'm sure Google can help.

    To your project set-up: I usually create simply new project from existing source and Makefile on the disk and then add whole SDK as virtual folder. After Refresh and Index rebuild Eclipse can see all the functions, modules and symbols but still need global defines from Makefile to correctly understand everything.

Reply
  • There are global defines in Makefile which Eclipse cannot parse and so it doesn't understand them. If you want them to be visible within Eclipse IDE you need to provision them manually into the project (and then change manually each time you change them in the Makefile). Don't ask me how this is done in detail, I'm sure Google can help.

    To your project set-up: I usually create simply new project from existing source and Makefile on the disk and then add whole SDK as virtual folder. After Refresh and Index rebuild Eclipse can see all the functions, modules and symbols but still need global defines from Makefile to correctly understand everything.

Children
Related