mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2026-03-14 06:22:50 +03:00
11 KiB
11 KiB
ESP-IDF v5.5 Migration Remediation Impacts
Date: 2026-02-11
Branch: refactoring
Scope: Container-first migration and iterative build remediation on ESP-IDF v5.5 baseline.
Purpose
This document records the impacts that have already been remediated during the migration to the new container/IDF baseline.
It focuses on remediation outcomes (what broke, what was fixed, and where).
Remediated Impact Areas
1) Container/CI baseline alignment
- Impact:
- Firmware and UI workflows were not aligned on a single ESP-IDF/container baseline.
- Mitigation:
- Unified workflows and docker tooling toward the IDF v5.5 container baseline.
- Updated contributor guidance to container-first while preserving native setup path.
- Primary files:
.github/workflows/Platform_build.yml.github/workflows/CrossBuild.yml.github/workflows/esp-idf-v4.3-build.yml.github/workflows/web_deploy.ymlDockerfiledocker/build_tools.pyREADME.md
2) Component dependency and CMake modernization
- Impact:
- Legacy component dependency assumptions caused configure/build incompatibilities on IDF 5.5.
- Mitigation:
- Added/updated component requirements and removed obsolete dependencies.
- Updated component-level
REQUIRES/PRIV_REQUIRESfor headers now split into dedicated components.
- Primary files:
main/idf_component.ymlmain/CMakeLists.txtcomponents/squeezelite/CMakeLists.txtcomponents/services/CMakeLists.txtcomponents/metrics/CMakeLists.txtcomponents/platform_console/CMakeLists.txtcomponents/platform_console/app_recovery/CMakeLists.txtcomponents/esp_http_server/CMakeLists.txt
3) Ethernet stack migration (SPI + RMII + netif integration)
- Impact:
- IDF 5.5 changed Ethernet init/config APIs and SPI-Ethernet setup flow.
- Mitigation:
- Updated SPI Ethernet config macros to new signatures.
- Migrated RMII MAC/PHY constructor usage.
- Updated
esp_macusage and timer callback signatures in Ethernet manager. - Removed obsolete SPI device attach path where IDF now handles internals in driver flow.
- Primary files:
components/wifi-manager/network_driver_W5500.ccomponents/wifi-manager/network_driver_DM9051.ccomponents/wifi-manager/network_driver_LAN8720.ccomponents/wifi-manager/network_ethernet.ccomponents/wifi-manager/network_services.hcomponents/wifi-manager/network_manager.hcomponents/raop/util.ccomponents/squeezelite-ota/protocol_examples_common.hcomponents/tools/tcpip_adapter_compat.h
4) FreeRTOS legacy API/type removal
- Impact:
- Build failures due to removed/deprecated compatibility symbols (
portTICK_RATE_MS, legacy queue/tick types, callback signatures).
- Build failures due to removed/deprecated compatibility symbols (
- Mitigation:
- Replaced
portTICK_RATE_MSwithportTICK_PERIOD_MS. - Updated queue/tick types and timer callback prototypes to current FreeRTOS API.
- Replaced
- Primary files:
components/services/led.ccomponents/services/buttons.ccomponents/services/battery.ccomponents/services/audio_controls.ccomponents/services/infrared.ccomponents/services/gpio_exp.ccomponents/platform_console/cmd_i2ctools.ccomponents/platform_console/cmd_wifi.ccomponents/services/services.ccomponents/driver_bt/bt_app_core.ccomponents/driver_bt/bt_app_source.c
5) GPIO/pad selection API updates
- Impact:
- Legacy GPIO pad selection symbols produced missing symbol/implicit declaration failures on IDF 5.5.
- Mitigation:
- Migrated to
esp_rom_gpio_pad_select_gpio(...)path and aligned wrapper macro behavior. - Added explicit include coverage where needed.
- Migrated to
- Primary files:
components/services/gpio_exp.hcomponents/services/gpio_exp.ccomponents/services/services.ccomponents/squeezelite/output_i2s.ccomponents/display/SSD1675.c
6) Strict compiler checks and type-width corrections (-Werror)
- Impact:
- New toolchain and stricter flags surfaced format-string and pointer-width mismatches.
- Mitigation:
- Fixed
printf/snprintf/sscanfformat mismatches. - Switched to width-safe intermediates/casts and correct callback argument types.
- Corrected size-type usage in SPIFFS info reporting and metadata parsing.
- Fixed
- Primary files:
components/services/monitor.ccomponents/tools/tools_spiffs_utils.cppcomponents/tools/tools.ccomponents/squeezelite/alac.ccomponents/squeezelite/helix-aac.ccomponents/squeezelite/mad.ccomponents/squeezelite/decode_external.ccomponents/raop/raop.c(partial type-format cleanup)
7) Header hygiene and removed transitive includes
- Impact:
- IDF 5.5 no longer transitively includes some headers (for example MAC APIs), and some internal/private headers are no longer valid.
- Mitigation:
- Added explicit includes where required (
esp_mac.h, etc.). - Removed stale/internal header use in multiple components.
- Added explicit includes where required (
- Primary files:
components/wifi-manager/network_ethernet.ccomponents/tools/tools.ccomponents/squeezelite/embedded.ccomponents/tools/bootstate.cppcomponents/services/accessors.ccomponents/telnet/telnet.ccomponents/services/messaging.ccomponents/tools/trace.c
8) Protobuf/Nanopb tooling stability in container
- Impact:
- Generator and plugin execution flow had environment/shebang/version conflicts in the new container baseline.
- Mitigation:
- Fixed Python shebangs for container runtime.
- Improved protobuf package checks and version constraints.
- Corrected nanopb/protoc lookup behavior to prefer valid compiler binary.
- Primary files:
tools/protoc_utils/check_python_packages.pytools/protoc_utils/ProtocParser.pytools/protoc_utils/parse_bin.pytools/protoc_utils/generate_bin.pytools/protoc_utils/protoc-gen-defaults.pytools/protoc_utils/protoc-gen-dump.pytools/protoc_utils/protoc-gen-json.pytools/protoc_utils/protoc-gen-options.pycomponents/spotify/cspot/bell/external/nanopb/extra/FindNanopb.cmake
9) SPIFFS/path and partition constraints
- Impact:
- Asset/image generation and partition validation failed under new checks.
- Mitigation:
- Increased SPIFFS object-name length where required.
- Updated partition flags to satisfy stricter partition-table checks.
- Primary files:
sdkconfigbuild-scripts/I2S-4MFlash-sdkconfig.defaultsbuild-scripts/Muse-sdkconfig.defaultsbuild-scripts/SqueezeAmp-sdkconfig.defaultspartitions.csv
10) Additional compile/runtime compatibility fixes
- Impact:
- Multiple compile breaks from deprecated/changed API surfaces and C/C++ correctness issues.
- Mitigation:
- Added missing includes.
- Updated legacy flash size call path.
- Fixed string and initialization issues and allocator mismatch in ESP-DSP sources.
- Added HTTP redirect event handling for OTA flow.
- Primary files:
components/platform_console/cmd_system.ccomponents/platform_console/app_recovery/recovery.ccomponents/squeezelite-ota/squeezelite-ota.ccomponents/squeezelite-ota/squeezelite-ota.hcomponents/spotify/cspot/bell/main/io/URLParser.cppcomponents/metrics/Batch.hcomponents/esp-dsp/modules/support/snr/float/dsps_snr_f32.cppcomponents/esp-dsp/modules/support/sfdr/float/dsps_sfdr_f32.cppcomponents/esp-dsp/modules/support/view/dsps_view.cpp
11) Connectivity and service-layer compatibility
- Impact:
- Compatibility gaps around network utility functions and handler glue code.
- Mitigation:
- Added tcpip adapter compatibility shims and network helper updates.
- Updated network/address conversion helper usage for current lwIP/IDF behavior.
- Primary files:
components/tools/tcpip_adapter_compat.hcomponents/wifi-manager/http_server_handlers.ccomponents/wifi-manager/network_manager.ccomponents/wifi-manager/network_services.h
12) RAOP mbedTLS v3 migration + late-stage build hardening
- Impact:
- RAOP RSA flow used legacy mbedTLS APIs removed/changed in IDF 5.5.
- Additional strict-format and
-fno-common/linkage issues appeared after earlier compile blockers were removed.
- Mitigation:
- Migrated RAOP RSA key parse/sign/decrypt flow to mbedTLS v3-compatible APIs and added RNG callback/error handling.
- Corrected display time formatting width mismatches.
- Updated Wi-Fi auth-mode switch mapping for new IDF enums and fixed RSSI format typing.
- Fixed multiple-definition issues by converting header-level globals to
externdeclarations and adding single C definitions. - Resolved duplicate
logleveldefinition in squeezelite decode path.
- Primary files:
components/raop/raop.ccomponents/display/display.ccomponents/platform_config/WifiList.cppcomponents/squeezelite/embedded.hcomponents/squeezelite/slimproto.ccomponents/display/display.hcomponents/display/core/gds_font.hcomponents/squeezelite/decode.c
Current Status
- Build progress has moved significantly forward versus initial migration state.
- RAOP mbedTLS migration blocker in
components/raop/raop.cis remediated and RAOP now compiles/links. - Most broad migration impacts above are remediated.
- Remaining blockers have moved to final link/image stages:
- unresolved symbol groups in final
squeezelite.elflink (network/PPP/mbedTLS TLS13/WPS/BT/RTC symbol families) - binary/footprint constraints (IRAM pressure hint and image-size pressure hint)
recovery.binpartition overflow warning (recoverypartition too small for current binary)
- unresolved symbol groups in final
- Latest investigated logs:
build/log/idf_py_stderr_output_68994build/log/idf_py_stdout_output_68994
Footprint Net-Gain Ledger (Recovery App)
Partition policy note: app partition sizes are fixed; this ledger tracks binary reduction only.
Baseline reference (handover):
recovery.bin:0x149a60recoverypartition:0x130000- overflow:
0x19a60
Measured changes (now moved to a recovery-only profile):
- Disable mbedTLS certificate bundle in recovery profile
# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE is not set- observed
recovery.bin:0x149ae0(intermediate run)
- Disable optional Wi-Fi auth feature families in recovery profile
# CONFIG_ESP_WIFI_ENABLE_WPA3_SAE is not set# CONFIG_ESP_WIFI_ENABLE_WPA3_OWE_STA is not set# CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT is not set- observed
recovery.bin:0x142e20
Profile split applied:
- shared
sdkconfigrestored for full app compatibility - recovery trims moved to
sdkconfig.recovery.defaults - helper script added:
build-scripts/build_recovery_size.sh
Net result vs baseline:
recovery.bindelta:-0x6c40bytes (-27,712)- overflow delta:
-0x6c40bytes (-27,712) - current overflow:
0x12e20
Latest size snapshot (build/recovery.map):
- Total image size:
1,322,415bytes - Flash code:
961,016 - Flash rodata (+appdesc):
237,152 - IRAM:
98,647(75.26%) - DRAM:
33,748(27.09%)
Notes for Contributors
- This file documents remediated impacts only.
- For open blockers, refer to latest in-container build logs under:
build/log/idf_py_stderr_output_*build/log/idf_py_stdout_output_*
- For recovery-only footprint experiments (without changing shared
sdkconfig), use:build-scripts/build_recovery_size.sh [build-dir]