Skip to content

Support for hardware qualifiers (Flash + PSRAM) in manifests#690

Open
daggerrz wants to merge 3 commits into
esphome:mainfrom
magwled:feature/more-hardware-qualifiers
Open

Support for hardware qualifiers (Flash + PSRAM) in manifests#690
daggerrz wants to merge 3 commits into
esphome:mainfrom
magwled:feature/more-hardware-qualifiers

Conversation

@daggerrz
Copy link
Copy Markdown

Allow for more fine grained targeting to sepcific hardware. The ESP32-S3 modules, for example, comes with several configurations of flash and PSRAM and this PR makes it possible to target them individually.

Summary

  • Add flashSizeMB and psramSizeMB optional qualifiers to manifest builds, enabling firmware targeting by hardware variant within the same chip family
  • Detect flash size and PSRAM on connect and select the most specific matching build (most-qualifiers-wins, with fallback to unqualified builds)
  • Add component that reads and displays chip, flash, PSRAM, crystal frequency, and MAC address without flashing
  • Validate and strip invalid qualifier values at manifest load time
  • Document hardware qualifiers and diagnostics button in README and website

Manifest example

  {
    "name": "My Firmware",
    "version": "1.0.0",
    "builds": [
      {
        "chipFamily": "ESP32-S3",
        "flashSizeMB": 16,
        "psramSizeMB": 8,
        "parts": [{ "path": "s3-16mb-8psram.bin", "offset": 0 }]
      },
      {
        "chipFamily": "ESP32-S3",
        "flashSizeMB": 4,
        "parts": [{ "path": "s3-4mb.bin", "offset": 0 }]
      },
      {
        "chipFamily": "ESP32-S3",
        "parts": [{ "path": "s3-generic.bin", "offset": 0 }]
      }
    ]
  }

A device with an ESP32-S3, 16 MB flash, and 8 MB PSRAM gets the first build. A 4 MB device gets the second. Any other ESP32-S3 falls back to the third.

@daggerrz daggerrz force-pushed the feature/more-hardware-qualifiers branch from e7cec8c to 673b428 Compare March 15, 2026 00:09
@Jason2866
Copy link
Copy Markdown
Contributor

The approach can not work. The gathered infos are incomplete. There is no Info about PSRAM Type QIO / OPI furthermore when PSRAM is not embedded it will not announced at all. There is simply no info about stored anywhere.
The only really working and correct info is the flash size.

@netmindz
Copy link
Copy Markdown

netmindz commented May 2, 2026

Which hardware did you test against @daggerrz ?

@daggerrz
Copy link
Copy Markdown
Author

daggerrz commented May 2, 2026

It definitely works for detecting the difference between ESP32-S3 modules with and without embedded PSRAM, which is one of the common modules that are hard for users of WLED to choose between. I have also tested half a dozen other board with Espressif modules that were detected correctly. I can put together a complete matrix of the hardware tested, if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants