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

nRF51 SDK makefile path-related problems

I'm trying to compile nRF51 SDK 8.0.0 under Windows. So for that purpose I'm going to components/toolchain/gcc and running 'make' there.

No targets specified and no makefile found. Stop.

Okay, I try running 'make -f Makefile.common'

Makefile.common:10: /Source//templates/gcc/Makefile.windows: No such file or directory

That doesn't seem right at all. There's no 'templates' folder in my SDK installation at all. Taking a look into Makefile.common and I see that it is definitely looking for it there:

TEMPLATE_PATH += $(SDK_SOURCE_PATH)/templates/gcc/

Is this how it's supposed to be? Am I doing something wrong? Digging deeper and it appears that there's even more path issues.

INCLUDEPATHS += -I"$(SDK_PATH)Include"

There isn't such a folder either, infact everything is scattered around in various folders. For now I can edit the makefile myself but I felt like I should report it anyway. Thanks

  • Hi, the makefiles are located in the example project folders, for instance ..\nRF51_SDK_8.0.0\examples\peripheral\blinky\pca10028\blank\armgcc for the blinky example. The project makefiles are standalone and does not depend on makefile.common anymore. However, before doing this you have to make sure that you have set the correct toolchain path for your system in "\components\toolchain\gcc\Makefile.windows".

    Just go to the ARMGCC of folder in any of the examples and type 'make' in the command line to start building.

  • Oh, I see. Thank you! I have another question. In this case can I create a makefile to compile the whole SDK into a library, which I'd use with my projects?

  • I think it is better to compile the source files for each example. The reason for that is that some source files are compiled differently depending on pre-processor definitions and configuration files such as pstorage_platform.h

  • Hi I am trying to setup this in windows Eclipse and for the blinky example it does not seem to work.. but when I try to compile other examples with cmd it get compiled ....

    here is the error ...

    18:29:56 **** Incremental Build of configuration Default for project blink test setup **** make -f "C:\Users\ASUS-PC\Documents\NRF51822_dev\nrf51\examples\peripheral\blinky\pca10028\s130\armgcc\Makefile" Debug C:\Users\ASUS-PC\Documents\NRF51822_dev\nrf51\examples\peripheral\blinky\pca10028\s130\armgcc\Makefile:11: ../../../../../../components/toolchain/gcc/Makefile.windows: No such file or directory make: *** No rule to make target `../../../../../../components/toolchain/gcc/Makefile.windows'. Stop.

    18:29:56 Build Finished (took 135ms)

  • I changed this

    TEMPLATE_PATH = C:\Users\ASUS-PC\Documents\NRF51822_dev\nrf51\components\toolchain\gcc ifeq ($(OS),Windows_NT) include $(TEMPLATE_PATH)/Makefile.windows else include $(TEMPLATE_PATH)/Makefile.posix endif

    now it compiles ..but when I make it for debug such as when I set Build (Incremental Build) as Debug I get ,....

    make -f "C:\Users\ASUS-PC\Documents\NRF51822_dev\nrf51\examples\ble_central_and_peripheral\experimental\ble_app_hrs_rscs_relay\pca10028\s130\armgcc\Makefile" Debug make: *** No rule to make target `Debug'. Stop.

Related