Stop expanding macros. Stop guessing values.
👉 Hover any C/C++ constant → see the final computed value instantly
No build. No debug. No navigation.
Write this:
#define RPM 1000
#define SPEED (RPM * 0.10472)You instantly see:
#define SPEED (RPM * 0.10472) ← 104.72✅ No compile
✅ No debugger
✅ No manual calculation
👉 What you see = what your firmware computes
| File | Screenshot |
|---|---|
| Inside C code | ![]() |
| Inside formulas*.yaml file | ![]() |
| Before | ![]() |
| After | ![]() |
| Header file generation |
|---|
![]() |
| Quick menu |
|---|
![]() |
Firmware is not hard because of logic — it's hard because values are hidden.
- Macros span multiple files
- Constants depend on chains
- Formulas live in Excel or docs
- Units and scaling are implicit
👉 Understanding one value = navigating half the project
CalcDocs removes that friction completely.
- Inline previews for macros and constants
- Hover with resolved numeric values
- CodeLens summaries directly in code
- Decimal + hex representation
- Define formulas in
formulas*.yaml - See results directly in C/C++
- No duplication, no drift
- Unit consistency checks
- Overflow detection
- Mismatch diagnostics (YAML vs C)
- clangd integration (optional, high accuracy)
- IntelliSense-compatible (no conflicts)
- Internal parser fallback (always works)
- Optimized for large codebases
CalcDocs combines 3 things:
- Reads your C/C++ code (macros, constants)
- Evaluates expressions safely
- Shows results inline in VS Code
Optional:
- Uses clangd for deeper analysis
- Syncs with YAML formulas
👉 No configuration required to start
Define formulas once:
power:
formula: vin * current
unit: WUse them everywhere.
CalcDocs:
- evaluates them
- links them to C/C++
- shows results inline
👉 Your formulas become live and synchronized
#define VIN 24
#define CURRENT 2
#define POWER (VIN * CURRENT)CalcDocs shows:
#define POWER (VIN * CURRENT) ← 48W- Install the extension
- Open a C/C++ file
- Hover any value
✅ Done
No more jumping across headers to resolve macros
See wrong values before flashing your MCU
Formulas stay aligned with firmware
Know values before runtime
- Not a compiler
- Not a debugger
- Not a full static analyzer
👉 It focuses on one thing:
making numeric logic visible
Works best with:
- clangd (recommended) → better symbols & accuracy
- C/C++ (ms-vscode.cpptools)
- CMake Tools
CalcDocs integrates without conflicts.
- Full macro expansion (including chained expressions)
- Conditional macro awareness (
#if,#ifdef, etc.) - CSV/table lookups inside YAML formulas
- Header generation (
macro_generate.h) - Inline calculations inside comments
- LRU cache for large projects
- Hybrid symbol resolution (clangd + fallback parser)
If CalcDocs saves you time:
-
⭐ Leave a review (this helps a lot)
https://marketplace.visualstudio.com/items?itemName=convergo-dev.calcdocs-vscode-extension
- Multi-workspace support
- Better visualization (graphs, relationships)
- Performance improvements for huge projects
- Export values to CSV/JSON
- Extended unit conversion
- Cortex-Debug integration
- AI-assisted validation
Full documentation available on GitHub:
- 👉 Getting Started
- 👉 Formula YAML Guide
- 👉 Real Use Cases
- 👉 Features Overview
- 👉 Configuration
- 👉 Architecture
- 👉 Limitations
- 👉 Contributing
- 👉 Inline Calculations
Spreadsheets hide logic. Code hides values.
CalcDocs reveals both.





