Just for including the bb_spi_lcd.h I get always the same error:
.pio/libdeps/cheap_yellow/bb_spi_lcd/src/bb_spi_lcd.cpp:127:10: fatal error: esp_psram.h: No such file or directory
It seems it is unable to find esp_psram.h
That file is included with all Arduino IDE libraries and thou the same code complies without problem under Arduino IDE.
The curious thing is that I’ve had some other projects running with this library under PlatformIO with Visual Studio Code some time ago, so I suppose I has to be with any update.
It might be possible that this header only exists in newer ESP-IDF versions (which is in turn used by newer Arduino-ESP32 core versions). The current version of platform-espressif32 still uses Arduino-ESP32 2.0.17.
To try compilation with Arduino-ESP32 3.x, use the pioarduino platform. For that, use a platformio.ini of e.g.
I’ve tried your suggestion and at least something changed.
Now I get a different error not finding the compiler:
sh: xtensa-esp32-elf-g++: command not found
I’ve tried to specify manually the compiler path through the compilerPath setting but of no help.
Any other suggestion?
This is beginning to make me crazy, too much days without being able to begin to work. Considering going back to Arduino IDE where it does compile and upload without any trouble.
I don’t really get the point of the error when it has been compiling on Visual Studio Code + PlatformIO before.
* Executing task: platformio run --target clean --environment cheap_yellow
Processing cheap_yellow (platform: espressif32; board: esp32dev; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
idf_tools.py installation failed
Verbose mode can be enabled via `-v, --verbose` option
idf_tools.py installation failed
Removing .pio/build/cheap_yellow
Done cleaning
========================================================================== [SUCCESS] Took 0.44 seconds ==========================================================================
* Terminal will be reused by tasks, press any key to close it.
Project Task Build:
Executing task: platformio run --environment cheap_yellow
Processing cheap_yellow (platform: espressif32; board: esp32dev; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
idf_tools.py installation failed
idf_tools.py installation failed
Verbose mode can be enabled via `-v, --verbose` option
idf_tools.py installation failed
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (54.3.21) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.2.1
- framework-arduinoespressif32-libs @ 5.4.0+sha.858a988d6e
- tool-esptoolpy @ 5.0.0
- toolchain-xtensa-esp-elf @ 14.2.0+20241119
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 42 compatible libraries
Scanning dependencies...
Dependency Graph
|-- bb_spi_lcd @ 2.9.7
Building in release mode
Compiling .pio/build/cheap_yellow/lib0f1/SPI/SPI.cpp.o
sh: xtensa-esp32-elf-g++: command not found
Compiling .pio/build/cheap_yellow/liba28/Wire/Wire.cpp.o
*** [.pio/build/cheap_yellow/lib0f1/SPI/SPI.cpp.o] Error 127
sh: xtensa-esp32-elf-g++: command not found
*** [.pio/build/cheap_yellow/liba28/Wire/Wire.cpp.o] Error 127
=========================================================================== [FAILED] Took 1.06 seconds ===========================================================================
* The terminal process "platformio 'run', '--environment', 'cheap_yellow'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
That’s because espressif32 now is that pioarduino’s version. It takes its place as the “highest installed platform version”. If you want to go back to PlatformIO’s (outdated) espressif32 version, you would have to specify them by version number, e.g., platform = espressif32@6.11.0.
Did uploading work fine? If there’s still the issue of your board being an ESP32S3 while you have your platformio.ini set for a regular ESP32, then nothing should work
What exact board are you uploading to? Any store link?
Screenshot of your Arduino IDE → Tools menu with which it works?
Any serial output? (project task → upload and monitor). This might need you to set the baud rate the firmware uses, e.g., monitor_speed = 115200 in the platformio.ini.
Yes, the uploading was all fine. I have just uploaded another project that uses TFT_eSPI instead of bb_spi_lcd with the same board esp32dev in platformio.ini and, as usual, works perfectly. I’m sure it is not an issue of the board.
The exact board I^'0m using is a Cheap Yellow Display of type 2432S028R (Pantalla ESP32 de 2,8)
The versions installed in Arduino IDE are
esp32 version 2.0.18
bb_spi_lcd version 2.9.7
The screenshot I sent shows DISPLAY_CYD_2USB because I have 2 CYDs, one with 1 USB port (DISPLAY_CYD) and another with 2 USB ports (DISPLAY_CYD_2USB)
I’m making all kind of tests with both and the problem is always the same: I can program any of them under Arduino IDE with any library (TFT_eSPI or bb_spi_lcd) but under VSC + PIO (once you pointed out the change of platform) I can only get results with TFT_eSPI, if I use bb_spi_lcd it compiles and uploads but I only get a blank screen
Thank you very much once again. I won’t have any way of giving you back all your efforts.
Are you sure? Can you show a screenshot? The Espressif core does not have 2.0.18. And the “Arduino ESP32 core” is not relevant because you don’t have an Arduino Nano ESP32.
Delete your entire ~/.platformio folder. If you have anything in there that you need backed up (old critical versions that aren’t published anymore or whatever), back them up. Otherwise, just rm -rf ~/.platformio
Re-Open VSCode. Wait a bit to let it reinstall everything.
I then need you to test the same example code in the Arduino IDE and PlatformIO, with the same display type configured. Use an example code like https://github.com/bitbank2/bb_spi_lcd/tree/master/examples/cyd_gif_demo instead of your own (more complicated sketch). What exact display code and pins are you choosing? Is the result the same on the Arduino IDE and PlatformIO?