2018-05-24 11:36:20 +02:00
|
|
|
NIMIBASE = -I$(PKGDIRBASE)/nimble
|
|
|
|
|
|
|
|
# include RIOT glue code headers
|
|
|
|
INCLUDES += -I$(RIOTPKG)/nimble/contrib/include
|
|
|
|
|
2019-02-22 13:55:16 +01:00
|
|
|
# include generic nimble headers
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/include
|
2018-05-24 11:36:20 +02:00
|
|
|
|
|
|
|
# include the RIOT NPL headers
|
|
|
|
INCLUDES += $(NIMIBASE)/porting/npl/riot/include
|
2019-02-22 13:55:16 +01:00
|
|
|
INCLUDES += $(NIMIBASE)/porting/nimble/include
|
2018-05-24 11:36:20 +02:00
|
|
|
|
|
|
|
# include nimble controller headers
|
2019-02-22 13:55:16 +01:00
|
|
|
ifneq (,$(filter nimble_controller,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/controller/include
|
|
|
|
# set environment
|
|
|
|
CFLAGS += -DNIMBLE_CFG_CONTROLLER=1
|
|
|
|
CFLAGS += -DMYNEWT_VAL_OS_CPUTIME_FREQ=32768
|
|
|
|
|
2019-04-27 21:24:54 +02:00
|
|
|
ifneq (,$(filter nimble_drivers_nrf5x,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/drivers/$(CPU_FAM)/include
|
2019-02-22 13:55:16 +01:00
|
|
|
endif
|
|
|
|
endif
|
2018-05-24 11:36:20 +02:00
|
|
|
|
|
|
|
# include nimble host headers
|
2019-02-22 13:55:16 +01:00
|
|
|
ifneq (,$(filter nimble_host,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_host_store_ram,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/store/ram/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_host_util,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/util/include
|
|
|
|
endif
|
|
|
|
|
|
|
|
# include tinycrypt headers
|
|
|
|
ifneq (,$(filter nimble_controller,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/ext/tinycrypt/include
|
|
|
|
endif
|
|
|
|
|
|
|
|
# include transport headers
|
|
|
|
ifneq (,$(filter nimble_transport_ram,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/transport/ram/include
|
|
|
|
endif
|
2018-05-24 11:36:20 +02:00
|
|
|
|
2019-02-22 13:55:16 +01:00
|
|
|
# include services
|
|
|
|
ifneq (,$(filter nimble_svc_ans,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/ans/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_svc_bas,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/bas/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_svc_bleuart,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/bleuart/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_svc_gap,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/gap/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_svc_gatt,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/gatt/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_svc_ias,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/ias/include
|
|
|
|
endif
|
2019-03-27 11:29:10 +01:00
|
|
|
ifneq (,$(filter nimble_svc_ipss,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/ipss/include
|
|
|
|
endif
|
2019-02-22 13:55:16 +01:00
|
|
|
ifneq (,$(filter nimble_svc_lls,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/lls/include
|
|
|
|
endif
|
|
|
|
ifneq (,$(filter nimble_svc_tps,$(USEMODULE)))
|
|
|
|
INCLUDES += $(NIMIBASE)/nimble/host/services/tps/include
|
|
|
|
endif
|
2019-03-26 09:50:08 +01:00
|
|
|
|
|
|
|
# include additional headers for RIOT specific NimBLE submodules
|
|
|
|
ifneq (,$(filter nimble_addr,$(USEMODULE)))
|
|
|
|
INCLUDES += -I$(RIOTPKG)/nimble/addr/include
|
|
|
|
endif
|
2019-05-17 11:15:49 +02:00
|
|
|
ifneq (,$(filter nimble_netif,$(USEMODULE)))
|
|
|
|
INCLUDES += -I$(RIOTPKG)/nimble/netif/include
|
|
|
|
|
|
|
|
# configure NimBLE's internals
|
|
|
|
NIMBLE_MAX_CONN ?= 3
|
|
|
|
CFLAGS += -DMYNEWT_VAL_MSYS_1_BLOCK_SIZE=264
|
|
|
|
CFLAGS += -DMYNEWT_VAL_BLE_L2CAP_COC_MAX_NUM=$(NIMBLE_MAX_CONN)
|
|
|
|
CFLAGS += -DMYNEWT_VAL_BLE_MAX_CONNECTIONS=$(NIMBLE_MAX_CONN)
|
|
|
|
# NimBLEs internal buffer need to hold one IPv6 MTU per connection
|
|
|
|
# for the internal MTU of 256 byte, we need 10 mbufs per connection...
|
|
|
|
CFLAGS += -DMYNEWT_VAL_MSYS_1_BLOCK_COUNT=35
|
|
|
|
endif
|
2019-03-26 11:39:29 +01:00
|
|
|
ifneq (,$(filter nimble_scanlist,$(USEMODULE)))
|
|
|
|
INCLUDES += -I$(RIOTPKG)/nimble/scanlist/include
|
|
|
|
endif
|
2019-03-26 13:46:25 +01:00
|
|
|
ifneq (,$(filter nimble_scanner,$(USEMODULE)))
|
|
|
|
INCLUDES += -I$(RIOTPKG)/nimble/scanner/include
|
|
|
|
endif
|