circuitpython/ports/nrf/bluetooth/bluetooth_common.mk

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.3 KiB
Makefile
Raw Normal View History

2018-12-30 22:49:20 -05:00
ifeq ($(SD), s140)
CFLAGS += -DBLUETOOTH_SD=140
CFLAGS += -DBLE_API_VERSION=4
else
$(error Incorrect softdevice set flag)
endif
CFLAGS += -DBLUETOOTH_SD_DEBUG=1
2019-01-29 08:47:01 -05:00
CFLAGS += -DSOFTDEVICE_PRESENT
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)
SOFTDEV_HEX_NAME = $(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)_softdevice.hex
SOFTDEV_HEX_PATH = bluetooth/$(SD)_$(MCU_VARIANT)_$(SOFTDEV_VERSION)
SOFTDEV_HEX = $(SOFTDEV_HEX_PATH)/$(SOFTDEV_HEX_NAME)
define STACK_MISSING_ERROR
###### ERROR: Bluetooth LE Stack not found ############
# #
# The build target requires a Bluetooth LE stack. #
# $(SOFTDEV_HEX) not found. #
# #
# Please run the download script: #
# #
# bluetooth/download_ble_stack.sh #
# #
#######################################################
endef
ifeq ($(shell test ! -e $(SOFTDEV_HEX) && echo -n no),no)
$(error $(STACK_MISSING_ERROR))
endif