Skip to content

Commit

Permalink
Introduce Bluetooth ESP32-only component and require it from NimBLE.
Browse files Browse the repository at this point in the history
  • Loading branch information
slav-at-attachix committed May 18, 2022
1 parent 658cf59 commit e19ec25
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 35 deletions.
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions Sming/Arch/Esp32/Components/bluetooth/component.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
COMPONENT_LIBNAME :=

COMPONENT_DEPENDS := esp32

EXTRA_LIBS += \
bt \
btdm_app

SDK_LIBDIRS := \
bt/controller/lib_esp32/$(ESP_VARIANT)/ \
bt/controller/lib_esp32c3_family/$(ESP_VARIANT)/

LIBDIRS += \
$(addprefix $(SDK_COMPONENTS_PATH)/,$(SDK_LIBDIRS))

SDK_INCDIRS := \
bt/include/$(ESP_VARIANT)/include \
bt/common/api/include/api \
bt/common/btc/profile/esp/blufi/include \
bt/common/btc/profile/esp/include \
bt/common/osi/include \
bt/host/nimble/nimble/nimble/include \
bt/host/nimble/nimble/nimble/host/include \
bt/host/nimble/nimble/porting/nimble/include \
bt/host/nimble/nimble/porting/npl/freertos/include \
bt/host/nimble/nimble/nimble/host/services/ans/include \
bt/host/nimble/nimble/nimble/host/services/bas/include \
bt/host/nimble/nimble/nimble/host/services/dis/include \
bt/host/nimble/nimble/nimble/host/services/gap/include \
bt/host/nimble/nimble/nimble/host/services/gatt/include \
bt/host/nimble/nimble/nimble/host/services/ias/include \
bt/host/nimble/nimble/nimble/host/services/ipss/include \
bt/host/nimble/nimble/nimble/host/services/lls/include \
bt/host/nimble/nimble/nimble/host/services/tps/include \
bt/host/nimble/nimble/nimble/host/util/include \
bt/host/nimble/nimble/nimble/host/store/ram/include \
bt/host/nimble/nimble/nimble/host/store/config/include \
bt/host/nimble/esp-hci/include \
bt/host/nimble/port/include

COMPONENT_INCDIRS := \
$(addprefix $(SDK_COMPONENTS_PATH)/,$(SDK_INCDIRS))

DISABLE_NETWORK := 0
5 changes: 0 additions & 5 deletions Sming/Arch/Esp32/Components/bt/component.mk

This file was deleted.

30 changes: 2 additions & 28 deletions Sming/Arch/Esp32/Components/esp32/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ SDK_LIBDIRS := \
xtensa/$(ESP_VARIANT)/ \
hal/$(ESP_VARIANT)/ \
$(ESP_VARIANT)/ld \
esp_rom/$(ESP_VARIANT)/ld \
bt/controller/lib_esp32/$(ESP_VARIANT)/
esp_rom/$(ESP_VARIANT)/ld

ESP32_COMPONENT_PATH := $(COMPONENT_PATH)
SDK_DEFAULT_PATH := $(ESP32_COMPONENT_PATH)/sdk
Expand All @@ -38,29 +37,6 @@ SDK_INCDIRS := \
app_update/include \
bootloader_support/include \
bootloader_support/include_bootloader \
bt/include/$(ESP_VARIANT)/include \
bt/common/api/include/api \
bt/common/btc/profile/esp/blufi/include \
bt/common/btc/profile/esp/include \
bt/common/osi/include \
bt/host/nimble/nimble/nimble/include \
bt/host/nimble/nimble/nimble/host/include \
bt/host/nimble/nimble/porting/nimble/include \
bt/host/nimble/nimble/porting/npl/freertos/include \
bt/host/nimble/nimble/nimble/host/services/ans/include \
bt/host/nimble/nimble/nimble/host/services/bas/include \
bt/host/nimble/nimble/nimble/host/services/dis/include \
bt/host/nimble/nimble/nimble/host/services/gap/include \
bt/host/nimble/nimble/nimble/host/services/gatt/include \
bt/host/nimble/nimble/nimble/host/services/ias/include \
bt/host/nimble/nimble/nimble/host/services/ipss/include \
bt/host/nimble/nimble/nimble/host/services/lls/include \
bt/host/nimble/nimble/nimble/host/services/tps/include \
bt/host/nimble/nimble/nimble/host/util/include \
bt/host/nimble/nimble/nimble/host/store/ram/include \
bt/host/nimble/nimble/nimble/host/store/config/include \
bt/host/nimble/esp-hci/include \
bt/host/nimble/port/include \
driver/$(ESP_VARIANT)/include \
driver/include \
esp_pm/include \
Expand Down Expand Up @@ -142,7 +118,6 @@ SDK_COMPONENTS := \

ifneq ($(DISABLE_NETWORK),1)
SDK_COMPONENTS += \
bt \
esp_wifi \
esp_eth \
lwip \
Expand All @@ -167,8 +142,6 @@ SDK_COMPONENTS += xtensa
endif

SDK_ESP_WIFI_LIBS := \
bt \
coexist \
core \
espnow \
mesh \
Expand All @@ -188,6 +161,7 @@ SDK_TARGET_ARCH_LIBS := hal xt_hal
endif

EXTRA_LIBS := \
coexist \
$(SDK_COMPONENTS) \
$(SDK_TARGET_ARCH_LIBS)

Expand Down
3 changes: 1 addition & 2 deletions Sming/Arch/Esp32/Components/sming-arch/component.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ COMPONENT_DEPENDS := \
heap \
esp32 \
gdbstub \
esptool \
bt
esptool

# ELF and BIN files
DEBUG_VARS += TARGET_BIN TARGET_OUT
Expand Down
2 changes: 2 additions & 0 deletions Sming/Libraries/NimBLE/component.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
COMPONENT_SUBMODULES := esp-nimble-cpp
COMPONENT_SOC := esp32*

COMPONENT_DEPENDS := bluetooth

COMPONENT_SRCDIRS := esp-nimble-cpp/src
COMPONENT_INCDIRS := $(COMPONENT_SRCDIRS)

0 comments on commit e19ec25

Please sign in to comment.