Skip to content

Release bin strategy #5463

Open
Open

Description

@netmindz

I would like to float an idea for a change in strategy to our release bins

Given it looks like the web installer is about to get the ability to detect psram and flash size I think it's an appropriate time to review our release bins

The previous approach seems to have been a mix between throwing in as much as possible, but then also keeping inside the limit imposed by our partition table and the rather generous filesystem partition (that goes massively underused in many cases I suspect)

However when it comes to usermods, other than AR they are not included, even if they are potentially quite broad if their appeal and minimal in flash usage

This means users might miss out on functionality and requires the use of custom builds (and the issues when it comes to upgrade)

What I was thinking is that for users with hardware with more than 4MB and/or PSRAM we include more in the build, otherwise those extra resources are just wasted

If for some reason you want a minimalist build, despite your hardware, these power users can still do a smaller build (or just ota to the 4MB image)

Activity

  1. DedeHai commented on Mar 30, 2026

    @DedeHai
    Collaborator

    The previous approach seems to have been a mix between throwing in as much as possible, but then also keeping inside the limit imposed by our partition table and the rather generous filesystem partition (that goes massively underused in many cases I suspect)

    the file system is adequate IMHO: if you run a 2D setup a few animated gifs will eat it up quickly - or have 100+ presets with many segments (not actually that uncommon as users use presets and segments in elaborate schemes). Given the possibilities with the new pixelforge tools - especially paint - I expect (a lot) more users to run out of FS space with 16.0.

    adding more default usermods is certainly on the table - Quinled already has the multi-relay UM added. Internal temperature would be another one or the autosave. even in the 4M builds.
    as for 8M builds I think they already have additional things compiled in - or was that in MM? But sure, making use of the available flash makes sense, I would not pack in too many if they are not useful for many people.

  2. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    as for 8M builds I think they already have additional things compiled in - or was that in MM?

    If you think about additional usermods - yes that was in MM. Another way to make use of the extra Flash on 8MB/16MB boards is to build the firmware with "-O2" (optimize for speed). This increases size by a few 100kb; it also creates a nice speedup - up to 30% in some cases.

    [Speed_Flags]
    build_unflags = -Os ;; to disable standard optimization for small size
    build_flags =
    -O2 ;; optimize for speed
    -free -fipa-pta ;; very useful, too
    ;;-fsingle-precision-constant ;; makes all floating point literals "float" (default is "double")
    ;;-funsafe-math-optimizations ;; less dangerous than -ffast-math; still allows the compiler to exploit FMA and reciprocals (up to 10% faster on -S3)
    # Important: we need to explicitly switch off some "-O2" optimizations
    -fno-jump-tables -fno-tree-switch-conversion ;; needed - firmware may crash otherwise
    -freorder-blocks -Wwrite-strings -fstrict-volatile-bitfields ;; needed - recommended by espressif

    Edit: in MM, -O2 is the default for boards with >= 8MB flash since some time already, so I can confirm "it does work this way" :-)

  3. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    The 8MB partitions file could use some optimization - currently its 1.95M program, 4M LittleFs. The 16MB partitions file has 3.2MB for program, which is the max possible without risking slow-down due to larger address space.

    I think we can safely modify the 8MB partitioning to have some more "headroom" for program,
    like 2.2MB program => 3.5MB LittleFS.

    This will be "invisible" to OTA updaters, unless we actually hit the 1.9MB program size limit of the current partitions file.

  4. willmmiles commented on Mar 30, 2026

    @willmmiles
    Member

    I think it's a good idea to start building up standard module sets for inclusion in each build. I have no objections to expanding the set of modules in standard builds, particularly for larger flash systems. In fact, I'd like to suggest that we split the "usermods" folder into "core_mods" and "usermods" -- no difference in functionality, but "core_mods" are the ones we actively maintain and include in standard builds; while "usermods" are those contributed by others (or put another way: the ones we aren't testing...).

    In the long term I'd also like to aim towards moving more of our optional integrations in to modules -- essentially, anywhere we've got #ifndef WLED_DISABLE_X is something that could be a module that could be switched in and out instead...

    I would very much like to import the Usermod::name/enable and per-usermod settings page logic from MM as part of this process.

    Re partitions: @DedeHai is correct that many new features can use up the "data" partition really fast. Graphics assets are big! I don't have a strong opinion on how to strike a balance between code partitions and data partitions -- whatever you guys think is best. (I agree that for 16MB+ devices, reserving the maximum possible size for code makes sense.) I'm not too too worried about changing our minds there -- a good module system will let us build "minimal" and "expanded" flavours to support old and new partition sizes, and if it comes to it, we can document an upgrade path for repartitioning. (It's technically possible to repartition OTA; we'd want a "total data partition backup" feature to close the loop.)


    For my obligatory pie-in-the-sky plan, what I really want is runtime dynamic linking, so usermods can be placed on the data partition. This is technically possible.

  5. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    Yes the "standard usermods set" idea makes sense. There is one problem that we would need to address: "pin stealing" by usermods (includes premature initialisation of I2C and SPI busses, too).

    Even an inactive usermod allocates PINs (pinmanager) during usermod::setup(). If we add some more usermods to the standard build, this will become a problem. User who "just used the standard build" will be surprised when 4 pins are allocated to the rotary usermods, but that usermod is not enabled. This is even true for audioreactive, because "allocate all usermod PINs in setup()" was kind of a dogma for a long time.

    I think the problem can be addressed, but it means we need to weed through our favourite "curated default" usermods collection, and make sure that none of them allocates pins when not enabled.

  6. willmmiles commented on Mar 30, 2026

    @willmmiles
    Member

    I think the problem can be addressed, but it means we need to weed through our favourite "curated default" usermods collection, and make sure that none of them allocates pins when not enabled.

    Right - historically usermods could reasonably assume that if they were included at all, that meant they should bring along a full default configuration and assume that they're expected to be used. Core mods can't take that assumption.

    One tricky bit is that the meaning of "enabled" is pulling double duty here. There's "enabled" like "whether or not to run any code from this module at all", vs "enabled" like "this module has a complete configuration and is ready to actually do work". Thinking it through, I'm less confident that a standard "enable" flag implemented at the top level makes sense -- "unconfigured" states might be a cleaner design. Eg. the rotary usermod could come up with all the pins set to "no pin", and it wakes up and starts working once the pins are assigned. Since "no pin" is a valid selector, it's going to have to handle that internally anyways.

  7. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    "unconfigured" states might be a cleaner design. Eg. the rotary usermod could come up with all the pins set to "no pin",

    makes sense - in WLED-MM some usermods are delivered "unconfigured" (=cannot enable before valid PINs are set by users) exactly to work around the "pin stealing" problem in some cases. Some users were actually not so happy about it, because they loved that a UM comes with default PINs - apparently this reduces the headache of "OMG which pins should I chose, there are so many" 😉

  8. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    PS: this situation also led to another divergence between MM and upstream WLED. In MM, the I2C device is not doing its Wire.Begin() at startup, while in upstream Wire.Begin() will run when I2C pins are valid, not matter if the unit is needed or not.

    In MM we've split the procedure - I2C pins are configured globally, but any "module" that wants to use I2C has to call pinManager::joinWire() to really kick-off the I2C bus. I think its the better solution:

    • I2C unit is not started unless its needed
    • delayed start means that I2C can often be re-configured by the user without reboot (there is no Wire.End() in older arduino)
    • conflicting I2C startup by several usermods can be avoided

    Edit: I ran into another dogma at that time - "pin manager is just for book-keeping". So this idea stayed in MM only.

  9. willmmiles commented on Mar 30, 2026

    @willmmiles
    Member

    We're well in to the resource management discussion now!

    I concur on all counts (except maybe the naming scheme!). Modules using shared resources like Wire will need to requisition them via the resource manager, and the actual initialization of those resources must be handled by the resource management framework.

    It does feel a little dirty to pack that under pinManager though. Time to start bikeshedding on a new namespace.

  10. DedeHai commented on Mar 30, 2026

    @DedeHai
    Collaborator

    sounds like you are talking about resource manager again ;) edit: @willmmiles beat me to it
    my WIP on new bus driver can allocate:

    • GDMA channels
    • SPI
    • UART
    • I2S
      maybe more in the future. need to define a priority or is it first come first serve?
  11. willmmiles commented on Mar 30, 2026

    @willmmiles
    Member

    maybe more in the future.

    RMT channels for sure, we aren't currently leveraging them for IR in, but we could be. LEDCs? Probably we just want to go down the ESP32 peripheral list.

    need to define a priority or is it first come first serve?

    Excellent question. For a first cut, first-come-first-served and leaving conflict handling to the module is probably the place to start (ie. complain to the user to fix their config). I don't think we'll get much value from trying to do some kind of smarter allocation -- there aren't many cases where there are meaningful direct alternatives. Digital bus drivers are maybe the only one, and even then the alternatives aren't always truly substitutable (RMTs can have unique timing parameters for each channel; parallel I2S/SPI have to agree on a base clock; and bit-banging is always possible but slow).

  12. 1 remaining item

  13. netmindz commented on Mar 30, 2026

    @netmindz
    MemberAuthor

    Sounds like we are broadly in favour or something along the lines of the propsal.

    So, is this 16.0 or 16.1 or 17.x change?

  14. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    I guess its too short time for 0.16:

    • we need to pick some usermods that we'll add to >= 8MB builds by default
    • check that none of them does "pin steeling" when not enabled
    • find a way to prevent steeling - first step is to not run usermod::setup() when the usermod is disabled, but it may still break some of them
    • building a new resource manager takes some time (however we could start without it)

    independent from UMs, I'll make a PR for changing the 8MB program size, so we can converge on a good default size.

  15. softhack007 commented on Mar 30, 2026

    @softhack007
    Member

    side-topic:

    after some "excursion" with the rabbit to looks at @netmindz draft PR's for matter and zigbee support - Wow these frameworks add a huge amount to flash program size. Maybe that's one of the reasons that 8MB and 16MB boards are becoming more popular.

    • Zigbee with 4MB Flash is almost impossible - removing OTA support in favour of ZigBee might be the only option for these boards. 8MB boards (especially -C6 and -C5) should be able to include the ZigBee stack without removing OTA.
      --> 300-500 kb program sized increase
    • MATTER is a real beast. No chance to have it on 4MB, not even if we try to import the Tasmota implementation (which seems to have serious limitations, like google home integration only with a google dev account). The espressif Matter stack might (barely) fit into an 8MB flash board. 16MB Flash will be needed for "normal" integration.
      --> 1500-2500 kb program sized increase
      --> The "tasmota way" is not really an option - I guess that it would take us 1-3 "man years" just to import/adopt their solution.

    wow 😅

  16. netmindz commented on Apr 1, 2026

    @netmindz
    MemberAuthor

    Yeah they are both very chunky. Given ZigBee is C6 only, I think mandating the 8MB variant is probably ok

    As for the beast that is Matter, I don't know if we can do anything with LTO to help on the size, but yeah it's big

    I've also been experimenting with trying to create a WLED bridge, so keep WLED as HTTP but then have a single esp32-C6 that presents itself as multiple ZigBee RGB lights so go ZigBee to WLED JSON API and possibly do the same for matter

  17. howels commented on Apr 12, 2026

    @howels

    I have several Hub75 panels with integrated esp32-s3 on the back which have appeared on AliExpress recently. Currently using WLED-MM for ease of deployment with the available hub75 release binaries. Would like to see hub75 support added to suitable targets, either via the additional LED output type or a dedicated build focused on hub75 but sacrificing other features. Not sure how much hub75 adds to overall size.
    And FWIW I'd rather lose 512K of GIF storage in return for extra features. I tend to use DDP to drive mine anyway.

  18. netmindz commented on Apr 12, 2026

    @netmindz
    MemberAuthor

    Do those panels match any of the default pin configs in WLED-MM @howels ?

  19. howels commented on Apr 12, 2026

    @howels

    Do those panels match any of the default pin configs in WLED-MM @howels ?

    Yes, the standard pinot used in https://github.com/MoonModules/WLED-MM/releases/download/v14.7.1/WLEDMM_14.7.1_esp32_4MB_V4_S_HUB75.bin works perfectly.

  20. kilrah commented on Apr 12, 2026

    @kilrah
    Contributor

    Since there's a discussion I'll reiterate my wish for a set of "factory" bins being released along with the app-only ones so that when people have issues with the flashers we can just tell them "flash this at 0x0" instead of having to hunt down proper bootlooaders etc which may cause issues if mismatched.

  21. howels commented on Apr 20, 2026

    @howels

    Another one to add - I recently got a Huidu HD-WF2 board which works under WLED-MM but is missing from WLED. This is a basic ESP32-S3 with no PSRAM and a pre-wired Hub75 port. Would be neat to have a similar bin available for Hub75 use with the new builds of WLED as they appear to work well on larger matrixes.

  22. netmindz commented on Apr 20, 2026

    @netmindz
    MemberAuthor

    One idea to possibly help provide pre built binaries without overwhelming the user would be put less common bins into a zip, but then you wouldn't be able to update automatically. You can't create a release with the basics and then a different "bonus extras" as you can only have a single release per tag

  23. howels commented on Apr 20, 2026

    @howels

    One idea to possibly help provide pre built binaries without overwhelming the user would be put less common bins into a zip, but then you wouldn't be able to update automatically. You can't create a release with the basics and then a different "bonus extras" as you can only have a single release per tag

    Or extend the wiki to provide a better reference showing which bin is needed for which board? I'd argue that new users will already be overwhelmed until they understand the various model designations.

  24. added this to the 16.1 milestone on May 3, 2026
  25. modified the milestones: 16.1, 17.0 on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions