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