2018-05-24 11:36:20 +02:00
|
|
|
# RIOT specific dependencies
|
2021-04-12 15:59:30 +02:00
|
|
|
USEMODULE += sema
|
2018-05-24 11:36:20 +02:00
|
|
|
USEMODULE += event_callback
|
2021-04-12 15:59:30 +02:00
|
|
|
USEMODULE += ztimer_msec
|
2018-05-24 11:36:20 +02:00
|
|
|
|
2019-06-12 12:17:08 +02:00
|
|
|
# Requires nimble feature
|
|
|
|
FEATURES_REQUIRED += ble_nimble
|
|
|
|
|
2018-05-24 11:36:20 +02:00
|
|
|
# glue code
|
|
|
|
USEMODULE += nimble_riot_contrib
|
|
|
|
|
2019-02-22 13:55:16 +01:00
|
|
|
# RIOT port
|
2018-05-24 11:36:20 +02:00
|
|
|
USEMODULE += nimble_porting_nimble
|
2021-07-05 14:31:14 +02:00
|
|
|
|
2022-03-22 08:53:47 +01:00
|
|
|
# Generic modules used by host and controller
|
|
|
|
USEMODULE += nimble_transport
|
|
|
|
|
2021-12-06 13:08:23 +01:00
|
|
|
# Pull in dependencies based on used features
|
|
|
|
ifneq (,$(filter ble_phy_coded,$(FEATURES_USED)))
|
|
|
|
USEMODULE += nimble_phy_coded
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter ble_phy_2mbit,$(FEATURES_USED)))
|
|
|
|
USEMODULE += nimble_phy_2mbit
|
|
|
|
endif
|
|
|
|
|
2021-07-05 14:31:14 +02:00
|
|
|
# NOTE: this dependency depends on inclusion order, for it to work properly
|
|
|
|
# mynewt-core should be selected as nimble backend as early as possible,
|
|
|
|
# i.e. at the application level.
|
|
|
|
ifneq (,$(filter mynewt-core,$(USEPKG)))
|
|
|
|
USEMODULE += mynewt-core_os
|
|
|
|
USEMODULE += mynewt-core_util
|
|
|
|
USEMODULE += mynewt-core_nrf5x_hal
|
|
|
|
else
|
|
|
|
# uwb-% requires mynewt-core so is incompatible with nimble_npl_riot
|
|
|
|
ifeq (,$(filter uwb%,$(USEPKG)))
|
|
|
|
USEMODULE += nimble_npl_riot
|
|
|
|
endif
|
|
|
|
endif
|
2018-05-24 11:36:20 +02:00
|
|
|
|
2019-02-22 13:55:16 +01:00
|
|
|
# if nothing else is specified, we build the host and controller
|
|
|
|
ifeq (,$(filter nimble_host nimble_controller,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_host
|
|
|
|
USEMODULE += nimble_controller
|
|
|
|
endif
|
|
|
|
|
|
|
|
# include host dependencies
|
|
|
|
ifneq (,$(filter nimble_host,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_host_util
|
|
|
|
USEMODULE += nimble_host_store_ram
|
2021-06-08 14:25:07 +02:00
|
|
|
USEPKG += tinycrypt
|
2019-02-22 13:55:16 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
# nimble controller dependencies
|
|
|
|
ifneq (,$(filter nimble_controller,$(USEMODULE)))
|
2023-07-13 13:22:28 +02:00
|
|
|
ifneq (,$(filter nrf51 nrf52,$(CPU_FAM)))
|
2019-04-27 21:24:54 +02:00
|
|
|
USEMODULE += nimble_drivers_nrf5x
|
2019-02-22 13:55:16 +01:00
|
|
|
endif
|
2018-05-24 11:36:20 +02:00
|
|
|
endif
|
2019-03-26 09:50:08 +01:00
|
|
|
|
2019-05-17 11:15:49 +02:00
|
|
|
# RIOT specific submodule dependencies
|
2019-03-26 09:50:08 +01:00
|
|
|
ifneq (,$(filter nimble_addr,$(USEMODULE)))
|
|
|
|
USEMODULE += bluetil_addr
|
|
|
|
endif
|
2019-03-26 11:39:29 +01:00
|
|
|
|
2022-08-12 16:06:16 +02:00
|
|
|
ifneq (,$(filter nimble_adv_ext,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += ble_adv_ext
|
|
|
|
endif
|
|
|
|
|
2020-02-24 11:38:17 +01:00
|
|
|
ifneq (,$(filter nimble_autoadv,$(USEMODULE)))
|
|
|
|
USEMODULE += bluetil_ad
|
2022-02-14 10:24:55 +01:00
|
|
|
USEMODULE += bluetil_addr
|
2024-03-19 15:10:51 +01:00
|
|
|
ifneq (,$(filter shell_cmds_default,$(USEMODULE)))
|
2022-02-14 10:24:55 +01:00
|
|
|
DEFAULT_MODULE += nimble_autoadv_shell
|
|
|
|
endif
|
2020-02-24 11:38:17 +01:00
|
|
|
endif
|
|
|
|
|
2021-12-06 13:57:17 +01:00
|
|
|
ifneq (,$(filter nimble_autoconn_ext,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_netif_ext
|
|
|
|
endif
|
|
|
|
|
2019-08-29 15:56:24 +02:00
|
|
|
ifneq (,$(filter nimble_autoconn_%,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_autoconn
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter nimble_autoconn,$(USEMODULE)))
|
2021-02-04 09:30:42 +01:00
|
|
|
USEMODULE += random
|
2019-08-29 15:56:24 +02:00
|
|
|
USEMODULE += nimble_netif
|
|
|
|
USEMODULE += nimble_scanner
|
|
|
|
USEMODULE += bluetil_ad
|
|
|
|
endif
|
|
|
|
|
2021-09-13 14:41:59 +02:00
|
|
|
ifneq (,$(filter nimble_phy_2mbit,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += ble_phy_2mbit
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(filter nimble_phy_coded,$(USEMODULE)))
|
|
|
|
FEATURES_REQUIRED += ble_phy_coded
|
|
|
|
endif
|
|
|
|
|
2021-12-06 13:55:45 +01:00
|
|
|
ifneq (,$(filter nimble_rpble_ext,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_rpble
|
|
|
|
USEMODULE += nimble_netif_ext
|
|
|
|
endif
|
|
|
|
|
2021-04-20 14:45:30 +02:00
|
|
|
ifneq (,$(filter nimble_rpble,$(USEMODULE)))
|
|
|
|
USEMODULE += gnrc_rpl
|
|
|
|
USEMODULE += nimble_netif
|
|
|
|
USEMODULE += nimble_scanner
|
|
|
|
USEMODULE += bluetil_ad
|
|
|
|
endif
|
|
|
|
|
2019-03-26 11:39:29 +01:00
|
|
|
ifneq (,$(filter nimble_scanlist,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_addr
|
|
|
|
USEMODULE += bluetil_ad
|
2021-04-12 15:59:57 +02:00
|
|
|
USEMODULE += ztimer_usec
|
2019-03-26 11:39:29 +01:00
|
|
|
endif
|
2019-05-17 11:15:49 +02:00
|
|
|
|
2021-12-06 13:28:00 +01:00
|
|
|
ifneq (,$(filter nimble_statconn_ext,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_statconn
|
|
|
|
USEMODULE += nimble_netif_ext
|
|
|
|
endif
|
|
|
|
|
2020-03-02 17:40:26 +01:00
|
|
|
ifneq (,$(filter nimble_statconn,$(USEMODULE)))
|
2021-02-03 11:19:37 +01:00
|
|
|
USEMODULE += random
|
2020-03-02 17:40:26 +01:00
|
|
|
USEMODULE += nimble_netif
|
|
|
|
USEMODULE += nimble_addr
|
|
|
|
endif
|
|
|
|
|
2021-12-06 13:28:00 +01:00
|
|
|
ifneq (,$(filter nimble_netif_ext,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_netif
|
|
|
|
USEMODULE += nimble_adv_ext
|
|
|
|
endif
|
|
|
|
|
2021-11-22 10:35:37 +01:00
|
|
|
ifneq (,$(filter nimble_netif,$(USEMODULE)))
|
|
|
|
# nimble_netif and nimble_autoadv will both setup gat advertisement, which will
|
|
|
|
# conflict with each other. Using the extended advertisement module allows
|
|
|
|
# setting this up on independent state machines allowing them to run concurently
|
|
|
|
ifneq (,$(filter nimble_autoadv,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_adv_ext
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-05-17 11:15:49 +02:00
|
|
|
ifneq (,$(filter nimble_netif,$(USEMODULE)))
|
2019-11-13 13:06:13 +01:00
|
|
|
FEATURES_REQUIRED += ble_nimble_netif
|
2021-04-21 20:33:41 +02:00
|
|
|
USEMODULE += random
|
2019-05-17 11:15:49 +02:00
|
|
|
USEMODULE += l2util
|
|
|
|
USEMODULE += bluetil_addr
|
|
|
|
ifneq (,$(filter gnrc_ipv6_%,$(USEMODULE)))
|
|
|
|
USEMODULE += nimble_svc_ipss
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter gnrc_ipv6_router_default,$(USEMODULE)))
|
|
|
|
USEMODULE += gnrc_ipv6_nib_6lr
|
|
|
|
USEMODULE += gnrc_sixlowpan
|
|
|
|
USEMODULE += gnrc_sixlowpan_iphc
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter gnrc_ipv6_default,$(USEMODULE)))
|
|
|
|
USEMODULE += gnrc_ipv6_nib_6ln
|
|
|
|
USEMODULE += gnrc_sixlowpan
|
|
|
|
USEMODULE += gnrc_sixlowpan_iphc
|
|
|
|
endif
|
|
|
|
endif
|