Create and Compile your Sidewalk Application#
Amazon Sidewalk Sample Applications#
Silicon Labs SDK for Amazon Sidewalk includes multiple example applications, including:
Amazon Sidewalk - SoC Hello Neighbor
Amazon Sidewalk - SoC CLI
Amazon Sidewalk - SoC Production Device Provisioner
Amazon Sidewalk - SoC OOB Demo (delivered in binary only)
When a Sidewalk-supported target device is selected, additional examples are available in the Simplicity Studio Launcher perspective, EXAMPLE PROJECTS & DEMOS tab. Type "sidewalk" into the Filter on Keywords field at top left, and press enter to view only Amazon Sidewalk examples.
For simplicity, this guide walks through the Amazon Sidewalk - SoC Hello Neighbor example on an EFR32xG24 radio board. You can then repeat this procedure with other examples in the SDK.
Create an Amazon Sidewalk Project#
With the Sidewalk resources added to your Gecko SDK, reopen Simplicity Studio 5. You can now use the graphical interface to create a Sidewalk project.
Mount the EFR32xG24 radio board onto the main board, then connect the assembly to your computer through the USB connector on the main board.
A new entry should appear in the Debug Adapters view.
Select the board and make sure your Gecko SDK with Amazon Sidewalk SDK extension installed is selected in the "Preferred SDK" section of the General Information card. If the "Secure FW" version depicted on the card is below the minimum SE FW for your target device specified by the Prerequisites page, click the nearby link to upgrade the SE FW before proceeding.
Go to the EXAMPLE PROJECTS & DEMOS tab.
Filter the example list by typing sidewalk in the "Filter on Keywords" field and press enter.
Click Create next to the Amazon Sidewalk - SoC Hello Neighbor example.
In the New Project Wizard, select the Copy contents radio button, then click Finish.
Ⓘ INFO Ⓘ: Simplicity Studio and the GSDK support multiple toolchains in addition to the default GCC. However, for projects using the Amazon Sidewalk SDK extension, GCC is required.
Compile and Flash the Project#
Simplicity Studio adds the project to the workspace folder. You can now compile and flash the project on the EFR32xG24 radio board.
In the Simplicity IDE perspective, select the Sidewalk project (.slcp file).
On the top menu click Run, then select Debug.
Wait for the build and flash operations to succeed.
In the Debug perspective, click Run.
Ⓘ INFO Ⓘ: It is a "best practice" to erase the main flash before writing new application firmware to your device. Simplicity Studio provides many ways to do so, including Simplicity Commander and the Flash Programmer.
⚠ WARNING ⚠: If using a radio board from the Silicon Labs Pro Kit for Amazon Sidewalk, the out-of-the-box (OOB) demo relies on device-specific credentials pre-flashed to the USERDATA page on your device. This page is not affected by mass-erase operations, but can be explicitly erased by a targeted page erase. Credentials Backup/Restore Feature describes a process by which you can restore a working out-of-the-box demo application after a mass-erase. However, care should be taken to NOT perform a page erase of USERDATA, or the OOB demo cannot be restored.
View the Application Logs through J-Link RTT
The UART interface is not always available to report traces from Sidewalk example applications. Instead, the applications leverage the J-Link RTT interface.
⚠ WARNING ⚠: J-Link RTT and Simplicity Studio use the same channel to communicate with the board. If you do not see logs in J-Link RTT, try closing and re-opening Simplicity Studio to reset the connection. RTT Viewer needs to be disconnected from a device to allow flashing again with commander or Simplicity Studio.
To set up the communication between your PC and the EFR32, follow these instructions:
Install the J-Link RTT Viewer.
Open the J-Link RTT Viewer.
In the Configuration panel, Connection to J-Link section, select USB.
In the Specify Target Device list, select the connected part. For the EFR32xG24 radio board BRD4187C, select EFR32MG24AxxxF1536.
In the Target Interface & Speed panel, select SWD and 4000 kHz.
In the RTT Control Block panel, select Auto Detection.
Ⓘ INFO Ⓘ: For the Quectel KG100S module, select EFR32BG21BxxxF1024 as the target device.
A terminal opens and the Sidewalk application traces are output as shown:
00>  <info> app: app started
00>  <info> pal: kv store opened with 0 object(s)
00>  <error> Sall mgm core create failed: -8
00>  <error> App - failed to initialize sidewalk: -8
00>  <error> App - fatal error
The above console log indicates that the example application is running, but found no objects in the device's NVM3 flash area. For any Sidewalk application (including this one) to run properly, Sidewalk resources in the cloud must be prepared. Move on to the next section, Provision your Amazon Sidewalk Device, to provision your device and prepare your Amazon Sidewalk cloud resources to interact with it.
If you encounter any issues during this Getting Started procedure, see our troubleshooting page with solutions to common problems.