| name | embedded-docs |
| description | Embedded firmware documentation generation and maintenance using Doxygen and related tools. Expert skill for API documentation, hardware interface documentation, memory maps, and integration with documentation systems. |
| allowed-tools | Read, Grep, Write, Edit, Bash, Glob, WebFetch |
| graph | {"domains":["domain:embedded-systems"],"specializations":["specialization:embedded-systems"],"skillAreas":["skill-area:rtos-programming","skill-area:firmware-development"],"roles":["role:embedded-engineer"]} |
Embedded Documentation Skill
Expert skill for embedded firmware documentation generation and maintenance. Provides Doxygen comment generation, API documentation structure, hardware interface documentation, and integration with documentation systems.
Overview
The Embedded Documentation skill enables comprehensive documentation for embedded firmware projects:
- Doxygen comment generation and maintenance
- API documentation structure and organization
- Hardware interface documentation
- Memory map documentation
- Call graph and dependency visualization
- Version changelog management
- Register documentation formatting
- Integration with Sphinx/MkDocs
Capabilities
1. Doxygen Comment Generation
Generate Doxygen-compatible documentation comments:
2. Function Documentation
Document functions with complete parameter and return information:
uart_status_t uart_init(uart_instance_t uart, const uart_config_t *config);
3. Hardware Register Documentation
Document hardware register definitions:
#define UART_CR1_OVER8_Pos (15U)
#define UART_CR1_OVER8_Msk (0x1UL << UART_CR1_OVER8_Pos)
#define UART_CR1_OVER8 UART_CR1_OVER8_Msk
4. Memory Map Documentation
Document memory layout and regions:
5. API Documentation Structure
Organize documentation with module grouping:
Process Integration
This skill integrates with the following processes:
| Process | Integration Point |
|---|
firmware-api-documentation.js | Primary documentation generation |
hw-sw-interface-specification.js | Interface documentation |
version-control-config-management.js | Release documentation |
Workflow
1. Analyze Codebase
grep -rn "^[a-z_]*\s\+[a-z_]*(" src/ | grep -v "/\*\*"
find src/ -name "*.h" -exec grep -l "@brief" {} \; | wc -l
find src/ -name "*.h" | wc -l
2. Generate Documentation Comments
The skill generates documentation comments for:
- Header files (module overview, includes, defines)
- Function declarations (params, returns, examples)
- Data structures (fields, usage)
- Enumerations (values, descriptions)
- Macros (purpose, usage)
3. Configure Doxygen
PROJECT_NAME = "Firmware API"
PROJECT_NUMBER = 1.2.0
OUTPUT_DIRECTORY = docs/api
GENERATE_HTML = YES
GENERATE_LATEX = NO
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
INPUT = src include
FILE_PATTERNS = *.c *.h
RECURSIVE = YES
EXCLUDE = src/third_party
HAVE_DOT = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
4. Generate Output
doxygen Doxyfile
cd docs/api/latex && make pdf
python -m http.server 8000 -d docs/api/html
Output Schema
{
"documentation": {
"type": "doxygen",
"format": "html",
"outputDir": "docs/api"
},
"coverage": {
"files": {
"total": 45,
"documented": 42,
"coverage": 0.933
},
"functions": {
"total": 156,
"documented": 148,
"coverage": 0.949
},
"parameters": {
"total": 312
Documentation Templates
Header File Template
#ifndef MODULE_NAME_H
#define MODULE_NAME_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
#endif
Driver Function Template
Best Practices
Comment Style
- Use brief descriptions starting with verb (Initialize, Configure, Get)
- Document all public API functions completely
- Include @param for every parameter
- Include @return and @retval for return values
- Add @pre/@post for state requirements
Organization
- Group related functions with @defgroup
- Use @ingroup to add items to groups
- Create a @mainpage for navigation
- Link related items with @see and @ref
Maintenance
- Update version numbers in @version tags
- Keep @date current with last modification
- Review and update documentation during code review
- Run Doxygen in CI to catch warnings
Integration with Documentation Systems
Sphinx Integration
.. doxygenfile:: uart_driver.h
:project: firmware
.. doxygenfunction:: uart_init
:project: firmware
MkDocs Integration
plugins:
- mkdoxy:
projects:
firmware:
src-dirs: src include
full-doc: True
References
- Doxygen Manual: https://www.doxygen.nl/manual/
- MISRA C Documentation Guidelines
- Embedded Artistry Documentation Standards
- Linux Kernel Documentation Guidelines
See Also
firmware-api-documentation.js - Documentation generation process
hw-sw-interface-specification.js - Interface specification process
- AG-012: Technical Documentation Agent