From 9641a0fed09702d8bbfc86c506e7e4e4cda8cd1d Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 16 Mar 2016 17:11:32 +0200 Subject: [PATCH] net: rpl: Enable timer debugging via Kconfig User can activate RPL timer debugging by setting CONFIG_NETWORK_IP_STACK_DEBUG_RPL_TIMERS config option. Change-Id: I66079640e4135a0f85620cc4eca04612eee1a890 Signed-off-by: Jukka Rissanen --- net/ip/Kconfig.debug | 7 +++++++ net/ip/contiki/rpl/rpl-timers.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/net/ip/Kconfig.debug b/net/ip/Kconfig.debug index 638410373cf..f8332b0f385 100644 --- a/net/ip/Kconfig.debug +++ b/net/ip/Kconfig.debug @@ -150,6 +150,13 @@ config NETWORK_IP_STACK_DEBUG_RPL_OF help Enables RPL Objective Function related debug messages +config NETWORK_IP_STACK_DEBUG_RPL_TIMERS + bool "Debug RPL timer functionality" + depends on NETWORKING_WITH_RPL + default n + help + Enables RPL timers related debug messages + config NETWORK_IP_STACK_DEBUG_IPV4 bool "Debug core IPv4" depends on NETWORKING_WITH_IPV4 diff --git a/net/ip/contiki/rpl/rpl-timers.c b/net/ip/contiki/rpl/rpl-timers.c index a296785e077..80b6cd7dac8 100644 --- a/net/ip/contiki/rpl/rpl-timers.c +++ b/net/ip/contiki/rpl/rpl-timers.c @@ -47,7 +47,9 @@ #include "lib/random.h" #include "sys/ctimer.h" -#define DEBUG DEBUG_NONE +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_RPL_TIMERS +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" /*---------------------------------------------------------------------------*/