Skip to content

Generate Docs

thanos edited this page Apr 25, 2021 · 4 revisions

Generate Documentation

There is detailed documentation of all the source code, generated by Doxygen, describing all the structures and functions of the project.

Doxygen Documentation: https://thanoskoutr.github.io/armOS/

NOTE: The online documentation is generated either for the Rasperry Pi 4 or the Raspberry Pi Zero / Zero W. They have some differences mainly regarding the register addresses, but they are mostly identical.

The documentation can be generated locally for either the Rasperry Pi 4 or the Raspberry Pi Zero / Zero W.

By building locally, you can take advantage of the other formats that Doxygen produces.

Doxygen generates:

  • HTML static site, like the one that is available online.
  • Latex files that can be build into a pdf reference manual.
  • Man pages, that can be viewed by man on a Unix system.

Install Doxygen

For Debian distros you can install doxygen and its dependencies with apt:

sudo apt install doxygen graphviz

For other distributions, either install from your distro's package manager, or build from source. More information can be found on the doxygen's installation page.

Generate Docs - Automatic

Run from the top-level directory.

Raspberry Pi Zero / Zero W

Gererate Docs for Rasperry Pi Zero/Zero W (aarch32):

make RASPI_MODEL=0 docs

Raspberry Pi 4

Gererate Docs for Rasperry Pi 4 (aarch64):

make RASPI_MODEL=4 docs

Generate Docs - Manually

Alternatively, you can generate the docs by providing all the variables to the Doxygen configuration file that the Makefile provides, manually for each Pi device.

Run from the top-level directory:

Raspberry Pi Zero / Zero W

Gererate Docs for Rasperry Pi Zero/Zero W (aarch32):

( cat .doxygenconfig ; echo "PREDEFINED = MODEL_0 AARCH_32" ; echo "OUTPUT_DIRECTORY = docs/doxygen" ; echo "INPUT = src include" ; echo "PROJECT_NUMBER = 0.1.0" ) | doxygen -

Raspberry Pi 4

Gererate Docs for Rasperry Pi 4 (aarch64):

( cat .doxygenconfig ; echo "PREDEFINED = MODEL_4 AARCH_64" ; echo "OUTPUT_DIRECTORY = docs/doxygen" ; echo "INPUT = src include" ; echo "PROJECT_NUMBER = 0.1.0" ) | doxygen -

Open HTML Docs

Open the docs in browser:

firefox docs/doxygen/html/index.html

Replace firefox with your default browser.

Create PDF Docs

Install Dependencies

In order to create the final .pdf from the .tex files, we need pdflatex.

The minimum packages required for pdflatex:

sudo apt install texlive-base texlive-latex-base texlive-latex-extra

Convert to PDF

Main .tex file is located in latex/refman.tex.

In order to generate the pdf, run with the Makefile option:

make docs_pdf

or manually:

pdflatex docs/doxygen/latex/refman.tex

Open Man Docs

Set MANPATH, depending on the location of the project in your system:

export MANPATH=PATH_TO/armOS/docs/doxygen/man

Open man pages with the filenames of each file in the man3 directory, e.g.:

man strings.h.3
man printk.h.3

Delete Docs

To delete the Docs directory:

make clean_docs

Previous Page

Create Release

Next Page

Deploy Docs

Clone this wiki locally