Resource measurements

The Cortex-M measurements used the former Zephyr validation sample, ZXSD_NO_HEAP=y, GCC -Os, and the default v0.13 limits. The native_sim CI report builds samples/zephyr/xsd-validation, whose prj.conf applies the limits derived from its schema, so its figures are lower than with the defaults. Run tools/measure_resources.py on the resulting object, ELF, and .su files to regenerate machine-readable results.

Target

Generated code

libzxsd flash

libzxsd static RAM

Complete image flash

Complete image static RAM

Largest zxsd stack frame

Peak zxsd heap

NUCLEO-F401RE, Cortex-M4

805 B

16,770 B

0 B

46,072 B

9,179 B

2,120 B

0 B

native_sim

Generated by Linux CI

See native-sim-resource-report artifact

—

—

—

—

0 B

The Cortex-M values were measured on Zephyr 4.5.0-rc1 with Zephyr SDK 1.0.0. native_sim cannot be built on macOS because Zephyr’s POSIX architecture explicitly requires Linux. The Zephyr CI job builds it with stack-usage data, publishes the complete JSON measurement as native-sim-resource-report, and copies it into the workflow summary. Static stack-frame measurement does not include the multiplication caused by recursive XML/schema depth; configure ZXSD_MAX_DEPTH according to the application stack budget.

Streaming content-model pool

Nested sequences and choices use ZXSD_STREAM_MODEL_CAPACITY continuation/frontier slots shared by all open elements. The default 128 slots add 128 * sizeof(zxsd_stream_model_node_t) bytes per stream, plus pool metadata, independent of XML depth and repetition count. Profiles generated with --zephyr-config disable this pool for flat-only schemas, such as the weather sample schemas. With the pool enabled, nested models also work with child-history capacity 1. Pool exhaustion or excessive epsilon work reports a limit error; tune and test that budget instead of allocating history proportional to the response size.