Skip to content

Commit 43b76b4

Browse files
authored
Update documentation for Doxygen 1.13.2 (#29)
- documentation sources moved into Documentation directory - new style template - added special handling for custom \token{x} command - updated gen_pack template script to latest version - rename GitHub action build.yml to pack.yml (match gen-pack-action name)
1 parent ae16060 commit 43b76b4

90 files changed

Lines changed: 4320 additions & 2280 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
name: Build documentation and pack
22
on:
33
workflow_dispatch:
4-
push:
5-
branches: [ main ]
64
pull_request:
7-
branches: [ main ]
5+
push:
6+
branches: [main]
87
release:
98
types: [published]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
pack:
1216
name: Generate pack
@@ -17,17 +21,16 @@ jobs:
1721
fetch-depth: 0
1822

1923
- name: Fetch tags
20-
if: ${{ github.event_name == 'release' }}
24+
if: github.event_name == 'release'
2125
run: |
2226
git fetch --tags --force
2327
2428
- uses: Open-CMSIS-Pack/gen-pack-action@main
2529
with:
26-
doxygen-version: 1.9.6 # default
27-
packchk-version: 1.3.95 # default
28-
gen-doc-script: ./DoxyGen/gen_doc.sh # skipped by default
29-
check-links-script: ./DoxyGen/check_links.sh # skipped by default
30-
doc-path: ./Documentation/html # skipped by default
31-
gen-pack-script: ./gen_pack.sh --no-preprocess # skipped by default
32-
gen-pack-output: ./output # skipped by default
33-
gh-pages-branch: gh-pages # default
30+
doxygen-version: 1.13.2 # required version of DoxyGen
31+
packchk-version: 1.4.4 # required version of PackChk
32+
gen-doc-script: ./Documentation/Doxygen/gen_doc.sh # path to documentation generator script
33+
doc-path: ./Documentation/html # path to generated documentation
34+
gen-pack-script: ./gen_pack.sh --no-preprocess # path to pack generator script
35+
gen-pack-output: ./output # path to folder with generated pack archive(s)
36+
gh-pages-branch: gh-pages # branch name to deploy generated documentation to
Lines changed: 646 additions & 360 deletions
Large diffs are not rendered by default.

Documentation/Doxygen/gen_doc.sh

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
#!/usr/bin/env bash
2+
# Version: 3.0
3+
# Date: 2025-10-21
4+
# This bash script generates CMSIS-Driver documentation
5+
#
6+
# Pre-requisites:
7+
# - bash shell (for Windows: install git for Windows)
8+
# - doxygen 1.13.2
9+
# - linkchecker (can be skipped with -s)
10+
11+
set -o pipefail
12+
13+
# Set version of gen pack library
14+
# For available versions see https://github.com/Open-CMSIS-Pack/gen-pack/tags.
15+
# Use the tag name without the prefix "v", e.g., 0.7.0
16+
REQUIRED_GEN_PACK_LIB="0.11.3"
17+
18+
DIRNAME=$(dirname "$(readlink -f "$0")")
19+
GENDIR=../html
20+
REQ_DXY_VERSION="1.13.2"
21+
22+
RUN_LINKCHECKER=1
23+
COMPONENTS=()
24+
25+
function usage() {
26+
echo "Usage: $(basename "$0") [-h] [-s] [-c <comp>]"
27+
echo " -h,--help Show usage"
28+
echo " -s,--no-linkcheck Skip linkcheck"
29+
echo " -c,--component <comp> Select component <comp> to generate documentation for. "
30+
echo " Can be given multiple times. Defaults to all components."
31+
}
32+
33+
while [[ $# -gt 0 ]]; do
34+
case $1 in
35+
'-h'|'help')
36+
usage
37+
exit 1
38+
;;
39+
'-s'|'--no-linkcheck')
40+
RUN_LINKCHECKER=0
41+
;;
42+
'-c'|'--component')
43+
shift
44+
COMPONENTS+=("$1")
45+
;;
46+
*)
47+
echo "Invalid command line argument: $1" >&2
48+
usage
49+
exit 1
50+
;;
51+
esac
52+
shift # past argument
53+
done
54+
55+
############ DO NOT EDIT BELOW ###########
56+
57+
# Set GEN_PACK_LIB_PATH to use a specific gen-pack library root
58+
# ... instead of bootstrap based on REQUIRED_GEN_PACK_LIB
59+
if [[ -f "${GEN_PACK_LIB_PATH}/gen-pack" ]]; then
60+
. "${GEN_PACK_LIB_PATH}/gen-pack"
61+
else
62+
. <(curl -sL "https://raw.githubusercontent.com/Open-CMSIS-Pack/gen-pack/main/bootstrap")
63+
fi
64+
65+
find_git
66+
find_doxygen "${REQ_DXY_VERSION}"
67+
[[ ${RUN_LINKCHECKER} != 0 ]] && find_linkchecker
68+
69+
if [ -z "${VERSION_FULL}" ]; then
70+
VERSION_FULL=$(git_describe)
71+
fi
72+
73+
pushd "${DIRNAME}" > /dev/null
74+
75+
echo "Generating documentation ..."
76+
77+
projectName=$(grep -E "PROJECT_NAME\s+=" cmsis_dv.dxy.in | sed -r -e 's/[^"]*"([^"]+)".*/\1/')
78+
projectNumberFull="${VERSION_FULL}"
79+
projectNumber="${projectNumberFull%+*}"
80+
datetime=$(date -u +'%a %b %e %Y %H:%M:%S')
81+
year=$(date -u +'%Y')
82+
83+
sed -e "s/{projectNumber}/${projectNumber}/" cmsis_dv.dxy.in > cmsis_dv.dxy
84+
85+
git_changelog -f html > src/history.txt
86+
87+
echo "\"${UTILITY_DOXYGEN}\" cmsis_dv.dxy"
88+
"${UTILITY_DOXYGEN}" cmsis_dv.dxy
89+
90+
mkdir -p "${DIRNAME}/${GENDIR}/search/"
91+
cp -f "${DIRNAME}/style_template/search.css" "${DIRNAME}/${GENDIR}/search/"
92+
cp -f "${DIRNAME}/style_template/navtree.js" "${DIRNAME}/${GENDIR}/"
93+
cp -f "${DIRNAME}/style_template/resize.js" "${DIRNAME}/${GENDIR}/"
94+
95+
sed -e "s/{datetime}/${datetime}/" "${DIRNAME}/style_template/footer.js.in" \
96+
| sed -e "s/{year}/${year}/" \
97+
| sed -e "s/{projectName}/${projectName}/" \
98+
| sed -e "s/{projectNumber}/${projectNumber}/" \
99+
| sed -e "s/{projectNumberFull}/${projectNumberFull}/" \
100+
> "${DIRNAME}/${GENDIR}/footer.js"
101+
102+
popd > /dev/null
103+
104+
[[ ${RUN_LINKCHECKER} != 0 ]] && check_links "${DIRNAME}/../html/index.html" "${DIRNAME}"
105+
106+
107+
exit 0
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[output]
2+
ignoreerrors=
3+
mag.svg
4+
mag_sel.svg
5+
mag_d.svg
6+
mag_seld.svg
7+
../tab_a.png
8+
../tab_ad.png
9+
minus.svg
10+
plus.svg
11+
minusd.svg
12+
plusd.svg
13+
14+
[filtering]
15+
ignorewarnings=
16+
http-redirected

0 commit comments

Comments
 (0)