装配输入与拒绝规则

配置权威是一份 authored schema-2 TOML 装配。SoC 和 Board 事实保持维护中的 JSON;resolved.json 是输出,不是另一份 authored 输入。CMake 拥有软件依赖。TOML 解析失败绝不回退 Kconfig、cache 变量、schema-1 JSON 或旧生成头。

完整维护输入

完整 Native UART 装配,由生产 resolver 解析。
schema = 2
board = "native_reference"
backend = "native"
clock = "model"
optimization = "Os"

[memory]
main_stack_bytes = 2048
flash_load_limit_bytes = 65536
static_ram_limit_bytes = 32768
libc_heap_bytes = 0

[uart.uart0]
binding = "uart0"
mode = "irq"
baud = 115200

[uart.uart0.rx]
format = "bytes"
capacity = 32

[uart.uart0.irq]
priority = 5

选择

含义与拒绝边界

schema = 2

Authored TOML 生成;未知键拒绝

board

boards/ 的维护中直接子目录;必须恰好选择一个 Board

board_package

相对装配定位的外部 package 路径;与 board 二选一

backend

显式 native、baremetal、freertos 或受支持 threadx 子集

clock

匹配 Board 与 SoC 事实的维护中精确 profile

optimization

维护中的优化/debug/LTO profile;不接受任意编译器覆盖

[memory]

以 byte 记录栈、libc heap、静态 RAM 和 Flash LOAD 预算

[factory]

显式可选 strong ID 和能力元数据

类别实例表

稳定 authored 名称、复核 binding、模式与有界选项

SPI/I2C 器件表

关联已有 controller 的独立 endpoint 身份

[abi]

断言复核 CPU architecture/FPU/float ABI;不能虚构芯片特性

资源检查包括实际 pin/AF、controller、IRQ ceiling、共享 timer/timebase、物理 DMA controller/stream、clock、精确内存域、模式和 endpoint 身份。语法合法的 selector 仍可能因 provider 未实现该路线而拒绝。Resolver 绝不悄悄更换 pin、模式或 clock。

检查并生成

从仓库根目录执行,使用自己拥有的新输出:

python tools/configure/configure.py list-bindings     --assembly tools/configure/assemblies/native-uart.toml
python tools/configure/configure.py check     --assembly tools/configure/assemblies/native-uart.toml
python tools/configure/configure.py explain     --assembly tools/configure/assemblies/native-uart.toml
python tools/configure/configure.py generate     --assembly tools/configure/assemblies/native-uart.toml     --output /tmp/nexus-native-config

check 与 explain 不生成输出。generate 发布一个原子 owned bundle;失败使其 owned 输出失效,不替换无关数据。检查 resolved.json、输入身份、生成的 nexus_config.h、bindings、factory、linker memory 和预算。声明输入变化要求重新解析;不同 Board/backend 组合使用独立 build root。

CPU-only Runtime 使用独立 authored runtime TOML 和共享 CPU resolver。它只生成 Core/Arch/可选 OS 策略,不生成 SoC/Board/startup/factory。不得据此声明完整设备平台。构建合同、接入合同和生产 field model/schema 拥有详细合法字段;编辑器补全不建立硬件能力。