b-parasite-esp32/code/nrf-connect/samples/zigbee/CMakeLists.txt
rbaron 509350457f [ZigBee sample] Introduce debug counters
In the effort to increse reliability of the Zigbee sample, #126 and #130
introduced handling for possibly rare, hard-to-debug events that may be
occurring. While these changes seem to help in practive, we don't know
exactly how often, if ever, they are triggered.

This PR introduces debug_counters in hope to add some visilibty in these
hard-to-debug, rare conditions.

Calling `prst_debug_counters_increment("some_counter")` will increment a
value stored in flash. These values are then dumped via logging when the
device boots. Moving forward we can also consider exposing these values
via a ZigBee cluster.
2023-06-07 08:08:34 +02:00

26 lines
678 B
CMake

cmake_minimum_required(VERSION 3.20.0)
# Pull in the dts/ and boards/ from prstlib.
set(DTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../prstlib)
set(BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../prstlib)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project("b-parasite Zigbee sample")
include_directories(src)
target_sources(app PRIVATE
src/main.c
src/debug_counters.c
src/double_reset_detector.c
src/factory_reset.c
src/flash_fs.c
src/prst_zb_attrs.c
src/prst_zb_soil_moisture_defs.c
src/restart_handler.c
)
add_subdirectory(../../prstlib prstlib)
target_include_directories(app PRIVATE ../../prstlib/include)
target_link_libraries(app PUBLIC prstlib)