Merge pull request #13290 from pokgak/pr/tinydtls/cleanup
tinydtls: remove TINYDTLS_LOG and cleanup
This commit is contained in:
commit
24f6b3953a
@ -31,13 +31,8 @@ CFLAGS += -DDTLS_DEFAULT_PORT=$(DTLS_PORT)
|
|||||||
# This adds support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
|
# This adds support for TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8
|
||||||
# CFLAGS += -DDTLS_ECC
|
# CFLAGS += -DDTLS_ECC
|
||||||
|
|
||||||
# Define the log entry for the tinydtls package.
|
|
||||||
# Values: 0:EMERG (Default), 1:ALERT 2:CRIT 3:WARN 4:NOTICE 5:INFO 6:DEBUG
|
|
||||||
TINYDTLS_LOG ?= 0
|
|
||||||
|
|
||||||
# Enable this line for setting tinyDTLS in debug mode.
|
# Enable this line for setting tinyDTLS in debug mode.
|
||||||
# This overrides TINYDTLS_LOG to 6
|
# CFLAGS += -DDTLS_DEBUG
|
||||||
# CFLAGS += -DTINYDTLS_DEBUG
|
|
||||||
|
|
||||||
# FIXME: This is a temporary patch
|
# FIXME: This is a temporary patch
|
||||||
# TinyDTLS <= 0.8.6 requires around 426 bytes in RAM.
|
# TinyDTLS <= 0.8.6 requires around 426 bytes in RAM.
|
||||||
|
|||||||
@ -37,9 +37,6 @@ CFLAGS += -DDTLS_PSK
|
|||||||
|
|
||||||
# Uncomment to enable debug logs
|
# Uncomment to enable debug logs
|
||||||
# CFLAGS += -DDTLS_DEBUG
|
# CFLAGS += -DDTLS_DEBUG
|
||||||
# When DTLS_DEBUG is set and using tinydtls, verbosity of debug log can be set with
|
|
||||||
# Values: 0:EMERG (Default), 1:ALERT 2:CRIT 3:WARN 4:NOTICE 5:INFO 6:DEBUG
|
|
||||||
# TINYDTLS_LOG=3
|
|
||||||
|
|
||||||
# FIXME: This is a temporary patch
|
# FIXME: This is a temporary patch
|
||||||
CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(2*THREAD_STACKSIZE_LARGE\)
|
CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(2*THREAD_STACKSIZE_LARGE\)
|
||||||
|
|||||||
@ -7,45 +7,31 @@ ifeq ($(TOOLCHAIN), llvm)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES += -I$(RIOTBASE)/pkg/tinydtls/include
|
INCLUDES += -I$(RIOTBASE)/pkg/tinydtls/include
|
||||||
|
INCLUDES += -I$(PKG_BUILDDIR)
|
||||||
|
# Mandatory for tinyDTLS
|
||||||
|
CFLAGS += -DDTLSv12 -DWITH_SHA256
|
||||||
|
|
||||||
ifneq (,$(filter tinydtls,$(USEMODULE)))
|
# Dependencies partially under control of the App's requirements
|
||||||
INCLUDES += -I$(PKG_BUILDDIR)
|
|
||||||
# Mandatory for tinyDTLS
|
|
||||||
CFLAGS += -DDTLSv12 -DWITH_SHA256
|
|
||||||
|
|
||||||
# Dependencies partially under control of the App's requirements
|
# The configuration for socket overrides Sock
|
||||||
|
ifeq (,$(filter posix_sockets,$(USEMODULE)))
|
||||||
# The configuration for socket overrides Sock
|
|
||||||
ifeq (,$(filter posix_sockets,$(USEMODULE)))
|
|
||||||
CFLAGS += -DWITH_RIOT_GNRC
|
CFLAGS += -DWITH_RIOT_GNRC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# NOTE: PSK should be enabled by default BUT if the user define any other cipher
|
# NOTE: PSK should be enabled by default BUT if the user define any other cipher
|
||||||
# suite(s) it should not be enabled.
|
# suite(s) it should not be enabled.
|
||||||
# TODO: Create the flag DTLS_CIPHERS with keywords PSK, ECC (and future)
|
# TODO: Create the flag DTLS_CIPHERS with keywords PSK, ECC (and future)
|
||||||
ifeq (,$(filter -DDTLS_PSK,$(CFLAGS)))
|
ifeq (,$(filter -DDTLS_PSK,$(CFLAGS)))
|
||||||
ifeq (,$(filter -DDTLS_ECC,$(CFLAGS)))
|
ifeq (,$(filter -DDTLS_ECC,$(CFLAGS)))
|
||||||
CFLAGS += -DDTLS_PSK
|
CFLAGS += -DDTLS_PSK
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable debug when using tinydtls_sock_dtls
|
# Handles the verbosity of tinyDTLS. Default: Minimum or just error messages.
|
||||||
ifneq (,$(filter -DDTLS_DEBUG,$(CFLAGS)))
|
ifeq (,$(filter -DDTLS_DEBUG,$(CFLAGS)))
|
||||||
ifeq (,$(TINYDTLS_LOG))
|
|
||||||
CFLAGS += -DTINYDTLS_DEBUG
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Handles the verbosity of tinyDTLS. Default: Minimum or just error messages.
|
|
||||||
ifeq (,$(filter -DTINYDTLS_DEBUG,$(CFLAGS)))
|
|
||||||
ifeq ( , $(TINYDTLS_LOG))
|
|
||||||
CFLAGS += -DTINYDTLS_LOG_LVL=0
|
CFLAGS += -DTINYDTLS_LOG_LVL=0
|
||||||
else
|
else
|
||||||
CFLAGS += -DTINYDTLS_LOG_LVL=$(TINYDTLS_LOG)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
CFLAGS += -DTINYDTLS_LOG_LVL=6
|
CFLAGS += -DTINYDTLS_LOG_LVL=6
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(filter tinydtls_aes,$(USEMODULE)))
|
ifneq (,$(filter tinydtls_aes,$(USEMODULE)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user