Cannot compile: esp32_adc2gpio undefined

Compiling an example for esp32 and get this error (all examples gives the same error):

Using board ‘canmod_mini_v2’ from platform in folder: /Users/meg/Documents/ArduinoSketches/hardware/espressif/esp32

Using core ‘esp32’ from platform in folder:

/private/var/folders/3q/c4hlcgyn17q8rrwdv23bcvbw0000gn/T/arduino-sketch-34769411EF95ECC57F62D06DAC30C26C/sketch/ESP32_WiFi.ino.cpp -o /private/var/folders/3q/c4hlcgyn17q8rrwdv23bcvbw0000gn/T/arduino-sketch-34769411EF95ECC57F62D06DAC30C26C/sketch/ESP32_WiFi.ino.cpp.o
In file included from /Users/meg/Documents/ArduinoSketches/hardware/espressif/esp32/cores/esp32/esp32-hal-gpio.h:29,
from /Users/meg/Documents/ArduinoSketches/hardware/espressif/esp32/cores/esp32/esp32-hal.h:79,
from /Users/meg/Documents/ArduinoSketches/hardware/espressif/esp32/cores/esp32/Arduino.h:36,
from /private/var/folders/3q/c4hlcgyn17q8rrwdv23bcvbw0000gn/T/arduino-sketch-34769411EF95ECC57F62D06DAC30C26C/sketch/ESP32_WiFi.ino.cpp:1:
/Users/meg/Documents/ArduinoSketches/libraries/Blynk/src/BlynkApiArduino.h: In member function ‘void BlynkApi::processCmd(const void*, size_t)’:
/Users/meg/Documents/ArduinoSketches/hardware/espressif/esp32/variants/canmod_mini_v2/pins_arduino.h:10:48: error: ‘esp32_adc2gpio’ was not declared in this scope
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
^~~~~~~~~~~~~~
/Users/meg/Documents/ArduinoSketches/libraries/Blynk/src/BlynkApiArduino.h:69:62: note: in expansion of macro ‘analogInputToDigitalPin’
#define BLYNK_DECODE_PIN(it) (((it).asStr()[0] == ‘A’) ? analogInputToDigitalPin(atoi((it).asStr()+1)) : (it).asInt())
^~~~~~~~~~~~~~~~~~~~~~~
/Users/meg/Documents/ArduinoSketches/libraries/Blynk/src/BlynkApiArduino.h:92:25: note: in expansion of macro ‘BLYNK_DECODE_PIN’
const uint8_t pin = BLYNK_DECODE_PIN(it);
^~~~~~~~~~~~~~~~

Using library WiFi at version 2.0.0 in folder: /Users/meg/Documents/ArduinoSketches/hardware/espressif/esp32/libraries/WiFi
Using library Blynk at version 1.1.0 in folder: /Users/meg/Documents/ArduinoSketches/libraries/Blynk
exit status 1

Compilation error: exit status 1

What version of the ESP32 core do you have installed?

What type of board is this?
It’s certainly not a board definition that appears in the standard boards included in the latest 2.0.4 version of the ESP32 core. Is it one that you’ve created, or downloaded from somewhere?

What happens if you choose a different board type - like the ESP32 Dev Module?

Pete.

Arduino 2.0.0-rc9.2-nightly-20220814
Arduino-esp32 2.0.4

Its my own board, but I get the same error for all boards since “esp32_adc2gpio” is referenced in pins_arduino.h for all esp32 boards.

Well, the examples do compile okay, so it appears to be an issue with your Arduino IDE, ESP32 Core or Blynk library setup as far as I can tell from the information you’ve supplied.

Pete.