Skip to content

Conversation

@andyshinn
Copy link
Contributor

An addition to support the Ai-Thinker ESP32-C3-12F module which has 2MB flash and needs a special board and partition layout. Board is not officially supported upstream yet (platformio/platform-espressif32#806) so a custom board was added.

In Discord it sounded like we didn't want this to be a primary supported board, yet. But opening this PR early so others can see it if they want to pull it in to compile.

[env:esp32-c3-12f]
extends = env:esp32c3
board = esp32-c3-12f
platform = espressif32@5.2.0
Copy link
Member

@softhack007 softhack007 Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is "platform = espressif32@5.2.0" strictly needed? Will it also work with platform = espressif32@5.1.1 ?
I'm asking because espressif32@5.1.1 has been tested also with other new boards, and there is currently more confidence in the 5.1.1.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is mentioned for another C3 board here #1940 (comment) as a prerequisite for a successful boot...

Copy link
Member

@softhack007 softhack007 Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you still try if platform = espressif32@5.1.1 works with your board?
I would like to exclude 5.2.0 for the moment, unless it is strictly proven to be necessary.

We have reports from several people (including @blazoncek) who seem to be successful with 5.1.1 also for -C3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is true. C3 is working for me with 5.1.1 using build environment present in WLED.

Comment on lines +26 to +28
"name": "Ai-Thinker ESP32-C3-12F",
"upload": {
"flash_size": "2MB",
Copy link
Member

@softhack007 softhack007 Dec 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am i correct that the "flash_size" and "name" lines are the only difference to esp32-c3-devkitm-1 ?

If yes, then maybe lets make the whole thing more generic, and rename the board def to something like esp32-c3-devkitm_2M.json ? @blazoncek what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flash size may be different on many boards and add to that that some may feature PSRAM as well.
It will be inevitable to add as many build environments as there are possible boards or provide instructions how users can create their own environment in PIO override.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the 2M partition table may be usefull for others too, because currently we don't have a WLED partions.csv for mcu's with 2M flash only. @andyshinn is OTA still possible with 2M?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andyshinn is OTA still possible with 2M?

Not for C3, S2, S3 or regular ESP32

nvs, data, nvs, 0x9000, 20K,
otadata, data, ota, 0xe000, 8K,
app0, app, ota_0, 0x10000, 1536K,
spiffs, data, spiffs, 0x190000, 384K,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a small file renaming here - to be more consistent with other partition tables -
please name this file WLED_ESP32-C3_2MB.csv

Copy link
Member

@softhack007 softhack007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments to individual files.

softhack007 added a commit to MoonModules/WLED-MM that referenced this pull request Mar 12, 2023
useful for small -C3 boards with 2MB flash memory only. Based on suggestions  from wled#2951 .

Needs `-D WLED_DISABLE_OTA` as OTA is not possible with 2MB.

RAM:   [==        ]  22.5% (used 73724 bytes from 327680 bytes)
Flash: [========= ]  94.9% (used 1492020 bytes from 1572864 bytes)
@Plaenkler
Copy link

What is the status of this PR? Requested changes are pending since 2022?

@blazoncek
Copy link
Contributor

A newer more thorough and generic PR is open for 8266, C3, S2 & S3. #3144

@andyshinn andyshinn closed this Mar 28, 2023
@andyshinn andyshinn deleted the ashinn/support-electrodragon-boards-based-on-esp32-c3-12f branch March 28, 2023 17:53
softhack007 added a commit that referenced this pull request Mar 29, 2023
based on proposal from  in PR #2951 by @andyshinn.
2MB does not allow to have an OTA partition, so this feature is disabled.
@softhack007 softhack007 added the board request PR adding support for a specific board. label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

board request PR adding support for a specific board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants