nimble: point to upstream, improve Makefile

This commit is contained in:
Matias N 2020-12-17 16:41:39 -03:00 committed by Xiang Xiao
parent 9f542c42e5
commit b97395dee1
2 changed files with 15 additions and 9 deletions

View File

@ -23,25 +23,31 @@ include $(APPDIR)/Make.defs
PRIORITY = 255 PRIORITY = 255
STACKSIZE = 16384 STACKSIZE = 16384
NIMBLE_ROOT = $(APPDIR)/wireless/bluetooth/nimble/mynewt-nimble NIMBLE_UNPACKDIR = mynewt-nimble
NIMBLE_ROOT = $(APPDIR)/wireless/bluetooth/nimble/$(NIMBLE_UNPACKDIR)
-include $(NIMBLE_ROOT)/porting/examples/nuttx/Make.defs -include $(NIMBLE_ROOT)/porting/examples/nuttx/Make.defs
CONFIG_NIMBLE_REF := $(patsubst "%",%,$(strip $(CONFIG_NIMBLE_REF)))
NIMBLE_TAR := $(CONFIG_NIMBLE_REF).tar.gz NIMBLE_TAR := $(CONFIG_NIMBLE_REF).tar.gz
NIMBLE_URL := https://github.com/v01d/mynewt-nimble/archive/$(NIMBLE_TAR) NIMBLE_URL := https://github.com/apache/mynewt-nimble/archive/$(NIMBLE_TAR)
$(NIMBLE_TAR): $(NIMBLE_TAR):
wget $(NIMBLE_URL) -O $(NIMBLE_TAR) wget $(NIMBLE_URL) -O $(NIMBLE_TAR)
$(NIMBLE_ROOT): $(NIMBLE_TAR) $(NIMBLE_UNPACKDIR): $(NIMBLE_TAR)
tar zxf $(NIMBLE_TAR) $(Q) tar zxf $(NIMBLE_TAR)
mv mynewt-nimble-$(CONFIG_NIMBLE_REF) mynewt-nimble $(Q) mv mynewt-nimble-$(CONFIG_NIMBLE_REF) $(NIMBLE_UNPACKDIR)
$(Q) touch $(NIMBLE_UNPACKDIR)
context:: $(NIMBLE_ROOT) context:: $(NIMBLE_UNPACKDIR)
distclean:: distclean::
$(call CLEAN,$(NIMBLE_TAR)) $(call DELFILE,$(NIMBLE_TAR))
$(call DELDIR,$(NIMBLE_ROOT)) $(call DELDIR,$(NIMBLE_UNPACKDIR))
# nimBLE assumes this flag since it expects undefined macros to be zero value
CFLAGS += -Wno-undef
include $(APPDIR)/Application.mk include $(APPDIR)/Application.mk

View File

@ -29,7 +29,7 @@ So, first is to get the newt tool:
At the moment, you will probably require unstable version At the moment, you will probably require unstable version
instead of a release so select a known working: instead of a release so select a known working:
$ git checkout 0fcf17566c40 $ git checkout c14c47bb683d
$ ./build.sh $ ./build.sh
There should be now a `newt` binary under `mynewt-newt/newt`. There should be now a `newt` binary under `mynewt-newt/newt`.