nimble: make nimble porting example optional

Enabled by default for the moment to avoid CI errors
This commit is contained in:
raiden00pl 2023-06-17 09:24:26 +02:00 committed by Petro Karashchenko
parent 86efbcbee7
commit 93c8cb29ea
2 changed files with 26 additions and 14 deletions

View File

@ -7,13 +7,23 @@ config NIMBLE
host-layer stack.
if NIMBLE
config NIMBLE_STACKSIZE
int "nimble stack size"
default DEFAULT_TASK_STACKSIZE
config NIMBLE_REF
string "Version"
default "bc7828341226d860429c63994065f8f1b8b8d7b0"
---help---
Git ref name to use when downloading from nimBLE repo
endif
config NIMBLE_PORTING_EXAMPLE
bool "Apache nimBLE NuttX porting example"
default y
if NIMBLE_PORTING_EXAMPLE
config NIMBLE_PORTING_EXAMPLE_STACKSIZE
int "Apache NimBLE NuttX porting example stack size"
default DEFAULT_TASK_STACKSIZE
endif # NIMBLE_PORTING_EXAMPLE
endif # NIMBLE

View File

@ -20,18 +20,24 @@
include $(APPDIR)/Make.defs
PRIORITY = 255
STACKSIZE = $(CONFIG_NIMBLE_STACKSIZE)
NIMBLE_UNPACKDIR = mynewt-nimble
NIMBLE_ROOT = $(APPDIR)/wireless/bluetooth/nimble/$(NIMBLE_UNPACKDIR)
-include $(NIMBLE_ROOT)/porting/examples/nuttx/Make.defs
CONFIG_NIMBLE_REF := $(patsubst "%",%,$(strip $(CONFIG_NIMBLE_REF)))
NIMBLE_TAR := $(CONFIG_NIMBLE_REF).tar.gz
NIMBLE_URL := https://github.com/apache/mynewt-nimble/archive/$(NIMBLE_TAR)
ifneq ($(CONFIG_NIMBLE_PORTING_EXAMPLE),)
# Nimble porting example built-in application
-include $(NIMBLE_ROOT)/porting/examples/nuttx/Make.defs
PRIORITY = 255
STACKSIZE = $(CONFIG_NIMBLE_PORTING_EXAMPLE_STACKSIZE)
# nimBLE assumes this flag since it expects undefined macros to be zero value
CFLAGS += -Wno-pointer-to-int-cast -Wno-undef
endif
$(NIMBLE_TAR):
$(Q) curl -L $(NIMBLE_URL) -o $(NIMBLE_TAR)
@ -49,8 +55,4 @@ distclean::
$(call DELDIR,$(NIMBLE_UNPACKDIR))
endif
# nimBLE assumes this flag since it expects undefined macros to be zero value
CFLAGS += -Wno-pointer-to-int-cast -Wno-undef
include $(APPDIR)/Application.mk