nrf5: Merging sdk makefiles into bluetooth_common.mk. s1xx_iot is still left out of this refactoring.

This commit is contained in:
Glenn Ruben Bakke 2017-03-04 17:52:20 +01:00
parent ec35861938
commit 5e89a27ba1
3 changed files with 17 additions and 46 deletions

View File

@ -1,25 +1,28 @@
SDK_MODULES ?=
SOFTDEV_HEX_NAME ?=
ifeq ($(SD), s1xx)
SDK_MODULES = iot_0.9.0
else ifeq ($(SD), s110)
SDK_MODULES = sdk_10.0.0
ifeq ($(SD), s110)
INC += -I$(SDK_ROOT)components/softdevice/$(SD)/headers
CFLAGS += -DBLUETOOTH_SD_DEBUG=1
CFLAGS += -DBLUETOOTH_SD=110
SOFTDEV_HEX_NAME = s110_nrf51_8.0.0_softdevice.hex
else ifeq ($(SD), s120)
SDK_MODULES = sdk_10.0.0
$(error No supported BLE wrapper)
$(error No BLE wrapper available yet)
else ifeq ($(SD), s130)
SDK_MODULES = sdk_10.0.0
$(error No BLE wrapper available yet)
else ifeq ($(SD), s132)
SDK_MODULES = sdk_12.1.0
SDK_COMPONENTS = 0
INC += -I$(SDK_ROOT)components/softdevice/$(SD)/headers
INC += -I$(SDK_ROOT)components/softdevice/$(SD)/headers/$(MCU_VARIANT)
CFLAGS += -DBLUETOOTH_SD_DEBUG=1
CFLAGS += -DBLUETOOTH_SD=132
SOFTDEV_HEX_NAME = s132_nrf52_3.0.0_softdevice.hex
#else ifeq ($(SD), s1xx)
# include sdk/iot_0.9.0/sdk.mk
else
$(error No SDK configured for this SD)
$(error Incorrect softdevice set flag)
endif
SDK_MODULES_PATH = sdk/$(SDK_MODULES)/
include $(SDK_MODULES_PATH)sdk.mk
SOFTDEV_HEX = $(lastword $(wildcard $(SDK_ROOT)/components/softdevice/$(SD)/hex/$(SOFTDEV_HEX_NAME)))
INC += -I./sdk

View File

@ -1,17 +0,0 @@
INC += -I./$(SDK_MODULES_PATH)
# Nothing to build from SDK.
# include $(SDK_MODULES_PATH)build.mk
INC += -I$(SDK_ROOT)components/softdevice/$(SD)/headers
CFLAGS += -DBLUETOOTH_SD_DEBUG=1
# softdevice .hex file
ifeq ($(SD), s110)
CFLAGS += -DBLUETOOTH_SD=110
SOFTDEV_HEX ?= $(lastword $(wildcard $(SDK_ROOT)/components/softdevice/s110/hex/s110_nrf51_8.0.0_softdevice.hex))
else ifeq ($(SD), s120)
CFLAGS += -DBLUETOOTH_SD=120
SOFTDEV_HEX ?= $(lastword $(wildcard $(SDK_ROOT)/components/softdevice/s120/hex/s120_nrf51_2.1.0_softdevice.hex))
endif

View File

@ -1,15 +0,0 @@
INC += -I./$(SDK_MODULES_PATH)
INC += -I$(SDK_ROOT)components/softdevice/$(SD)/headers
INC += -I$(SDK_ROOT)components/softdevice/$(SD)/headers/$(MCU_VARIANT)
CFLAGS += -DBLUETOOTH_SD_DEBUG=1
# softdevice .hex file
ifeq ($(SD), s130)
CFLAGS += -DBLUETOOTH_SD=130
SOFTDEV_HEX ?= $(lastword $(wildcard $(SDK_ROOT)/components/softdevice/s130/hex/s130_nrf51_2.0.1_softdevice.hex))
else ifeq ($(SD), s132)
CFLAGS += -DBLUETOOTH_SD=132
SOFTDEV_HEX ?= $(lastword $(wildcard $(SDK_ROOT)/components/softdevice/s132/hex/s132_nrf52_3.0.0_softdevice.hex))
endif