|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
This document explains how to generate, browse, and maintain the project's API reference, which is produced by Doxygen from the in-tree source comments. The configuration file is the top-level Doxyfile; the wrapper script is scripts/builders/docs.sh; the canonical entry point is just docs::build.
From the repository root:
just docs::build is a thin wrapper around bash scripts/builders/docs.sh, which in turn:
docs/doxygen_theme/header.html is a doxygen HTML template: it was generated by doxygen -w html from exactly the pinned release, then extended with the theme's script includes. Doxygen substitutes only the $placeholders it knows; rendering the template with any other version leaves the unknown ones (e.g. $mermaidjs) as literal text on every published page and mangles the <head>. The vendored doxygen-awesome theme likewise supports a bounded range of doxygen releases. Building with the distro or Homebrew doxygen of the day is therefore not supported – always go through just docs::build / scripts/builders/docs.sh, which enforce the pin.
The site uses the MIT-licensed doxygen-awesome-css theme in its sidebar-only variant with the dark-mode toggle, fragment copy button, and paragraph links extensions. The theme files are vendored as a unit under docs/doxygen_theme/ – never hand-edit individual lines. To update the theme:
To open the freshly-built HTML in a browser without a separate command, pass --open:
Doxyfile's INPUT block is the authority. It covers the README.md (rendered as the main page via USE_MDFILE_AS_MAINPAGE), the Markdown under docs/, and all first-party source: the libraries, the adapters onto the vendored stacks, the co-processor firmware, the products and the examples, and the developer tooling, host emulator included.
libs/third_party/ and apps/shared_libs/third_party/ are explicitly excluded – vendored SOUP is documented under docs/SOUP/ instead, not via Doxygen. So is docs/doxygen_theme/ (the vendored HTML theme itself).
The repository is private while the docs site is public, so GitHub Actions status badges in Markdown would render as broken images for site visitors. scripts/gen/doxygen_md_filter.py (wired via FILTER_PATTERNS) strips them from every Markdown page at docs-build time; they remain in the files on github.com.
After just docs::build, navigate to build/docs/html/index.html. The left-hand sidebar carries the rendered README, a page per source file (its @file block, its declared symbols, and – if Graphviz is on PATH – include and caller graphs), an alphabetical symbol index, and a type index. Two settings shape what appears there: EXTRACT_ALL = YES surfaces even file-static helpers, while EXTRACT_PRIVATE = NO keeps NSC-private and priv_* helpers hidden by default.
Each function page renders the Doxygen tags the block carries. @brief, @details, @param[in/out], @return / @retval, two @pre, two @post, @note and @since are required and gated (see the Workflow section below for by what). @warning, @see and @par MC/DC: also render, and are conventions rather than requirements – see docs/STYLE_GUIDE.md "Function documentation" for the measurement behind that split. Cross-references resolve to other pages automatically.
When you add a new function, struct, enum, or file:
Everything is in Doxyfile, and the three settings worth knowing about are EXTRACT_PRIVATE (off, so priv_* helpers stay hidden), HAVE_DOT (on, but the wrapper turns it off when Graphviz is absent rather than failing), and the call-graph node ceiling, which trades build time for larger graphs. A brand-new top-level library needs a line in INPUT; nothing else discovers it.
The docs are built in CI through scripts/builders/docs.sh and the same pinned doxygen, twice, for different reasons:
The recommended local workflow is still to run just docs::build before pushing any change that touches public API surface.