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

Eclipse build failed for Blinky w/ SDK 14 - Make Error 2

Hello!

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:

  1. CFLAGS += -O0 -g3 # was already in the Makefile
  2. changed components/toolchain/gcc/*.S to *.s (lower case) and changed "/Include" in Makefile line 54 to "/include"
  3. rebuilt c++ index
  4. commented Line 42 of Makefile (which referenced the non-existent nrf_delay.c)

Other important information:

  1. Here attached is my Makefile.
  2. I'm using Windows 10 pro.
  3. The Console error indicates a missing file - the I manually checked all of the includes and there is one that does not exist - there is no bsp folder in examples. I don't know if this is related, but it's all I could find
  4. Here attached is the verbose error from the Console.
  5. Everything in the tutorials works fine with nrfjprog.
  6. Make the folder utils are added to path and work readily in CMD - i.e. "where make" and "where mkdir" both point to the properly referenced GNU ARM Eclipse build tools folder.
  7. I did see something about spaces in the tools path, but there are no paths with spaces referenced in the Makefile. Should I move the build tools and toolchain to a path without spaces and tell Eclipse to look for such?
  8. The following lines show up with errors in Eclipse:

Makefile

  • Line 127 under all: clean: $(NO_ECHO)$(MAKE) -f $(MAKEFILE_NAME) -C $(MAKEFILE_DIR) -e cleanobj

  • Line 163 under $(OBJECT_DIRECTORY)/%.o: %.c: @echo Compiling file: $(notdir $<)

main.c

  • 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

Thanks for your help!

Parents
  • Hello,

    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:

    • Make sure you have a clean copy of SDK 14.2.0
    • Extract armgcc.zip and copy the files into \examples\peripheral\blinky\pca10040\blank\armgcc
    • Open "\components\toolchain\gcc\Makefile.windows" in a text editor and verify toolchain path. Looks like it should be C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/ in your case.
    • Open Eclipse and select File -> import from the menu-bar. Then select "existing projects into workspace" and import the project from \examples\peripheral\blinky\pca10040\blank\armgcc
    • Install device family pack and select nRF52 device in settings
    • Update parser settings as shown in screenshots below (open images in new tab in case text is not visible)

    image description

    image description

    image description

    image description

    Edit 12/13

    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.

    image description

    image description

Reply
  • Hello,

    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:

    • Make sure you have a clean copy of SDK 14.2.0
    • Extract armgcc.zip and copy the files into \examples\peripheral\blinky\pca10040\blank\armgcc
    • Open "\components\toolchain\gcc\Makefile.windows" in a text editor and verify toolchain path. Looks like it should be C:/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/ in your case.
    • Open Eclipse and select File -> import from the menu-bar. Then select "existing projects into workspace" and import the project from \examples\peripheral\blinky\pca10040\blank\armgcc
    • Install device family pack and select nRF52 device in settings
    • Update parser settings as shown in screenshots below (open images in new tab in case text is not visible)

    image description

    image description

    image description

    image description

    Edit 12/13

    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.

    image description

    image description

Children
Related