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

Library does not compile when a ESP32-S3 board is selected in Arduino IDE #579

Closed
Miraculix200 opened this issue Jun 11, 2022 · 7 comments
Closed
Labels
pending Pending new release; already merged but not released in a version

Comments

@Miraculix200
Copy link

Miraculix200 commented Jun 11, 2022

Library does not compile when a ESP32-S3 board is selected in Arduino IDE. Compilation fails with error:

DotStarEsp32DmaSpiMethod.h:41:52: error: 'VSPI_HOST' was not declared in this scope

DotStarEsp32DmaSpiMethod.h:41:52: note: suggested alternative: 'SPI3_HOST'
const static spi_host_device_t SpiHostDevice = VSPI_HOST;
^~~~~~~~~
SPI3_HOST

This can be fixed by commenting out the line 115 in Neopixelbus.h:
#include "internal/DotStarEsp32DmaSpiMethod.h"

I guess some #if defined directives could be added. I think all ESP32-S3 boards include the compiler option -DARDUINO_VARIANT="esp32s3". But it's not possible to make the preprocessor compare the string? Another compilter option included for some boards is -DARDUINO_ESP32S3_DEV

DMA may also be possible on ESP32-S3, but I didn't test it:
Bodmer/TFT_eSPI#1863

@Miraculix200 Miraculix200 added the NOT AN ISSUE This was a question, please use gitter for general questions and help label Jun 11, 2022
@Makuna
Copy link
Owner

Makuna commented Jun 11, 2022

If they follow their standards, it should be CONFIG_IDF_TARGET_ESP32S3
But, it takes more than what you suggest to fix this.
These defines control RMT channels also and there is needed research to known how many are supported as even if they only support two they may still define four as available in the code.

@Miraculix200
Copy link
Author

Miraculix200 commented Jun 12, 2022

Datasheet says the ESP32-S3 supports 4 RX and 4 TX channels for RMT. DMA TX access on channel 3, RX access on channel 7. This RMT Neopixel example supposedly works with ESP32-S3 (I did not test it): https://github.com/espressif/arduino-esp32/blob/master/libraries/ESP32/examples/RMT/RMTWriteNeoPixel/RMTWriteNeoPixel.ino

And yes, CONFIG_IDF_TARGET_ESP32S3 should work. I forgot.

@Makuna
Copy link
Owner

Makuna commented Jun 12, 2022

#580

Try it now.

@Makuna Makuna added pending Pending new release; already merged but not released in a version and removed NOT AN ISSUE This was a question, please use gitter for general questions and help labels Jun 12, 2022
@Miraculix200
Copy link
Author

It compiles without errors and works. I'm using the NeoEsp32Rmt0800KbpsMethod though, not SPI.

@Makuna
Copy link
Owner

Makuna commented Jun 13, 2022

I2s is tracked by #559, its currently not supported for C3 or S3.

@Makuna Makuna reopened this Jun 21, 2022
@Makuna
Copy link
Owner

Makuna commented Jun 21, 2022

I am leaving this open until I create a released version that includes the changes. I marked it Pending, this means the github has the changes, but they haven't been officially released. Sort of wish I had a way for the author (you) to mark it as "I agree its fixed" without closing it.

@Makuna
Copy link
Owner

Makuna commented Feb 3, 2023

@Makuna Makuna closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending Pending new release; already merged but not released in a version
Projects
None yet
Development

No branches or pull requests

2 participants