From 03c87ff4a0d77611b5082f9e374672fbfa5f2891 Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Mon, 12 Mar 2018 14:20:24 +0100 Subject: [PATCH 1/5] Adding .gitignore Signed-off-by: Frederic.Pillon --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..11eecab --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +CMSIS-*.tar.bz2 +package_CMSIS_*_index.json From 6f22b183b1b9765559096c23bab43a9ac86690da Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Mon, 12 Mar 2018 11:10:06 +0100 Subject: [PATCH 2/5] Updated url of CMSIS Signed-off-by: Frederic.Pillon --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 88f0084..b56a81c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "ARM_CMSIS"] path = CMSIS - url = git@github.com:ARM-software/CMSIS.git + url = https://github.com/ARM-software/CMSIS.git From e3236747b046e11c4fd24702d9a9e92d1aa07a09 Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Mon, 19 Mar 2018 10:07:11 +0100 Subject: [PATCH 3/5] Adding ARM CMSIS_5 as submodule Signed-off-by: Frederic.Pillon --- .gitmodules | 3 +++ CMSIS_5 | 1 + 2 files changed, 4 insertions(+) create mode 160000 CMSIS_5 diff --git a/.gitmodules b/.gitmodules index b56a81c..470eb65 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "ARM_CMSIS"] path = CMSIS url = https://github.com/ARM-software/CMSIS.git +[submodule "CMSIS_5"] + path = CMSIS_5 + url = https://github.com/ARM-software/CMSIS_5.git diff --git a/CMSIS_5 b/CMSIS_5 new file mode 160000 index 0000000..49ac527 --- /dev/null +++ b/CMSIS_5 @@ -0,0 +1 @@ +Subproject commit 49ac527aa7406cecbba46d4d3bdbc7f60c6c6d42 From ebf20610a8711d14893e5e7b1a79bb1879fd06c7 Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Mon, 19 Mar 2018 16:03:27 +0100 Subject: [PATCH 4/5] Update Makefile to package CMSIS 5 Signed-off-by: Frederic.Pillon --- Makefile | 46 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 65b82fb..84f2559 100644 --- a/Makefile +++ b/Makefile @@ -24,13 +24,12 @@ SHELL = /bin/sh ROOT_PATH := . -#PACKAGE_NAME := $(basename $(notdir $(CURDIR))) +OS ?=$(shell uname -s) + PACKAGE_NAME := "CMSIS" -PACKAGE_VERSION := 4.5.0 # ----------------------------------------------------------------------------- # packaging specific -PACKAGE_FOLDER := CMSIS ifeq (postpackaging,$(findstring $(MAKECMDGOALS),postpackaging)) PACKAGE_FILENAME=$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2 @@ -41,12 +40,16 @@ endif # end of packaging specific # ----------------------------------------------------------------------------- -.PHONY: all clean print_info postpackaging +.PHONY: all clean cmsis cmsis5 print_info postpackaging # Arduino module packaging: # - exclude version control system files, here git files and folders .git, .gitattributes and .gitignore # - exclude 'extras' folder -all: clean print_info +all: cmsis cmsis5 + +cmsis: PACKAGE_VERSION := 4.5.0 +cmsis: PACKAGE_FOLDER := CMSIS +cmsis: clean print_info @echo ---------------------------------------------------------- @echo "Packaging module." tar --exclude=./.gitattributes \ @@ -59,7 +62,34 @@ all: clean print_info --exclude=Device/ARM/Documents \ --exclude=.git \ -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)" - $(MAKE) --no-builtin-rules postpackaging -C . + $(MAKE) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C . + @echo ---------------------------------------------------------- + +cmsis5: PACKAGE_VERSION := 5.3.0 +cmsis5: PACKAGE_FOLDER := CMSIS_5 +cmsis5: clean print_info + @echo ---------------------------------------------------------- + @echo "Packaging module." + tar --exclude=docs \ + --exclude=CMSIS/CoreValidation \ + --exclude=CMSIS/Documentation \ + --exclude=CMSIS/DoxyGen \ + --exclude=CMSIS/NN/Examples \ + --exclude=CMSIS/NN/NN_Lib_Tests \ + --exclude=CMSIS/Pack \ + --exclude=CMSIS/Utilities \ + --exclude=CMSIS/DSP/DSP_Lib_TestSuite \ + --exclude=CMSIS/DSP/Examples \ + --exclude=CMSIS/DSP/Projects \ + --exclude=Device/ARM/Documents \ + --exclude=.git \ + --exclude=.gitignore \ + --exclude=.gitattributes \ + --exclude=manifest \ + --exclude=*.pdf \ + --transform "s|CMSIS_5|CMSIS|" \ + -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)" + $(MAKE) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C . @echo ---------------------------------------------------------- clean: @@ -74,8 +104,10 @@ print_info: @echo "CURDIR = $(CURDIR)" @echo "OS = $(OS)" @echo "SHELL = $(SHELL)" - @echo "PACKAGE_VERSION = $(PACKAGE_VERSION)" @echo "PACKAGE_NAME = $(PACKAGE_NAME)" + @echo "PACKAGE_FOLDER = $(PACKAGE_FOLDER)" + @echo "PACKAGE_VERSION = $(PACKAGE_VERSION)" + postpackaging: @echo "PACKAGE_CHKSUM = $(PACKAGE_CHKSUM)" From 50d200d8e88153bc89db19e71ff29dcf3b711237 Mon Sep 17 00:00:00 2001 From: "Frederic.Pillon" Date: Fri, 30 Mar 2018 13:50:32 +0200 Subject: [PATCH 5/5] Update Makefile to get CMSIS 5 version from git Use commit date to always generate the same package using tar. Signed-off-by: Frederic.Pillon --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 84f2559..f0cb776 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ cmsis: PACKAGE_FOLDER := CMSIS cmsis: clean print_info @echo ---------------------------------------------------------- @echo "Packaging module." - tar --exclude=./.gitattributes \ + @tar --exclude=./.gitattributes \ --exclude=./.travis.yml \ --exclude=CMSIS/index.html \ --exclude=CMSIS/Documentation \ @@ -65,12 +65,14 @@ cmsis: clean print_info $(MAKE) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C . @echo ---------------------------------------------------------- -cmsis5: PACKAGE_VERSION := 5.3.0 cmsis5: PACKAGE_FOLDER := CMSIS_5 +cmsis5: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags) +cmsis5: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci)) cmsis5: clean print_info @echo ---------------------------------------------------------- @echo "Packaging module." - tar --exclude=docs \ + @tar --mtime='$(PACKAGE_DATE)' \ + --exclude=docs \ --exclude=CMSIS/CoreValidation \ --exclude=CMSIS/Documentation \ --exclude=CMSIS/DoxyGen \ @@ -113,5 +115,5 @@ postpackaging: @echo "PACKAGE_CHKSUM = $(PACKAGE_CHKSUM)" @echo "PACKAGE_SIZE = $(PACKAGE_SIZE)" @echo "PACKAGE_FILENAME = $(PACKAGE_FILENAME)" - cat extras/package_index.json.template | sed s/%%VERSION%%/$(PACKAGE_VERSION)/ | sed s/%%FILENAME%%/$(PACKAGE_FILENAME)/ | sed s/%%CHECKSUM%%/$(PACKAGE_CHKSUM)/ | sed s/%%SIZE%%/$(PACKAGE_SIZE)/ > package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json + @cat extras/package_index.json.template | sed s/%%VERSION%%/$(PACKAGE_VERSION)/ | sed s/%%FILENAME%%/$(PACKAGE_FILENAME)/ | sed s/%%CHECKSUM%%/$(PACKAGE_CHKSUM)/ | sed s/%%SIZE%%/$(PACKAGE_SIZE)/ > package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json @echo "package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json created"