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

ESP32-C6, -C2, -C5, -H2, -P4 are not supported #3078

Open
1 task done
Enelar opened this issue Feb 4, 2023 · 34 comments
Open
1 task done

ESP32-C6, -C2, -C5, -H2, -P4 are not supported #3078

Enelar opened this issue Feb 4, 2023 · 34 comments
Labels
backburner low priority compared to other issues enhancement

Comments

@Enelar
Copy link

Enelar commented Feb 4, 2023

What happened?

Unable to flash WLED firmware to ESP32-C6-DevKitC-1 v1.1

To Reproduce Bug

Just try to flash wled firmware to any ESP32-C6 chip

Expected Behavior

I guess we need two versions of firmware

Install Method

Binary from WLED.me

What version of WLED?

WLED_0.14.0-b1

Which microcontroller/board are you seeing the problem on?

Other

Relevant log/trace output

[user@user-nvme esp32]$ sudo esptool.py --no-stub write_flash 0x1000 ./esp32_bootloader_v4.bin 
esptool.py v4.4
Found 2 serial ports
Serial port /dev/ttyS4
Connecting......................................
/dev/ttyS4 failed to connect: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-C6
Chip is ESP32-C6 (revision v0.0)
Features: WiFi 6, BT 5
Crystal is 40MHz
MAC: 60:55:f9:f6:a2:bc
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00001000 to 0x00010fff...
Erasing flash...
Took 0.29s to erase flash block
Wrote 65536 bytes at 0x00001000 in 0.6 seconds (900.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
[user@user-nvme esp32]$ sudo esptool.py --no-stub write_flash 0x10000 ./WLED_0.14.0-b1_ESP32.bin 
esptool.py v4.4
Found 2 serial ports
Serial port /dev/ttyS4
Connecting......................................
/dev/ttyS4 failed to connect: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Serial port /dev/ttyACM0
Connecting...
Detecting chip type... ESP32-C6
Chip is ESP32-C6 (revision v0.0)
Features: WiFi 6, BT 5
Crystal is 40MHz
MAC: 60:55:f9:f6:a2:bc
Enabling default SPI flash mode...
Configuring flash size...
Unexpected chip id in image. Expected 13 but value was 0. Is this image for a different chip model?

A fatal error occurred: ./WLED_0.14.0-b1_ESP32.bin is not an ESP32-C6 image. Use --force to flash anyway

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Enelar Enelar added the bug label Feb 4, 2023
@blazoncek blazoncek added enhancement and removed bug labels Feb 4, 2023
@blazoncek
Copy link
Collaborator

Correct observation.
There are no plans to support C6 at the time as C3, S2 and S3 are still in early experimental phase, not yet ready for production use. And those are older, more mature chips.

@softhack007 softhack007 added the backburner low priority compared to other issues label Feb 4, 2023
@softhack007
Copy link
Collaborator

softhack007 commented Feb 4, 2023

Similar for other very brandnew chips: -C2, -C6 , -C61, ESP32-H2, -H4, or ESP32-P4, or -C5.

To put it into some context - market availeability of ESP32-C6 was announced just 3 weeks ago on Jan 6, 2023. Knowing espressif, I bet it will take at least 2 years until stable development environments and open source libraries are ready for any "serious use" on -C6.

We should put it on the backburner, until stable support is availeable from the core libraries we need, for example:

For now, we have enough troubles to make -S3/-S2/-C3 work. So don't expect support for other new models this year.

@softhack007 softhack007 changed the title ESP32-C6 is not supported ESP32-C6, -C2, -C5, -H2, -P4 etc are not supported Feb 4, 2023
@cherrydev
Copy link

Supporting those newer chips requires updating to the esp-idf v5.1. From what I've seen, the migration documentation is pretty good. A potentially valuable bonus is that some of the newer chips, like the S3, now support DMA over the RMT interface. From my experiments, enabling DMA reduces the CPU usage during a transmission to 0.01% compared to about 18% using PIO. I believe this would also reduce the chances of a rogue interrupt causing a glitch proportionally. I'm not sure if this project bumps up into those limits or has a problem with interrupt-caused glitches, but if so, that might be another reason to consider it.

@blazoncek
Copy link
Collaborator

A project as big as WLED needs manpower to support various chips, not just development environment.
Any help would be appreciated.

@softhack007
Copy link
Collaborator

softhack007 commented Mar 30, 2023

Supporting those newer chips requires updating to the esp-idf v5.1

Sorry, but what you propose is not enough for WLED. We have a long list of dependencies, including (but not limited to) arduino-esp32, and NeoPixelBus.

All dependencies (libraries / frameworks that we use with WLED) need to be upgraded to support new chips. For some (like NPB) explicit support must be added by developing new code. it's not just about dropping in a new framework, then be happy.

I fully concur with @blazoncek - any real help (personal commitment for coding & testing) would be much appreciated.


From what I've seen, the migration documentation is pretty good

Edit: Not sure about quality of the migration document, it is definitely "pretty big" . Espressif announces a huge number of "breaking changes", some important APIs were either deprecated, or already replaced with something completely other. It means a lot of work to go from esp-idf 4.4.x to esp-idf 5.1.

@cherrydev
Copy link

I'm not a user of WLED but also write LED drivers for ESP32, and I'm not making requests, demands or suggestions that you do anything at all. I was sharing information I'd learned about the new features in ESP-IDFv5 that might be relevant to someone else writing LED driver code on ESP chips, since it offers a significant performance improvement. I was excited by my discovery and thought the people working on this project would be too. Your project is impressive and I hope you find the help you're looking for.

@blazoncek
Copy link
Collaborator

Thanks for your willingness to share.
Unfortunately we do not write LED (or any other) drivers ourselves but reuse existing @Makuna 's excellent NeoPixelBus.

As such there is (almost) nothing (apart GPIO numbers related stuff) in WLED core code that is chip specific. Libraries as NeoPixelBus or LittleFS and AsyncWebServer are the ones that would need to add support for the above mentioned chips before WLED can support them as well

Though some usermods may use particular HW but those are optional and not all support every chip.

@cherrydev
Copy link

I've been over to the NeoPixelBus repo and looking at Makuna/NeoPixelBus#598 it seems they're already looking into it.

@softhack007 softhack007 pinned this issue Dec 16, 2023
@softhack007 softhack007 changed the title ESP32-C6, -C2, -C5, -H2, -P4 etc are not supported ESP32-C6, -C2, -C5, -H2, -P4 are not supported Dec 16, 2023
@aaalek
Copy link

aaalek commented Oct 5, 2024

It's been some time since this issue has been created, have there been any advancements with the libraries and such to make the new chips work?

@softhack007
Copy link
Collaborator

softhack007 commented Oct 5, 2024

It's been some time since this issue has been created, have there been any advancements with the libraries and such to make the new chips work?

Not enough advances, unfortunately - it looks like my old "at least 2 years" estimate was quite accurate..

If NeoPixelBus would be able to utilize the new RMT driver in esp-IDF 5.1.x, we could make an attempt to get WLED running on the -C6. Maybe this will happen during the next year. For other new chips - nothing in sight.

@Makuna
Copy link

Makuna commented Oct 6, 2024

The new RMT support is in the NeoPixelBus/Core3 branch. Still not configured to use the new boards yet. Still waiting on an updated IDF to fix issues others have seen with it.

@oerix
Copy link

oerix commented Oct 19, 2024

The new RMT support is in the NeoPixelBus/Core3 branch. Still not configured to use the new boards yet. Still waiting on an updated IDF to fix issues others have seen with it.

Sorry to be that guy, but is there an rough estimate on how long it will take? I'm looking to invest in to these boards, once support is added. Thanks

@softhack007
Copy link
Collaborator

softhack007 commented Oct 19, 2024

Sorry to be that guy, but is there an rough estimate on how long it will take? I'm looking to invest in to these boards, once support is added. Thanks

As you are "that guy" you probably guessed the answer 😉
"it's ready when its done".

A bit more seriously - there is no schedule for supporting the -C6 in WLED. Personally I have a fork that compiles for -C6, but there is still a looooong way to go.
C6 support might come as "experimental" in 0.16 (may be released in one year), and it will be comparable to the -C3 performance wise.

From experience with other "new boards" like the -S3, I would expect that we'll need around two years from "experimental" to "WLED runs stable on this MCU". The same was true for -S3, where we started "experimental support" in mid 2022.

Same for possible support of the "C61" and P4". OK P4 might even take longer because there is no support from arduino-esp32 or other libraries yet.

So if you're looking at a project or other business case, I'd say don't bet your money on the -C6.

If you need ZigBee, you could be faster by taking a ZigBee "daughter board" (e.g. XBee module) and then you'd program a usermod that communicates with the daughter board.

@pafftis
Copy link

pafftis commented Oct 22, 2024

I'm a bit confused. You write that the esp32-c3 and esp32-s3 boards, the mini ones, are not supported normally yet. But still, do you have some firmware posted, are these boards supported or not? If yes, do they work well?

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 22, 2024

C3 and S3 are mostly supported now but still not as stable as classic ESP32 and there may still be undiscovered bugs. Not all variations of C3 and S3 boards are supported by the installer or WLED, you may need to edit code or manually install.

@amcewen
Copy link

amcewen commented Oct 22, 2024

A bit more seriously - there is no schedule for supporting the -C6 in WLED. Personally I have a fork that compiles for -C6, but there is still a looooong way to go.
C6 support might come as "experimental" in 0.16 (may be released in one year), and it will be comparable to the -C3 performance wise.

What would be the best way to help out with -C6 support? I should have a few -C6 boards to try out in a couple of weeks, and should be able to contribute some development effort.

@blazoncek
Copy link
Collaborator

You write that the esp32-c3 and esp32-s3 boards, the mini ones, are not supported normally yet

Nobody said that. MCUs, C3 and S3 (and S2) are well supported in WLED. The issue is development board implementation by different hardware manufacturers. There are variants that will not play well with officially distributed versions of WLED binaries. In such case you'll need to compile (and figure out compilation parameters) yourself. There are also poorly designed boards out there. No software can help with that.

do you have some firmware posted, are these boards supported or not

Yes we have. Yes and no. Depends on particular development board. See above.

If yes, do they work well?

Depends on what you consider "well". There may be connectivity issues if your WiFi is not perfect, you may see performance lag compared to ESP32, etc. As there are numerous development boards available and not all are made equal we cannot support all of them. Currently working "well" are the following (the ones I tested, @softhack007 and @DedeHai may add theirs):

  • Lolin ESP32-S2 mini (single core, low on RAM, direct replacement for Wemos D1 mini)
  • LilyGo TTGO T-01 C3 (ESP32-C3, single core, slow speed, plenty of RAM, direct replacement for ESP01)
  • Espressif ESP32-C3-DevKitM-1 (ESP32-C3, single core, slow speed, plenty of RAM)
  • Lolin C3 pico (ESP32-C3, single core, slow speed, plenty of RAM, direct replacement for Wemos D1 mini)
  • generic ESP32-S3 Zero (dual core, fast, plenty of RAM, bad WiFi performance, gets hot, bad effect performance)
  • generic ESP32-C3 Zero (single core, slow speed, plenty of RAM, poor WiFi performance)

@blazoncek
Copy link
Collaborator

What would be the best way to help out with -C6 support?

Compile until it works. When compile works, figure out GPIO restrictions, RAM restrictions, library restrictions.

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 22, 2024

I can add this to the list

  • C3 Supermini - There are two variants, one works, one has very (!) poor wifi, there is a reddit post about it

Personally I do not see any benefit in the C6 over C3 for WLED, it just has more GPIOs but so does the S3.

@pafftis
Copy link

pafftis commented Oct 22, 2024

I'm looking for the smallest board possible to put a levelshifter on and connect it to the strip. My maximum profile width is 3 cm and the depth is 2 cm. Esp32-c3 is ideal - it just fits, all other boards are bigger unfortunately.

@blazoncek
Copy link
Collaborator

C3 is far from ideal. But it is a good start.
The smallest development board I've seen is Seed Studio XIAO S3.

Depending on what you need, @srg74 may have LilyGo TTGO T-01 C3 compatible board which is 30x20x17 mm including LilyGo board.

@softhack007
Copy link
Collaborator

I'm looking for the smallest board possible to put a levelshifter on and connect it to the strip. My maximum profile width is 3 cm and the depth is 2 cm. Esp32-c3 is ideal - it just fits, all other boards are bigger unfortunately.

The smallest one I know about is the waveshare S3 Zero - 1.8cm x 2.5cm. It needs the esp32s3_4M_qspi buildenv.

@softhack007
Copy link
Collaborator

softhack007 commented Oct 22, 2024

So here ist my list of boards I have.

  • generic ESP32S3 8MB flash no PSRAM--> custom buildenv based on [esp32s3] but without -DBOARD_HAS_PSRAM
  • Lilygo/TTGO T7-S3 16MB flash, 8MB PSRAM --> [env:esp32s3dev_16MB_opi]
  • Freenove ESP32-S3 8MB flash, 8MB PSRAM --> [env:esp32s3dev_8MB_opi]
  • Waveshare ESP32-S3 Zero 4MB flash 2MB PSRAM (needs passive cooling) --> [env:esp32s3_4M_qspi]
  • ESP32-S2-DevKitC-1U-N8R2 with external radio antenna (8MB flash, 2MB PSRAM) --> custom buildenv with 8MB partition table (based on [env:lolin_s2_mini])
  • Lolin S2 mini (has low wifi range) --> [env:lolin_s2_mini]
  • ESP32-C3-DevKitM-1 --> [env:esp32c3dev]
  • Lolin C3 mini, Lolin C3 pico (low wifi range) --> [env:esp32c3dev]

plus a "nanoESP32-C6" for experimenting with C6 builds. But that's absolutely experimental.

Please note that some of the boards need a modified platformio.ini buildenv - usually to adjust for flash size, or add -DLOLIN_WIFI_FIX for the small ones that only have a crystal "radio". Also I prefer to have boards with a "real" Serial-to-USB chip, because the "USB-CTC" port is too unreliable for me.

@softhack007
Copy link
Collaborator

softhack007 commented Oct 22, 2024

Personally I do not see any benefit in the C6 over C3 for WLED, it just has more GPIOs but so does the S3.

@DedeHai @blazoncek I fully agree - running WLED on -C6 is useless at the moment - see below

@amcewen @aaalek some facts as to where we are, and what can be expected from -C6

  • it is as slow as -C3
  • 6 additional pins to use (compared to -C3)
  • only a handful of ws2812b LEDs possible right now (but this might get better with the new NeoPixelBus/Core3 branch from Makuna)
  • due to arduino-esp32 v3.0.x incompatibilities:
    • no Audioreactive
    • no analog LEDs
    • its necessary to fork and patch several libraries - including ESPAsyncWebServer and AsyncTCP
    • its necessary to fork and patch fastLED, because the fastLED buildin driver crashes at boot if your board has a buildin WS2812b led. Update: This could be solved in the latest fastLED release.
    • Lots of rework still required in the Network and Wifi code - espressif has declared commonly used network API's as "deprecated" --> WiFiClient, WiFiServer, WiFiUdp and WiFiClientSecure might be gone in a year
  • There is no platformIO support for -C6, so we need to use the pioarduino framework as a replacement. From reading the discussions at platform-espressif32, it seems PlatformIO and Espressif are going seperate ways in the future....

For the curious, this my own experimental branch for -C6:
MoonModules#138
it compiles, WLED boots up - that's all I can say. And I fully agree with @DedeHai -i see no benefit for WLED over using C3 or S3. So I've put this activity onto the backburner.

Maybe a usermod for ZigBee would be a game-changer - but this usermod is "yet to be created" by the WLED community.

@netmindz
Copy link
Collaborator

Yeah I wanted to try the C6 for ZigBee, but it's looking like I might end up writing a usermod to communicate with a C6 from a supported ESP32 before having a WLED build running on the C6 alone

@sapkra
Copy link

sapkra commented Oct 22, 2024

@netmindz Actually having a similar idea but instead of writing a usermod I will just remote control WLED by simulating a ESP-NOW remote on my C6. I need the C6 because it has 2 TWAI controllers, that I need for my project.

@pafftis
Copy link

pafftis commented Oct 23, 2024

I'm looking for the smallest board possible to put a levelshifter on and connect it to the strip. My maximum profile width is 3 cm and the depth is 2 cm. Esp32-c3 is ideal - it just fits, all other boards are bigger unfortunately.

The smallest one I know about is the waveshare S3 Zero - 1.8cm x 2.5cm. It needs the esp32s3_4M_qspi buildenv.

Is this particular board currently supported or not?

Контроллер WLED ESP32C3 5-24 В,
https://sl.aliexpress.ru/p?key=EAM5rXK

Here on Ali they sell some ready-made boards. Are they bad?

@softhack007
Copy link
Collaborator

softhack007 commented Oct 23, 2024

The smallest one I know about is the waveshare S3 Zero - 1.8cm x 2.5cm. It needs the esp32s3_4M_qspi buildenv.

Is this particular board currently supported or not?

Please define "supported". I have one on my desk and I can upload WLED 0.15 to it - from the developer environment (VSCode+platformIO). I'm not sure if the web installer has all the necessary files. But you may be lucky. Please remember it is just the ESP32-S3, so you'll need to add level shift and other components for driving your LED strip.

This is an open source community project - you can't get a definite guarantee from us. My suggestion would be to order one, and try it out.

Контроллер WLED ESP32C3 5-24 В, https://sl.aliexpress.ru/p?key=EAM5rXK
Here on Ali they sell some ready-made boards. Are they bad?

I have no idea. It's a C3 so its very minimal, and no audio support. Maybe ask the seller how to upload WLED updates (USB preferred).

we are drifting off-topic.

If you have further questions about what kind of board to chose, there is a very friendly WLED community in discord. Please ask for help on discord

@pafftis
Copy link

pafftis commented Oct 25, 2024

Do I understand correctly that the main problem is the lack of libraries during the firmware of the board? If the firmware is loaded somehow into the esp32-c3, then most likely it will work fine?

@blazoncek
Copy link
Collaborator

If the firmware is loaded somehow into the esp32-c3, then most likely it will work fine?

"Somehow" is by using web installer or PIO upload or manually uploading using esptool. As mentioned several times C3, S2 and S3 are fully supported in firmware. Getting correct binary is somehow tricky for S3.

@amcewen
Copy link

amcewen commented Oct 25, 2024

@softhack007 thanks for sharing your experiences with -C6 and take on where things are build-wise.

I hadn't seen the platformio / espressif politics until now - my other big ESP32 project at the moment is using esp-idf directly (with Arduino as a component). It does seem like -C6 support would only make sense once it's clearer how WLED is going to address things w.r.t. platformio and arduino-esp32 v3.0.x

I'll probably go with a -C3 for now then (the Bluetooth 5.3 support on the -C6 was what was tempting me that way, but was always a longer-term thing-to-play-with 😁)

As I say, I'm not tracking platformio closely and so might be looking in the wrong place, but it looks like they're still supporting later versions of esp-idf? Would moving to Arduino as a component be a path to migrate to newer versions, and arduino-esp32 v3, while continuing to use platformio?

I've got the move from esp-idf v4 and arduino-esp32 v2 to v5.3 and v3 looming on another project, so will have a bit of experience with that move (with arduino as a component) in a month or so. On a personal note it's a shame to see WiFiClient, etc. deprecated, given that I introduced them when I was in charge of the original Arduino Ethernet library 😢

@damnms
Copy link

damnms commented Nov 5, 2024

The c6 would be very nice for me because of those 2 reasons:

  1. here is hell with 2.4ghz networks
  2. my router can only do 2.4 or 5ghz, with 5ghz i get more speed on the devices but i am forced to use 2.4 because of my esp32

would love to see support, even if its only experimental, for the c6.

@softhack007
Copy link
Collaborator

2. with 5ghz i get more speed on the devices but i am forced to use 2.4 because of my esp32

Sorry but -C6 is still 2.4Ghz only. So it would not help in your situation.

@damnms
Copy link

damnms commented Nov 9, 2024

Thanks, i got tricked by this "Wifi6" and did not see the "2.4ghz". Should be -C5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backburner low priority compared to other issues enhancement
Projects
None yet
Development

No branches or pull requests