Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Silabs] Add SystemView #23708

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/platform/efr32/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ extern "C" {
#include "sl_component_catalog.h"
#endif

#if SL_SYSTEM_VIEW
#include "SEGGER_SYSVIEW_FreeRTOS.h"
#endif

/*-----------------------------------------------------------
* Application specific definitions.
*
Expand Down
8 changes: 8 additions & 0 deletions examples/platform/efr32/init_efrPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,20 @@ extern "C" {
#include "sl_mbedtls.h"
#include "sl_system_init.h"

#if SL_SYSTEM_VIEW
#include "SEGGER_SYSVIEW.h"
#endif

void initAntenna(void);

void init_efrPlatform(void)
{
sl_system_init();
sl_mbedtls_init();
#if SL_SYSTEM_VIEW
SEGGER_SYSVIEW_Conf();
SEGGER_SYSVIEW_Start();
#endif

#if EFR32_LOG_ENABLED
efr32InitLog();
Expand Down
22 changes: 22 additions & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ declare_args() {
# Use Silabs factory data provider example.
# Users can implement their own.
use_efr32_factory_data_provider = true

# Enable Segger System View
use_system_view = false
}

# Explorer Kit and MGM240L do not have external flash
Expand Down Expand Up @@ -195,6 +198,17 @@ template("efr32_sdk") {
#"__STACK_SIZE=0",
]

if (use_system_view) {
_include_dirs += [
"${efr32_sdk_root}/util/third_party/segger/systemview/SEGGER",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10/Config/Cortex-M",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10",
"${efr32_sdk_root}/util/third_party/segger/systemview/Config/",
]

defines += [ "SL_SYSTEM_VIEW=1" ]
}

defines += board_defines

if (use_wstk_leds) {
Expand Down Expand Up @@ -571,6 +585,14 @@ template("efr32_sdk") {
"${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_simple_button_instances.c",
]

if (use_system_view) {
sources += [
"${efr32_sdk_root}/util/third_party/segger/systemview/SEGGER/SEGGER_SYSVIEW.c",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c",
"${efr32_sdk_root}/util/third_party/segger/systemview/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.c",
]
}

if (use_wstk_leds) {
sources += [
"${efr32_sdk_root}/platform/driver/leddrv/src/sl_led.c",
Expand Down