0
votes

I have been installing ARM toolchain on Windows 10 for development of Nordic nRF51, and followed instructions in their tutorial https://devzone.nordicsemi.com/tutorials/7

when I run make for first time, I get a build error.

In detail: I have installed toolchain in directory C:\Program Files (x86)\GNU Tools ARM Embedded\5.3 2016q1

Coreutils is installed in directory C:\Program Files (x86)\GnuWin32

Nordict SDK toolchain is installed in directory C:\Program Files (x86)\Nordic Semiconductor\NRF5_SDK

I have added following to user path environment: C:\Program Files (x86)\GNU Tools ARM Embedded\5.3 2016q1;C:\Program Files (x86)\GnuWin32\bin

in directory C:\Program Files (x86)\Nordic Semiconductor\NRF5_SDK\components\toolchain\gcc windows.makefile changed to:

GNU_INSTALL_ROOT := $(PROGFILES)/GNU Tools ARM Embedded/5.3 2016q1/
GNU_VERSION := 5.3
GNU_PREFIX := arm-none-eabi

I have checked that make and gcc are found from command line.

Following tutorial instructions at directory: C:\Program Files (x86)\Nordic Semiconductor\NRF5_SDK\examples\peripheral\blinky\pca20006\blank\armgcc open a cmd window (as user) and run make.

mkdir _build
Access is denied.
make: *** [_build] Error 1

error suggests unable to create _build directory.

So, from new cmd window as admin try again:

mkdir _build
make: *** No rule to make target `_build/Program', needed by `nrf51822_xxaa'.  Stop.

summary of output from make -d (in admin window):

Reading makefile `makefile'...
Reading makefile `../../../../../../components/toolchain/gcc/Makefile.windows' (search path) (no ~ expansion)...

 No implicit rule found for `_build/Program'.
 Finished prerequisites of target file `_build/Program'.
Must remake target `_build/Program'.
make: *** No rule to make target `_build/Program', needed by `nrf51822_xxaa'.  Stop.

It seems that make is failing to find makefile.windows (correct?), so I checked path by copying the target to cmd and using as:

cd ../../../../../../components/toolchain/gcc/

this changed to the correct directory. so I believe the target path is correct.

questions: why is an admin needed to run make, why doesn't it have correct privilege to create the _build directory?

what is failing when make is run in admin window?

thanks in advance.

1
See the "Errors like "make: No rule to make target '_build/Nordic', needed by `nrf51422_xxac". Stop can also be an indication..." bit in that very tutorial. 20 years since Windows 95 and the free software movement still don't accept spaces in filenames being a thing; 10 years since Vista and people still wondering why you need admin permission to modify things in Program Files; sigh...Notlikethat
thanks, that was a good pointer. Guess I suffered wood'n'trees issue there. BUT. changed directory to Nordic_Semiconductor and updated path settings. Still get the same error message though.John McDermott

1 Answers

0
votes

Looks like I may have this solved.

Uninstalled all the tools and reinstalled into a user directory (not Program Files), and made sure there were no white spaces in the directory path.

Make now builds a binary. Seems that Nordic have released toolset that can't be installed as described...