Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Default 32MB partition #11143

Merged
merged 12 commits into from
Mar 20, 2025
Merged

Add a Default 32MB partition #11143

merged 12 commits into from
Mar 20, 2025

Conversation

Math0XK
Copy link
Contributor

@Math0XK Math0XK commented Mar 19, 2025

Description of Change

This update adds support for 32MB ESP32 boards, specifically for the ESP32-S3-DevKitC-1-N32R8V.

Test Scenarios

I have tested this partition configuration on my ESP32-S3-DevKitC-1-N32R8V, using PlatformIO with custom board settings.
I also submitted these board settings to PlatformIO for official support.

Related Links

Pull request for the addition of ESP32-S3-DevKitC-1-N32R8V support:
PlatformIO PR #1554

This is a complementary addition to use 32MB boards in PlatformIO like the ESP32-S3-DevKitC-1-N32R8V.
Copy link
Contributor

github-actions bot commented Mar 19, 2025

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Add a Default 32MB partition":
    • probably contains Jira ticket reference (C-1). Please remove Jira tickets from commit messages.
    • body's lines must not be longer than 100 characters
    • summary looks empty
    • type/action looks empty
  • the commit message "Delete tools/boards.txt":
    • summary looks empty
    • type/action looks empty
  • the commit message "Edited Board file":
    • summary looks empty
    • type/action looks empty
  • the commit message "Edited boards.txt":
    • summary looks empty
    • type/action looks empty
  • the commit message "add change to esp32s3-octal board too":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello Math0XK, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against e9fd96c

@CLAassistant
Copy link

CLAassistant commented Mar 19, 2025

CLA assistant check
All committers have signed the CLA.

@SuGlider
Copy link
Collaborator

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@Math0XK - In order to continue, please read and sign the CLA.

@SuGlider SuGlider added the Status: Pending CLA ⚠️ Contributor is required to sign the CLA label Mar 19, 2025
@lucasssvaz
Copy link
Collaborator

lucasssvaz commented Mar 19, 2025

There is already a 32MB partition that can be used with SPIFFS for S3. Check if it fits your requirements here: https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/large_littlefs_32MB.csv

@Math0XK
Copy link
Contributor Author

Math0XK commented Mar 19, 2025

There is already a 32MB partition that can be used with SPIFFS for S3. Check if it fits your requirements here: https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/large_littlefs_32MB.csv

Hello, thanks for your reply.

This partition serves different needs than the "large_littlefs_32MB.csv" partition. Specifically, the "default_32MB.csv" partition allows for the creation of larger applications (app1 and app2 are 2.7 times larger) while requiring significantly less SPIFFS (~3.3 times less). I have aimed to maintain an app/SPIFFS ratio similar to that of the "default_16MB.csv" partition.

I invite you to take a look at the partition and compare the two.

Best regards.

@lucasssvaz
Copy link
Collaborator

Please also edit the boards file to add the partitions to the menu. PTAL here: https://github.com/espressif/arduino-esp32/pull/8498/files#diff-c3a7c63d53cdec402cf559c1707ce5ef639a7e59e575f41ac5c8f5941e806a9f

@SuGlider SuGlider added Resolution: Awaiting response Waiting for response of author and removed Status: Pending CLA ⚠️ Contributor is required to sign the CLA labels Mar 19, 2025
@Math0XK
Copy link
Contributor Author

Math0XK commented Mar 19, 2025

Please also edit the boards file to add the partitions to the menu. PTAL here: https://github.com/espressif/arduino-esp32/pull/8498/files#diff-c3a7c63d53cdec402cf559c1707ce5ef639a7e59e575f41ac5c8f5941e806a9f

I'm not sure I fully understand what needs to be added, as these lines already provides support for boards with 32MB of flash:

esp32s3.menu.FlashSize.32M=32MB (256Mb)
esp32s3.menu.FlashSize.32M.build.flash_size=32MB

To better understand how to proceed, I would need some additional explanations.

@Jason2866
Copy link
Collaborator

Just my 2cents. There will be always a need for a different partitions config setup. Why not just use a custom partitions.csv without adding in core? As you noted Platformio, there is absolutely no need to add there. In Platformio it is plain easy to add a custom partitions.csv

@Math0XK
Copy link
Contributor Author

Math0XK commented Mar 19, 2025

Just my 2cents. There will be always a need for a different partitions config setup. Why not just use a custom partitions.csv without adding in core? As you noted Platformio, there is absolutely no need to add there. In Platformio it is plain easy to add a custom partitions.csv

As of today, there is no native support for ESP32 32MB boards in PlatformIO. As an owner of an ESP32-S3-DevKitC-1-N32R8V, I am forced to use a configuration that only utilizes up to 16MB of flash, which is a waste of resources.

I have spent several hours searching for a custom configuration that fully utilizes the flash memory of my board, but I couldn't find anything functional.

Therefore, I would like to submit the "default_32MB.csv" partition, which is more versatile than "large_littlefs_32MB.csv", to introduce native support for 32MB flash boards in PlatformIO.

@Jason2866
Copy link
Collaborator

Jason2866 commented Mar 19, 2025

Providing a boards manifest PR in Platformio repo is time waste. Platformio stopped every development around espressif Arduino. Take a look at open PRs and Feature Requests.
There is an pinned issue in there repo about support of Arduino core 3.x.
Use pioarduino instead.
Here is a good list of espressif modules setup for pio https://github.com/sivar2311/ESP32-S3-PlatformIO-Flash-and-PSRAM-configurations

@me-no-dev
Copy link
Member

me-no-dev commented Mar 19, 2025

To better understand how to proceed, I would need some additional explanations.

Here is how a partition scheme is added to ESP32-S3 board definitions, so it can be selected from Arduino IDE board menu. In this case it's the large_littlefs_32MB.csv

esp32s3.menu.PartitionScheme.app5M_little24M_32MB=32M Flash (4.8MB APP/22MB LittleFS)
esp32s3.menu.PartitionScheme.app5M_little24M_32MB.build.partitions=large_littlefs_32MB
esp32s3.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592

Also in Arduino IDE you can add your custom partition scheme partitions.csv to the sketch root and that will actually get used when compiling/uploading, so you can select another similar scheme in the board menu and use a custom one at the same time. The one in the board menu should have a firmware partition of similar or larger size in order to not get "can not fit" error when compiling.

I'm pretty sure the pioarduino offers similar functionality. @Jason2866 can confirm and provide a config line

@Jason2866
Copy link
Collaborator

Jason2866 commented Mar 19, 2025

For Platformio add in the config

board_build.partitions  = your_custom_partition_scheme.csv

in the root folder of the project.

Math0XK added 4 commits March 19, 2025 18:53
Added partition "default_32MB" to the menu
Added the "default_32MB" partition to the menu
@Math0XK
Copy link
Contributor Author

Math0XK commented Mar 19, 2025

Thank you for your response!

Here is how a partition scheme is added to ESP32-S3 board definitions, so it can be selected from Arduino IDE board menu. In this case it's the large_littlefs_32MB.csv.

I have modified the boards.txt file following your instructions.
Please feel free to correct me if I made any mistakes.

PioArduino seems like a great alternative. Given that PlatformIO was originally a Ukrainian project, I understand that its development has slowed down in recent years.

board_build.partitions = your_custom_partition_scheme.csv

To use a custom partition with PioArduino, should I simply add this line to my .ini file? (with the name of my custom partition indeed)

@me-no-dev
Copy link
Member

Given that PlatformIO was originally a Ukrainian project, I understand that its development has slowed down in recent years.

This is not the reason. Without going too much into it, just know that PlatformIO does not support any newer Arduino cores after 2.0.17, so everything 3.x is only supported by pioarduino. To switch to it is a matter of replacing one file in your pioconfig. Example for the latest stable version (3.1.3)

platform = https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip

@Jason2866
Copy link
Collaborator

Jason2866 commented Mar 19, 2025

board_build.partitions = your_custom_partition_scheme.csv
To use a custom partition with PioArduino, should I simply add this line to my .ini file? (with the name of my custom partition indeed)

yes, see this example https://github.com/arendst/Tasmota/blob/fb6640b91fde752096ce0bcb4cbe571cab75d49b/platformio_tasmota_cenv_sample.ini#L59-L68

@SuGlider
Copy link
Collaborator

@Math0XK - sorry for the mess with so many commits.
I just wanted to add the S3 Octal boards to the list of boards that support your new partition scheme.

@Math0XK
Copy link
Contributor Author

Math0XK commented Mar 20, 2025

@Math0XK - Sorry for the mess with so many commits. I just wanted to add the S3 Octal boards to the list of boards that support your new partition scheme.

It looks pretty good to me!

yes, see this example https://github.com/arendst/Tasmota/blob/fb6640b91fde752096ce0bcb4cbe571cab75d49b/platformio_tasmota_cenv_sample.ini#L59-L68

Thanks for your help! I'll try to merge my current project into your PioArduino IDE.

This is not the reason. Without going too much into it, just know that PlatformIO does not support any newer Arduino cores after 2.0.17, so everything 3.x is only supported by PioArduino.

My apologies, I assumed something without knowing what was actually going on behind the scenes.
Besides, I find it quite strange that PlatformIO still doesn't support Arduino cores beyond 2.0.17, while PioArduino does.

From what I can see, PioArduino is essentially a fork of PlatformIO, and yet you managed to add support for newer Arduino cores.
Why hasn't PlatformIO been updated with your work?

@me-no-dev
Copy link
Member

Why hasn't PlatformIO been updated with your work?

PlatformIO changed business model, Espressif and other companies did not agree with the changes and support for newer cores was dropped from PlatformIO. Pioarduino forked PlatformIO's integration, updated and added some new features and support new cores for ESP32. Pioarduino is a community maintained project and not commercial one, like what PlatformIO has become.

@SuGlider SuGlider added Chip: ESP32-S3 Issue is related to support of ESP32-S3 Chip Area: Tools & Build System Issue is related to tools and/or the build system and removed Resolution: Awaiting response Waiting for response of author labels Mar 20, 2025
@SuGlider SuGlider added this to the 3.2.0 milestone Mar 20, 2025
@SuGlider SuGlider added the Status: Review needed Issue or PR is awaiting review label Mar 20, 2025
@me-no-dev me-no-dev added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Mar 20, 2025
@me-no-dev me-no-dev merged commit 6c04a93 into espressif:master Mar 20, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Tools & Build System Issue is related to tools and/or the build system Chip: ESP32-S3 Issue is related to support of ESP32-S3 Chip Status: Pending Merge Pull Request is ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

7 participants