I’ve got several ESP32 projects that build with no problem. I created a new project selecting board type “Espressif ESP32 Dev Module” and framework Arduino. The new project was successfully created. Then I copied all the files from src in an existing ESP32 project to src in the new project.
I also copied the platformio.ini file.
[env:esp32dev]
platform = espressif32 @ ~3.5.0
board = esp32dev
framework = arduino
lib_extra_dirs = ~/Documents/Arduino/libraries
monitor_speed = 115200
lib_deps =
ESP Async WebServer
bblanchon/ArduinoJson @ ^6.17.3
ottowinter/ArduinoJson-esphomelib@^6.15.2
; marian-craciunescu/ESP32Ping@^1.7
extra_scripts = pre:pre_compile.py
upload_port = COM6
monitor_port = COM6
; upload_protocol = espota
; upload_port = 192.168.0.125
When I do a build I get an error because it appears to be trying to use Raspberry Pi files:
Processing esp32dev (platform: espressif32 @ ~3.5.0; board: esp32dev; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
pre_compile.py running
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (3.5.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.10006.210326 (1.0.6)
- tool-esptoolpy @ 1.30100.210531 (3.1.0)
- toolchain-xtensa32 @ 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 34 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ESP Async WebServer @ 3.0.6
|-- ArduinoJson @ 6.21.6
|-- ArduinoJson-esphomelib @ 6.15.2
|-- FS @ 1.0
|-- SPIFFS @ 1.0
|-- Async TCP @ 3.1.4
|-- Update @ 1.0
|-- WiFi @ 1.0
|-- EEPROM @ 1.0.3
|-- ESPmDNS @ 1.0
|-- ArduinoOTA @ 1.0
Building in release mode
Compiling .pio\build\esp32dev\src\BuildTime.cpp.o
Compiling .pio\build\esp32dev\libcbb\AsyncTCP_RP2040W\AsyncPrinter.cpp.o
Compiling .pio\build\esp32dev\libcbb\AsyncTCP_RP2040W\AsyncTCP_RP2040W.cpp.o
Compiling .pio\build\esp32dev\libcbb\AsyncTCP_RP2040W\AsyncTCP_RP2040W_buffer.cpp.o
Compiling .pio\build\esp32dev\libcbb\AsyncTCP_RP2040W\SyncClient.cpp.o
In file included from .pio\libdeps\esp32dev\AsyncTCP_RP2040W\src\AsyncPrinter.h:51:0,
from .pio\libdeps\esp32dev\AsyncTCP_RP2040W\src\AsyncPrinter.cpp:51:
.pio\libdeps\esp32dev\AsyncTCP_RP2040W\src\AsyncTCP_RP2040W.h:73:4: error: #error For RASPBERRY_PI_PICO_W board using CYW43439WiFi only
#error For RASPBERRY_PI_PICO_W board using CYW43439 WiFi only
^
Then several more errors of the same type, i.e. from AsyncTCP_RP2040W`files.
I’ve never seen this before in several years of using PlatformIO. If you know how to fix it, any help would be greatly appreciated.
[Edit: I did a ‘clean’. All my source files built okay, but I still get the above error]