Skip to content

Cannot compile for ESP32S3 #1615

Closed
Closed

Description

@TTXL3099

When I tried to compile for the ESP32S3, the arduinoIDE reported an error

note: #pragma message: No hardware SPI pins defined.  All SPI access will default to bitbanged output
 #      pragma message "No hardware SPI pins defined.  All SPI access will default to bitbanged output"
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
E:\G\Mixly2.0\testArduino\testArduino.ino:178:26: error: 'VSPI' was not declared in this scope
  SPIClass spi = SPIClass(VSPI);
                          ^~~~
E:\G\Mixly2.0\testArduino\testArduino.ino:178:26: note: suggested alternative: 'SPI'
  SPIClass spi = SPIClass(VSPI);
                          ^~~~
                          SPI

I've already tried #1610 #1552 But still
arduinoIDE 1.8.19
ESP32 2.0.15
@coryking
Please excuse my poor English……

Activity

  1. huster-songtao commented on May 4, 2024

    @huster-songtao

    To enable the hardware SPI driver, add the following line before including FastLED.h:

    #define FASTLED_ALL_PINS_HARDWARE_SPI
    This driver uses the VSPI bus by default (GPIO 18, 19, 23, & 5). To use the HSPI bus (GPIO 14, 12, 13, & 15) add the following line before including FastLED.h:
    #define FASTLED_ESP32_SPI_BUS HSPI

    * #define FASTLED_ESP32_SPI_BUS HSPI

    // Conditional compilation for ESP32-S3 to utilize its flexible SPI capabilities
    #if CONFIG_IDF_TARGET_ESP32S3
    #pragma message "Targeting ESP32S3, which has better SPI support. Configuring for flexible pin assignment."
    #undef FASTLED_ESP32_SPI_BUS
    // I think we have to "fake" being FSPI... there might be a better way to do this.
    // whatever the case, this "tricks" the pin assignment defines below into using DATA_PIN & CLOCK_PIN
    #define FASTLED_ESP32_SPI_BUS FSPI
    #else // Configuration for other ESP32 variants
    #ifndef FASTLED_ESP32_SPI_BUS
    #pragma message "Setting ESP32 SPI bus to VSPI by default"
    #define FASTLED_ESP32_SPI_BUS VSPI
    #endif
    #endif

    I'm also looking at solutions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions