Skip to content

Problem with TFT_eFEX on latest version of espressif32 arduino framework dependancy #592

@renegadeandy

Description

@renegadeandy

I am using a ESP32-WROOM-32 with GuiSlice and the TFT_eFEX and TFT_eSPI successfully. For various reasons I changed my platform code to use : https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip which I believe is newer than I originally used.

Since doing this, when I compile my application it fails with:

.pio/libdeps/esp32dev/TFT_eFEX/TFT_eFEX.cpp: In function 'bool jpgDecode(jpg_file_decoder_t*, uint32_t (*)(JDEC*, uint8_t*, uint32_t))':
.pio/libdeps/esp32dev/TFT_eFEX/TFT_eFEX.cpp:1314:41: error: invalid conversion from 'uint32_t (*)(JDEC*, uint8_t*, uint32_t)' {aka 'long unsigned int (*)(JDEC*, unsigned char*, long unsigned int)'} to 'UINT (*)(JDEC*, BYTE*, UINT)' {aka 'unsigned int (*)(JDEC*, unsigned char*, unsigned int)'} [-fpermissive]
 1314 |     JRESULT jres = jd_prepare(&decoder, reader, work, 3100, jpeg);
      |                                         ^~~~~~
      |                                         |
      |                                         uint32_t (*)(JDEC*, uint8_t*, uint32_t) {aka long unsigned int (*)(JDEC*, unsigned char*, long unsigned int)}
In file included from .pio/libdeps/esp32dev/TFT_eFEX/TFT_eFEX.h:23:
C:/Users/Andy/.platformio/packages/framework-arduinoespressif32-libs/esp32/include/esp_rom/esp32/include/esp32/rom/tjpgd.h:91:28: note:   initializing argument 2 of 'JRESULT jd_prepare(JDEC*, UINT (*)(JDEC*, BYTE*, UINT), void*, UINT, void*)'
   91 | JRESULT jd_prepare (JDEC*, UINT(*)(JDEC*,BYTE*,UINT), void*, UINT, void*);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~
.pio/libdeps/esp32dev/TFT_eFEX/TFT_eFEX.cpp:1334:32: error: invalid conversion from 'uint32_t (*)(JDEC*, void*, JRECT*)' {aka 'long unsigned int (*)(JDEC*, void*, JRECT*)'} to 'UINT (*)(JDEC*, void*, JRECT*)' {aka 'unsigned int (*)(JDEC*, void*, JRECT*)'} [-fpermissive]
 1334 |     jres = jd_decomp(&decoder, jpgWrite, (uint8_t)jpeg->scale);
      |                                ^~~~~~~~
      |                                |
      |                                uint32_t (*)(JDEC*, void*, JRECT*) {aka long unsigned int (*)(JDEC*, void*, JRECT*)}
C:/Users/Andy/.platformio/packages/framework-arduinoespressif32-libs/esp32/include/esp_rom/esp32/include/esp32/rom/tjpgd.h:92:27: note:   initializing argument 2 of 'JRESULT jd_decomp(JDEC*, UINT (*)(JDEC*, void*, JRECT*), BYTE)'
   92 | JRESULT jd_decomp (JDEC*, UINT(*)(JDEC*,void*,JRECT*), BYTE);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~

I read about a similar issue which didn't seem to get resolved on the TFT_eFEX repo here:Bodmer/TFT_eFEX#44

I decided to just comment out those declarations from the library and then I hit GUISlice issues as it dependended on these jpg functions:

toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/esp32dev/lib9f7/GUIslice-0.17.2/GUIslice_drv_tft_espi.cpp.o:(.literal.gslc_DrvDrawJpegFromFile+0x4): undefined reference to TFT_eFEX::drawJpgFile(fs::FS&, char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, jpeg_div_t)' toolchain-xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: .pio/build/esp32dev/lib9f7/GUIslice-0.17.2/GUIslice_drv_tft_espi.cpp.o: in function gslc_DrvDrawJpegFromFile':
.pio/libdeps/esp32dev/GUIslice-0.17.2/src/GUIslice_drv_tft_espi.cpp:1080:(.text.gslc_DrvDrawJpegFromFile+0x22): undefined reference to `TFT_eFEX::drawJpgFile(fs::FS&, char const*, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, unsigned short, jpeg_div_t)

I am using an image element in GUISlice : gslc_ElemCreateImg, to display a bitmap.

Can you help:
1/Get my project compiling again
2/The challenge we now have with the TFT_eFEX compatibility?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions