CLUTGen
Generates calibrated lookup tables at build time to turn raw ADC readings into physical units.
- Follows branch
zephyr: eachwest updatewill get its latest commits. To stay on one version, it is recommended to use a release tag.
Install
# From the workspace root
curl -fsSL https://kartben.github.io/windrose/m/clutgen.yaml \
-o zephyr/submanifests/clutgen.yaml
west update clutgen
west packages -m clutgen pip --install
# From the workspace root
Invoke-WebRequest https://kartben.github.io/windrose/m/clutgen.yaml `
-OutFile zephyr/submanifests/clutgen.yaml
west update clutgen
west packages -m clutgen pip --install
- name: clutgen url: https://github.com/wkhadgar/clutgen-zephyr revision: zephyr path: modules/tools/clutgen submodules: true
Add to projects in your west.yml, then run west update clutgen and west packages -m clutgen pip --install.
Details
- Revision
- zephyr
- License
- Apache-2.0
- Maintainers
- @wkhadgar
- Last commit
- 7 mo ago
- Includes
- Python requirements
About
CLUTGen automates the creation of Look-Up Tables for embedded systems, converting raw ADC readings into calibrated physical units such as temperature, pressure, or distance.
Given a set of calibration samples, CLUTGen fits an interpolation curve and generates a production-ready .c/.h pair with the full LUT precomputed for every possible ADC reading. At runtime, conversion is a single array index operation, so you can trade costly RAM operations from math.h and other similar libraries for a constant and predictable ROM cost.
This Zephyr module integrates CLUTGen directly into the west build system. LUT generation runs at CMake configure time and the generated files are automatically linked into the application.