You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code worked when Platformio Development environment is set to [env:esp32dev] but when changed to [env:wt32-eth01]
code fails with:
platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp: In member function 'void SPIClass::begin(int8_t, int8_t, int8_t, int8_t)':
/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:64:37: error: 'SCK' was not declared in this scope
_sck = (_spi_num == VSPI) ? SCK : 14;
Does not contain the same elements as the other library:
static const uint8_t SS = 5;
static const uint8_t MOSI = 23;
static const uint8_t MISO = 19;
static const uint8_t SCK = 18;
platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp: In member function 'void SPIClass::begin(int8_t, int8_t, int8_t, int8_t)':
/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:64:37: error: 'SCK' was not declared in this scope
_sck = (_spi_num == VSPI) ? SCK : 14;
Actually, it lacks SPI pin definition in pins_arduino.h for wt32-eth01 board.
But we should think about a schema similar to HardwareSerial, where we check if RX1, TX1 are defined in pins_arduino.h, otherwise it just uses some default definition.
@wmarchewka The author of the board doesn't declare the default SPI pins. Adding the same pins as default ones for ESP32 to the pins_arduino.h can conflict with Ethernet pins.
Board
WT32-ETH01
Device Description
WT32-ETH01
Hardware Configuration
#define VSPI_MISO -1
#define VSPI_CS 12
#define VSPI_SCLK 14
#define VSPI_MOSI 15
Version
v2.0.4
IDE Name
Platformio
Operating System
Mac OS 11.6
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
96100
Description
Code worked when Platformio Development environment is set to [env:esp32dev] but when changed to [env:wt32-eth01]
code fails with:
platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp: In member function 'void SPIClass::begin(int8_t, int8_t, int8_t, int8_t)':
/.platformio/packages/framework-arduinoespressif32/libraries/SPI/src/SPI.cpp:64:37: error: 'SCK' was not declared in this scope
_sck = (_spi_num == VSPI) ? SCK : 14;
It appears that the:
espressif/arduino-esp32/blob/master/variants/wt32-eth01/pins_arduino.h
Does not contain the same elements as the other library:
static const uint8_t SS = 5;
static const uint8_t MOSI = 23;
static const uint8_t MISO = 19;
static const uint8_t SCK = 18;
Sketch
Debug Message
Other Steps to Reproduce
https://community.platformio.org/t/wt32-eth01-spi-issue/28132/2
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: