Skip to content

Commit

Permalink
[SL-ONLY] Silabs tracing cherry pick (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpbeliveau-silabs authored Nov 21, 2024
1 parent d0e8630 commit e66991b
Show file tree
Hide file tree
Showing 7 changed files with 1,515 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/platform/silabs/Logging.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* See Project CHIP LICENSE file for licensing information. */
#include <platform/logging/LogV.h>
#include <platform/silabs/Logging.h>

#include <lib/core/CHIPConfig.h>
#include <platform/CHIPDeviceConfig.h>
Expand Down Expand Up @@ -200,6 +201,13 @@ extern "C" void silabsLog(const char * aFormat, ...)
va_end(v);
}

#ifdef SILABS_LOG_ENABLED
bool isLogInitialized()
{
return sLogInitialized;
}
#endif // SILABS_LOG_ENABLED

namespace chip {
namespace DeviceLayer {

Expand Down
4 changes: 4 additions & 0 deletions src/platform/silabs/Logging.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* See Project CHIP LICENSE file for licensing information. */
#pragma once

bool isLogInitialized(void);
33 changes: 33 additions & 0 deletions src/platform/silabs/tracing/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#/***************************************************************************
# * @file BUILD.gn
# * @brief Instrumenting for matter operation tracing for the Silicon Labs platform.
# *******************************************************************************
# * # License
# * <b>Copyright 2024 Silicon Laboratories Inc. www.silabs.com</b>
# *******************************************************************************
# *
# * The licensor of this software is Silicon Laboratories Inc. Your use of this
# * software is governed by the terms of Silicon Labs Master Software License
# * Agreement (MSLA) available at
# * www.silabs.com/about-us/legal/master-software-license-agreement. This
# * software is distributed to you in Source Code format and is governed by the
# * sections of the MSLA applicable to Source Code.
# *
# ******************************************************************************/

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

static_library("SilabsTracing") {
sources = [
"SilabsTracing.cpp",
"SilabsTracing.h",
]

deps = [
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
"${chip_root}/src/platform",
"${chip_root}/src/system",
]
}
Loading

0 comments on commit e66991b

Please sign in to comment.