Linking problems

I am beginning using the:

ESP32-S3-Touch-LCD-7
Waveshare display 7" with
ESP32-S3 using LVGL libraries with touch.

I followed the examples on the Instructions_wiki.pdf and, correcting some
errors, I was able to run them, except the lvgl_porting.
The example compiles, but at the linking phase it gives this error


Linking .pio\build\default\firmware.elf
C:/Users/JDS/.platformio/packages/toolchain-xtensa-esp-elf/bin/…/lib/gcc/xtensa-esp-elf/13.2.0/…/…/…/…/xtensa-esp-elf/bin/ld.exe: .pio\build\default\lvgl_Porting\main\rgb_lcd_example_main.c.o:(.literal.example_lvgl_touch_cb+0x0): undefined reference to `esp_lcd_touch_read_data’

and more errors all of this type.

The function `esp_lcd_touch_read_data’ exists, is declared and defined and reachable.

In between, I found that the function has a differente declaration/definition signature, that its use:
esp_lcd_touch_read_data(drv->user_data);

declaration/definition
esp_err_t esp_lcd_touch_read_data(esp_lcd_touch_handle_t tp);

So, the error!

I tried to find the same function, with the correct signature in the libraries I have, without success.

So, I declared/defined a function with the correct signature, trying to go on, but without success: same error.

I am using PlatformIo.

packages used:

PACKAGES:

  • framework-espidf @ 3.50202.0 (5.2.2)
  • tool-cmake @ 3.16.4
  • tool-esptoolpy @ 1.40501.0 (4.5.1)
  • tool-idf @ 1.0.1
  • tool-mconf @ 1.4060000.20190628 (406.0.0)
  • tool-ninja @ 1.9.0
  • tool-riscv32-esp-elf-gdb @ 11.2.0+20220823
  • tool-xtensa-esp-elf-gdb @ 11.2.0+20230208
  • toolchain-esp32ulp @ 1.23500.220830 (2.35.0)
  • toolchain-riscv32-esp @ 13.2.0+20230928
  • toolchain-xtensa-esp-elf @ 13.2.0+20230928

and lvgl libraries on the WAVESHARE examples
S3-7-libraries

Any idea for help?

Thanks in advance

Joaquim Silva

This is not correct due to the fact that drv->user_data is of type void *drv->user_data, so has a pointer type void.
So, this is not the problem.