2019-11-29 17:54:45 +01:00
|
|
|
# name of your application
|
2021-03-25 13:51:08 +01:00
|
|
|
APPLICATION = lwm2m
|
2019-11-29 17:54:45 +01:00
|
|
|
|
|
|
|
# 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
|
2019-11-29 17:54:45 +01:00
|
|
|
USEMODULE += auto_init_gnrc_netif
|
|
|
|
# Specify the mandatory networking modules
|
|
|
|
USEMODULE += gnrc_ipv6_router_default
|
|
|
|
# Additional networking modules that can be dropped if not needed
|
|
|
|
USEMODULE += gnrc_icmpv6_echo
|
|
|
|
# Add also the shell, some shell commands
|
|
|
|
USEMODULE += shell
|
2022-08-16 16:35:20 +02:00
|
|
|
USEMODULE += shell_cmds_default
|
2019-11-29 17:54:45 +01:00
|
|
|
USEMODULE += ps
|
|
|
|
|
|
|
|
# Comment this out to disable code in RIOT that does safety checking
|
|
|
|
# which is not needed in a production environment but helps in the
|
|
|
|
# development process:
|
|
|
|
DEVELHELP ?= 1
|
|
|
|
|
|
|
|
# NOTE: Add the package for wakaama
|
|
|
|
USEPKG += wakaama
|
2021-03-18 09:41:30 +01:00
|
|
|
USEMODULE += wakaama_objects_light_control
|
2019-11-29 17:54:45 +01:00
|
|
|
|
2021-03-25 13:51:08 +01:00
|
|
|
# add DTLS support
|
|
|
|
USEMODULE += wakaama_client_dtls
|
|
|
|
|
|
|
|
# Specify sock DTLS implementation
|
|
|
|
USEPKG += tinydtls
|
|
|
|
# tinydtls needs crypto secure PRNG
|
|
|
|
USEMODULE += prng_sha1prng
|
|
|
|
|
|
|
|
## Application-specific Configuration options
|
2024-09-17 13:20:25 +02:00
|
|
|
LWM2M_SERVER_URI ?= '"coaps://[fd00:dead:beef::1]:5684"'
|
2021-03-25 13:51:08 +01:00
|
|
|
LWM2M_SERVER_SHORT_ID ?= 1
|
|
|
|
|
2024-09-17 13:20:25 +02:00
|
|
|
CFLAGS += -DEVENT_THREAD_MEDIUM_STACKSIZE='(4*1024)'
|
2019-11-29 17:54:45 +01:00
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
2019-12-17 14:05:44 +01:00
|
|
|
|
2021-03-25 13:51:08 +01:00
|
|
|
DTLS_MAX_BUF=1024
|
|
|
|
|
|
|
|
# Configure via CFLAGS only if not done via Kconfig
|
2019-12-17 14:05:44 +01:00
|
|
|
ifndef CONFIG_LWM2M_SERVER_URI
|
2021-03-25 13:51:08 +01:00
|
|
|
CFLAGS += -DCONFIG_LWM2M_SERVER_URI=$(LWM2M_SERVER_URI)
|
|
|
|
CFLAGS += -DCONFIG_LWM2M_SERVER_SHORT_ID=$(LWM2M_SERVER_SHORT_ID)
|
|
|
|
CFLAGS += -DCONFIG_DTLS_PEER_MAX=2
|
|
|
|
CFLAGS += -DCONFIG_MAX_BUF=1024
|
|
|
|
# Uncomment to enable Wakaama debug log
|
|
|
|
#CFLAGS += -DCONFIG_LWM2M_WITH_LOGS=1
|
2019-12-17 14:05:44 +01:00
|
|
|
endif
|