Skip to content

Commit 0d82eb4

Browse files
authored
Merge pull request #2 from stm32duino/cmsis_6
feat: add CMSIS_6 support
2 parents c1bfbe5 + fa91567 commit 0d82eb4

File tree

7 files changed

+99
-21
lines changed

7 files changed

+99
-21
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
*.swp
2-
CMSIS-*.tar.bz2
2+
CMSIS*-*.tar.bz2
33
package_CMSIS_*_index.json

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
[submodule "CMSIS_5"]
22
path = CMSIS_5
33
url = https://github.com/ARM-software/CMSIS_5.git
4+
[submodule "CMSIS_6"]
5+
path = CMSIS_6
6+
url = https://github.com/ARM-software/CMSIS_6.git
7+
[submodule "CMSIS-NN"]
8+
path = CMSIS-NN
9+
url = https://github.com/ARM-software/CMSIS-NN
10+
[submodule "CMSIS-DSP"]
11+
path = CMSIS-DSP
12+
url = https://github.com/ARM-software/CMSIS-DSP

CMSIS-DSP

Submodule CMSIS-DSP added at d5717e4

CMSIS-NN

Submodule CMSIS-NN added at 22080c6

CMSIS_6

Submodule CMSIS_6 added at 6f0a58d

Makefile

Lines changed: 80 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ ROOT_PATH := .
2626

2727
OS ?=$(shell uname -s)
2828

29-
PACKAGE_NAME := "CMSIS"
30-
3129
# -----------------------------------------------------------------------------
3230
# packaging specific
3331

@@ -40,14 +38,89 @@ endif
4038
# end of packaging specific
4139
# -----------------------------------------------------------------------------
4240

43-
.PHONY: all clean cmsis5 print_info postpackaging
41+
.PHONY: all clean cmsis5 cmsis6 cmsis_dsp cmsis_nn print_info postpackaging
4442

4543
# Arduino module packaging:
4644
# - exclude version control system files, here git files and folders .git, .gitattributes and .gitignore
4745
# - exclude 'extras' folder
48-
all: cmsis5
46+
all: cmsis6 cmsis_dsp cmsis_nn
47+
48+
cmsis6: PACKAGE_NAME := "CMSIS"
49+
cmsis6: PACKAGE_FOLDER := CMSIS_6
50+
cmsis6: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags | sed 's/^v//')
51+
cmsis6: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci))
52+
cmsis6: clean print_info
53+
@echo ----------------------------------------------------------
54+
@echo "Packaging module."
55+
@tar --mtime='$(PACKAGE_DATE)' \
56+
--exclude=.github \
57+
--exclude=CMSIS/CoreValidation \
58+
--exclude=CMSIS/Documentation \
59+
--exclude=CMSIS/Driver \
60+
--exclude=.git \
61+
--exclude=.gitignore \
62+
--exclude=gen_pack.sh \
63+
--exclude=.devcontainer \
64+
--transform "s|CMSIS_6|CMSIS|" \
65+
-cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)"
66+
$(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C .
67+
@echo ----------------------------------------------------------
4968

69+
cmsis_dsp: PACKAGE_NAME := "CMSIS_DSP"
70+
cmsis_dsp: PACKAGE_FOLDER := CMSIS-DSP
71+
cmsis_dsp: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags | sed 's/^v//')
72+
cmsis_dsp: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci))
73+
cmsis_dsp: clean print_info
74+
@echo ----------------------------------------------------------
75+
@echo "Packaging module."
76+
@tar --mtime='$(PACKAGE_DATE)' \
77+
--exclude=.github \
78+
--exclude=cmsisdsp \
79+
--exclude=Documentation \
80+
--exclude=dsppp \
81+
--exclude=Examples \
82+
--exclude=PythonWrapper \
83+
--exclude=Scripts \
84+
--exclude=Testing \
85+
--exclude=.git \
86+
--exclude=.gitignore \
87+
--exclude=CMakeLists.txt \
88+
--exclude=gen_pack.sh \
89+
--exclude=MANIFEST.in \
90+
--exclude=pyproject.toml \
91+
--exclude=PythonWrapper_README.md \
92+
--exclude=setup.py \
93+
--exclude=vcpkg-configuration.json \
94+
--transform "s|CMSIS-DSP|CMSIS_DSP|" \
95+
-cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)"
96+
$(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C .
97+
@echo ----------------------------------------------------------
98+
99+
cmsis_nn: PACKAGE_NAME := "CMSIS_NN"
100+
cmsis_nn: PACKAGE_FOLDER := CMSIS-NN
101+
cmsis_nn: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags | sed 's/^v//')
102+
cmsis_nn: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci))
103+
cmsis_nn: clean print_info
104+
@echo ----------------------------------------------------------
105+
@echo "Packaging module."
106+
@tar --mtime='$(PACKAGE_DATE)' \
107+
--exclude=.github \
108+
--exclude=Documentation \
109+
--exclude=Examples \
110+
--exclude=Tests \
111+
--exclude=.git \
112+
--exclude=.clang-format \
113+
--exclude=.gitignore \
114+
--exclude=check_pdsc.sh \
115+
--exclude=check_version_and_date.sh \
116+
--exclude=CMakeLists.txt \
117+
--exclude=gen_pack.sh \
118+
--transform "s|CMSIS-NN|CMSIS_NN|" \
119+
-cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)"
120+
$(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C .
121+
@echo ----------------------------------------------------------
50122

123+
cmsis5: PACKAGE_NAME := "CMSIS"
51124
cmsis5: PACKAGE_FOLDER := CMSIS_5
52125
cmsis5: PACKAGE_VERSION := $(shell git --git-dir=$(PACKAGE_FOLDER)/.git describe --tags)
53126
cmsis5: PACKAGE_DATE := $(firstword $(shell git --git-dir=$(PACKAGE_FOLDER)/.git log -1 --pretty=format:%ci))
@@ -102,13 +175,13 @@ cmsis5: clean print_info
102175
--exclude=*.scvd \
103176
--transform "s|CMSIS_5|CMSIS|" \
104177
-cjf "$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.bz2" "$(PACKAGE_FOLDER)"
105-
$(MAKE) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C .
178+
$(MAKE) PACKAGE_NAME=$(PACKAGE_NAME) PACKAGE_VERSION=$(PACKAGE_VERSION) --no-builtin-rules postpackaging -C .
106179
@echo ----------------------------------------------------------
107180

108181
clean:
109182
@echo ----------------------------------------------------------
110183
@echo Cleanup
111-
-$(RM) $(PACKAGE_NAME)-*.tar.bz2 package_$(PACKAGE_NAME)_*.json test_package_$(PACKAGE_NAME)_*.json
184+
-$(RM) CMSIS*-*.tar.bz2 package_CMSIS*_*.json test_package_CMSIS*_*.json
112185
@echo ----------------------------------------------------------
113186

114187
print_info:
@@ -126,5 +199,5 @@ postpackaging:
126199
@echo "PACKAGE_CHKSUM = $(PACKAGE_CHKSUM)"
127200
@echo "PACKAGE_SIZE = $(PACKAGE_SIZE)"
128201
@echo "PACKAGE_FILENAME = $(PACKAGE_FILENAME)"
129-
@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
202+
@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
130203
@echo "package_$(PACKAGE_NAME)_$(PACKAGE_VERSION)_index.json created"

extras/package_index.json.template

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,38 @@
11
{
2-
"name": "CMSIS",
2+
"name": "%%PACKAGENAME%%",
33
"version": "%%VERSION%%",
44
"systems":
55
[
66
{
7-
"host": "i686-mingw32",
8-
"url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%",
9-
"archiveFileName": "%%FILENAME%%",
10-
"checksum": "SHA-256:%%CHECKSUM%%",
11-
"size": "%%SIZE%%"
12-
},
13-
{
14-
"host": "x86_64-apple-darwin",
7+
"host": "aarch64-linux-gnu",
158
"url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%",
169
"archiveFileName": "%%FILENAME%%",
1710
"checksum": "SHA-256:%%CHECKSUM%%",
1811
"size": "%%SIZE%%"
1912
},
2013
{
21-
"host": "x86_64-pc-linux-gnu",
14+
"host": "arm64-apple-darwin",
2215
"url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%",
2316
"archiveFileName": "%%FILENAME%%",
2417
"checksum": "SHA-256:%%CHECKSUM%%",
2518
"size": "%%SIZE%%"
2619
},
2720
{
28-
"host": "i686-pc-linux-gnu",
21+
"host": "i686-mingw32",
2922
"url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%",
3023
"archiveFileName": "%%FILENAME%%",
3124
"checksum": "SHA-256:%%CHECKSUM%%",
3225
"size": "%%SIZE%%"
3326
},
3427
{
35-
"host": "arm-linux-gnueabihf",
28+
"host": "x86_64-apple-darwin",
3629
"url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%",
3730
"archiveFileName": "%%FILENAME%%",
3831
"checksum": "SHA-256:%%CHECKSUM%%",
3932
"size": "%%SIZE%%"
4033
},
4134
{
42-
"host": "all",
35+
"host": "x86_64-pc-linux-gnu",
4336
"url": "https://github.com/stm32duino/ArduinoModule-CMSIS/releases/download/%%VERSION%%/%%FILENAME%%",
4437
"archiveFileName": "%%FILENAME%%",
4538
"checksum": "SHA-256:%%CHECKSUM%%",

0 commit comments

Comments
 (0)