You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/18 02:42:56 UTC

[incubator-nuttx-apps] branch master updated: nimble: point to upstream, improve Makefile

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new b97395d  nimble: point to upstream, improve Makefile
b97395d is described below

commit b97395dee1a3e0988d31bcdb27f014c04786dd75
Author: Matias N <ma...@protobits.dev>
AuthorDate: Thu Dec 17 16:41:39 2020 -0300

    nimble: point to upstream, improve Makefile
---
 wireless/bluetooth/nimble/Makefile  | 22 ++++++++++++++--------
 wireless/bluetooth/nimble/README.md |  2 +-
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/wireless/bluetooth/nimble/Makefile b/wireless/bluetooth/nimble/Makefile
index 56443ad..50e6293 100644
--- a/wireless/bluetooth/nimble/Makefile
+++ b/wireless/bluetooth/nimble/Makefile
@@ -23,25 +23,31 @@ include $(APPDIR)/Make.defs
 PRIORITY  = 255
 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
 
+CONFIG_NIMBLE_REF := $(patsubst "%",%,$(strip $(CONFIG_NIMBLE_REF)))
 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):
 	wget $(NIMBLE_URL) -O $(NIMBLE_TAR)
 
-$(NIMBLE_ROOT): $(NIMBLE_TAR)
-	tar zxf $(NIMBLE_TAR)
-	mv mynewt-nimble-$(CONFIG_NIMBLE_REF) mynewt-nimble
+$(NIMBLE_UNPACKDIR): $(NIMBLE_TAR)
+	$(Q) tar zxf $(NIMBLE_TAR)
+	$(Q) mv mynewt-nimble-$(CONFIG_NIMBLE_REF) $(NIMBLE_UNPACKDIR)
+	$(Q) touch $(NIMBLE_UNPACKDIR)
 
-context:: $(NIMBLE_ROOT)
+context:: $(NIMBLE_UNPACKDIR)
 
 distclean::
-	$(call CLEAN,$(NIMBLE_TAR))
-	$(call DELDIR,$(NIMBLE_ROOT))
+	$(call DELFILE,$(NIMBLE_TAR))
+	$(call DELDIR,$(NIMBLE_UNPACKDIR))
 
+# nimBLE assumes this flag since it expects undefined macros to be zero value
+
+CFLAGS += -Wno-undef
 
 include $(APPDIR)/Application.mk
diff --git a/wireless/bluetooth/nimble/README.md b/wireless/bluetooth/nimble/README.md
index 46307d9..5800c6b 100644
--- a/wireless/bluetooth/nimble/README.md
+++ b/wireless/bluetooth/nimble/README.md
@@ -29,7 +29,7 @@ So, first is to get the newt tool:
 At the moment, you will probably require unstable version
 instead of a release so select a known working:
 
-  $ git checkout 0fcf17566c40
+  $ git checkout c14c47bb683d
   $ ./build.sh
 
 There should be now a `newt` binary under `mynewt-newt/newt`.