{"id":23071242,"url":"https://github.com/softplus/esp32repartition","last_synced_at":"2026-02-12T01:14:25.020Z","repository":{"id":268299676,"uuid":"903544853","full_name":"softplus/Esp32Repartition","owner":"softplus","description":"ESP32 firmware to expand the partition table to 1536kb for WLED 0.15+","archived":false,"fork":false,"pushed_at":"2024-12-28T17:22:47.000Z","size":1423,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T07:09:36.208Z","etag":null,"topics":["esp32","platformio","wled"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-14T21:49:56.000Z","updated_at":"2025-04-20T01:27:33.000Z","dependencies_parsed_at":"2024-12-15T22:22:57.104Z","dependency_job_id":"7453a7ba-5af2-42b7-9bd7-05ac362ca465","html_url":"https://github.com/softplus/Esp32Repartition","commit_stats":null,"previous_names":["softplus/esp32repartition"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/softplus/Esp32Repartition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2FEsp32Repartition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2FEsp32Repartition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2FEsp32Repartition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2FEsp32Repartition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softplus","download_url":"https://codeload.github.com/softplus/Esp32Repartition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softplus%2FEsp32Repartition/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270735508,"owners_count":24636376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp32","platformio","wled"],"created_at":"2024-12-16T07:12:05.784Z","updated_at":"2026-02-12T01:14:24.958Z","avatar_url":"https://github.com/softplus.png","language":"C++","readme":"# Esp32Repartition - Fix old WLED ESP32 partition table devices via OTA\n\nThis is a kinda basic hack for updating the partition table of an ESP32 device running [WLED](https://kno.wled.ge/) via OTA.\nThis creates a 1536KB partition for app0 and app1.\nThis is useful for devices that have an old partition table that doesn't have enough space for the latest WLED firmware.\nThis is a workaround for the issue described in [this issue](https://github.com/Aircoookie/WLED/issues/4369).\n\n*Use at your own risk.*\n\nRisk: This can brick your ESP32 device and require a USB firmware reinstall. I am not responsible for any damage caused by this software.\nThis code is not tested on many devices. Use at your own risk, really.\nAlso, make sure your device doesn't randomly get rebooted / have bad power;\nif it stops at the wrong time (the window is short), it can disable your partition table and require a USB firmware reinstall.\n\n## What it does\n\n1. It will check that your partition table is in a supported order (anything, app0, app1, data); names don't matter.\n2. It will check that the app0 partition is the one that is running. You can just reupdate this firmware if it's not, it will switch from app1 to app0.\n3. It will erase the app1 and data partitions. *THIS WILL DELETE ALL DATA ON THESE PARTITIONS.*\n4. It will resize the app0 and app1 partitions to 1536KB each. Shrinking the data partition.\n5. It will recreate the checksum for the partitions.\n6. It will reboot the device.\n7. You can now install the latest WLED firmware via OTA.\n8. Connect to 'WLED-AP' and set up your wifi.\n9. Feel free to breathe again.\n\n## Usage\n\n1. Backup both `Prefixes` and `Configuration` from your WLED setup. This data will get lost.\n2. Upload this [firmware](https://github.com/softplus/Esp32Repartition/releases) to your ESP32 device using the WLED firmware update page.\n3. It will create an access point called `EPM-AP`, with password `wled1234`. Connect to it.\n4. Go to `http://4.3.3.4/` in your browser. This will take you to the main menu.\n7. Click `List partitions` to see the current partition table.\n    It does a bunch of tests to make sure that your device is suitable for this. In particular:\n    * It checks that you're in the first `app` partition. Otherwise just upload the same firmware again and try again.\n    * It checks that the partition table is a supported layout (app0, app1, data).\n    * It checks that the data partition has enough space.\n    * It shows you the current partition table \u0026 the proposed new one.\n    * FYI, example of a 'reasonable' partition table:\n    ```\n    Partition:\n    Addr: 0x00008000\n    Type: 01, Subtype: 02, Addr: 0x00009000, Size: 0x00005000 (20K), Label: nvs\n    Type: 01, Subtype: 00, Addr: 0x0000e000, Size: 0x00002000 (8K), Label: otadata\n    Type: 00, Subtype: 10, Addr: 0x00010000, Size: 0x00140000 (1280K), Label: app0\n    Type: 00, Subtype: 11, Addr: 0x00150000, Size: 0x00140000 (1280K), Label: app1\n    Type: 01, Subtype: 82, Addr: 0x00290000, Size: 0x00170000 (1472K), Label: spiffs\n    Running: Addr: 0x00010000, Label: app0\n    Next:    Addr: 0x00150000, Label: app1\n    ```\n8. Click `Fix partitions`, and await the results.\n9. If you're ok, it'll say ready on the bottom and reboot.\n    Click `Download log` to save what you see to a local text file.\n    If something breaks, you (or I) might find it useful.\n10. Reload the page once reboot is complete.\n11. Check `List partitions` to see if it worked.\n12. Upload your desired firmware update. Connect to WLED's AP, set your wifi settings, restore prefixes and configuration.\n13. Good luck.\n\n## Building\n\nSetting everything up took a bit, but here's roughly how it works:\n\n1. Clone this repo.\n2. Open PlatformIO. Let it do its thing. It will install the ESP32 platform, etc.\n3. In a command window, enter `pio run -t menuconfig`. This will open the ESP32 menuconfig.\n4. Enable: `Arduino Configuration` -\u003e `Autostart Arduino setup and loop on boot`\n5. Set: `Component config` -\u003e `SPI Flash driver` -\u003e `Writing to dangerous flash regions` -\u003e `Allowed`\n6. Save and exit.\n\nNote you may need to follow the [workaround for Compile Error \"esp32-arduino requires CONFIG_FREERTOS_HZ=1000 (currently 100)\"](https://github.com/espressif/arduino-esp32/discussions/8375#discussioncomment-7908337) and manually tweak the `cmakelists.txt` file for the ESP32 platform in order to get this to compile.\n\nNow you can build and upload the firmware.\nNote uploading the firmware will reset your partition table to the old WLED partition table as shown in `partitions_old.csv`.\nThis allows you to test the functionality.\n\n## Supported devices\n\nThis has only been tried on these devices. Your mileage may vary. Prepare the USB cable.\n\n* ESP32 DevKitC\n* D1 Mini ESP32\n\n## Known issues\n\n? Works for me.\n\nPotential to-dos:\n\n* Find a bunch of bootloaders \u0026 check their MD5\n\n## Changes\n\n[Releases](https://github.com/softplus/Esp32Repartition/releases)\n\n* 2024-12-28: Release v0.4.0\n  * Checks for encrypted flash \u0026 aborts if so\n  * Added support to download app1 partition\n  * Added timing of steps\n* 2024-12-27: Release v0.3.0\n  * Add support for various configurations with min 2x app, 1x data\n  * Move data partitions instead of deleting\n* 2024-12-27: Release v0.2.0\n* 2024-12-15: Initial release - v0.1.0\n\n## My notes\n\nFor releases:\n\n```bash\ncp .pio/build/esp32dev/firmware.bin build/esp32-repart.bin\n```\n\n## Other\n\nLicensed under the MIT license.\n[WLED](https://kno.wled.ge/) is awesome and you should check it out.\n\n*Disclaimer:*\n\nAs per the MIT license, I assume no liability for any damage to you or any other person or equipment.  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Fesp32repartition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftplus%2Fesp32repartition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftplus%2Fesp32repartition/lists"}