feat(v2): OTA firmware update over Ethernet

POST /ota writes the image to the idle app slot and reboots; GET /ota
reports the running slot. App rollback is enabled, and a new image confirms
itself after 10 s. Adds make ota HOST=<ip>, tools/ota.py and the led-tool
--ota update.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Sonnet 5.5 committed 2026-11-01 00:22:55 +13:00
1 parent 8d78af1246
commit 6c16998691
8 files changed
+212 -4

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#pragma once
#include "esp_err.h"
#include "esp_http_server.h"
// Register POST /ota (raw firmware .bin as the body) and GET /ota (running image info).
// A good upload is written to the idle app slot, becomes the boot image and the board reboots.
esp_err_t ota_register(httpd_handle_t server);
// Call once at boot: confirms the running image after it has stayed up for a few seconds, so
// a new image that crashes on start rolls back to the previous one.
void ota_confirm_later(void);