Update and test

Native OTA

How firmware is updated after shipment. Partition tables start on board one.

Update and test OTA update ESP32 family

Official path: examples/system/ota/native_ota_example

01 Overview

Pull a new image and switch boot slot.

  • Use when: field bugfix and features.
  • Skip when: the board cannot stay online yet.

02 Hardware

  • Flash must fit two OTA slots (4MB is a comfortable start).
  • Power loss during update is a partition problem.

03 Software flow

1. Table with two OTA slots + selector.

2. Download, verify, set boot partition, reboot.

3. Define rollback: boot the old slot on failure.

4. HTTPS for public internet.

04 Core points

  • OTA is a partition decision, not a later plugin.
  • Custom work: channel, signing, rollback.

中文

升级与产测

Native OTA 远程升级

出货后固件怎么安全更新。分区表从第一块板就要定。

升级与产测 远程升级 ESP32 family

官方路径: examples/system/ota/native_ota_example

01 项目概述

从网络拉新固件并切换启动分区。

  • 适用: 已部署设备修 bug、加功能。
  • 不适用: 还不会稳定联网的板。

02 项目硬件描述

  • Flash 要够双分区(常见 4MB 起更从容)。
  • 升级中掉电要靠分区设计,不是靠运气。

03 项目软件流程描述

1. 分区表含两个 OTA 槽 + 选区。

2. 下载镜像、校验、设启动分区、重启。

3. 回滚策略要在产品里明确:失败起旧区。

4. HTTPS 升级才适合公网。

04 项目核心点

  • OTA 不是后加功能,是分区决策。
  • 可定制: 升级通道、签名校验、失败回滚。