Firmware Configuration Schema Compiler: JSON to Bounded C11
Generate a fixed-size C11 configuration struct, defaults function, validator, and JSON defaults file from one firmware settings schema. The Python compiler keeps device settings in one source of truth and emits static C storage without heap allocation.
Use it when firmware and host-side tools currently duplicate the same setting names, defaults, and value limits.
Install and compile a schema
Requires Python 3.11 or newer. From a repository checkout:
git clone https://github.com/buxerr/firmware-config-compiler.git
cd firmware-config-compiler
python -m pip install .
python -m firmware_config_compiler examples/weather_node.json --out build/generated
The output directory contains firmware_config.h, firmware_config.c, and defaults.json. Include the generated header in a C11 project, call firmware_config_set_defaults, then call firmware_config_validate after your application loads settings from flash or a transport.
Supported setting types
The schema supports bool, int32, uint32, bounded ASCII string, and enum. Numeric settings require min and max; strings reserve an extra byte for the terminating NUL. Invalid identifiers, duplicate fields, unsupported properties, and out-of-range defaults are rejected before output is written.
Check schema compatibility
Compare a schema from your application with its previous version before generating firmware code:
python -m firmware_config_compiler new_schema.json --out build/generated --check-from old_schema.json
Any setting change requires a greater schema_version. The comparison reports added or removed settings and changes to types, ranges, defaults, string lengths, and enum values.
The Python test suite runs with python -m unittest discover -s tests -v. CI also compiles generated code with warnings treated as errors and runs a small C smoke test.
Scope and limitations
This is a settings schema compiler, not a wire protocol, flash-storage driver, JSON parser for embedded targets, or automatic firmware migration engine. The application owns serialization and decides how to migrate values between device versions.
License
MIT. See LICENSE.
Metadata
Release files for firmware-config-compiler 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| firmware_config_compiler-0.1.0.tar.gz | 10.5 kB | With provenance | Details for firmware_config_compiler-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| firmware_config_compiler-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for firmware_config_compiler-0.1.0-py3-none-any.whl |
Total release size: 19.9 kB
Release files / firmware_config_compiler-0.1.0.tar.gz
| Download URL | firmware_config_compiler-0.1.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5110fed4efbc2b5335d9e338fd7a0edd112c659b990ee1e945e02220823183e2
|
|
BLAKE2b-256 checksum How to use checksums |
63c3c5e1cc6bfdcd533bf998940997e1bf1f607598e33561d4ebad806906432a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / firmware_config_compiler-0.1.0-py3-none-any.whl
| Download URL | firmware_config_compiler-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54df2979fbbdebb0bf1674154dddc4269163d78abba87b02a4abb91698b3d92f
|
|
BLAKE2b-256 checksum How to use checksums |
300eb8d1e30d4d828cb0944d31da0abe1212c2c25a63ed6d39d1c871e3540f8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for firmware-config-compiler 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for firmware_config_compiler-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.