Testing and Debugging#

RTT Logs#

The UART interface is not always available to report traces from Sidewalk example applications. Instead, reporting leverages the J-Link RTT interface. To set up the communication between your PC and the EFR32, follow these instructions.

  1. Install the J-Link 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 example EFR32BG21BxxxF1024 or 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 KG100S module, select EFR32BG21BxxxF1024 as the target device.

A terminal opens and the Sidewalk application traces are output as shown below (Bluetooth application).

> [I] MFG NVM3 start info:
> OK
> [I] KV NVM3 start info:
> OK
> [I] MFG Store opened with 0 objects

⚠ 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.

Switch Logs from RTT to UART#

The initial step is to verify that VCOM is active. This can be confirmed by ensuring that SL_BOARD_ENABLE_VCOM is set to 1 in the config/sl_board_control_config.h file. If it is not, you should adjust it accordingly.

To configure the log output from RTT to UART, please follow these steps:

  1. Navigate to Software Components and search for iostream.

  2. Install the IO Stream: USART component (or IO Stream: EUSART for xG28 and xG24).

  3. Access the configuration settings of the newly created VCOM instance.

  4. Deactivate Enable High frequency mode and Restrict the energy mode to allow the reception options.

  5. In config/sl_cli_config_inst.h change the value of SL_CLI_INST_IOSTREAM_HANDLE to sl_iostream_vcom_handle.

  6. Navigate back to Software Components and search for sidewalk.

  7. Uninstall the Sidewalk Log: App RTT component and install Sidewalk Log: App VCOM component in its place.

Cloud Application Debugging#

To debug your cloud application, several AWS objects can be use to monitor the events in your account. See Amazon CloudWatch for more information.