I experienced the same errors as here and here when following the Eclipse gcc tutorial (7), but the solutions did not solve my problem.
I suspect this is related to my using SDK 14 instead of 13, as the project Makefile was tested with, but I did copy the attached Makefile.common to the directory, and it had no effect one way or the other. As for the general Makefile for the project, the following suggestions from other answers were individually then jointly applied without success after the build initially failed:
Other important information:
Line 127 under all: clean: $(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e cleanobj
$(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e cleanobj
Line 163 under $(OBJECT_DIRECTORY)/%.o: %.c: @echo Compiling file: $(notdir $<)
@echo Compiling file: $(notdir $<)
Lines 51, 52, 54: Unresolved inclusions for <stdbool.h>, <stdint.h> and "boards.h"
Line 65, while (true): symbol "true" could not be resolved
Line 67, for (int i = 0; i < LEDS_NUMBER; i++): symbol LEDS_NUMBER could not be resolved
for (int i = 0; i < LEDS_NUMBER; i++)
Thanks for your help!
Any help to be had on this?
Makefiles in SDK 14 don't require any changes to work with the CDT output parser (parser collects symbols and include paths from console during builds), and recommend to use these instead of porting the old makefiles to SDK 14.
I've made a new Eclipse project for the blinky makefile example in SDK 14.2.0 that you can try:
Forgot to add that you may have to rebuild the "index" after the first build ( right click on project in project explorer and select index -> rebuild). This should fix the error shown in build-output.png. Are you able to revert back to this setup? Sounds like you got more errors on your second attempt after re-installing Eclipse.
Thanks Vidar! I'll report back once I've tried it.
The compiler still does not recognize the board-specific definitions, however it looks as though it might be an Eclipse error. Here is the output.
The eclipse abnormality is that there are two tabs each for Devices and for Toolchains under C/C++ Build > Settings. The Nordic packs only show up in one of the Devices tabs, and the Build tools path option only shows up in one of the Toolchains tabs. Here are screenshots of that:
Devices 1 (incorrect)
Devices 2 (correct)
I'll reinstall Eclipse and see if it helps.
I should also mention that there are two options under perspectives for packs. One allows installation and the other just lists. Either this is an error (likely related to this!) or something that should be mentioned on here.