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 default method uses "legacy" RMT driver, conflicting with some cores #815

Open
egnor opened this issue Jul 17, 2024 · 6 comments
Open
Labels
active development This issue is a primary item I am actively working on. Interested testers add a comment. bug

Comments

@egnor
Copy link

egnor commented Jul 17, 2024

Describe the bug
With some cores, such as esp32s3 (for the Espressif ESP32-S3 dev board), simply referencing a default-method NeoPixelBus in the code (not necessarily actually using it!) causes a boot loop with an error message like this

ELF file SHA256: d2dd9a167d544b2f

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x9 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378489
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x508
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x29e4
entry 0x403c9880
E (98) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver

abort() was called at PC 0x4200f903 on core 0

Backtrace: 0x40377e76:0x3fceb200 0x4037c8a5:0x3fceb220 0x4038241d:0x3fceb240 0x4200f903:0x3fceb2c0 0x4201354a:0x3fceb2e0 0x4037817b:0x3fceb310 0x403cd852:0x3fceb340 0x403cdafe:0x3fceb380 0x403c98d5:0x3fceb4b0 0x40045c01:0x3fceb570 0x40043ab6:0x3fceb6f0 0x40034c45:0x3fceb710

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple sketch using NeoWs2812xMethod
  2. Add https://espressif.github.io/arduino-esp32/package_esp32_index.json to "additional board manager URLs"
  3. Select the "ESP32S3 Dev Module" board
  4. Compile, upload, run

Expected behavior
Sketch runs as usual.

Development environment (please complete the following information):

  • OS: Ubuntu 24.04 LTS
  • Build Environment - arduino-cli 1.0.2
  • Board target - ESP32-S3
  • Library version - 2.8.0

Additional context
I believe this is why this happens:

@softhack007
Copy link
Contributor

softhack007 commented Jul 17, 2024

E (98) rmt(legacy): CONFLICT! driver_ng is not allowed to be used with the legacy driver

@Makuna this looks familiar. It only happens with arduino-esp32 v3.0.x, in particular v3.0.0 thru 3.0.2. The problem is that the arduino core makes reference to the "new RMT" driver, so any other lib that still uses "legacy RMT" will trigger the bootloop error.

arduino-esp32 version 3.0.3 should have a solution.

Until 3.0.3 gets released, the smartest solution is to stay on version 2.0.14 (and maybe in general v2.0.x is preferable, when looking at the long list of breaking changes in 3.0.x ;-)

@Makuna
Copy link
Owner

Makuna commented Jul 17, 2024

@egnor and @softhack007
I will leave this around; it is related to moving to the next core API.
Currently, I have no implementation for the next API yet, it is on my list but isn't coming soon. I still have consumers using the older cores.

This is a failure on the core to reference something that will cause legacy API which are depreciated but still supported to cause such a failure. Please raise this with them to get an immediate fix.

@Makuna Makuna added platform limited Not able to provide a solution specific to the details, but is in consideration for other platforms bug and removed platform limited Not able to provide a solution specific to the details, but is in consideration for other platforms labels Jul 17, 2024
@egnor
Copy link
Author

egnor commented Aug 5, 2024

FYI here's a corresponding issue with Adafruit's library: adafruit/Adafruit_NeoPixel#375

For ESP-IDF v3 compatibility, Adafruit added a quick function to use the arduino-esp32 RMT layer, but, that requires spelling out all the timing transitions in a buffer (since the Arduino RMT driver doesn't expose the custom timing translation feature), which they allocated on the stack in show(), which doesn't work for longer strips.

I assume FastLED and others are addressing this in their own way. (Or maybe FastLED doesn't use RMT?)

@zackees
Copy link

zackees commented Aug 21, 2024

We use RMT. We are also broken.

Came here to see if NeoPixelBus fixed it... they haven't yet.

We are all in the same boat. IDF 5.1 is a painful break for everyone.

@Makuna
Copy link
Owner

Makuna commented Sep 21, 2024

Working Branch for RMT fixes: https://github.com/Makuna/NeoPixelBus/tree/CORE3

@Makuna Makuna added the active development This issue is a primary item I am actively working on. Interested testers add a comment. label Sep 21, 2024
@zackees
Copy link

zackees commented Sep 22, 2024

FastLED this week agreed on a path forward for RMT 5.1 with an internal demo.

All the technical issues have been theoretically solved and it seems like it's downhill from here.

It will be a couple weeks or more before the new driver lands because we have to implement support for parallel async which has some innovation but which seems straight forward.

There's a lot of issues this is going to
solve which the tail end of users face. Short story is that yes, it's coming and it's going to be awesome and memory efficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active development This issue is a primary item I am actively working on. Interested testers add a comment. bug
Projects
None yet
Development

No branches or pull requests

4 participants