initial upload viewconfig
This commit is contained in:
parent
1c8b438bca
commit
3d255ed6f8
|
@ -304,6 +304,25 @@ endif
|
|||
%.flashprof: %.$(TARGET)
|
||||
$(NM) -S -td --size-sort $< | grep -i " [t] " | cut -d' ' -f2,4
|
||||
|
||||
viewconf:
|
||||
@echo "----------------- Make variables: --------------"
|
||||
@echo "##### \"TARGET\": ________________________________ $(TARGET)"
|
||||
@echo "##### \"BOARD\": _________________________________ $(BOARD)"
|
||||
@echo "##### \"MAKE_MAC\": ______________________________ $(MAKE_MAC)"
|
||||
@echo "##### \"MAKE_NET\": ______________________________ $(MAKE_NET)"
|
||||
@echo "##### \"MAKE_ROUTING\": __________________________ $(MAKE_ROUTING)"
|
||||
ifdef MAKE_COAP_DTLS_KEYSTORE
|
||||
@echo "##### \"MAKE_COAP_DTLS_KEYSTORE\": _______________ $(MAKE_COAP_DTLS_KEYSTORE)"
|
||||
endif
|
||||
@echo "----------------- C variables: -----------------"
|
||||
$(Q)$(CC) $(CFLAGS) -E $(CONTIKI)/tools/viewconf.c | grep \#\#\#\#\#
|
||||
@echo "------------------------------------------------"
|
||||
@echo "'==' Means the flag is set to a given a value"
|
||||
@echo "'->' Means the flag is unset, but will default to a given value"
|
||||
@echo "'><' Means the flag is unset and has no default value"
|
||||
@echo "To view more Make variables, edit $(CONTIKI)/Makefile.include, rule 'viewconf'"
|
||||
@echo "To view more C variables, edit $(CONTIKI)/tools/viewconf.c"
|
||||
|
||||
# Don't treat %.$(TARGET) as an intermediate file because it is
|
||||
# in fact the primary target.
|
||||
.PRECIOUS: %.$(TARGET)
|
||||
|
|
151
core/sys/log-conf.h
Normal file
151
core/sys/log-conf.h
Normal file
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
* Copyright (c) 2017, Inria.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the Institute nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file
|
||||
* Default log levels for a number of modules
|
||||
* \author
|
||||
* Simon Duquennoy <simon.duquennoy@inria.fr>
|
||||
*/
|
||||
|
||||
/** \addtogroup sys
|
||||
* @{ */
|
||||
|
||||
/** \addtogroup log
|
||||
* @{ */
|
||||
|
||||
#ifndef __LOG_CONF_H__
|
||||
#define __LOG_CONF_H__
|
||||
|
||||
/* Log only the last 16 bytes of link-layer and IPv6 addresses */
|
||||
#ifdef LOG_CONF_WITH_COMPACT_ADDR
|
||||
#define LOG_WITH_COMPACT_ADDR LOG_CONF_WITH_COMPACT_ADDR
|
||||
#else /* LOG_CONF_WITH_COMPACT_ADDR */
|
||||
#define LOG_WITH_COMPACT_ADDR 0
|
||||
#endif /* LOG_CONF_WITH_COMPACT_ADDR */
|
||||
|
||||
/* Prefix all logs with file name and line-of-code */
|
||||
#ifdef LOG_CONF_WITH_LOC
|
||||
#define LOG_WITH_LOC LOG_CONF_WITH_LOC
|
||||
#else /* LOG_CONF_WITH_LOC */
|
||||
#define LOG_WITH_LOC 0
|
||||
#endif /* LOG_CONF_WITH_LOC */
|
||||
|
||||
/* Prefix all logs with Module name and logging level */
|
||||
#ifdef LOG_CONF_WITH_MODULE_PREFIX
|
||||
#define LOG_WITH_MODULE_PREFIX LOG_CONF_WITH_MODULE_PREFIX
|
||||
#else /* LOG_CONF_WITH_MODULE_PREFIX */
|
||||
#define LOG_WITH_MODULE_PREFIX 1
|
||||
#endif /* LOG_CONF_WITH_MODULE_PREFIX */
|
||||
|
||||
/* Cooja annotations */
|
||||
#ifdef LOG_CONF_WITH_ANNOTATE
|
||||
#define LOG_WITH_ANNOTATE LOG_CONF_WITH_ANNOTATE
|
||||
#else /* LOG_CONF_WITH_ANNOTATE */
|
||||
#define LOG_WITH_ANNOTATE 0
|
||||
#endif /* LOG_CONF_WITH_ANNOTATE */
|
||||
|
||||
/* Custom output function -- default is printf */
|
||||
#ifdef LOG_CONF_OUTPUT
|
||||
#define LOG_OUTPUT(...) LOG_CONF_OUTPUT(__VA_ARGS__)
|
||||
#else /* LOG_CONF_OUTPUT */
|
||||
#define LOG_OUTPUT(...) printf(__VA_ARGS__)
|
||||
#endif /* LOG_CONF_OUTPUT */
|
||||
|
||||
/*
|
||||
* Custom output function to prefix logs with level and module.
|
||||
*
|
||||
* This will only be called when LOG_CONF_WITH_MODULE_PREFIX is enabled and
|
||||
* all implementations should be based on LOG_OUTPUT.
|
||||
*
|
||||
* \param level The log level
|
||||
* \param levelstr The log level as string
|
||||
* \param module The module string descriptor
|
||||
*/
|
||||
#ifdef LOG_CONF_OUTPUT_PREFIX
|
||||
#define LOG_OUTPUT_PREFIX(level, levelstr, module) LOG_CONF_OUTPUT_PREFIX(level, levelstr, module)
|
||||
#else /* LOG_CONF_OUTPUT_PREFIX */
|
||||
#define LOG_OUTPUT_PREFIX(level, levelstr, module) LOG_OUTPUT("[%-4s: %-10s] ", levelstr, module)
|
||||
#endif /* LOG_CONF_OUTPUT_PREFIX */
|
||||
|
||||
/******************************************************************************/
|
||||
/********************* A list of currently supported modules ******************/
|
||||
/******************************************************************************/
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_RPL
|
||||
#define LOG_CONF_LEVEL_RPL LOG_LEVEL_NONE /* Only for rpl-lite */
|
||||
#endif /* LOG_CONF_LEVEL_RPL */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_TCPIP
|
||||
#define LOG_CONF_LEVEL_TCPIP LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_TCPIP */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_IPV6
|
||||
#define LOG_CONF_LEVEL_IPV6 LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_IPV6 */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_6LOWPAN
|
||||
#define LOG_CONF_LEVEL_6LOWPAN LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_6LOWPAN */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_NULLNET
|
||||
#define LOG_CONF_LEVEL_NULLNET LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_NULLNET */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_MAC
|
||||
#define LOG_CONF_LEVEL_MAC LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_MAC */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_FRAMER
|
||||
#define LOG_CONF_LEVEL_FRAMER LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_FRAMER */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_6TOP
|
||||
#define LOG_CONF_LEVEL_6TOP LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_6TOP */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_COAP
|
||||
#define LOG_CONF_LEVEL_COAP LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_COAP */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_LWM2M
|
||||
#define LOG_CONF_LEVEL_LWM2M LOG_LEVEL_NONE
|
||||
#endif /* LOG_CONF_LEVEL_LWM2M */
|
||||
|
||||
#ifndef LOG_CONF_LEVEL_MAIN
|
||||
#define LOG_CONF_LEVEL_MAIN LOG_LEVEL_INFO
|
||||
#endif /* LOG_CONF_LEVEL_MAIN */
|
||||
|
||||
#endif /* __LOG_CONF_H__ */
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
155
tools/viewconf.c
Normal file
155
tools/viewconf.c
Normal file
|
@ -0,0 +1,155 @@
|
|||
#include "contiki.h"
|
||||
#include "core/net/mac/frame802154.h"
|
||||
#include "core/net/mac/tsch/tsch.h"
|
||||
#include "core/net/mac/tsch/tsch-conf.h"
|
||||
#include "core/net/mac/tsch/tsch-schedule.h"
|
||||
#include "core/net/ipv6/uip-nd6.h"
|
||||
#include "core/net/ip/uipopt.h"
|
||||
#include "core/net/queuebuf.h"
|
||||
#include "core/net/nbr-table.h"
|
||||
#include "core/sys/log-conf.h"
|
||||
#include "core/sys/energest.h"
|
||||
|
||||
#ifdef PROJECT_CONF_PATH
|
||||
##### "PROJECT_CONF_PATH": _____________________ == PROJECT_CONF_PATH
|
||||
#else
|
||||
##### "PROJECT_CONF_PATH": _____________________ ><
|
||||
#endif
|
||||
|
||||
##### "CONTIKI_VERSION_STRING": ________________ == CONTIKI_VERSION_STRING
|
||||
|
||||
#ifdef IEEE802154_CONF_PANID
|
||||
##### "IEEE802154_CONF_PANID":__________________ == IEEE802154_CONF_PANID
|
||||
#else
|
||||
##### "IEEE802154_CONF_PANID":__________________ == IEEE802154_PANID
|
||||
#endif
|
||||
|
||||
#ifdef FRAME802154_CONF_VERSION
|
||||
##### "FRAME802154_CONF_VERSION":_______________ == FRAME802154_CONF_VERSION
|
||||
#else
|
||||
##### "FRAME802154_CONF_VERSION":_______________ == FRAME802154_VERSION
|
||||
#endif
|
||||
|
||||
#if MAC_CONF_WITH_TSCH
|
||||
|
||||
#ifdef TSCH_CONF_DEFAULT_HOPPING_SEQUENCE
|
||||
##### "TSCH_CONF_DEFAULT_HOPPING_SEQUENCE": ____ == TTSCH_CONF_DEFAULT_HOPPING_SEQUENCE
|
||||
#else
|
||||
##### "TSCH_CONF_DEFAULT_HOPPING_SEQUENCE": ____ -> TSCH_DEFAULT_HOPPING_SEQUENCE
|
||||
#endif
|
||||
|
||||
#ifdef TSCH_CONF_JOIN_HOPPING_SEQUENCE
|
||||
##### "TSCH_CONF_JOIN_HOPPING_SEQUENCE": _______ == TSCH_CONF_JOIN_HOPPING_SEQUENCE
|
||||
#else
|
||||
##### "TSCH_CONF_JOIN_HOPPING_SEQUENCE": _______ -> TSCH_JOIN_HOPPING_SEQUENCE
|
||||
#endif
|
||||
|
||||
#ifdef TSCH_CONF_EB_PERIOD
|
||||
##### "TSCH_CONF_EB_PERIOD": ___________________ == TSCH_CONF_EB_PERIOD
|
||||
#else
|
||||
##### "TSCH_CONF_EB_PERIOD": ___________________ -> TSCH_EB_PERIOD
|
||||
#endif
|
||||
|
||||
#ifdef TSCH_CONF_MAX_EB_PERIOD
|
||||
##### "TSCH_CONF_MAX_EB_PERIOD": _______________ == TSCH_CONF_MAX_EB_PERIOD
|
||||
#else
|
||||
##### "TSCH_CONF_MAX_EB_PERIOD": _______________ -> TSCH_MAX_EB_PERIOD
|
||||
#endif
|
||||
|
||||
#if TSCH_CONF_DEFAULT_TIMESLOT_LENGTH
|
||||
##### "TSCH_CONF_DEFAULT_TIMESLOT_LENGTH": _____ == TSCH_CONF_DEFAULT_TIMESLOT_LENGTH
|
||||
#else
|
||||
##### "TSCH_CONF_DEFAULT_TIMESLOT_LENGTH": _____ -> TSCH_DEFAULT_TIMESLOT_LENGTH
|
||||
#endif
|
||||
|
||||
#ifdef TSCH_SCHEDULE_CONF_DEFAULT_LENGTH
|
||||
##### "TSCH_SCHEDULE_CONF_DEFAULT_LENGTH": _____ == TSCH_SCHEDULE_CONF_DEFAULT_LENGTH
|
||||
#else
|
||||
##### "TSCH_SCHEDULE_CONF_DEFAULT_LENGTH": _____ -> TSCH_SCHEDULE_DEFAULT_LENGTH
|
||||
#endif
|
||||
|
||||
#else /* MAC_CONF_WITH_TSCH */
|
||||
|
||||
#ifdef RF_CHANNEL
|
||||
##### "RF_CHANNEL": ____________________________ == RF_CHANNEL
|
||||
#else
|
||||
##### "RF_CHANNEL": ____________________________ ><
|
||||
#endif
|
||||
|
||||
#endif /*MAC_CONF_WITH_TSCH */
|
||||
|
||||
#ifdef QUEUEBUF_CONF_NUM
|
||||
##### "QUEUEBUF_CONF_NUM": _____________________ == QUEUEBUF_CONF_NUM
|
||||
#else
|
||||
##### "QUEUEBUF_CONF_NUM": _____________________ -> QUEUEBUF_NUM
|
||||
#endif
|
||||
|
||||
#ifdef NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||
##### "NBR_TABLE_CONF_MAX_NEIGHBORS": __________ == NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||
#else
|
||||
##### "NBR_TABLE_CONF_MAX_NEIGHBORS": __________ -> NBR_TABLE_MAX_NEIGHBORS
|
||||
#endif
|
||||
|
||||
##### "NETSTACK_MAX_ROUTE_ENTRIES": ____________ == NETSTACK_MAX_ROUTE_ENTRIES
|
||||
##### "UIP_CONF_BUFFER_SIZE": __________________ == UIP_CONF_BUFFER_SIZE
|
||||
##### "UIP_CONF_UDP": __________________________ == UIP_CONF_UDP
|
||||
|
||||
#ifdef UIP_CONF_UDP_CONNS
|
||||
##### "UIP_CONF_UDP_CONNS": ____________________ == UIP_CONF_UDP_CONNS
|
||||
#else
|
||||
##### "UIP_CONF_UDP_CONNS": ____________________ -> UIP_UDP_CONNS
|
||||
#endif
|
||||
|
||||
##### "UIP_CONF_TCP": __________________________ == UIP_CONF_TCP
|
||||
|
||||
#ifdef UIP_CONF_TCP_CONNS
|
||||
##### "UIP_CONF_TCP_CONNS": ____________________ == UIP_CONF_TCP_CONNS
|
||||
#else
|
||||
##### "UIP_CONF_TCP_CONNS": ____________________ -> UIP_TCP_CONNS
|
||||
#endif
|
||||
|
||||
#ifdef UIP_CONF_ND6_SEND_RA
|
||||
##### "UIP_CONF_ND6_SEND_RA": __________________ == UIP_CONF_ND6_SEND_RA
|
||||
#else
|
||||
##### "UIP_CONF_ND6_SEND_RA": __________________ -> UIP_ND6_SEND_RA
|
||||
#endif
|
||||
|
||||
#ifdef UIP_CONF_ND6_SEND_NS
|
||||
##### "UIP_CONF_ND6_SEND_NS": __________________ == UIP_CONF_ND6_SEND_NS
|
||||
#else
|
||||
##### "UIP_CONF_ND6_SEND_NS": __________________ -> UIP_ND6_SEND_NS
|
||||
#endif
|
||||
|
||||
#ifdef UIP_CONF_ND6_SEND_NA
|
||||
##### "UIP_CONF_ND6_SEND_NA": __________________ == UIP_CONF_ND6_SEND_NA
|
||||
#else
|
||||
##### "UIP_CONF_ND6_SEND_NA": __________________ -> UIP_ND6_SEND_NA
|
||||
#endif
|
||||
|
||||
#ifdef UIP_CONF_ND6_AUTOFILL_NBR_CACHE
|
||||
##### "UIP_CONF_ND6_AUTOFILL_NBR_CACHE": _______ == UIP_CONF_ND6_AUTOFILL_NBR_CACHE
|
||||
#else
|
||||
##### "UIP_CONF_ND6_AUTOFILL_NBR_CACHE": _______ -> UIP_ND6_AUTOFILL_NBR_CACHE
|
||||
#endif
|
||||
|
||||
##### "SICSLOWPAN_CONF_FRAG": __________________ == SICSLOWPAN_CONF_FRAG
|
||||
|
||||
#ifdef SICSLOWPAN_CONF_COMPRESSION
|
||||
##### "SICSLOWPAN_CONF_COMPRESSION": ___________ == SICSLOWPAN_CONF_COMPRESSION
|
||||
#else
|
||||
##### "SICSLOWPAN_CONF_COMPRESSION": ___________ -> SICSLOWPAN_COMPRESSION
|
||||
#endif
|
||||
|
||||
##### "ENERGEST_CONF_ON": ______________________ == ENERGEST_CONF_ON
|
||||
|
||||
##### "LOG_CONF_LEVEL_RPL": ____________________ == LOG_CONF_LEVEL_RPL
|
||||
##### "LOG_CONF_LEVEL_TCPIP": __________________ == LOG_CONF_LEVEL_TCPIP
|
||||
##### "LOG_CONF_LEVEL_IPV6": ___________________ == LOG_CONF_LEVEL_IPV6
|
||||
##### "LOG_CONF_LEVEL_6LOWPAN": ________________ == LOG_CONF_LEVEL_6LOWPAN
|
||||
##### "LOG_CONF_LEVEL_NULLNET": ________________ == LOG_CONF_LEVEL_NULLNET
|
||||
##### "LOG_CONF_LEVEL_MAC": ____________________ == LOG_CONF_LEVEL_MAC
|
||||
##### "LOG_CONF_LEVEL_FRAMER": _________________ == LOG_CONF_LEVEL_FRAMER
|
||||
##### "LOG_CONF_LEVEL_6TOP": ___________________ == LOG_CONF_LEVEL_6TOP
|
||||
##### "LOG_CONF_LEVEL_COAP": ___________________ == LOG_CONF_LEVEL_COAP
|
||||
##### "LOG_CONF_LEVEL_LWM2M": __________________ == LOG_CONF_LEVEL_LWM2M
|
||||
##### "LOG_CONF_LEVEL_MAIN": ___________________ == LOG_CONF_LEVEL_MAIN
|
Loading…
Reference in a new issue