m5stack / M5Stack

M5Stack Arduino Library
MIT License
1.19k stars 425 forks source link

Compilation errors #317

Closed Richrfl closed 2 weeks ago

Richrfl commented 8 months ago

Describe the bug

I have had compilation issues when calling the library and I had always compilation errors. Therefore, I cleaned up my libraries, and started a new project but still I have errors that I cannot explain or solve. Here is the project:

# include <M5Stack.h>;

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

and here is the error report:

In file included from c:\Users\rcric\Documents\Arduino\libraries\M5Stack\src/M5Display.h:8, from c:\Users\rcric\Documents\Arduino\libraries\M5Stack\src/M5Stack.h:111, from C:\Users\rcric\AppData\Local\Temp.arduinoIDE-unsaved2023927-53880-130vt5o.cddq\sketch_oct27a\sketch_oct27a.ino:1: c:\Users\rcric\Documents\Arduino\libraries\M5Stack\src/utility/In_eSPI.h:633:20: error: 'VSPI' was not declared in this scope uint8_t port = VSPI; ^~~~ c:\Users\rcric\Documents\Arduino\libraries\M5Stack\src/utility/In_eSPI.h:633:20: note: suggested alternative: 'SPI' uint8_t port = VSPI; ^~~~ SPI

exit status 1

Compilation error: exit status 1

I would appreciate any suggestion to fix this issue. I guess it's on my side, but I can't figure it out.

To reproduce

Create project Compile Board selected Adafruit QT Py ESP32-S3 No PSRAM.

Expected behavior

Success compilation

Screenshots

No response

Environment

Additional context

No response

Issue checklist

jackiehanlon commented 5 months ago

I had the same issue at first- this is simply due to using the incorrect library for your device. ESP32-S3 devices do not support VSPI, you will want to use the M5CoreS3 library rather than the M5Stack library. See this reddit post about the same issue for reference.

Tinyu-Zhao commented 2 weeks ago

I had the same issue at first- this is simply due to using the incorrect library for your device. ESP32-S3 devices do not support VSPI, you will want to use the M5CoreS3 library rather than the M5Stack library. See this reddit post about the same issue for reference.

Thank you for your answer.