Add a Default 32MB partition by Math0XK · Pull Request #11143 · espressif/arduino-esp32 (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

@Math0XK

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.

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

@Math0XK

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

@github-actions

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>): , 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

CLA assistant check
All committers have signed the CLA.

@SuGlider

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.

@lucasssvaz

@Math0XK

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

@Math0XK

@Jason2866

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

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

@me-no-dev

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

For Platformio add in the config

board_build.partitions  = your_custom_partition_scheme.csv

in the root folder of the project.

@Math0XK

Added partition "default_32MB" to the menu

@Math0XK

@Math0XK

Added the "default_32MB" partition to the menu

@Math0XK

@Math0XK

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

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

@SuGlider

@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

@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

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.

lucasssvaz

P-R-O-C-H-Y

me-no-dev

@pre-commit-ci-lite

Labels