Update develop documentation on gh-pages using gh-action.
- Add gh-action workflows.
- Remove old build batches as they are not platform
independent.
- Add new build bash script.
- Fix all dxy files to use quotes around project name.
- Move footer text (timestamp) into single js file so that
regenerating documentation doesn't affect unchanged html
files.
diff --git a/CMSIS/DoxyGen/Build/Build.dxy b/CMSIS/DoxyGen/Build/Build.dxy
index 827e05a..b3897b3 100644
--- a/CMSIS/DoxyGen/Build/Build.dxy
+++ b/CMSIS/DoxyGen/Build/Build.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-Build
+PROJECT_NAME = "CMSIS-Build"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/Build/doxygen_build.bat b/CMSIS/DoxyGen/Build/doxygen_build.bat
deleted file mode 100644
index 4bf5d66..0000000
--- a/CMSIS/DoxyGen/Build/doxygen_build.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-REM Generates Documentation Part for CMSIS Build
-doxygen Build.dxy
diff --git a/CMSIS/DoxyGen/Core/doxygen_core.bat b/CMSIS/DoxyGen/Core/doxygen_core.bat
deleted file mode 100644
index e3e6e4f..0000000
--- a/CMSIS/DoxyGen/Core/doxygen_core.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen core.dxy
diff --git a/CMSIS/DoxyGen/Core/doxygen_core_CM0-7.bat b/CMSIS/DoxyGen/Core/doxygen_core_CM0-7.bat
deleted file mode 100644
index 7647653..0000000
--- a/CMSIS/DoxyGen/Core/doxygen_core_CM0-7.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen core_CM0-7.dxy
diff --git a/CMSIS/DoxyGen/Core_A/doxygen_core_A.bat b/CMSIS/DoxyGen/Core_A/doxygen_core_A.bat
deleted file mode 100644
index 7c48552..0000000
--- a/CMSIS/DoxyGen/Core_A/doxygen_core_A.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen core_A.dxy
diff --git a/CMSIS/DoxyGen/DAP/dap.dxy b/CMSIS/DoxyGen/DAP/dap.dxy
index 62cb16b..efb6fd7 100644
--- a/CMSIS/DoxyGen/DAP/dap.dxy
+++ b/CMSIS/DoxyGen/DAP/dap.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-DAP
+PROJECT_NAME = "CMSIS-DAP"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/DAP/doxygen_dap.bat b/CMSIS/DoxyGen/DAP/doxygen_dap.bat
deleted file mode 100644
index 9419dc0..0000000
--- a/CMSIS/DoxyGen/DAP/doxygen_dap.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen dap.dxy
diff --git a/CMSIS/DoxyGen/DSP/doxygen_dsp.bat b/CMSIS/DoxyGen/DSP/doxygen_dsp.bat
deleted file mode 100644
index a80800d..0000000
--- a/CMSIS/DoxyGen/DSP/doxygen_dsp.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen dsp.dxy
diff --git a/CMSIS/DoxyGen/DSP/dsp.dxy b/CMSIS/DoxyGen/DSP/dsp.dxy
index ff105c7..0afc8ea 100644
--- a/CMSIS/DoxyGen/DSP/dsp.dxy
+++ b/CMSIS/DoxyGen/DSP/dsp.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-DSP
+PROJECT_NAME = "CMSIS-DSP"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/Doxygen_Templates/_cp_search.bat b/CMSIS/DoxyGen/Doxygen_Templates/_cp_search.bat
deleted file mode 100644
index 47735ce..0000000
--- a/CMSIS/DoxyGen/Doxygen_Templates/_cp_search.bat
+++ /dev/null
@@ -1,8 +0,0 @@
-copy /Y search.css ..\General\html\search\.
-copy /Y search.css ..\CORE\html\search\.
-copy /Y search.css ..\Driver\html\search\.
-copy /Y search.css ..\DSP\html\search\.
-copy /Y search.css ..\Pack\html\search\.
-copy /Y search.css ..\RTOS\html\search\.
-copy /Y search.css ..\RTOS2\html\search\.
-copy /Y search.css ..\SVD\html\search\.
diff --git a/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.html b/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.html
index a36ba3b..bae4bdb 100644
--- a/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.html
+++ b/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.html
@@ -3,12 +3,13 @@
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
- <li class="footer">Generated on $datetime for $projectname $projectnumber by Arm Ltd. All rights reserved.
- <!--
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="$relpath$doxygen.png" alt="doxygen"/></a> $doxygenversion
- -->
- </li>
+ <li class="footer">
+ <script type="text/javascript">
+ <!--
+ writeFooter.call(this);
+ //-->
+ </script>
+ </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
diff --git a/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.js b/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.js
new file mode 100644
index 0000000..886da84
--- /dev/null
+++ b/CMSIS/DoxyGen/Doxygen_Templates/cmsis_footer.js
@@ -0,0 +1,3 @@
+function writeFooter() {
+ document.write('Generated on {datetime} for {projectName} {projectNumber} by Arm Ltd. All rights reserved.');
+};
diff --git a/CMSIS/DoxyGen/Doxygen_Templates/cmsis_header.html b/CMSIS/DoxyGen/Doxygen_Templates/cmsis_header.html
index 3f80bd7..8d48f2e 100644
--- a/CMSIS/DoxyGen/Doxygen_Templates/cmsis_header.html
+++ b/CMSIS/DoxyGen/Doxygen_Templates/cmsis_header.html
@@ -11,6 +11,7 @@
<script type="text/javascript" src="$relpath$jquery.js"></script>
<script type="text/javascript" src="$relpath$dynsections.js"></script>
<script type="text/javascript" src="$relpath$printComponentTabs.js"></script>
+<script type="text/javascript" src="$relpath$cmsis_footer.js"></script>
$treeview
$search
$mathjax
diff --git a/CMSIS/DoxyGen/Driver/Driver.dxy b/CMSIS/DoxyGen/Driver/Driver.dxy
index 94d4baf..0361040 100644
--- a/CMSIS/DoxyGen/Driver/Driver.dxy
+++ b/CMSIS/DoxyGen/Driver/Driver.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-Driver
+PROJECT_NAME = "CMSIS-Driver"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/Driver/doxygen_driver.bat b/CMSIS/DoxyGen/Driver/doxygen_driver.bat
deleted file mode 100644
index 8a86a3e..0000000
--- a/CMSIS/DoxyGen/Driver/doxygen_driver.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-REM Generates Documentation Part for General Driver
-doxygen Driver.dxy
diff --git a/CMSIS/DoxyGen/General/doxygen_general.bat b/CMSIS/DoxyGen/General/doxygen_general.bat
deleted file mode 100644
index 4749bbc..0000000
--- a/CMSIS/DoxyGen/General/doxygen_general.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen general.dxy
diff --git a/CMSIS/DoxyGen/General/general.dxy b/CMSIS/DoxyGen/General/general.dxy
index d3cd0af..ddfccc6 100644
--- a/CMSIS/DoxyGen/General/general.dxy
+++ b/CMSIS/DoxyGen/General/general.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS
+PROJECT_NAME = "CMSIS"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/NN/doxygen_nn.bat b/CMSIS/DoxyGen/NN/doxygen_nn.bat
deleted file mode 100644
index 9b1b66e..0000000
--- a/CMSIS/DoxyGen/NN/doxygen_nn.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen nn.dxy
diff --git a/CMSIS/DoxyGen/NN/nn.dxy b/CMSIS/DoxyGen/NN/nn.dxy
index 81bc9c8..9348ca1 100644
--- a/CMSIS/DoxyGen/NN/nn.dxy
+++ b/CMSIS/DoxyGen/NN/nn.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-NN
+PROJECT_NAME = "CMSIS-NN"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/Pack/Pack.dxy b/CMSIS/DoxyGen/Pack/Pack.dxy
index a95d03a..51b39fa 100644
--- a/CMSIS/DoxyGen/Pack/Pack.dxy
+++ b/CMSIS/DoxyGen/Pack/Pack.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-Pack
+PROJECT_NAME = "CMSIS-Pack"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/Pack/doxygen_pack.bat b/CMSIS/DoxyGen/Pack/doxygen_pack.bat
deleted file mode 100644
index 6259fcf..0000000
--- a/CMSIS/DoxyGen/Pack/doxygen_pack.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-REM Generates Documentation Part for CMSIS PACK
-doxygen Pack.dxy
diff --git a/CMSIS/DoxyGen/RTOS/doxygen_rtos.bat b/CMSIS/DoxyGen/RTOS/doxygen_rtos.bat
deleted file mode 100644
index a73298e..0000000
--- a/CMSIS/DoxyGen/RTOS/doxygen_rtos.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-REM Generates Documentation Part for CMSIS-RTOS
-doxygen rtos.dxy
diff --git a/CMSIS/DoxyGen/RTOS/rtos.dxy b/CMSIS/DoxyGen/RTOS/rtos.dxy
index 2181308..4812735 100644
--- a/CMSIS/DoxyGen/RTOS/rtos.dxy
+++ b/CMSIS/DoxyGen/RTOS/rtos.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-RTOS
+PROJECT_NAME = "CMSIS-RTOS"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/RTOS2/doxygen_rtos.bat b/CMSIS/DoxyGen/RTOS2/doxygen_rtos.bat
deleted file mode 100644
index a73298e..0000000
--- a/CMSIS/DoxyGen/RTOS2/doxygen_rtos.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-REM Generates Documentation Part for CMSIS-RTOS
-doxygen rtos.dxy
diff --git a/CMSIS/DoxyGen/RTOS2/doxygen_rtos_CM0-7.bat b/CMSIS/DoxyGen/RTOS2/doxygen_rtos_CM0-7.bat
deleted file mode 100644
index da96820..0000000
--- a/CMSIS/DoxyGen/RTOS2/doxygen_rtos_CM0-7.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen rtos_CM0-7.dxy
diff --git a/CMSIS/DoxyGen/RTOS2/rtos.dxy b/CMSIS/DoxyGen/RTOS2/rtos.dxy
index 7876456..90db4c9 100644
--- a/CMSIS/DoxyGen/RTOS2/rtos.dxy
+++ b/CMSIS/DoxyGen/RTOS2/rtos.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-RTOS2
+PROJECT_NAME = "CMSIS-RTOS2"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/RTOS2/rtos_CM0-7.dxy b/CMSIS/DoxyGen/RTOS2/rtos_CM0-7.dxy
index 23e9874..b8fbd17 100644
--- a/CMSIS/DoxyGen/RTOS2/rtos_CM0-7.dxy
+++ b/CMSIS/DoxyGen/RTOS2/rtos_CM0-7.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-RTOS2
+PROJECT_NAME = "CMSIS-RTOS2"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/SVD/doxygen_svd.bat b/CMSIS/DoxyGen/SVD/doxygen_svd.bat
deleted file mode 100644
index 9b6051c..0000000
--- a/CMSIS/DoxyGen/SVD/doxygen_svd.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen svd.dxy
diff --git a/CMSIS/DoxyGen/SVD/svd.dxy b/CMSIS/DoxyGen/SVD/svd.dxy
index 4257d75..7a550cd 100644
--- a/CMSIS/DoxyGen/SVD/svd.dxy
+++ b/CMSIS/DoxyGen/SVD/svd.dxy
@@ -32,7 +32,7 @@
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = CMSIS-SVD
+PROJECT_NAME = "CMSIS-SVD"
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
diff --git a/CMSIS/DoxyGen/Zone/doxygen_zone.bat b/CMSIS/DoxyGen/Zone/doxygen_zone.bat
deleted file mode 100644
index 52835ed..0000000
--- a/CMSIS/DoxyGen/Zone/doxygen_zone.bat
+++ /dev/null
@@ -1 +0,0 @@
-doxygen zone.dxy
diff --git a/CMSIS/DoxyGen/genDoc.bat b/CMSIS/DoxyGen/genDoc.bat
deleted file mode 100644
index d2e5405..0000000
--- a/CMSIS/DoxyGen/genDoc.bat
+++ /dev/null
@@ -1,103 +0,0 @@
-@echo off
-
-REM ====================================================================================
-REM Batch file for generating
-REM
-REM Author :
-REM Date : 7th April 2016
-REM Version : 1.0
-REM Company : ARM
-REM
-REM
-REM Command syntax: genDoc.bat
-REM
-REM Version: 1.0 Initial Version.
-REM ====================================================================================
-
-SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
-
-REM -- Delete previous generated HTML files ---------------------
- ECHO.
- ECHO Delete previous generated HTML files
-
-REM -- Remove generated doxygen files ---------------------
-PUSHD ..\Documentation
-FOR %%A IN (Core, Core_A, DAP, Driver, DSP, NN, General, Pack, Build, RTOS, RTOS2, SVD, Zone) DO IF EXIST %%A (RMDIR /S /Q %%A)
-POPD
-
-REM -- Generate New HTML Files ---------------------
- ECHO.
- ECHO Generate New HTML Files
-
-pushd Core
-CALL doxygen_core.bat
-popd
-
-pushd Core_A
-CALL doxygen_core_A.bat
-popd
-
-pushd DAP
-CALL doxygen_dap.bat
-popd
-
-pushd Driver
-CALL doxygen_driver.bat
-popd
-
-pushd DSP
-CALL doxygen_dsp.bat
-popd
-
-pushd NN
-CALL doxygen_nn.bat
-popd
-
-pushd General
-CALL doxygen_general.bat
-popd
-
-pushd Pack
-CALL doxygen_pack.bat
-popd
-
-pushd Build
-CALL doxygen_build.bat
-popd
-
-pushd RTOS
-CALL doxygen_rtos.bat
-popd
-
-pushd RTOS2
-CALL doxygen_rtos.bat
-popd
-
-pushd SVD
-CALL doxygen_svd.bat
-popd
-
-pushd Zone
-CALL doxygen_zone.bat
-popd
-
-REM -- Copy search style sheet ---------------------
- ECHO.
- ECHO Copy search style sheets
-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\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\Build\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\NN\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\DAP\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\RTOS\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\RTOS2\html\search\.
-copy /Y Doxygen_Templates\search.css ..\Documentation\Zone\html\search\.
-
-:END
- ECHO.
-REM done
diff --git a/CMSIS/DoxyGen/gen_doc.sh b/CMSIS/DoxyGen/gen_doc.sh
new file mode 100755
index 0000000..3d47a13
--- /dev/null
+++ b/CMSIS/DoxyGen/gen_doc.sh
@@ -0,0 +1,97 @@
+#!/bin/bash
+# Version: 1.0
+# Date: 2021-05-05
+# This bash script generates CMSIS Documentation:
+#
+# Pre-requisites:
+# - bash shell (for Windows: install git for Windows)
+# - doxygen 1.8.6
+# - mscgen 0.20
+
+set -o pipefail
+
+DIRNAME=$(dirname $(readlink -f $0))
+DOXYGEN=$(which doxygen)
+MSCGEN=$(which mscgen)
+REGEN=0
+ALLPARTS=($(find ${DIRNAME} -mindepth 1 -maxdepth 1 -type d -exec basename {} \;))
+PARTS=()
+
+if [[ -z "$*" ]]; then
+ REGEN=1
+else
+ for part in "$*"; do
+ if [[ " ${ALLPARTS[@]} " =~ " $part " ]]; then
+ PARTS+=($part)
+ fi
+ done
+fi
+
+if [[ ! -f "${DOXYGEN}" ]]; then
+ echo "Doxygen not found!" >&2
+ echo "Did you miss to add it to PATH?"
+ exit 1
+else
+ version=$("${DOXYGEN}" --version)
+ echo "DOXYGEN is ${DOXYGEN} at version ${version}"
+ if [[ "${version}" != "1.8.6" ]]; then
+ echo " >> Version is different from 1.8.6 !" >&2
+ fi
+fi
+
+if [[ ! -f "${MSCGEN}" ]]; then
+ echo "mscgen not found!" >&2
+ echo "Did you miss to add it to PATH?"
+ exit 1
+else
+ version=$("${MSCGEN}" 2>/dev/null | grep "Mscgen version" | sed -r -e 's/Mscgen version ([^,]+),.*/\1/')
+ echo "MSCGEN is ${MSCGEN} at version ${version}"
+ if [[ "${version}" != "0.20" ]]; then
+ echo " >> Version is different from 0.20 !" >&2
+ fi
+fi
+
+function doxygen {
+ partname=$(basename $(dirname $1))
+ if [[ $REGEN != 0 ]] || [[ " ${PARTS[@]} " =~ " ${partname} " ]]; then
+ pushd "$(dirname $1)" > /dev/null
+ echo "${DOXYGEN} $1"
+ "${DOXYGEN}" $(basename "$1")
+ popd > /dev/null
+
+ if [[ $2 != 0 ]]; then
+ cp -f "${DIRNAME}/Doxygen_Templates/search.css" "${DIRNAME}/../Documentation/${partname}/html/search/"
+ fi
+
+ projectName=$(grep -E "PROJECT_NAME\s+=" $1 | sed -r -e 's/[^"]*"([^"]+)"/\1/')
+ projectNumber=$(grep -E "PROJECT_NUMBER\s+=" $1 | sed -r -e 's/[^"]*"([^"]+)"/\1/')
+ datetime=$(date -u +'%a %b %e %Y %H:%M:%S')
+ sed -e "s/{datetime}/${datetime}/" "${DIRNAME}/Doxygen_Templates/cmsis_footer.js" \
+ | sed -e "s/{projectName}/${projectName}/" \
+ | sed -e "s/{projectNumber}/${projectNumber}/" \
+ > "${DIRNAME}/../Documentation/${partname}/html/cmsis_footer.js"
+ fi
+}
+
+if [[ $REGEN != 0 ]]; then
+ echo "Cleaning existing documentation ..."
+ find "${DIRNAME}/../Documentation/" -mindepth 1 -maxdepth 1 -type d -exec rm -rf {} +
+fi
+
+echo "Generating documentation ..."
+doxygen "${DIRNAME}/Build/Build.dxy" 1
+doxygen "${DIRNAME}/Core/core.dxy" 1
+doxygen "${DIRNAME}/Core_A/core_A.dxy" 1
+doxygen "${DIRNAME}/DAP/dap.dxy" 1
+doxygen "${DIRNAME}/Driver/Driver.dxy" 1
+doxygen "${DIRNAME}/DSP/dsp.dxy" 1
+doxygen "${DIRNAME}/General/general.dxy" 0
+doxygen "${DIRNAME}/DAP/dap.dxy" 1
+doxygen "${DIRNAME}/NN/nn.dxy" 1
+doxygen "${DIRNAME}/Pack/Pack.dxy" 1
+doxygen "${DIRNAME}/RTOS/rtos.dxy" 1
+doxygen "${DIRNAME}/RTOS2/rtos.dxy" 1
+doxygen "${DIRNAME}/SVD/svd.dxy" 0
+doxygen "${DIRNAME}/Zone/zone.dxy" 1
+
+exit 0