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 diff --git a/.gitmodules b/.gitmodules index 88f0084..b46f77c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "ARM_CMSIS"] - path = CMSIS - url = git@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 b/CMSIS deleted file mode 160000 index 8c0e1a9..0000000 --- a/CMSIS +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8c0e1a91341cde86532b05625f2ad584ce856118 diff --git a/CMSIS_5 b/CMSIS_5 new file mode 160000 index 0000000..2b7495b --- /dev/null +++ b/CMSIS_5 @@ -0,0 +1 @@ +Subproject commit 2b7495b8535bdcb306dac29b9ded4cfb679d7e5c diff --git a/Makefile b/Makefile index 65b82fb..8f0dcd4 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,25 +40,69 @@ endif # end of packaging specific # ----------------------------------------------------------------------------- -.PHONY: all clean print_info postpackaging +.PHONY: all clean 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: cmsis5 + + +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=./.gitattributes \ - --exclude=./.travis.yml \ - --exclude=CMSIS/index.html \ + @tar --mtime='$(PACKAGE_DATE)' \ + --exclude=docs \ + --exclude=CMSIS/CoreValidation \ --exclude=CMSIS/Documentation \ + --exclude=CMSIS/DoxyGen \ + --exclude=CMSIS/DAP/Firmware/Examples/ \ + --exclude=CMSIS/DSP/cmsisdsp \ + --exclude=CMSIS/DSP/Examples \ + --exclude=CMSIS/DSP/Platforms \ + --exclude=CMSIS/DSP/PythonWrapper \ + --exclude=CMSIS/DSP/Scripts \ + --exclude=CMSIS/DSP/SDFTools \ + --exclude=CMSIS/DSP/Testing \ + --exclude=CMSIS/DSP/Toolchain \ + --exclude=CMSIS/NN/Examples \ + --exclude=CMSIS/NN/Scripts \ + --exclude=CMSIS/NN/Tests \ --exclude=CMSIS/Pack \ + --exclude=CMSIS/RTOS/RTX/LIB \ + --exclude=CMSIS/RTOS/RTX/SRC/ARM \ + --exclude=CMSIS/RTOS/RTX/SRC/IAR \ + --exclude=CMSIS/RTOS2/RTX/Examples* \ + --exclude=CMSIS/RTOS2/RTX/Library/ARM \ + --exclude=CMSIS/RTOS2/RTX/Library/IAR \ + --exclude=CMSIS/RTOS2/RTX/Source/ARM \ + --exclude=CMSIS/RTOS2/RTX/Source/IAR \ --exclude=CMSIS/Utilities \ - --exclude=CMSIS/DSP_Lib/Examples \ - --exclude=Device/ARM/Documents \ + --exclude=Device/_Template_Vendor/Vendor/Device/Source/ARM \ + --exclude=Device/_Template_Vendor/Vendor/Device/Source/IAR \ + --exclude=Device/_Template_Vendor/Vendor/Device_A \ + --exclude=Device/ARM/*/Source/AC5 \ + --exclude=Device/ARM/*/Source/AC6 \ + --exclude=Device/ARM/*/Source/ARM \ + --exclude=Device/ARM/*/Source/IAR \ + --exclude=Device/Utilities \ + --exclude=docker \ + --exclude=*.cmake \ + --exclude=CMakeLists.txt \ --exclude=.git \ + --exclude=.gitignore \ + --exclude=.gitattributes \ + --exclude=.github \ + --exclude=manifest \ + --exclude=*.pdf \ + --exclude=*.py \ + --exclude=*.scvd \ + --transform "s|CMSIS_5|CMSIS|" \ -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 ---------------------------------------------------------- clean: @@ -74,12 +117,14 @@ 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)" @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" diff --git a/README.md b/README.md index 9348f1b..7abf07a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # ArduinoModule-CMSIS ARM CMSIS module for Arduino IDE -Source is the one provided by ARM at https://github.com/ARM-software/CMSIS/ +Source is the one provided by ARM at: + * CMSIS 4 (legacy): https://github.com/ARM-software/CMSIS/ + * CMSIS 5: https://github.com/ARM-software/CMSIS_5 -Main CMSIS URL is http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php +Main CMSIS URL is https://developer.arm.com/tools-and-software/embedded/cmsis -API Help can be found at http://www.keil.com/pack/doc/cmsis/general/html/index.html +API Help can be found at https://arm-software.github.io/CMSIS_5/General/html/index.html diff --git a/extras/package_index.json.template b/extras/package_index.json.template index 0b3cfef..9045a86 100644 --- a/extras/package_index.json.template +++ b/extras/package_index.json.template @@ -5,42 +5,42 @@ [ { "host": "i686-mingw32", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { "host": "x86_64-apple-darwin", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { "host": "x86_64-pc-linux-gnu", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { "host": "i686-pc-linux-gnu", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { "host": "arm-linux-gnueabihf", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { "host": "all", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%"