2016-10-19 20:58:35 +02:00
|
|
|
# name of your application
|
|
|
|
APPLICATION = nanocoap_server
|
|
|
|
|
|
|
|
# If no BOARD is found in the environment, use this default:
|
|
|
|
BOARD ?= native
|
|
|
|
|
|
|
|
# This has to be the absolute path to the RIOT base directory:
|
|
|
|
RIOTBASE ?= $(CURDIR)/../..
|
|
|
|
|
|
|
|
# Include packages that pull up and auto-init the link layer.
|
|
|
|
# NOTE: 6LoWPAN will be included if IEEE802.15.4 devices are present
|
2021-08-31 10:54:48 +02:00
|
|
|
USEMODULE += netdev_default
|
2016-10-19 20:58:35 +02:00
|
|
|
USEMODULE += auto_init_gnrc_netif
|
|
|
|
# Specify the mandatory networking modules for IPv6 and UDP
|
2017-04-26 17:29:10 +02:00
|
|
|
USEMODULE += gnrc_ipv6_default
|
2020-08-31 15:20:08 +02:00
|
|
|
USEMODULE += sock_udp
|
2016-10-19 20:58:35 +02:00
|
|
|
# Additional networking modules that can be dropped if not needed
|
|
|
|
USEMODULE += gnrc_icmpv6_echo
|
|
|
|
|
2017-11-22 12:28:30 +01:00
|
|
|
USEMODULE += nanocoap_sock
|
2023-02-23 00:30:34 +01:00
|
|
|
USEMODULE += nanocoap_resources
|
2016-10-19 20:58:35 +02:00
|
|
|
|
2021-12-13 19:18:00 +01:00
|
|
|
USEMODULE += xtimer
|
|
|
|
|
2016-11-16 11:36:05 +01:00
|
|
|
# include this for nicely formatting the returned internal value
|
|
|
|
USEMODULE += fmt
|
|
|
|
|
2018-03-06 18:00:27 +01:00
|
|
|
# include sha256 (used by example blockwise handler)
|
|
|
|
USEMODULE += hashes
|
|
|
|
|
2017-11-19 14:12:25 +01:00
|
|
|
# Comment this out to enable code in RIOT that does safety checking
|
2016-10-19 20:58:35 +02:00
|
|
|
# which is not needed in a production environment but helps in the
|
|
|
|
# development process:
|
2017-11-19 14:12:25 +01:00
|
|
|
#DEVELHELP = 1
|
2016-10-19 20:58:35 +02:00
|
|
|
|
|
|
|
# Use different settings when compiling for one of the following (low-memory)
|
|
|
|
# boards
|
2018-02-27 14:31:53 +01:00
|
|
|
LOW_MEMORY_BOARDS := nucleo-f334r8
|
2016-10-19 20:58:35 +02:00
|
|
|
|
|
|
|
ifneq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS)))
|
2017-09-22 14:52:38 +02:00
|
|
|
$(info Using low-memory configuration for microcoap_server.)
|
|
|
|
## low-memory tuning values
|
|
|
|
USEMODULE += prng_minstd
|
2016-10-19 20:58:35 +02:00
|
|
|
endif
|
|
|
|
|
2023-02-23 00:30:34 +01:00
|
|
|
# Enable fileserver for boards with plenty of memory
|
2024-02-01 13:55:02 +01:00
|
|
|
HIGH_MEMORY_BOARDS := native native64 same54-xpro mcb2388
|
2023-02-23 00:30:34 +01:00
|
|
|
|
|
|
|
ifneq (,$(filter $(BOARD),$(HIGH_MEMORY_BOARDS)))
|
2024-01-16 16:51:35 +01:00
|
|
|
# enable separate response
|
|
|
|
USEMODULE += nanocoap_server_separate
|
|
|
|
USEMODULE += event_callback
|
|
|
|
USEMODULE += event_thread
|
|
|
|
USEMODULE += event_timeout_ztimer
|
|
|
|
|
|
|
|
# enable fileserver
|
2023-10-30 15:23:21 +01:00
|
|
|
USEMODULE += nanocoap_fileserver
|
2023-02-23 00:30:34 +01:00
|
|
|
USEMODULE += vfs_default
|
|
|
|
|
|
|
|
# always enable auto-format for native
|
2024-02-01 13:55:02 +01:00
|
|
|
ifneq (,$(filter native native64,$(BOARD)))
|
2023-02-23 00:30:34 +01:00
|
|
|
USEMODULE += vfs_auto_format
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-10-19 20:58:35 +02:00
|
|
|
# Change this to 0 show compiler invocation lines by default:
|
|
|
|
QUIET ?= 1
|
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
2016-11-02 11:08:10 +01:00
|
|
|
|
2020-10-16 10:37:52 +02:00
|
|
|
ifneq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS)))
|
|
|
|
# lower pktbuf buffer size
|
|
|
|
# Set GNRC_PKTBUF_SIZE via CFLAGS if not being set via Kconfig.
|
|
|
|
ifndef CONFIG_GNRC_PKTBUF_SIZE
|
|
|
|
CFLAGS += -DCONFIG_GNRC_PKTBUF_SIZE=1000
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2016-11-02 11:08:10 +01:00
|
|
|
# Set a custom channel if needed
|
2019-10-22 15:18:08 +02:00
|
|
|
include $(RIOTMAKE)/default-radio-settings.inc.mk
|