{
  "kind": "合成输入与数学模型输出，非设备实测",
  "article": "https://qifudev.com/article/ota-64k-alignment-tail/",
  "tool": "https://qifudev.com/tools/ota-budget/",
  "formula": "单槽 = floor(应用区域 / 2 / 64KiB) × 64KiB；所需 = ceil(镜像KiB × (100 + 余量%)/100)",
  "inputs": [
    {
      "name": "可用于两个应用槽的连续区域",
      "key": "regionKiB",
      "value": 6100,
      "unit": "KiB"
    },
    {
      "name": "最终待写入应用镜像大小",
      "key": "imageKiB",
      "value": 2800,
      "unit": "KiB"
    },
    {
      "name": "规划增长余量",
      "key": "marginPercent",
      "value": 0,
      "unit": "%"
    }
  ],
  "outputs": [
    {
      "name": "每个对齐后的应用槽",
      "key": "slotKiB",
      "value": 3008,
      "unit": "KiB"
    },
    {
      "name": "含增长预留的镜像预算",
      "key": "requiredKiB",
      "value": 2800,
      "unit": "KiB"
    },
    {
      "name": "单槽剩余预算",
      "key": "headroomKiB",
      "value": 208,
      "unit": "KiB"
    },
    {
      "name": "区域内未分配尾部",
      "key": "unusedKiB",
      "value": 84,
      "unit": "KiB"
    }
  ],
  "warnings": [],
  "assumptions": "不生成可烧录分区表，不预算factory第三槽，不验证实际偏移或安全启动签名附加空间。应输入最终实际写入镜像大小，并通过idf.py partition-table与构建输出核对。",
  "source": {
    "label": "乐鑫分区表：应用分区与对齐",
    "url": "https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/partition-tables.html"
  },
  "measured": {
    "device": null,
    "firmware": null,
    "environment": null,
    "instrument": null,
    "result": null,
    "verdict": null
  }
}
