Struggling to Compile simple_port Example for Arduino IDE with Waveshare ESP32-S3-Touch-LCD-5 #184
Replies: 3 comments 6 replies
-
Hi @sabinhagen, Sorry you encountered this problem. Could you provide a complete project and configuration files used to reproduce the problem? This will help me quickly locate this problem. |
Beta Was this translation helpful? Give feedback.
-
Just an update on what I've been doing - maybe I should start a new discussion topic? Since the Arduino demo was capable of being configured and mostly compiled (but not properly linked), I decided to setup PlatformIO in VSCode to run the demo there using the Arduino framework. That's always a bit burdensome because VSCode intellisense doesn't always find the necessary includes, but with nowhere else to go, I decided to get that going. Using the PlatformIO library manager, I eventually noticed that the library code showing up in the .pio>libdeps>environmanet_name>ESP32_Display_Panel did NOT have the same files as the Arduino library folder had. PlatformIO said this library version was 1.1.1, but that it was released two years ago. The Arduino IDE showed it as v1.0.1, same as this repository. After looking at some of the files, it seemed that the PlatformIO version was before the refactoring with esp-lib-utils, so I removed the PlatformIO library and "manually" installed it into my project under the "lib" folder. And just to be safe, I did the same for the IO_Expander, esp-lib-utils, and lvgl v8.4. Good news is that I got things to compile. The bad news was that I could instantiate a board object, but when I called init, I saw an error message that the ESP32_Display_Panel could not load the default board config. Knowing that there were really only two config files that I needed, esp_panel_board_spported_conf.h and esp_panel_drivers_conf, I added two new #define macros to these two files and had my code check if these symbols exist at runtime. I have the board->init() call commented out, just trying things to see where the library really wants these two files to reside in PlatformIO in order to read them. I initially had them at the highest folder level of the ESP_Display_Panel library and that's where I had the first runtime error. I eventually found that my symbol was found when I placed esp_panel_drivers_conf.h in the ESP_Panel_Display>src>drivers folder. When I placed both files in just the >src folder, neither was found. And when I moved esp_panel_board_supported_conf.h to the src>board folder, I encountered a compile error:
I'm going to keep trying to get this demo working one way or another, just thought I'd report my findings. I think installs for PlatformIO are the environment that doesn't get as much documentation around demos, so hopefully this is helpful. |
Beta Was this translation helpful? Give feedback.
-
OK, 1 final comment. I did find that my initial Waveshare ESP32-S3-Touch-LCD-5B had a hardware problem. It wouldn't always program, and by the time I gave up on it, it failed to program the last 5-6 times I tried. I ordered a replacement and programming from PlatformIO has been flawless. So hardware problems are a real thing too. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to work with the subject board, and found that Waveshare's example code not fully functional out of the gate. So I thought I'd go right to this repository and give things another try. Here is what I tried.
I have LVGL v8.4 loaded into the Arduino IDE, as well as esp-lib-utils v0.0.2 and ESP32_Display_Panel v1.0.1 installed. These libraries and specific versions did allow to successfully the Waveshare demo 5, the IO test that fills the screen with either Red or Green depending on whether the extended Input channels read the high levels from the extended output channels. But I don't think I can avoid using a higher-level library like LVGL to actually make a display project the way I need it to.
So I downloaded the SimplePort example files and loaded them into a new Arduino project folder, went through all the settings according to the ReadMe markdown, and believe I have everything configured properly for this board. The compilation went for quite a long time and finally gave me a linker error:
C:/Users/scott.sabin/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\scott.sabin\AppData\Local\arduino\sketches\FE8CE605C241C9A0354B8614DBD97F75\libraries\ESP32_Display_Panel\board\objs.a(esp_panel_board.cpp.o):(.literal._ZN9esp_panel5board5Board4initEv+0x3c): undefined reference to `vtable for esp_panel::drivers::BusI2C'
So a linker issue, not a compilation issue. Any ideas on how I might resolve this?
Beta Was this translation helpful? Give feedback.
All reactions