# Create and Compile your Sidewalk Application

## Amazon Sidewalk Sample Applications

Silicon Labs SDK for Amazon Sidewalk includes multiple example applications, including:

- Amazon Sidewalk - OOB Demo (delivered in binary only)
- Amazon Sidewalk - SoC Hello Neighbor
- Amazon Sidewalk - SoC CLI
- Amazon Sidewalk - SoC Location
- Amazon Sidewalk - SoC Dynamic Multiprotocol Light (BLE)
- Amazon Sidewalk - SoC Dynamic Multiprotocol Light (FSK)
- Amazon Sidewalk - SoC Empty
- Amazon Sidewalk - SoC Qualification
- Amazon Sidewalk - Production Device Provisioner (PDP)

When a Sidewalk-supported target device is selected, additional examples are available in the Simplicity Studio **DEVICES** page, **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.

Additional sample applications are available in the Silabs Sidewalk SDK.

## Create an Amazon Sidewalk Project

With the Sidewalk resources added to your Simplicity SDK, reopen Simplicity Studio 6. 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 **CONNECTED** devices pane.
- Select the board and make sure your Simplicity SDK with Amazon Sidewalk SDK extension installed is selected in the "SDK" dropdown section of device's header. If the **Secure FW** version depicted on the card is below the minimum SE FW for your target device specified by the [Prerequisites](prerequisites) page, click the nearby link to upgrade the SE FW before proceeding.![Device create](/sidewalk-getting-started/1.1/images/create-and-compile-device.jpg)
- Go to the **EXAMPLE PROJECTS & DEMOS** tab.
- Filter the example list by selecting **Sidewalk** from the **Wireless Technology** list.
- Click **Create** next to the **Amazon Sidewalk - SoC Hello Neighbor** example.![Device create HN](/sidewalk-getting-started/1.1/images/create-and-compile-device-hn.jpg)
- In the **New Project Wizard**, use the default settings, then click **Finish**.![Device create](/sidewalk-getting-started/1.1/images/create-and-compile-device-finish-link.jpg)

> **Ⓘ INFO Ⓘ**: Simplicity Studio and the Simplicity SDK support multiple toolchains in addition to the default GCC. However, for projects using the Amazon Sidewalk SDK extension, GCC is required.

For the examples leveraging a Semtech transceiver, SX1262 is used by default. It can be changed to LR1110 with a few simple steps:

1. Update the LR1110 firmware:  
   - You will need the LR1110 transceiver firmware version 0x0401 downloadable [here](https://github.com/Lora-net/SWTL001/wiki).  
   - Using the STM32 Nucleo board (recommended), follow the procedure [here](https://github.com/Lora-net/SWTL001?tab=readme-ov-file#load).
2. In your Sidewalk application, open the the SLCP file and select the Software component panel.
3. Install the LR1110 driver as shown in the picture below. This software component will replace the one for SX1262. In the pop-up window, select **"Replace..."** and click **OK**.

![Install Amazon Sidewalk Sub-GHz LR1110 software component](/sidewalk-getting-started/1.1/images/soft-comp-lr1110-ssv6.jpg)

## 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 **PROJECTS** page, select the Sidewalk project (.slcp file).
- On the top menu click **Open in VS Code**, then select **Debug** within VS Code.
- Wait for the build and flash operations to succeed.
- In the **Debug** perspective, click **Continue**.
- Then click **Stop**.

> **Ⓘ 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 the command line and GUI version of the [Simplicity Commander](https://docs.silabs.com/simplicity-commander/latest/simplicity-commander-commands/device-erase-commands).

> **⚠ 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](/amazon-sidewalk/2.9.3/sidewalk-stack-structure#credentials-backuprestore-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. You can easily switch between J-Link RTT and UART interface. A procedure is available in the [Developer's Guide](/amazon-sidewalk/2.9.3/sidewalk-test-and-debug#switch-logs-from-rtt-to-uart).

In the Amazon Sidewalk sample application, the RTT interface is split between 3 channels:

- Terminal 0 - App: contains the application logs
- Terminal 1 - Stack: contains the logs from the Amazon Sidewalk precompiled binaries
- Terminal 2 - Pal: contains the logs from Physical Abstraction Layer (PAL) available in source in the extension

To set up the communication between your PC and the EFR32, follow these instructions:

1. Install the [J-Link RTT Viewer](https://www.segger.com/products/debug-probes/j-link/tools/rtt-viewer/).
2. Open the J-Link RTT Viewer.
3. In the **Configuration** panel, **Connection to J-Link** section, select **USB**.
4. In the **Specify Target Device** list, select the connected part. For the EFR32xG24 radio board BRD4187C, select EFR32MG24AxxxF1536.
5. In the **Target Interface & Speed panel**, select **SWD** and **4000 kHz**.
6. In the **RTT Control Block** panel, select **Auto Detection**.
7. Click **OK**.

> **Ⓘ INFO Ⓘ**: For the Quectel KG100S module, select EFR32BG21BxxxF1024 as the target device.

A terminal opens and the Sidewalk application traces are output as shown (Terminal 2):

```c
[00000006] <I> pal kv-storage: kv store opened with 1 object(s)
[00000007] <I> pal swi: interrupt init ok
[00000008] <W> pal mfg: no objects found in mfg store
```

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](provision-your-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](/amazon-sidewalk/2.9.3/sidewalk-troubleshooting) with solutions to common problems.