WT32-ETH01 spi issue

I have an issue with SPI on when using wt32-eth01.

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;
                                     ^~~

This previously worked when the environment and board was set to esp32dev.

#include <Arduino.h>
#include <SPI.h>

#define VSPI_MISO -1
#define VSPI_CS 12
#define VSPI_SCLK 14
#define VSPI_MOSI 15

SPIClass *vspi = NULL;

void setup(){
  vspi = new SPIClass(VSPI);                              //create spi
  vspi->begin(VSPI_SCLK, VSPI_MISO, VSPI_MOSI, VSPI_CS);  //SCLK, MISO, MOSI, SS
  pinMode(VSPI_CS, OUTPUT);                               //VSPI SS
  digitalWrite(VSPI_CS, HIGH);                            //pull ss high t 
}

void loop()
{
  delay(1);
}

Well looking at

there is no SCK pin created, unlike other variants like the esp32dev

So it looks like an Arduino core bug to me.

In any case, to satisfy the compilation, you are not running into that piece of code anyways (arduino-esp32/libraries/SPI/src/SPI.cpp at 33011ede3004276b14a46d4b010658b211540bd1 · espressif/arduino-esp32 · GitHub) so you might as well just add some defaults

build_flags =
   -DSS=5
   -DMOSI=23
   -DMISO=19
   -DSCK=18

to the platformio.ini.

Also, please file an issue at Issues · espressif/arduino-esp32 · GitHub.

Thank you for your help, I did file and issue.