diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ce7c668 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +CMSIS*-*.tar.bz2 +package_CMSIS_*_index.json diff --git a/.gitmodules b/.gitmodules index 88f0084..0622113 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,12 @@ -[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 +[submodule "CMSIS_6"] + path = CMSIS_6 + url = https://github.com/ARM-software/CMSIS_6.git +[submodule "CMSIS-NN"] + path = CMSIS-NN + url = https://github.com/ARM-software/CMSIS-NN +[submodule "CMSIS-DSP"] + path = CMSIS-DSP + url = https://github.com/ARM-software/CMSIS-DSP 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-DSP b/CMSIS-DSP new file mode 160000 index 0000000..d5717e4 --- /dev/null +++ b/CMSIS-DSP @@ -0,0 +1 @@ +Subproject commit d5717e454fec0337bef114a21f1d2d01d74f2701 diff --git a/CMSIS-NN b/CMSIS-NN new file mode 160000 index 0000000..22080c6 --- /dev/null +++ b/CMSIS-NN @@ -0,0 +1 @@ +Subproject commit 22080c68d040c98139e6cb1549473e3149735f4d 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/CMSIS_6 b/CMSIS_6 new file mode 160000 index 0000000..6f0a58d --- /dev/null +++ b/CMSIS_6 @@ -0,0 +1 @@ +Subproject commit 6f0a58d01aa9bd2feba212097f9afe7acd991d52 diff --git a/Makefile b/Makefile index 65b82fb..f84bbe1 100644 --- a/Makefile +++ b/Makefile @@ -24,13 +24,10 @@ SHELL = /bin/sh ROOT_PATH := . -#PACKAGE_NAME := $(basename $(notdir $(CURDIR))) -PACKAGE_NAME := "CMSIS" -PACKAGE_VERSION := 4.5.0 +OS ?=$(shell uname -s) # ----------------------------------------------------------------------------- # packaging specific -PACKAGE_FOLDER := CMSIS ifeq (postpackaging,$(findstring $(MAKECMDGOALS),postpackaging)) PACKAGE_FILENAME=$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2 @@ -41,31 +38,152 @@ endif # end of packaging specific # ----------------------------------------------------------------------------- -.PHONY: all clean print_info postpackaging +.PHONY: all clean cmsis5 cmsis6 cmsis_dsp cmsis_nn 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: cmsis6 cmsis_dsp cmsis_nn + +cmsis6: PACKAGE_NAME := "CMSIS" +cmsis6: PACKAGE_FOLDER := CMSIS_6 +cmsis6: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags | sed 's/^v//') +cmsis6: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci)) +cmsis6: clean print_info @echo ---------------------------------------------------------- @echo "Packaging module." - tar --exclude=./.gitattributes \ - --exclude=./.travis.yml \ - --exclude=CMSIS/index.html \ + @tar --mtime='$(PACKAGE_DATE)' \ + --exclude=.github \ + --exclude=CMSIS/CoreValidation \ --exclude=CMSIS/Documentation \ + --exclude=CMSIS/Driver \ + --exclude=.git \ + --exclude=.gitignore \ + --exclude=gen_pack.sh \ + --exclude=.devcontainer \ + --transform "s|CMSIS_6|CMSIS|" \ + -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)" + $(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) CMSIS_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C . + @echo ---------------------------------------------------------- + +cmsis_dsp: PACKAGE_NAME := "CMSIS_DSP" +cmsis_dsp: PACKAGE_FOLDER := CMSIS-DSP +cmsis_dsp: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags | sed 's/^v//') +cmsis_dsp: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci)) +cmsis_dsp: CMSIS_VERSION := $(shell git --git-dir=CMSIS_6/.git describe --tags | sed 's/^v//') +cmsis_dsp: clean print_info + @echo ---------------------------------------------------------- + @echo "Packaging module." + @tar --mtime='$(PACKAGE_DATE)' \ + --exclude=.github \ + --exclude=cmsisdsp \ + --exclude=Documentation \ + --exclude=dsppp \ + --exclude=Examples \ + --exclude=PythonWrapper \ + --exclude=Scripts \ + --exclude=Testing \ + --exclude=.git \ + --exclude=.gitignore \ + --exclude=CMakeLists.txt \ + --exclude=gen_pack.sh \ + --exclude=MANIFEST.in \ + --exclude=pyproject.toml \ + --exclude=PythonWrapper_README.md \ + --exclude=setup.py \ + --exclude=vcpkg-configuration.json \ + --transform "s|CMSIS-DSP|CMSIS_DSP|" \ + -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)" + $(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) CMSIS_VERSION=$(CMSIS_VERSION) --no-builtin-rules postpackaging -C . + @echo ---------------------------------------------------------- + +cmsis_nn: PACKAGE_NAME := "CMSIS_NN" +cmsis_nn: PACKAGE_FOLDER := CMSIS-NN +cmsis_nn: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags | sed 's/^v//') +cmsis_nn: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci)) +cmsis_nn: CMSIS_VERSION := $(shell git --git-dir=CMSIS_6/.git describe --tags | sed 's/^v//') +cmsis_nn: clean print_info + @echo ---------------------------------------------------------- + @echo "Packaging module." + @tar --mtime='$(PACKAGE_DATE)' \ + --exclude=.github \ + --exclude=Documentation \ + --exclude=Examples \ + --exclude=Tests \ + --exclude=.git \ + --exclude=.clang-format \ + --exclude=.gitignore \ + --exclude=check_pdsc.sh \ + --exclude=check_version_and_date.sh \ + --exclude=CMakeLists.txt \ + --exclude=gen_pack.sh \ + --transform "s|CMSIS-NN|CMSIS_NN|" \ + -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)" + $(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) CMSIS_VERSION=$(CMSIS_VERSION) --no-builtin-rules postpackaging -C . + @echo ---------------------------------------------------------- + +cmsis5: PACKAGE_NAME := "CMSIS" +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 --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_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C . @echo ---------------------------------------------------------- clean: @echo ---------------------------------------------------------- @echo Cleanup - -$(RM) $(PACKAGE_NAME)-*.tar.bz2 package_$(PACKAGE_NAME)_*.json test_package_$(PACKAGE_NAME)_*.json + -$(RM) CMSIS*-*.tar.bz2 package_CMSIS*_*.json test_package_CMSIS*_*.json @echo ---------------------------------------------------------- print_info: @@ -74,12 +192,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/%%PACKAGENAME%%/$(PACKAGE_NAME)/ | sed s/%%VERSION%%/$(PACKAGE_VERSION)/ | sed s/%%CMSISVERSION%%/$(CMSIS_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..34fb1ce 100644 --- a/extras/package_index.json.template +++ b/extras/package_index.json.template @@ -1,46 +1,39 @@ { - "name": "CMSIS", + "name": "%%PACKAGENAME%%", "version": "%%VERSION%%", "systems": [ { - "host": "i686-mingw32", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "host": "aarch64-linux-gnu", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%CMSISVERSION%%/%%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%%", + "host": "arm64-apple-darwin", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%CMSISVERSION%%/%%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%%", - "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%%", + "host": "i686-mingw32", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%CMSISVERSION%%/%%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%%", + "host": "x86_64-apple-darwin", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%CMSISVERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { - "host": "all", - "url": "https://github.com/arduino/ArduinoModule-CMSIS/releases/download/v%%VERSION%%/%%FILENAME%%", + "host": "x86_64-pc-linux-gnu", + "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%CMSISVERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%"