From 5d55da272bb72f0470973a5b86e333d18d2cb647 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Wed, 19 Nov 2025 11:21:00 +0100 Subject: [PATCH 1/2] feat: add CMSIS 6 support Add as submodules and version: CMSIS_6: v6.2.0 CMSIS-DSP: v1.16.2 CMSIS-NN: v7.0.0 Signed-off-by: Frederic Pillon --- .gitmodules | 9 +++++++++ CMSIS-DSP | 1 + CMSIS-NN | 1 + CMSIS_6 | 1 + 4 files changed, 12 insertions(+) create mode 160000 CMSIS-DSP create mode 160000 CMSIS-NN create mode 160000 CMSIS_6 diff --git a/.gitmodules b/.gitmodules index b46f77c..0622113 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,12 @@ [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-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_6 b/CMSIS_6 new file mode 160000 index 0000000..6f0a58d --- /dev/null +++ b/CMSIS_6 @@ -0,0 +1 @@ +Subproject commit 6f0a58d01aa9bd2feba212097f9afe7acd991d52 From fa9156710884f39457962e0c47e9e32aca486af4 Mon Sep 17 00:00:00 2001 From: Frederic Pillon Date: Fri, 5 Dec 2025 14:57:07 +0100 Subject: [PATCH 2/2] feat: add cmsis6, dsp and nn makefile targets Signed-off-by: Frederic Pillon --- .gitignore | 2 +- Makefile | 87 +++++++++++++++++++++++++++--- extras/package_index.json.template | 19 +++---- 3 files changed, 87 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 11eecab..ce7c668 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.swp -CMSIS-*.tar.bz2 +CMSIS*-*.tar.bz2 package_CMSIS_*_index.json diff --git a/Makefile b/Makefile index 8f0dcd4..957e47b 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,6 @@ ROOT_PATH := . OS ?=$(shell uname -s) -PACKAGE_NAME := "CMSIS" - # ----------------------------------------------------------------------------- # packaging specific @@ -40,14 +38,89 @@ endif # end of packaging specific # ----------------------------------------------------------------------------- -.PHONY: all clean cmsis5 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: cmsis5 +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 --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) --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: 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) --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: 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) --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)) @@ -102,13 +175,13 @@ cmsis5: clean print_info --exclude=*.scvd \ --transform "s|CMSIS_5|CMSIS|" \ -cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)" - $(MAKE) PACKAGE_VERSION=$(PACKAGE_VERSION) --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: @@ -126,5 +199,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/%%PACKAGENAME%%/$(PACKAGE_NAME)/ | 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/extras/package_index.json.template b/extras/package_index.json.template index 9045a86..9697317 100644 --- a/extras/package_index.json.template +++ b/extras/package_index.json.template @@ -1,45 +1,38 @@ { - "name": "CMSIS", + "name": "%%PACKAGENAME%%", "version": "%%VERSION%%", "systems": [ { - "host": "i686-mingw32", - "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", - "archiveFileName": "%%FILENAME%%", - "checksum": "SHA-256:%%CHECKSUM%%", - "size": "%%SIZE%%" - }, - { - "host": "x86_64-apple-darwin", + "host": "aarch64-linux-gnu", "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", + "host": "arm64-apple-darwin", "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { - "host": "i686-pc-linux-gnu", + "host": "i686-mingw32", "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { - "host": "arm-linux-gnueabihf", + "host": "x86_64-apple-darwin", "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%", "size": "%%SIZE%%" }, { - "host": "all", + "host": "x86_64-pc-linux-gnu", "url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%", "archiveFileName": "%%FILENAME%%", "checksum": "SHA-256:%%CHECKSUM%%",