2018-12-30 22:49:20 -05:00
|
|
|
ifeq ($(SD), s140)
|
2018-02-07 21:45:46 +01:00
|
|
|
CFLAGS += -DBLUETOOTH_SD=140
|
|
|
|
CFLAGS += -DBLE_API_VERSION=4
|
2016-12-13 20:27:26 +01:00
|
|
|
else
|
2018-01-31 07:29:31 +01:00
|
|
|
$(error Incorrect softdevice set flag)
|
2016-12-13 20:27:26 +01:00
|
|
|
endif
|
|
|
|
|
2018-02-07 21:45:46 +01:00
|
|
|
CFLAGS += -DBLUETOOTH_SD_DEBUG=1
|
2019-01-29 20:47:01 +07:00
|
|
|
CFLAGS += -DSOFTDEVICE_PRESENT
|
2018-02-07 21:45:46 +01:00
|
|
|
|
2018-07-22 16:23:04 +02:00
|
|
|
INC += -Ibluetooth/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)_API/include
|
|
|
|
INC += -Ibluetooth/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)_API/include/$(MCU_VARIANT)
|
2018-02-07 21:45:46 +01:00
|
|
|
|
2018-06-18 23:11:30 +02:00
|
|
|
SOFTDEV_HEX_NAME = $(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)_softdevice.hex
|
2018-07-22 16:23:04 +02:00
|
|
|
SOFTDEV_HEX_PATH = bluetooth/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)
|
2018-02-07 21:45:46 +01:00
|
|
|
SOFTDEV_HEX = $(SOFTDEV_HEX_PATH)/$(SOFTDEV_HEX_NAME)
|
|
|
|
|
2017-04-21 18:55:59 +02:00
|
|
|
define STACK_MISSING_ERROR
|
|
|
|
|
|
|
|
|
|
|
|
###### ERROR: Bluetooth LE Stack not found ############
|
|
|
|
# #
|
|
|
|
# The build target requires a Bluetooth LE stack. #
|
2018-11-30 13:26:12 -08:00
|
|
|
# $(SOFTDEV_HEX) not found. #
|
2017-04-21 18:55:59 +02:00
|
|
|
# #
|
|
|
|
# Please run the download script: #
|
|
|
|
# #
|
2018-07-22 16:23:04 +02:00
|
|
|
# bluetooth/download_ble_stack.sh #
|
2017-04-21 18:55:59 +02:00
|
|
|
# #
|
|
|
|
#######################################################
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(shell test ! -e $(SOFTDEV_HEX) && echo -n no),no)
|
|
|
|
$(error $(STACK_MISSING_ERROR))
|
|
|
|
endif
|