Adafruit GFX example does not work

A yaer ago I used Adafruit GFX on a ESP32.

Today, the code does not compile, so I downloaded the example 'Hello world' Does not compile either.

Adafruit GFX is at level 1.12.6 latest version

What's wrong ?

I would check this:

  • ESP32 board package version
  • Adafruit BusIO installed
  • correct display driver library installed
  • first compiler error in the log

Adafruit GFX itself is usually not the problem.

Hi @JLBCS.

I'm going to ask you to provide the full output from a compilation.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Open the sketch in Arduino IDE.
  2. Select Sketch > Verify/Compile from the Arduino IDE menus.
  3. Wait for the compilation to fail.
  4. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  5. Open a reply here on this forum topic by clicking the "Reply" button.
  6. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  7. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  8. Move the cursor outside of the code block markup before you add any additional text to your reply.
  9. Click the "Reply" button to publish the post.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here.

Click here for attachment instructions

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a reply here on this forum topic by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:

    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

Here is the environment:

Board ESP32-WROOM-32

Adafruit Busio 1.17.4
Adafruit GFX Lirary 1.12.6
ESP32 ESP3252 Analogwrte 5.02
ESP32_IO_Expender 1.1.1
EspSoftwareSerial 8.1.0

Error message attached

Thanks

ADA_TV.txt (64.3 KB)

When I specify board ESP32-WROOM-DA module the error txt is

ADA_WROOM.txt (72.0 KB)

The issue doesn't seem to be with Adafruit GFX itself, but rather all the errors and warnings appear to be originating from ESP_8_BIT_GFX.h, which is included in GFX_HelloWorld.ino.

"C:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp-x32\\2601/bin/xtensa-esp32-elf-g++" -MMD -c "@C:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-libs\\3.3.8/flags/cpp_flags" -Wall -Wextra -Os -Werror=return-type -DF_CPU=240000000L -DARDUINO=10607 -DARDUINO_ESP32_WROOM_DA -DARDUINO_ARCH_ESP32 "-DARDUINO_BOARD=\"ESP32_WROOM_DA\"" "-DARDUINO_VARIANT=\"esp32da\"" -DARDUINO_PARTITION_default "-DARDUINO_HOST_OS=\"windows\"" "-DARDUINO_FQBN=\"esp32:esp32:esp32da:UploadSpeed=921600,CPUFreq=240,FlashFreq=80,FlashMode=qio,FlashSize=4M,PartitionScheme=default,DebugLevel=none,LoopCore=1,EventsCore=1,EraseFlash=none\"" -DESP32=ESP32 -DCORE_DEBUG_LEVEL=0 -DARDUINO_RUNNING_CORE=1 -DARDUINO_EVENT_RUNNING_CORE=1 -DARDUINO_USB_CDC_ON_BOOT=0 "@C:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-libs\\3.3.8/flags/defines" "-IC:\\Users\\jacques\\AppData\\Local\\Temp\\.arduinoIDE-unsaved202648-12896-og7b19.r1olo\\GFX_HelloWorld" -iprefix "C:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-libs\\3.3.8/include/" "@C:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-libs\\3.3.8/flags/includes" "-IC:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\tools\\esp32-libs\\3.3.8/qio_qspi/include" "-IC:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.8\\cores\\esp32" "-IC:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.8\\variants\\esp32da" "-Ic:\\Users\\jacques\\Documents\\Arduino\\libraries\\ESP_8_BIT_Color_Composite_Video_Library" "-Ic:\\Users\\jacques\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-Ic:\\Users\\jacques\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-IC:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.8\\libraries\\Wire\\src" "-IC:\\Users\\jacques\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\3.3.8\\libraries\\SPI\\src" "@C:\\Users\\jacques\\AppData\\Local\\arduino\\sketches\\A75646B8D9D28938C5DD3AA1E05011EB/build_opt.h" "@C:\\Users\\jacques\\AppData\\Local\\arduino\\sketches\\A75646B8D9D28938C5DD3AA1E05011EB/file_opts" "C:\\Users\\jacques\\AppData\\Local\\arduino\\sketches\\A75646B8D9D28938C5DD3AA1E05011EB\\sketch\\GFX_HelloWorld.ino.cpp" -o "C:\\Users\\jacques\\AppData\\Local\\arduino\\sketches\\A75646B8D9D28938C5DD3AA1E05011EB\\sketch\\GFX_HelloWorld.ino.cpp.o"
In file included from c:\Users\jacques\Documents\Arduino\libraries\ESP_8_BIT_Color_Composite_Video_Library/ESP_8_BIT_composite.h:47,
                 from c:\Users\jacques\Documents\Arduino\libraries\ESP_8_BIT_Color_Composite_Video_Library/ESP_8_BIT_GFX.h:64,
                 from C:\Users\jacques\AppData\Local\Temp\.arduinoIDE-unsaved202648-12896-og7b19.r1olo\GFX_HelloWorld\GFX_HelloWorld.ino:38:

If you are using the ESP_8_BIT Color Composite Video Out Library, please try again with the ESP32 platform package changed from 3.3.8 to 2.0.17.

For reference: Compilation failures after updating to v3.x ESP32 Arduino Core · Issue #56 · Roger-random/ESP_8_BIT_composite · GitHub

As far as I understood: Your log shows ESP32 core 3.3.8, while this composite video library seems to be older and may not be compatible with ESP32 core 3.x.

Give this a try:

  1. selecting another version of “esp32 by Espressif Systems”
  2. installing an ESP32 core 2.x version (for example 2.0.14)

I changed “esp32 by Espressif Systems” to version 2.0.17 instead of 3.3.8 and miracolo, it woks!

Thank you

I works today but what about tomorrow ?

Congratulation!

Tomorrow is another day. Let's leave tomorrow's work to tomorrow's self!

The important thing is to avoid upgrading your installation of the "esp32" boards platform back to the incompatible version.

Arduino IDE will occasionally notify you that a new version of the boards platform is available, you'll need to refrain from clicking the "INSTALL ALL" button in that dialog (which would result in the "esp32" platform being updated back to the latest version. If you find these notifications annoying, you can disable them via the IDE preferences.

I'll provide instructions you can follow to do that:

  1. Select File > Preferences... (or Arduino > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to "Check for updates on startup" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.

If you disable the automatic update check, make sure to periodically do a manual check for newer versions of those installed boards platforms and libraries you do wish to keep updated. You can check for new versions of Arduino IDE by selecting Help > Check for Arduino IDE Updates from the Arduino IDE menus. You can check for new versions of boards platforms and libraries by selecting "Updatable" from the "Type" menu in the Boards Manager and Library Manager views.