.. _rigs4zephyr_reference_promotion: Promotion ========== A shield can become a rig of one instance — or a small list of shields a rig of several — **with neither a** :term:`rig metadata file` **nor a** :term:`rig content file` **ever written to disk.** This page is the semantics of that grammar: what a promotion target means, what it desugars to, and which forms are refused and why. The authority is ``scripts/rigc/promote.py`` (the desugaring itself) and ``scripts/list_rigs.py`` (the namespace rule cmake's own ``-DRIG=`` resolution runs before promotion is ever reached). :ref:`rigs4zephyr_reference_commands` keeps the command-line surface — which flags accept a promotion target, and how they spell it. This page is what that target *means*. .. contents:: :local: :depth: 1 What promoting a shield means -------------------------------- A :term:`shield template` is *promotable* when its own ``shield.yml`` declares ``template: true``. Naming a promotable shield's own name wherever a rig target is accepted (``-DRIG=``, ``west rigs --explain``, ``west rigs --boards-for``) is the **natural mapping** ``a -> [a]``: one instance, named after the shield itself, with no ``socket:`` unless one is given — the same *unique-by-type* inference an authored rig's own un-socketed instance gets. A bare name is resolved against **both namespaces** — a persisted rig (``boards/rigs//``) and a discoverable, promotable shield — before anything else about the target is read: - a name that is **only** a rig resolves as that rig, unaffected by anything on this page; - a name that is **only** a promotable shield resolves as a promotion; - a name that is **neither** does not resolve at all; - a name that is **both** is refused outright — ``'' names both a rig () and a shield () -- rename one; a name that is both is ambiguous by construction, never guessed between.`` A shield that is *discoverable* (``shield.yml`` exists) but not *promotable* (no ``template: true``, or no ``shield.yml`` at all) is named in the refusal along with which of the two it is missing. The target grammar ---------------------- .. code-block:: text := [;...] := [@][/][:...] := socket=