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.
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 example EFR32BG21BxxxF1024 or EFR32MG24AxxxF1536).
In the Target Interface & Speed panel, select SWD and 4000 kHz.
In the RTT Control Block panel, select Auto Detection.
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, follow these steps:
Navigate to Software Components and search for iostream.
Install the IO Stream: USART component (or IO Stream: EUSART for xG28 and xG24).
Access the configuration settings of the newly created VCOM instance.
Deactivate Enable High frequency mode and Restrict the energy mode to allow the reception options.
In
config/sl_cli_config_inst.h
change the value ofSL_CLI_INST_IOSTREAM_HANDLE
tosl_iostream_vcom_handle
.Navigate back to Software Components and search for sidewalk.
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.