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

GCC Build w/sdk9 (no rule to make target)

Hi there!

I've followed the guide to Eclipse GCC (using OSX) from here:devzone.nordicsemi.com/.../

I had to add some stuff to main.c to have it built (e.g. BSP_LED_APP_TIMERS_NUMBER).

Apart from that it seems like everything goes well, until I need to build the app using the make file.

I get the following error:

make[1]: *** No rule to make target _build/app_button.o, needed by nrf51422_xxac_s110.  Stop.

Please help, I've spent a lot of hours trying to get this to work.

Thanks! Henrik

  • With the unmodified version I got more errors. E.g. the BSP_LED_APP_TIMERS_NUMBER that was unresolved. I haven't tested the "import project from existing Makefile" because I couldn't get that to work at all.

  • But your are not seeing any errors in the build output (CDT Build console) when building the unmodified project? Actual build errors will be shown there as build is happening outside of Eclipse environment using GNU make and the ARM toolchain. In order for Eclipse to be able to resolve defines, and index header files you will need to have the CDT parser configured correctly as described in the "Enable auto discovery of symbols, include paths and compiler settings" section of the tutorial, and also apply the following changes to your makefile: Search for the $(NO_ECHO)$(CC) $(CFLAGS) $(INC_PATHS) -c -o $@ $< line in the makefile. Add @echo arm-none-eabi-gcc $(CFLAGS) $(INC_PATHS) -c -o $@ $< on the line above to echo the symbols and include paths used when compiling the source files.

  • Well, I don't remember (don't have the unmodified version in my workspace anymore, but could of course recreate it). I had a gazillion red crosses in the source editor, which I removed one by one, by including extra files via virtual folders, and finally adding constants such as the BSP_LED_APP_TIMERS_NUMBER. And also true and false, by the way.

  • The SDK makefiles have been tested and should not give any build warnings. However, from Eclipse it will appear to be errors since it is not able to resolve include paths and symbols unless added by the CDT parser, or that you have added them manually in your project settings. I would suggest to download SDK 8.0.0., add the hrs example project from the tutorial, then follow the instructions in the 'Enable auto discovery of symbols, include paths and compiler settings' section. Should be not red crosses in Eclipse if done correctly. I think it is better to have a working template, and then you can compare the configurations with your current project.

Related