Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 3.12 KB

readme.adoc

File metadata and controls

65 lines (46 loc) · 3.12 KB

RVM-CSI Specification Repo

This repository contains the specification for RVM-CSI (Risc-V Microcontrollers - Common Software Interface). This defines a programming layer aimed at source-code compatibility across embedded microcontroller platforms, and defines the format of Board Support Packs (BSPs) supplying code conforming to that interface.

License

This work is licensed under a Creative Commons Attribution 4.0 International License (CC-BY-4.0). See the LICENSE file for details.

Contributors

Contributors to this specification are contained in the contributors file.

For instructions on how to contribute please see the CONTRIBUTING file.

Dependencies

This project is built using AsciiDoctor (Ruby). The repository has been setup to build the PDF on checkin using GitHub actions. Workflow dependencies are located in the dependencies directory.

For more information on AsciiDoctor, specification guidelines, or building locally, see the RISC-V Documentation Developer Guide.

Cloning the project

This project uses GitHub Submodules to include the RISC-V docs-resources project to achieve a common look and feel.

When cloning this repository for the first time, you must either use git clone --recurse-submodules or execute git submodule init and git submodule update after the clone to populate the docs-resources directory. Failure to clone the submodule, will result in the PDF build fail with an error message like the following:

$ make
asciidoctor-pdf \
-a toc \
-a compress \
-a pdf-style=docs-resources/themes/riscv-pdf.yml \
-a pdf-fontsdir=docs-resources/fonts \
--failure-level=ERROR \
-o profiles.pdf profiles.adoc
asciidoctor: ERROR: could not locate or load the built-in pdf theme `docs-resources/themes/riscv-pdf.yml'; reverting to default theme
No such file or directory - notoserif-regular-subset.ttf not found in docs-resources/fonts
  Use --trace for backtrace
make: *** [Makefile:7: profiles.pdf] Error 1

Building the document

The final specification form of PDF can be generated using the make command.

Modifying the Specification

The APIs for the RVM-CSI Hardware Adaption Layer (HAL) are derived from a Single Source of Truth (SSoT) in YAML format. This YAML is parsed by a python parsing tool which propagates the information into API source files (potentially for multiple languages) and documentation files in .adoc format. The YAML SSoT is found in the api folder. It follows a schema which can be found in the spec-schema folder. The make process will validate the SSoT YAML against this schema, then run the parser to generate C header files in the api/C/include folder, and docs in the auto-gen folder.

The content of the api/C/include and auto-gen folders must therefore not be manually edited. Instead, edit the SSoT YAML in the api folder.

After running the parser, the make process runs asciidoctor-pdf to produce a PDF specification document.