Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/build.yaml → .github/workflows/pack.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Build documentation and pack
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
push:
branches: [main]
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
pack:
name: Generate pack
Expand All @@ -17,17 +21,16 @@ jobs:
fetch-depth: 0

- name: Fetch tags
if: ${{ github.event_name == 'release' }}
if: github.event_name == 'release'
run: |
git fetch --tags --force

- uses: Open-CMSIS-Pack/gen-pack-action@main
with:
doxygen-version: 1.9.6 # default
packchk-version: 1.3.95 # default
gen-doc-script: ./DoxyGen/gen_doc.sh # skipped by default
check-links-script: ./DoxyGen/check_links.sh # skipped by default
doc-path: ./Documentation/html # skipped by default
gen-pack-script: ./gen_pack.sh --no-preprocess # skipped by default
gen-pack-output: ./output # skipped by default
gh-pages-branch: gh-pages # default
doxygen-version: 1.13.2 # required version of DoxyGen
packchk-version: 1.4.4 # required version of PackChk
gen-doc-script: ./Documentation/Doxygen/gen_doc.sh # path to documentation generator script
doc-path: ./Documentation/html # path to generated documentation
gen-pack-script: ./gen_pack.sh --no-preprocess # path to pack generator script
gen-pack-output: ./output # path to folder with generated pack archive(s)
gh-pages-branch: gh-pages # branch name to deploy generated documentation to
1,006 changes: 646 additions & 360 deletions DoxyGen/CMSIS_DV.dxy.in → Documentation/Doxygen/cmsis_dv.dxy.in

Large diffs are not rendered by default.

107 changes: 107 additions & 0 deletions Documentation/Doxygen/gen_doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/usr/bin/env bash
# Version: 3.0
# Date: 2025-10-21
# This bash script generates CMSIS-Driver documentation
#
# Pre-requisites:
# - bash shell (for Windows: install git for Windows)
# - doxygen 1.13.2
# - linkchecker (can be skipped with -s)

set -o pipefail

# Set version of gen pack library
# For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags.
# Use the tag name without the prefix "v", e.g., 0.7.0
REQUIRED_GEN_PACK_LIB="0.11.3"

DIRNAME=$(dirname "$(readlink -f "$0")")
GENDIR=../html
REQ_DXY_VERSION="1.13.2"

RUN_LINKCHECKER=1
COMPONENTS=()

function usage() {
echo "Usage: $(basename "$0") [-h] [-s] [-c <comp>]"
echo " -h,--help Show usage"
echo " -s,--no-linkcheck Skip linkcheck"
echo " -c,--component <comp> Select component <comp> to generate documentation for. "
echo " Can be given multiple times. Defaults to all components."
}

while [[ $# -gt 0 ]]; do
case $1 in
'-h'|'help')
usage
exit 1
;;
'-s'|'--no-linkcheck')
RUN_LINKCHECKER=0
;;
'-c'|'--component')
shift
COMPONENTS+=("$1")
;;
*)
echo "Invalid command line argument: $1" >&2
usage
exit 1
;;
esac
shift # past argument
done

############ DO NOT EDIT BELOW ###########

# Set GEN_PACK_LIB_PATH to use a specific gen-pack library root
# ... instead of bootstrap based on REQUIRED_GEN_PACK_LIB
if [[ -f "${GEN_PACK_LIB_PATH}/gen-pack" ]]; then
. "${GEN_PACK_LIB_PATH}/gen-pack"
else
. <(curl -sL "https://raw.githubusercontent.com/Open-CMSIS-Pack/gen-pack/main/bootstrap")
fi

find_git
find_doxygen "${REQ_DXY_VERSION}"
[[ ${RUN_LINKCHECKER} != 0 ]] && find_linkchecker

if [ -z "${VERSION_FULL}" ]; then
VERSION_FULL=$(git_describe)
fi

pushd "${DIRNAME}" > /dev/null

echo "Generating documentation ..."

projectName=$(grep -E "PROJECT_NAME\s+=" cmsis_dv.dxy.in | sed -r -e 's/[^"]*"([^"]+)".*/\1/')
projectNumberFull="${VERSION_FULL}"
projectNumber="${projectNumberFull%+*}"
datetime=$(date -u +'%a %b %e %Y %H:%M:%S')
year=$(date -u +'%Y')

sed -e "s/{projectNumber}/${projectNumber}/" cmsis_dv.dxy.in > cmsis_dv.dxy

git_changelog -f html > src/history.txt

echo "\"${UTILITY_DOXYGEN}\" cmsis_dv.dxy"
"${UTILITY_DOXYGEN}" cmsis_dv.dxy

mkdir -p "${DIRNAME}/${GENDIR}/search/"
cp -f "${DIRNAME}/style_template/search.css" "${DIRNAME}/${GENDIR}/search/"
cp -f "${DIRNAME}/style_template/navtree.js" "${DIRNAME}/${GENDIR}/"
cp -f "${DIRNAME}/style_template/resize.js" "${DIRNAME}/${GENDIR}/"

sed -e "s/{datetime}/${datetime}/" "${DIRNAME}/style_template/footer.js.in" \
| sed -e "s/{year}/${year}/" \
| sed -e "s/{projectName}/${projectName}/" \
| sed -e "s/{projectNumber}/${projectNumber}/" \
| sed -e "s/{projectNumberFull}/${projectNumberFull}/" \
> "${DIRNAME}/${GENDIR}/footer.js"

popd > /dev/null

[[ ${RUN_LINKCHECKER} != 0 ]] && check_links "${DIRNAME}/../html/index.html" "${DIRNAME}"


exit 0
16 changes: 16 additions & 0 deletions Documentation/Doxygen/linkchecker.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[output]
ignoreerrors=
mag.svg
mag_sel.svg
mag_d.svg
mag_seld.svg
../tab_a.png
../tab_ad.png
minus.svg
plus.svg
minusd.svg
plusd.svg

[filtering]
ignorewarnings=
http-redirected
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,19 @@ This manual contains the following chapters:
- \ref debugging - Describes procedure for debugging of the interface drivers using the CMSIS-Driver Validation.
- \ref resource_requirements - Lists memory and CMSIS-RTOS2 requirements.
- \ref examples - Contains information about several example projects including the required hardware setup.
- <a class="el" href="./modules.html">Reference</a> - Explains the configuration and tests for the various CMSIS-Driver interfaces.
- <a class="el" href="./topics.html">Reference</a> - Explains the configuration and tests for the various CMSIS-Driver interfaces.

\section License License

The CMSIS Driver example implementations are provided free of charge under Apache 2.0 license.
See the <a href="LICENSE.txt">Apache 2.0 License</a>.
See the <a href="../../LICENSE.txt">Apache 2.0 License</a>.

*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
/**
\page rev_hist Revision History

The table below provides information about the changes delivered with specific versions of CMSIS-Driver Validation.

*/
/*=======0=========1=========2=========3=========4=========5=========6=========7=========8=========9=========0=========1====*/
Expand Down Expand Up @@ -100,7 +107,7 @@ Each interface has a related <b>DV_<i>interface</i>_Config.h</b> file, where <i>
For example for Serial Peripheral Interface (SPI) related config file name is DV_SPI_Config.h.

For details on interface specific configuration and test selection please check the Configuration section in the
<a class="el" href="./modules.html">Reference</a> of the related interface.
<a class="el" href="./topics.html">Reference</a> of the related interface.


\section step5 Step 5: Configure the Heap memory
Expand Down
Loading
Loading