build: move to pioarduino 55.03.312 (Arduino 3.3.12, ESP-IDF 5.5)

IDF 4.4 gets no more security fixes, and the planned RMT radio needs
IDF 5's RMT driver.  See docs/adr/0003-pioarduino-idf55.md.

- Every env on one pinned pioarduino release.  C6 drops its own
  library list and flags but stays a debug build on huge_app.
- Release envs build at CORE_DEBUG_LEVEL=2 so the ESP32 image fits its
  1.5 MB OTA slot (17 KB free); debug envs stay at 3.
- Drop the C3: its image is 76.5 KB over the OTA slot on IDF 5.5.
- CI installs pioarduino's Core and checks firmware.bin against the app
  partition, failing under 8 KB free.  PlatformIO's "Flash:" figure
  reads ~45 KB low and passed a C3 image that doesn't fit.
- esp_task_wdt_reconfigure(): on 3.x the core already starts the watchdog
  and esp_task_wdt_init() fails, so the C6 build kept the 5 s default.
- An updated firmware is kept only once it has run 60 s with the
  network up; a reset before then rolls back to the previous one.
- ETH.begin() takes the 3.x argument order; Arduino 2.x branches gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-19 22:05:12 +02:00
parent e1a62fe5be
commit a1622e652d
13 changed files with 152 additions and 59 deletions

View file

@ -18,7 +18,6 @@
// progress (see LogLockPolicy.h).
#include <Arduino.h>
#include <stdarg.h>
#include "esp_idf_version.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/task.h"
@ -41,19 +40,12 @@ static volatile TaskHandle_t logOwner = nullptr;
// line takes about 20ms at 115200 baud.
#define LOG_LOCK_WAIT_MS 20
#if ESP_IDF_VERSION_MAJOR >= 5
#define taskOnCore(core) xTaskGetCurrentTaskHandleForCore(core)
#define taskCore(task) xTaskGetCoreID(task)
#else
#define taskOnCore(core) xTaskGetCurrentTaskHandleForCPU(core)
#define taskCore(task) xTaskGetAffinity(task)
#endif
static LogHolder logHolder(TaskHandle_t owner) {
if(!owner) return LogHolder::unknown;
for(BaseType_t core = 0; core < portNUM_PROCESSORS; core++)
if(taskOnCore(core) == owner) return LogHolder::running;
if(xTaskGetCurrentTaskHandleForCore(core) == owner) return LogHolder::running;
// A task pinned elsewhere only runs once whatever preempted it there is done.
const BaseType_t core = taskCore(owner);
const BaseType_t core = xTaskGetCoreID(owner);
if(core == tskNO_AFFINITY || core == xPortGetCoreID()) return LogHolder::preemptedHere;
return LogHolder::preemptedElsewhere;
}