Skip to content

support the ESP32-C3-12F module from AI-Thinker and associated boards - #2951

Closed
andyshinn wants to merge 1 commit into
wled:mainfrom
andyshinn:ashinn/support-electrodragon-boards-based-on-esp32-c3-12f
Closed

andyshinn wants to merge 1 commit into
wled:mainfrom
andyshinn:ashinn/support-electrodragon-boards-based-on-esp32-c3-12f

Conversation

@andyshinn

Copy link
Copy Markdown
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.

Comment thread platformio.ini
[env:esp32-c3-12f]
extends = env:esp32c3
board = esp32-c3-12f
platform = [email protected]

@softhack007 softhack007 Dec 15, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

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...

@softhack007 softhack007 Dec 15, 2022 •

Copy link
Copy Markdown
Member

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 = [email protected] 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
Copy Markdown
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 thread boards/esp32-c3-12f.json
Comment on lines +26 to +28
"name": "Ai-Thinker ESP32-C3-12F",
"upload": {
"flash_size": "2MB",

@softhack007 softhack007 Dec 15, 2022 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

@softhack007 softhack007 left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown

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

@blazoncek

Copy link
Copy Markdown
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
aenertia pushed a commit to aenertia/WLED that referenced this pull request Aug 18, 2026
based on proposal from  in PR wled#2951 by @andyshinn.
2MB does not allow to have an OTA partition, so this feature is disabled.
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