Skip to content

Commit

Permalink
Silabs add systemview (#23708)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Feb 6, 2024
1 parent 13a196f commit a3d9d6b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
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

0 comments on commit a3d9d6b

Please sign in to comment.