Cross-compiling AWS Application
Download the tool-chain from the link shown below.
“www.google.com”
Cross-compile custom aws application using the tool chain.
There are two ways of providing aws parameters while doing cross-compilation.
▪Defining aws parameters directly in the program
The aws parameters can be directly defined in the programs statically.
But keep in mind that all the certificates and key file location should be “/etc/ssl/certs/***
Eg: #define AWS_MQTT_PORT 8883
#define ROOT_CA_CERT_PATH “/etc/ssl/certs/*.crt”
▪Using cmake variables.
Another method of providing aws parameters are with the help of cmake variables.
Some of the commonly used variables are AWS_IOT_ENDPOINT, ROOT_CA_CERT_PATH,
CLIENT_CERT_PATH, DCLIENT_PRIVATE_KEY_PATH, AWS_MQTT_PORT,
THING_NAME etc.
The cmake variables can be used as follows.
Eg: cmake -S. -Bbuild -DAWS_MQTT_PORT=8883 -
DROOT_CA_CERT_PATH=/etc/ssl/certs/RootCA.pem
Once the compiled application is ready we need to upload it to the device along with the certificates required.
Use the device data end point from IoT core settings.