New pack gen bash script.
- Add scripts to fetch pre-built libs from Artifactory.
- Add pack build stage to Jenkinsfile.
diff --git a/.gitignore b/.gitignore
index fc26914..eb646ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,10 @@
CMSIS/CoreValidation/Tests/bootloader/build
*.uvguix.*
*.uvmpw.uvgui.*
+*.zip
docker/dependenciesFiles
+CMSIS/RTOS/RTX/LIB/**/*.a
+CMSIS/RTOS/RTX/LIB/**/*.lib
+CMSIS/RTOS2/RTX/Library/**/*.a
+CMSIS/RTOS2/RTX/Library/**/*.lib
+output
diff --git a/ARM.CMSIS.pdsc b/ARM.CMSIS.pdsc
index ef18053..947983d 100644
--- a/ARM.CMSIS.pdsc
+++ b/ARM.CMSIS.pdsc
@@ -8,33 +8,25 @@
<url>http://www.keil.com/pack/</url>
<releases>
- <release version="5.7.1-dev2">
- Active development ...
- CMSIS-RTOS2:
- - RTX 5.5.3 (see revision history for details)
- </release>
- <release version="5.7.1-dev1">
+ <release version="5.8.0">
Active development ...
CMSIS-Core(M):
+ - Updated GCC LinkerDescription, GCC Assembler startup
- Added ARMv8-M Stack Sealing (to linker, startup) for toolchain ARM, GCC
- Changed C-Startup to default Startup.
- </release>
- <release version="5.7.1-dev0">
- Active development ...
- CMSIS-Core(M):
- - Updated GCC LinkerDescription, GCC Assembler startup
CMSIS-DSP:
- Purged pre-built libs from Git
- CMSIS-RTOS:
- - RTX4: Purged pre-built libs from Git
- CMSIS-RTOS2:
- - RTX5: Purged pre-built libs from Git
CMSIS-NN: 3.0.0 (see revision history for details including version 2.0.0)
- Major interface change for functions compatible with TensorFlow Lite for Microcontroller
- Added optimization for SVDF kernel
- Improved MVE performance for fully Connected and max pool operator
- NULL bias support for fully connected operator in non-MVE case(Can affect performance)
- Expanded existing unit test suite along with support for FVP
+ CMSIS-RTOS:
+ - RTX4: Purged pre-built libs from Git
+ CMSIS-RTOS2:
+ - RTX5: Purged pre-built libs from Git
+ - RTX 5.5.3 (see revision history for details)
</release>
<release version="5.7.0" date="2020-04-09">
CMSIS-Build: 0.9.0 (beta)
diff --git a/CMSIS/DoxyGen/Build/src/General.txt b/CMSIS/DoxyGen/Build/src/General.txt
index 8bf0488..bc79d4c 100644
--- a/CMSIS/DoxyGen/Build/src/General.txt
+++ b/CMSIS/DoxyGen/Build/src/General.txt
@@ -60,24 +60,25 @@
<tr>
<td>0.10.0 (beta)</td>
<td>Release for beta review:
- - new command line options: --update, --quiet, --log, --intdir, --outdir (see usage for more information).
- - building an executable always creates binaries in ELF, HEX and BIN format in output directory.
- - added build progress information to build output.
- - added makefile target 'rebuild' (clean + build).
- - added makefile self-dependency. Generated makefile is only written if the content changed.
- - added makefile target 'database' for generating a compilation database file.
- - added special handling for layer files (layer.\<layer name>.\<ext>) copied unconditionally along with the layer on extract, remove, compose and add commands of cbuildgen.
- - added special handling for layer markdown files (layer.\<layer name>.md) being concatenated into README.md on compose command of cbuildgen.
- - fixed: #970 Toolchain configuration files corrected to handle Cortex-M0+, Cortex-M35P, SC000, SC300 and ARMV81MML based devices.
- - fixed: #971 Unnecessary rebuild of libraries when using GCC toolchain.
- </td>
+ - new command line options: --update, --quiet, --log, --intdir, --outdir (see usage for more information).
+ - building an executable always creates binaries in ELF, HEX and BIN format in output directory.
+ - added build progress information to build output.
+ - added makefile target 'rebuild' (clean + build).
+ - added makefile self-dependency. Generated makefile is only written if the content changed.
+ - added makefile target 'database' for generating a compilation database file.
+ - added special handling for layer files (layer.\<layer name>.\<ext>) copied unconditionally along with the layer on extract, remove, compose and add commands of cbuildgen.
+ - added special handling for layer markdown files (layer.\<layer name>.md) being concatenated into README.md on compose command of cbuildgen.
+ - fixed: #970 Toolchain configuration files corrected to handle Cortex-M0+, Cortex-M35P, SC000, SC300 and ARMV81MML based devices.
+ - fixed: #971 Unnecessary rebuild of libraries when using GCC toolchain.
+ </td>
+ </tr>
<tr>
<td>0.9.0 (beta)</td>
<td>Release for beta review:
- - added layer description to project format specification.
- - added support for multiple compilers.
- - added commands for layer operations to cbuildgen.
- </td>
+ - added layer description to project format specification.
+ - added support for multiple compilers.
+ - added commands for layer operations to cbuildgen.
+ </td>
</tr>
<tr>
<td>0.1.0</td>
diff --git a/CMSIS/RTOS/RTX/LIB/fetch_libs.sh b/CMSIS/RTOS/RTX/LIB/fetch_libs.sh
new file mode 100755
index 0000000..62e4011
--- /dev/null
+++ b/CMSIS/RTOS/RTX/LIB/fetch_libs.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+VERSION=4.82.0
+if [ -z "$JENKINS_FAMILY_ENV" ]; then
+ ARTIFACTORY_URL=https://artifactory.eu02.arm.com:443/artifactory/mcu.promoted
+else
+ ARTIFACTORY_URL=https://eu-west-1.artifactory.aws.arm.com:443/artifactory/mcu.promoted
+fi
+
+if [ -z "$ARTIFACTORY_API_KEY" ]; then
+ echo "Please set your Artifactory in ARTIFACTORY_API_KEY"
+ echo ""
+ echo "1. Browse to $(dirname $(dirname $ARTIFACTORY_URL))/ui/admin/artifactory/user_profile"
+ echo "2. Copy the API Key"
+ echo "3. Add 'export ARTIFACTORY_API_KEY=\"<API Key>\"' to ~/.bashrc"
+ exit 1
+fi
+
+set -o pipefail
+
+function usage {
+ echo "$(basename $0) [-h|--help] [-f|--force]"
+ echo ""
+ echo "Arguments:"
+ echo " -h|--help Print this usage message and exit."
+ echo " -f|--force Force (re)download."
+ echo ""
+ echo "Environment:"
+ echo " curl"
+ echo " sha256sum"
+ echo ""
+}
+
+POSITIONAL=()
+while [[ $# -gt 0 ]]
+do
+ key="$1"
+
+ case $key in
+ '-h'|'--help')
+ usage
+ exit 1
+ ;;
+ '-f'|'--force')
+ FORCE=1
+ ;;
+ *) # unknown option
+ POSITIONAL+=("$1") # save it in an array for later
+ ;;
+ esac
+ shift # past argument
+done
+set -- "${POSITIONAL[@]}" # restore positional parameters
+
+pushd $(dirname $0) > /dev/null
+
+ARCHIVE_NAME="RTX-${VERSION}.zip"
+ARCHIVE_URL="${ARTIFACTORY_URL}/CMSIS_5/Libraries/${ARCHIVE_NAME}"
+echo "Fetching ${ARCHIVE_URL}..."
+
+if [[ $FORCE == 1 ]]; then
+ rm ${ARCHIVE_NAME}
+fi
+
+if [[ -f ${ARCHIVE_NAME} ]]; then
+ sha256sum=$(curl -s -I -H "X-JFrog-Art-Api:${ARTIFACTORY_API_KEY}" "${ARCHIVE_URL}" | grep "X-Checksum-Sha256" | cut -d" " -f2)
+ if echo "${sha256sum} *${ARCHIVE_NAME}" | sha256sum -c --status; then
+ echo "Already up-to-date"
+ else
+ rm ${ARCHIVE_NAME}
+ fi
+fi
+
+if [[ ! -f ${ARCHIVE_NAME} ]]; then
+ curl -C - -H "X-JFrog-Art-Api:${ARTIFACTORY_API_KEY}" -O "${ARCHIVE_URL}"
+fi
+
+unzip -u ${ARCHIVE_NAME}
+
+exit 0
diff --git a/CMSIS/RTOS2/RTX/Library/fetch_libs.sh b/CMSIS/RTOS2/RTX/Library/fetch_libs.sh
new file mode 100755
index 0000000..41a5d92
--- /dev/null
+++ b/CMSIS/RTOS2/RTX/Library/fetch_libs.sh
@@ -0,0 +1,80 @@
+#!/bin/bash
+
+VERSION=5.5.2
+if [ -z "$JENKINS_FAMILY_ENV" ]; then
+ ARTIFACTORY_URL=https://artifactory.eu02.arm.com:443/artifactory/mcu.promoted
+else
+ ARTIFACTORY_URL=https://eu-west-1.artifactory.aws.arm.com:443/artifactory/mcu.promoted
+fi
+
+if [ -z "$ARTIFACTORY_API_KEY" ]; then
+ echo "Please set your Artifactory in ARTIFACTORY_API_KEY"
+ echo ""
+ echo "1. Browse to $(dirname $(dirname $ARTIFACTORY_URL))/ui/admin/artifactory/user_profile"
+ echo "2. Copy the API Key"
+ echo "3. Add 'export ARTIFACTORY_API_KEY=\"<API Key>\"' to ~/.bashrc"
+ exit 1
+fi
+
+set -o pipefail
+
+function usage {
+ echo "$(basename $0) [-h|--help] [-f|--force]"
+ echo ""
+ echo "Arguments:"
+ echo " -h|--help Print this usage message and exit."
+ echo " -f|--force Force (re)download."
+ echo ""
+ echo "Environment:"
+ echo " curl"
+ echo " sha256sum"
+ echo ""
+}
+
+POSITIONAL=()
+while [[ $# -gt 0 ]]
+do
+ key="$1"
+
+ case $key in
+ '-h'|'--help')
+ usage
+ exit 1
+ ;;
+ '-f'|'--force')
+ FORCE=1
+ ;;
+ *) # unknown option
+ POSITIONAL+=("$1") # save it in an array for later
+ ;;
+ esac
+ shift # past argument
+done
+set -- "${POSITIONAL[@]}" # restore positional parameters
+
+pushd $(dirname $0) > /dev/null
+
+ARCHIVE_NAME="RTX5-${VERSION}.zip"
+ARCHIVE_URL="${ARTIFACTORY_URL}/CMSIS_5/Libraries/${ARCHIVE_NAME}"
+echo "Fetching ${ARCHIVE_URL}..."
+
+if [[ $FORCE == 1 ]]; then
+ rm ${ARCHIVE_NAME}
+fi
+
+if [[ -f ${ARCHIVE_NAME} ]]; then
+ sha256sum=$(curl -s -I -H "X-JFrog-Art-Api:${ARTIFACTORY_API_KEY}" "${ARCHIVE_URL}" | grep "X-Checksum-Sha256" | cut -d" " -f2)
+ if echo "${sha256sum} *${ARCHIVE_NAME}" | sha256sum -c --status; then
+ echo "Already up-to-date"
+ else
+ rm ${ARCHIVE_NAME}
+ fi
+fi
+
+if [[ ! -f ${ARCHIVE_NAME} ]]; then
+ curl -C - -H "X-JFrog-Art-Api:${ARTIFACTORY_API_KEY}" -O "${ARCHIVE_URL}"
+fi
+
+unzip -u ${ARCHIVE_NAME}
+
+exit 0
diff --git a/CMSIS/Utilities/gen_pack.bat b/CMSIS/Utilities/gen_pack.bat
deleted file mode 100644
index 9e03c29..0000000
--- a/CMSIS/Utilities/gen_pack.bat
+++ /dev/null
@@ -1,226 +0,0 @@
-:: Batch file for generating CMSIS pack
-:: This batch file uses:
-:: 7-Zip for packaging
-:: Doxygen version 1.8.2 and Mscgen version 0.20 for generating html documentation.
-:: The generated pack and pdsc file are placed in folder %RELEASE_PATH% (../../Local_Release)
-@ECHO off
-
-SETLOCAL
-
-:: Tool path for zipping tool 7-Zip
-SET ZIPPATH=C:\Program Files\7-Zip
-
-:: Tool path for doxygen
-SET DOXYGENPATH=C:\Program Files\doxygen\bin
-
-:: Tool path for mscgen utility
-SET MSCGENPATH=C:\Program Files (x86)\Mscgen
-:: These settings should be passed on to subprocesses as well
-SET PATH=%ZIPPATH%;%DOXYGENPATH%;%MSCGENPATH%;%PATH%
-
-:: Pack Path (where generated pack is stored)
-SET RELEASE_PATH=..\..\Local_Release
-
-:: !!!!!!!!!!!!!!!!!
-:: DO NOT EDIT BELOW
-:: !!!!!!!!!!!!!!!!!
-
-:: Remove previous build
-IF EXIST %RELEASE_PATH% (
- ECHO removing %RELEASE_PATH%
- RMDIR /Q /S %RELEASE_PATH%
-)
-
-:: Create build output directory
-MKDIR %RELEASE_PATH%
-
-
-:: Copy PDSC file
-COPY ..\..\ARM.CMSIS.pdsc %RELEASE_PATH%\ARM.CMSIS.pdsc
-
-:: Copy LICENSE file
-COPY ..\..\LICENSE.txt %RELEASE_PATH%\LICENSE.txt
-
-:: Copy Device folder
-XCOPY /Q /S /Y ..\..\Device\*.* %RELEASE_PATH%\Device\*.*
-
-:: Copy CMSIS folder
-:: -- Core files
-XCOPY /Q /S /Y ..\..\CMSIS\Core\Include\*.* %RELEASE_PATH%\CMSIS\Core\Include\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Core\Include\*.* %RELEASE_PATH%\CMSIS\Include\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Core\Template\ARMv8-M\*.* %RELEASE_PATH%\CMSIS\Core\Template\ARMv8-M\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Core_A\Include\*.* %RELEASE_PATH%\CMSIS\Core_A\Include\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Core_A\Source\*.* %RELEASE_PATH%\CMSIS\Core_A\Source\*.*
-
-:: -- DAP files
-XCOPY /Q /S /Y ..\..\CMSIS\DAP\*.* %RELEASE_PATH%\CMSIS\DAP\*.*
-
-:: -- Driver files
-XCOPY /Q /S /Y ..\..\CMSIS\Driver\*.* %RELEASE_PATH%\CMSIS\Driver\*.*
-
-:: -- DSP files
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\ComputeLibrary\*.* %RELEASE_PATH%\CMSIS\DSP\ComputeLibrary\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\Include\*.* %RELEASE_PATH%\CMSIS\DSP\Include\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\Include\*.* %RELEASE_PATH%\CMSIS\Include\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\PrivateInclude\*.* %RELEASE_PATH%\CMSIS\DSP\PrivateInclude\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\Source\*.* %RELEASE_PATH%\CMSIS\DSP\Source\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\Projects\*.* %RELEASE_PATH%\CMSIS\DSP\Projects\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\Examples\*.* %RELEASE_PATH%\CMSIS\DSP\Examples\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\DSP\Lib\*.* %RELEASE_PATH%\CMSIS\DSP\Lib\*.*
-
-:: -- NN files
-XCOPY /Q /S /Y ..\..\CMSIS\NN\*.* %RELEASE_PATH%\CMSIS\NN\*.*
-
-:: -- Pack files
-XCOPY /Q /S /Y ..\..\CMSIS\Pack\Example\*.* %RELEASE_PATH%\CMSIS\Pack\Example\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Pack\Tutorials\*.* %RELEASE_PATH%\CMSIS\Pack\Tutorials\*.*
-
-:: -- RTOS files
-XCOPY /Q /S /Y ..\..\CMSIS\RTOS\Template\*.* %RELEASE_PATH%\CMSIS\RTOS\Template\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\RTOS\RTX\*.* %RELEASE_PATH%\CMSIS\RTOS\RTX\*.*
-
-:: -- RTOS2 files
-XCOPY /Q /S /Y ..\..\CMSIS\RTOS2\Include\*.* %RELEASE_PATH%\CMSIS\RTOS2\Include\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\RTOS2\Source\*.* %RELEASE_PATH%\CMSIS\RTOS2\Source\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\RTOS2\Template\*.* %RELEASE_PATH%\CMSIS\RTOS2\Template\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\RTOS2\RTX\*.* %RELEASE_PATH%\CMSIS\RTOS2\RTX\*.*
-
-:: -- SVD files
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\ARM_Example.* %RELEASE_PATH%\CMSIS\SVD\*.*
-
-:: -- Utilities files
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\CMSIS-SVD.xsd %RELEASE_PATH%\CMSIS\Utilities\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\PACK.xsd %RELEASE_PATH%\CMSIS\Utilities\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\PackIndex.xsd %RELEASE_PATH%\CMSIS\Utilities\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\CPRJ.xsd %RELEASE_PATH%\CMSIS\Utilities\*.*
-
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\Win32\*.* %RELEASE_PATH%\CMSIS\Utilities\Win32\*.*
-XCOPY /Q /S /Y ..\..\CMSIS\Utilities\Linux64\*.* %RELEASE_PATH%\CMSIS\Utilities\Linux64\*.*
-
-:: -- index file
-REM COPY ..\..\CMSIS\index.html %RELEASE_PATH%\CMSIS\index.html
-
-:: Generate Documentation
-:: -- Generate doxygen files
-PUSHD ..\DoxyGen
-
-:: -- Delete previous generated HTML files
-ECHO.
-ECHO Delete previous generated HTML files
-
-PUSHD ..\Documentation
-FOR %%A IN (Build, Core, Core_A, DAP, Driver, DSP, General, Pack, RTOS, RTOS2, SVD, Zone) DO IF EXIST %%A (RMDIR /S /Q %%A)
-POPD
-
-:: -- Generate HTML Files
-ECHO.
-ECHO Generate HTML Files
-
-pushd Build
-doxygen Build.dxy
-popd
-
-pushd Core
-doxygen core.dxy
-popd
-
-pushd Core_A
-doxygen core_A.dxy
-popd
-
-pushd DAP
-doxygen dap.dxy
-popd
-
-pushd Driver
-doxygen Driver.dxy
-popd
-
-pushd DSP
-doxygen dsp.dxy
-popd
-
-pushd General
-doxygen general.dxy
-popd
-
-pushd NN
-doxygen nn.dxy
-popd
-
-pushd Pack
-doxygen Pack.dxy
-popd
-
-pushd RTOS
-doxygen rtos.dxy
-popd
-
-pushd RTOS2
-doxygen rtos.dxy
-popd
-
-pushd SVD
-doxygen svd.dxy
-popd
-
-pushd Zone
-doxygen zone.dxy
-popd
-
-:: -- Copy search style sheet
-ECHO.
-ECHO Copy search style sheets
-copy /Y Doxygen_Templates\search.css ..\Documentation\Build\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\Core\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\Core_A\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\Driver\html\search\.
-REM copy /Y Doxygen_Templates\search.css ..\Documentation\General\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\Pack\html\search\.
-REM copy /Y Doxygen_Templates\search.css ..\Documentation\SVD\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\DSP\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\DAP\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\NN\html\search\.
-
-ECHO.
-POPD
-
-:: -- Copy generated doxygen files
-XCOPY /Q /S /Y ..\Documentation\*.* %RELEASE_PATH%\CMSIS\Documentation\*.*
-
-:: -- Remove generated doxygen files
-PUSHD ..\Documentation
-FOR %%A IN (Build, Core, Core_A, DAP, Driver, DSP, General, NN, Pack, RTOS, RTOS2, SVD, Zone) DO IF EXIST %%A (RMDIR /S /Q %%A)
-POPD
-
-:: Checking
-Win32\PackChk.exe %RELEASE_PATH%\ARM.CMSIS.pdsc -n %RELEASE_PATH%\PackName.txt -x M353 -x M364 -x M335
-
-:: --Check if PackChk.exe has completed successfully
-IF %errorlevel% neq 0 GOTO ErrPackChk
-
-:: Packing
-PUSHD %RELEASE_PATH%
-
-:: -- Pipe Pack's Name into Variable
-SET /P PackName=<PackName.txt
-DEL /Q PackName.txt
-
-:: Pack files
-ECHO Creating pack file ...
-7z.exe a %PackName% -tzip > NUL:
-ECHO Packaging complete
-POPD
-GOTO End
-
-:ErrPackChk
-ECHO PackChk.exe has encountered an error!
-EXIT /b
-
-:End
-ECHO Removing temporary files and folders
-RMDIR /Q /S %RELEASE_PATH%\CMSIS
-RMDIR /Q /S %RELEASE_PATH%\Device
-DEL %RELEASE_PATH%\LICENSE.txt
-
-ECHO gen_pack.bat completed successfully
diff --git a/CMSIS/Utilities/gen_pack.sh b/CMSIS/Utilities/gen_pack.sh
new file mode 100755
index 0000000..98db133
--- /dev/null
+++ b/CMSIS/Utilities/gen_pack.sh
@@ -0,0 +1,332 @@
+#!/bin/bash
+# Version: 1.3
+# Date: 2021-04-27
+# This bash script generates a CMSIS Software Pack:
+#
+# Pre-requisites:
+# - bash shell (for Windows: install git for Windows)
+# - git in path (for Windows: install git for Windows)
+# - 7z in path (zip archiving utility)
+# e.g. Ubuntu: sudo apt-get install p7zip-full p7zip-rar)
+# - PackChk is taken from latest install CMSIS Pack installed in $CMSIS_PACK_ROOT
+# - xmllint in path (XML schema validation; available only for Linux)
+
+############### EDIT BELOW ###############
+# Extend Path environment variable locally
+#
+
+set -o pipefail
+
+function usage {
+ echo "$(basename $0) [-h|--help] [<pdsc>]"
+ echo ""
+ echo "Arguments:"
+ echo " -h|--help Print this usage message and exit."
+ echo " pdsc The pack description to generate the pack for."
+ echo ""
+ echo "Environment:"
+ echo " 7z"
+ echo " PackChk"
+ if [ $(uname -s) = "Linux" ]; then
+ echo " xmllint"
+ fi
+ echo ""
+}
+
+function pack_version()
+{
+ local version=$(grep -Pzo "(?s)<releases>\s+<release version=\"([^\"]+)\"" "$1" | tr -d '\0' | tail -n 1 | sed -r -e 's/.*version="([^"]+)"/\1/g')
+ echo "PDSC version: '$version'" >&2
+ echo $version
+}
+
+function git_describe()
+{
+ local gitversion=$(git describe --match $1* --abbrev=9 || echo "$1-dirty-0-g$(git describe --match $1* --always --abbrev=9)")
+ local version=$(echo $gitversion | sed -r -e 's/-([0-9]+)-(g[0-9a-f]{9})/\1+\2/')
+ if [[ $version != $1 ]] && [[ $version == $gitversion ]]; then
+ version+=0
+ fi
+ echo "Git version: '$version'" >&2
+ echo $version
+}
+
+function patch_pdsc()
+{
+ if [[ "$2" != "$3" ]]; then
+ echo "Updating latest release tag with version '$3'"
+ sed -r -i -e "s/<release version=\"$2\"/<release version=\"$3\"/" $1
+ fi
+}
+
+POSITIONAL=()
+while [[ $# -gt 0 ]]
+do
+ key="$1"
+
+ case $key in
+ '-h'|'--help')
+ usage
+ exit 1
+ ;;
+ *) # unknown option
+ POSITIONAL+=("$1") # save it in an array for later
+ shift # past argument
+ ;;
+ esac
+done
+set -- "${POSITIONAL[@]}" # restore positional parameters
+
+OS=$(uname -s)
+case $OS in
+ 'Linux')
+ CMSIS_TOOLSDIR="./CMSIS/Utilities/Linux64"
+ ;;
+ 'WindowsNT'|MINGW*|CYGWIN*)
+ CMSIS_TOOLSDIR="./CMSIS/Utilities/Win32"
+ ;;
+ 'Darwin')
+ echo "Error: CMSIS Tools not available for Mac at present."
+ exit 1
+ ;;
+ *)
+ echo "Error: unrecognized OS $OS"
+ exit 1
+ ;;
+esac
+
+PATH_TO_ADD="$CMSIS_TOOLSDIR"
+
+[[ ":$PATH:" != *":${PATH_TO_ADD}:"* ]] && PATH="${PATH}:${PATH_TO_ADD}"
+echo $PATH_TO_ADD appended to PATH
+echo " "
+
+# Pack warehouse directory - destination
+PACK_WAREHOUSE=./output
+
+# Temporary pack build directory
+PACK_BUILD=./build
+
+# Specify directory names to be added to pack base directory
+PACK_DIRS="
+ Device
+ CMSIS/Core/Include
+ CMSIS/Core/Template
+ CMSIS/Core_A
+ CMSIS/DAP
+ CMSIS/Driver
+ CMSIS/DSP/ComputeLibrary
+ CMSIS/DSP/Include
+ CMSIS/DSP/Source
+ CMSIS/DSP/Projects
+ CMSIS/DSP/Examples
+ CMSIS/DSP/Include
+ CMSIS/DSP/PrivateInclude
+ CMSIS/NN
+ CMSIS/RTOS
+ CMSIS/RTOS2
+ CMSIS/Utilities/Win32
+ CMSIS/Utilities/Linux64
+ CMSIS/Documentation
+"
+
+# Specify file names to be added to pack base directory
+PACK_BASE_FILES="
+ LICENSE.txt
+ CMSIS/Utilities/ARM_Example.*
+ CMSIS/Utilities/*.xsd
+"
+
+# Specify file names to be deleted from pack build directory
+PACK_DELETE_FILES="
+ CMSIS/RTOS/CMSIS_RTOS_Tutorial.pdf
+ CMSIS/RTOS/RTX/LIB/fetch_libs.sh
+ CMSIS/RTOS/RTX/LIB/*.zip
+ CMSIS/RTOS2/RTX/Library/fetch_libs.sh
+ CMSIS/RTOS2/RTX/Library/*.zip
+ CMSIS/RTOS2/RTX/Library/build.py
+"
+
+# Specify patches to be applied
+PACK_PATCH_FILES=""
+
+############ DO NOT EDIT BELOW ###########
+echo Starting CMSIS-Pack Generation: `date`
+# Zip utility check
+ZIP=7z
+type -a "${ZIP}"
+errorlevel=$?
+if [ $errorlevel -gt 0 ]
+ then
+ echo "Error: No 7zip Utility found"
+ echo "Action: Add 7zip to your path"
+ echo " "
+ exit 1
+fi
+
+# Pack checking utility check
+PACKCHK=PackChk
+type -a ${PACKCHK}
+errorlevel=$?
+if [ $errorlevel != 0 ]; then
+ echo "Error: No PackChk Utility found"
+ echo "Action: Add PackChk to your path"
+ echo "Hint: Included in CMSIS Pack:"
+ echo "$CMSIS_PACK_ROOT/ARM/CMSIS/<version>/CMSIS/Utilities/<os>/"
+ echo " "
+ exit 1
+fi
+echo " "
+
+# Locate Package Description file
+# check whether there is more than one pdsc file
+NUM_PDSCS=$(ls -1 *.pdsc | wc -l)
+PACK_DESCRIPTION_FILE=$(ls *.pdsc)
+if [[ -n $1 && -f $1 ]]; then
+ PACK_DESCRIPTION_FILE=$1
+elif [ ${NUM_PDSCS} -lt 1 ]; then
+ echo "Error: No *.pdsc file found in current directory"
+ echo " "
+ exit 1
+elif [ ${NUM_PDSCS} -gt 1 ]; then
+ echo "Error: Only one PDSC file allowed in directory structure:"
+ echo "Found:"
+ echo "$PACK_DESCRIPTION_FILE"
+ echo "Action: Provide PDSC file explicitly!"
+ echo " "
+ usage
+ exit 1
+fi
+
+SAVEIFS=$IFS
+IFS=.
+set ${PACK_DESCRIPTION_FILE}
+# Pack Vendor
+PACK_VENDOR=$1
+# Pack Name
+PACK_NAME=$2
+echo "Generating Pack: for $PACK_VENDOR.$PACK_NAME"
+echo " "
+IFS=$SAVEIFS
+
+#if $PACK_BUILD directory does not exist, create it.
+if [ ! -d "$PACK_BUILD" ]; then
+ mkdir -p "$PACK_BUILD"
+fi
+
+# Copy files into build base directory: $PACK_BUILD
+# pdsc file is mandatory in base directory:
+cp -f "./${PACK_VENDOR}.${PACK_NAME}.pdsc" "${PACK_BUILD}"
+
+# Add directories
+echo Adding directories to pack:
+echo "${PACK_DIRS}"
+echo " "
+for d in ${PACK_DIRS}; do
+ cp -r --parents "$d" "${PACK_BUILD}"
+done
+
+# Add files
+echo Adding files to pack:
+echo "${PACK_BASE_FILES}"
+echo " "
+if [ ! -x ${PACK_BASE_FILES+x} ]; then
+ for f in ${PACK_BASE_FILES}; do
+ cp -f --parents "$f" $PACK_BUILD/
+ done
+fi
+
+# Delete files
+echo Deleting files from pack:
+echo "${PACK_DELETE_FILES}"
+echo " "
+if [ ! -x ${PACK_DELETE_FILES+x} ]; then
+ for f in ${PACK_DELETE_FILES}; do
+ find $PACK_BUILD/$(dirname "$f") -name $(basename "$f") -delete
+ done
+fi
+
+# Apply patches
+echo Applying patches to pack:
+echo "${PACK_PATCH_FILES}"
+echo " "
+if [ ! -x ${PACK_PATCH_FILES+x} ]; then
+ CWD=$(pwd)
+ pushd $PACK_BUILD > /dev/null
+ for f in ${PACK_PATCH_FILES}; do
+ patch -p0 -t -i "${CWD}/${f}"
+ done
+ popd > /dev/null
+fi
+
+# Create checksum file
+echo Creating checksum file:
+pushd $PACK_BUILD > /dev/null
+find . -type f -exec sha1sum {} + > ../${PACK_VENDOR}.${PACK_NAME}.sha1
+mv ../${PACK_VENDOR}.${PACK_NAME}.sha1 .
+popd > /dev/null
+
+# Run Schema Check (for Linux only):
+# sudo apt-get install libxml2-utils
+
+if [ $(uname -s) = "Linux" ]; then
+ echo "Running schema check for ${PACK_VENDOR}.${PACK_NAME}.pdsc"
+ xmllint --noout --schema "$(realpath -m ./CMSIS/Utilities/PACK.xsd)" "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc"
+ errorlevel=$?
+ if [ $errorlevel -ne 0 ]; then
+ echo "build aborted: Schema check of $PACK_VENDOR.$PACK_NAME.pdsc against PACK.xsd failed"
+ echo " "
+ exit 1
+ fi
+else
+ echo "Use MDK PackInstaller to run schema validation for $PACK_VENDOR.$PACK_NAME.pdsc"
+fi
+
+# Patch pack version
+echo "Checking PDCS version against Git..."
+pdsc_version=$(pack_version "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc")
+git_version=$(git_describe ${pdsc_version})
+patch_pdsc "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc" ${pdsc_version} ${git_version}
+
+# Run Pack Check and generate PackName file with version
+"${PACKCHK}" "${PACK_BUILD}/${PACK_VENDOR}.${PACK_NAME}.pdsc" \
+ -n ${PACK_BUILD}/PackName.txt \
+ -x M353 -x M364 -x M335 -x M336
+errorlevel=$?
+if [ $errorlevel -ne 0 ]; then
+ echo "build aborted: pack check failed"
+ echo " "
+ exit 1
+fi
+
+PACKNAME=$(cat ${PACK_BUILD}/PackName.txt)
+rm -rf ${PACK_BUILD}/PackName.txt
+
+# Archiving
+# $ZIP a $PACKNAME
+echo "creating pack file $PACKNAME"
+#if $PACK_WAREHOUSE directory does not exist create it
+if [ ! -d "$PACK_WAREHOUSE" ]; then
+ mkdir -p "$PACK_WAREHOUSE"
+fi
+pushd "$PACK_WAREHOUSE" > /dev/null
+PACK_WAREHOUSE=$(pwd)
+popd > /dev/null
+pushd "$PACK_BUILD" > /dev/null
+PACK_BUILD=$(pwd)
+"$ZIP" a "$PACK_WAREHOUSE/$PACKNAME" -tzip
+popd > /dev/null
+errorlevel=$?
+if [ $errorlevel -ne 0 ]; then
+ echo "build aborted: archiving failed"
+ exit 1
+fi
+
+echo "build of pack succeeded"
+# Clean up
+echo "cleaning up ..."
+
+rm -rf "$PACK_BUILD"
+echo " "
+
+echo Completed CMSIS-Pack Generation: $(date)
diff --git a/Jenkinsfile b/Jenkinsfile
index 3214cab..ff1c08a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -279,6 +279,54 @@
}
}
+ stage('Pack') {
+ agent {
+ kubernetes {
+ defaultContainer 'cmsis'
+ slaveConnectTimeout 600
+ yaml """\
+ apiVersion: v1
+ kind: Pod
+ spec:
+ imagePullSecrets:
+ - name: ${dockerinfo['k8sPullSecret']}
+ securityContext:
+ runAsUser: 1000
+ runAsGroup: 1000
+ containers:
+ - name: cmsis
+ image: ${dockerinfo['registryUrl']}/${dockerinfo['image']}:${dockerinfo['label']}
+ alwaysPullImage: true
+ imagePullPolicy: Always
+ command:
+ - sleep
+ args:
+ - infinity
+ resources:
+ requests:
+ cpu: 2
+ memory: 2Gi
+ """.stripIndent()
+ }
+ }
+ steps {
+ checkoutScmWithRetry(3)
+ sh('./CMSIS/RTOS/RTX/LIB/fetch_libs.sh')
+ sh('./CMSIS/RTOS2/RTX/Library/fetch_libs.sh')
+
+ tee('doxygen.log') {
+ sh('./CMSIS/DoxyGen/gen_doc.sh')
+ }
+ sh('./CMSIS/Utilities/gen_pack.sh')
+
+ archiveArtifacts artifacts: 'output/ARM.CMSIS.*.pack', allowEmptyArchive: true
+
+ recordIssues tools: [doxygen(id: 'DOXYGEN', name: 'Doxygen', pattern: 'doxygen.log')],
+ qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]],
+ referenceJobName: 'nightly', ignoreQualityGate: true
+ }
+ }
+
stage('CoreValidation') {
when {
expression { return CORE_VALIDATION }
@@ -340,7 +388,7 @@
}
}
- archiveArtifacts artifacts: "CoreValidation_*.zip", allowEmptyArchive: true
+ archiveArtifacts artifacts: 'CoreValidation_*.zip', allowEmptyArchive: true
stash name: "CV_${DEVICE}", includes: '*.log, *.junit'
}
}
diff --git a/README.md b/README.md
index 26593ea..853bf68 100644
--- a/README.md
+++ b/README.md
@@ -84,19 +84,20 @@
- **7z.exe (7-Zip)** Version: 16.02 (File Archiver)
Using these tools, you can generate on a Windows PC:
- - **CMSIS Software Pack** using the batch file **gen_pack.bat** (located in ./CMSIS/Utilities). This batch file also generates the documentation.
-
- - **CMSIS Documentation** using the batch file **genDoc.bat** (located in ./CMSIS/Doxygen).
+ - **CMSIS Documentation** using the batch file **gen_doc.sh** (located in ./CMSIS/Doxygen).
+ - **CMSIS Software Pack** using the batch file **gen_pack.sh** (located in ./CMSIS/Utilities).
+ The bash script does not generate the documentation. The pre-built libraries for RTX4 and RTX5
+ are not included within this repository.
The file ./CMSIS/DoxyGen/How2Doc.txt describes the rules for creating API documentation.
## License
-Arm CMSIS is licensed under Apache-2.0.
+Arm CMSIS is licensed under Apache 2.0.
## Contributions and Pull Requests
-Contributions are accepted under Apache-2.0. Only submit contributions where you have authored all of the code.
+Contributions are accepted under Apache 2.0. Only submit contributions where you have authored all of the code.
### Issues and Labels
diff --git a/manifest b/manifest
deleted file mode 100644
index e031411..0000000
--- a/manifest
+++ /dev/null
@@ -1,53 +0,0 @@
-pdsc: ARM.CMSIS.pdsc
-preproc:
- - clean: CMSIS/Documentation/(Build,Core,Core_A,DAP,Driver,DSP,NN,General,Pack,RTOS,RTOS2,SVD,Zone)
- - doxygen: CMSIS/DoxyGen/Build/Build.dxy
- - doxygen: CMSIS/DoxyGen/Core/core.dxy
- - doxygen: CMSIS/DoxyGen/Core_A/core_A.dxy
- - doxygen: CMSIS/DoxyGen/DAP/dap.dxy
- - doxygen: CMSIS/DoxyGen/Driver/Driver.dxy
- - doxygen: CMSIS/DoxyGen/DSP/dsp.dxy
- - doxygen: CMSIS/DoxyGen/General/general.dxy
- - doxygen: CMSIS/DoxyGen/NN/nn.dxy
- - doxygen: CMSIS/DoxyGen/Pack/Pack.dxy
- - doxygen: CMSIS/DoxyGen/RTOS/rtos.dxy
- - doxygen: CMSIS/DoxyGen/RTOS2/rtos.dxy
- - doxygen: CMSIS/DoxyGen/SVD/svd.dxy
- - doxygen: CMSIS/DoxyGen/Zone/zone.dxy
-glob:
- - LICENSE.txt
- - Device/**/*
- - CMSIS/Core/Include/**/*
- - CMSIS/Core/Include/**/*: CMSIS/Include/
- - CMSIS/Core/Template/**/*
- - CMSIS/Core_A/**/*
- - CMSIS/DAP/**/*
- - CMSIS/Driver/**/*
- - CMSIS/DSP/ComputeLibrary/**/*
- - CMSIS/DSP/Include/**/*
- - CMSIS/DSP/Source/**/*
- - CMSIS/DSP/Projects/**/*
- - CMSIS/DSP/Examples/**/*
- - CMSIS/DSP/Include/**/*: CMSIS/Include/
- - CMSIS/DSP/PrivateInclude/**/*
- - CMSIS/DSP/Lib/**/*
- - CMSIS/NN/**/*
- - CMSIS/Pack/**/*
- - CMSIS/RTOS/**/*
- - CMSIS/RTOS2/**/*
- - CMSIS/Utilities/ARM_Example.*: CMSIS/SVD/ARM_Example.
- - CMSIS/Utilities/CMSIS-SVD.xsd
- - CMSIS/Utilities/PACK.xsd
- - CMSIS/Utilities/PackIndex.xsd
- - CMSIS/Utilities/Win32/**/*
- - CMSIS/Utilities/Linux64/**/*
- - CMSIS/Documentation/**/*
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/Build/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/Core/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/Core_A/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/Driver/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/Pack/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/DSP/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/DAP/html/search/search.css
- - CMSIS/DoxyGen/Doxygen_Templates/search.css: CMSIS/Documentation/NN/html/search/search.css
-