Set up project directory structure.
I prefer and will use one main PROJECT folder as a base folder and do everything within it. E.g. on my windos computer that would be c:\projects\nRF51-project\, under linux I would clone into /home/user/projects/nRF51-project/. Since we are talking GCC + Eclipse here, both are cross-platform and everything can be done relative to the base path.
- Install GNU ARM Embedded Toolchain (arm-none-eabi) from their distribution site. Nordic for some reason seems to like 4 series (specifically 4.9.3 as defined in GCC configuration), but I've been running SDK verisons 8 and 10 on toolchain version 5.4.1 just fine. I would recommend installing toolchain in a location which does not contain spaces, dots and other fancy stuff in the path, such as "C:\tools\gnu-arm\4_9_3\" to avoid path and folder name issues. Make sure that installation is added to the system path. To check that it did actually happen, try starting a new command line and then executing:
arm-none-eabi-gcc --version
this should return something similar to:
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Above output means that toolchain has been installed and added to the path successfully and you can compile stuff anywhere in the system without the need to use full toolchain path for each execution.
- Download latest SDK. According to release notes , version 13.0.0 dropped support for nRF51 series, so we are stuck with 12.2.0. Download that and unpack it somewhere, I'll use PROJECT\SDK\12.2.0\ folder for it.