Core Module Code Setup

PUREmodules were designed around the Modular Sensor Architecture to make hardware prototypes faster, simpler and easier. Our goal is to build an ecosystem of hardware that utilizes the Open Architecture as a launching point for your next project.

Getting started with the Github Code:

1- Download the Repo

1.1 Navigate to: https://github.com/pureengineering/puremodules

-Select the "Clone or Download" button as shown below.

-Download Zip File.

-Open you Downloads folder and Unzip the file. Take note of the Directory you unzip this folder to. I will refer to this directory as [YOURDIRECTORY].

2- Setup your environment

The CoreModule uses an Nrf52. This section will guide you in setting up the environment for the Nrf52.

2.1- Open a Command Prompt.

-On windows you can type "cmd" in the search bar.

-On Linux Press CTRL+ALT+T

2.2- Start by running the Makefile to setup the NRF52 SDK:

-First navigate to the correct folder by typing this command in the command prompt:

> cd [YOURDIRECTORY]\PUREmodules-master\PUREmodules-master\Nrf52

-Once in this directory, make the file using the make command below to download the Nordic SDK.

>make

Note: This may take some time to install.

THE STEP ABOVE SHOULD THROW THIS ERROR:

>"make: *** [nRF5_SDK_12.2.0_f012efa/external/micro-ecc/micro-ecc] Error 2"

This is fine and will corrected in the next step.

Windows:

If the command "make" gives a different error, click here for a guide on how to setup the necessary tools.

Linux:

-Other Possible errors when running "make" include:

"make curl: Command not found". If you receive this error click here and complete Step 2.

"make: Command not found". If you receive this error click here and complete Step 1.

If you have any of the two errors above, redo Step 2.2 after they have been corrected.

Once complete your Nrf52 directory should have the SDK. Highlighted below are the directories that have been added by this step.

3- Correct GCC Version

We need to match the Gcc version on your computer to the one specified by the code.

Open the file:

[YOURDIRECTORY]\nRF5_SDK_12.2.0_f012efa\components\toolchain\gcc\Makefile.windows

You can see your GCC version by opening your computer's Environmental Variables under the PATH variable.

Linux: To see your version number run

$ cat proc/version

4- Correct Missing micro-ecc library error

As mentioned in step 2.2 running "make" in the Nrf52 directory should throw an error because this external library has not been compiled. To compile it follow these steps.

4.1- Start by navigating to the library's directory using the following command in your terminal window

>cd [YOURDIRECTORY]\nRF5_SDK_12.2.0_f012efa\external\micro-ecc\nrf52_armgcc\armgcc

> make

This will compile the micro-ecc library.

You are now ready to flash some code into the Nrf52.