Skip to content

Shared Contracts

Host tools and tag firmware meet at a small set of contracts. A change to any of them changes both sides, and usually stored data as well, so each has one home here or a single link from here. The code stays where it is: proto/ and include/ are not moved.

Contract Code Documented in
Monitor protocol (configuration, status, download RPC over SWD) proto/tag.proto, include/monitor.h monitor-interface.md
Protobuf schema and nanopb generation proto/ proto README
Tag configuration: the Config message, which fields each tag supports (its default config), and fields with tag-specific meanings proto/tagdata.proto, embedded/proto-c/*-proto-c/default-config.json, configshape.h configuration-model.md
Packed binary log records include/imutag_log_format.h, prestag_log_format.h, uiuctag_log_format.h binary-datalogs.md and the Doxygen in each header
External-flash loader service block include/loader_service.h loader runtime, SWD capture library
SQLite download schema host/libraries/tagcore/sqlitelog user reference (authoritative), writer internals

The offline rebuild (tag-rebuild) decodes captured tag memory on the host, so firmware structs are a contract too: the firmware _Static_asserts every struct offset the decoders in host/libraries/tagcore/recovery/capturesource.cc read. When one fires, see Capturing a tag.

Open work on these contracts is in the shared contracts worklist.