Building the project using your local system
Before building the project using your local system, complete the following steps:
Prepare your system
Clone the project and install the dependencies
Configure the project
Prepare your system
Follow the installation instructions of the nRF Connect SDK to set up your system for building the project.
Clone the project and install the dependencies
Create a folder, for example, ncs
and initialize the project by running the following commands:
# ~/nrf-asset-tracker
cd ./ncs
sudo pip3 install -U --pre west
west init -m https://github.com/NordicSemiconductor/asset-tracker-cloud-firmware-aws \
--mr saga firmware
west update
sudo pip3 install -r zephyr/scripts/requirements.txt
sudo pip3 install pc_ble_driver_py
sudo pip3 install -r nrf/scripts/requirements.txt
sudo pip3 install -r bootloader/mcuboot/scripts/requirements.txt
# this sets $ZEPHYR_TOOLCHAIN_VARIANT and $GNUARMEMB_TOOLCHAIN_PATH
source zephyr/zephyr-env.sh
Configure the project
If you have not configured the firmware yet, follow the instructions for configuring the firmware.
Then, move the ~/nrf-asset-tracker/firmware.conf
file into the ~/nrf-asset-tracker/ncs/firmware
folder.
# ~/nrf-asset-tracker
mv ~/nrf-asset-tracker/firmware.conf ~/nrf-asset-tracker/ncs/firmware/
Build the project
Navigate to the ./ncs/firmware
directory and build the project for your nRF9160-based device.
Thingy:91 (PCA20035)
west build -p always -b thingy91_nrf9160_ns -- -DOVERLAY_CONFIG="overlay-aws.conf;overlay-debug.conf;asset-tracker-cloud-firmware-aws.conf;firmware.conf"
nRF9160 DK (PCA10090)
west build -p always -b nrf9160dk_nrf9160_ns -- -DOVERLAY_CONFIG="overlay-aws.conf;overlay-debug.conf;asset-tracker-cloud-firmware-aws.conf;firmware.conf"
Location of the HEX file
The built HEX file will be located in ./ncs/firmware/build/zephyr/merged.hex
.
Device credentials
For the device to be able to connect to the nRF Asset Tracker for AWS, you must create device credentials.