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
Follow the Getting Started Guide of the nRF Connect SDK to set up your system for building the project.
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
If you have not configured the firmware yet, follow the instructions for configuring the firmware <aws-firmware-configuration>
.
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/
Navigate to the ./ncs/firmware
directory and build the project for your nRF9160-based device.
west build -p always -b thingy91_nrf9160_ns -- -DOVERLAY_CONFIG="overlay-aws.conf;overlay-debug.conf;asset-tracker-cloud-firmware-aws.conf;firmware.conf"
west build -p always -b nrf9160dk_nrf9160_ns -- -DOVERLAY_CONFIG="overlay-aws.conf;overlay-debug.conf;asset-tracker-cloud-firmware-aws.conf;firmware.conf"
The built HEX file will be located in ./ncs/firmware/build/zephyr/merged.hex
.
For the device to be able to connect to the nRF Asset Tracker for AWS, you must create device credentials <aws-device-credentials>
.