4.
Application Firmware
The application firmware is used to demonstrate connectivity to AWS IoT. The firmware connects the
board to AWS IoT cloud, updates the sensor data and obtains the LED state to AWS Shadow by
publishing and subscribing to the AWS Shadow MQTT topics.
The MCU application firmware source codes are available in the
directory of the release
package. This directory contains following project solution files.
•
saml21g18b_sensor_board_demo_ECC.atsln
– This project is used for performing AWS
account provisioning. A private key is generated for the authentication with the AWS cloud and the
AWS account credentials are stored in the ECC608. The developer needs to program this project
code to the board to migrate the board and connect to the private AWS account. Python scripts are
available in the
ProvisionScripts/
directory to perform AWS account provision. For more details,
refer to
.
•
saml21g18b_sensor_board_demo_JITR.atsln
– This project is used in the normal application.
A board running this firmware can connect to AWS IoT, publish and subscribe AWS IoT Shadow
Topics.
For firmware development, at first, the developer needs to program the code of
saml21g18b_sensor_board_demo_ECC.atsln
to provision the board to the private AWS account.
Then, customize the application in
saml21g18b_sensor_board_demo_JITR.atsln
and program this
project to the board.
4.1
Application Firmware Compilation Procedure
1.
Download release package files from
https://github.com/MicrochipTech/winc1500-wifi-smart-device-
and copy the source file to the C drive (
C:/
) root folder.
2.
Launch Atmel Studio 7.0.
3.
Click on
File > Open > Project...
4.
Select project to open
mcu-firmware/saml21g18b_sensor_board_demo_JITR.atsln
or
mcu-firmware/saml21g18b_sensor_board_demo_ECC.atsln
files.
5.
By default, the starting address of the application firmware is
0x2000
as the board is pre-
programmed with a boot-loader. The starting address of boot-loader is
0x0
.
– If Atmel ICE is used for programming the firmware to the board; the developer need not use
the boot-loader and starting address of the application firmware must be set back to
0
. Skip
this step if boot-loader is used for programming the firmware.
– Perform the following steps on the project solution to set the starting address of the application
firmware:
1.
Launch Atmel Studio.
2.
Open > Right click > Properties > Toolchain > ARM/GNU Linker > Miscellaneous
.
3.
Modify "Wl,--section-start=.text=0x2000" to "Wl,--section-start=.text=0x0000" in the
Linker Flag.
6.
Click
Build > Rebuild Solution
to compile the source code and generate binary files.
Note:
Generated binary files are to be stored in the
C:\github\winc1500-wifi-smart-device-
enablement-kit-aws-cloud\mcu-firmware\saml21g18b_sensor_board_demo\Debug
directory.
ATWINC15x0 Smart Device Kit
Application Firmware
©
2019 Microchip Technology Inc.
User Guide
DS50002885A-page 11