-
As per Issue #385 at lovyan03/LovyanGFX I am looking for some help. Background is as follows: Need to integrate into an existing (large) "C" codebase using ESP IDF v5.x Looking for an example, simplest possible, to Any suggestions |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 12 replies
-
LovyanGFX configuration required for Makerfabs ESP32S3 3.5" 480x320 16bit parallel board is here for both Display & Touch. You cannot use LovyanGFX (C++) with C code. The only thing you need to do is to use extern "C" for your app_main and rename your extern "C" void app_main(void)
{
}
|
Beta Was this translation helpful? Give feedback.
-
The above config works for IDF 4.x |
Beta Was this translation helpful? Give feedback.
-
Everything you have mentioned I have done. The compile goes through with 3 deprecation warnings for driver/definition issuesBUT it then fails in the linker stage. I am using a 100% copy of the simplest test example from the library, with setup() and loop() code called, at the appropriate stages, from my task. Linker errors are as follows: /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.literal.spi_master_init_driver+0x4c): undefined reference to `spi_hal_deinit' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.iram1.6.literal+0x0): undefined reference to `spi_hal_fetch_result' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.iram1.0.literal+0x0): undefined reference to `spi_hal_setup_device' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.iram1.5.literal+0x0): undefined reference to `spi_hal_setup_trans' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.iram1.5.literal+0x4): undefined reference to `spi_hal_prepare_data' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.iram1.5.literal+0x8): undefined reference to `spi_hal_user_start' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.iram1.7.literal+0x18): undefined reference to `spi_hal_usr_is_done' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj):(.literal.spi_bus_add_device+0x48): undefined reference to `spi_hal_cal_clock_conf' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_master_init_driver': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:241: undefined reference to `spi_hal_init' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:255: undefined reference to `spi_hal_deinit' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_master_deinit_driver': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:277: undefined reference to `spi_hal_deinit' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_post_trans': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:604: undefined reference to `spi_hal_fetch_result' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_setup_device': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:502: undefined reference to `spi_hal_setup_device' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_new_trans': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:589: undefined reference to `spi_hal_setup_trans' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:590: undefined reference to `spi_hal_prepare_data' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:595: undefined reference to `spi_hal_user_start' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_intr': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:619: undefined reference to `spi_hal_usr_is_done' /Users/andremaree/.espressif/tools/xtensa-esp32-elf/esp-2022r1-11.2.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/11.2.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/driver/libdriver.a(spi_master.c.obj): in function `spi_bus_add_device': /Users/andremaree/Dropbox/devs/ws/z-sdk/esp-idf/components/driver/spi_master.c:371: undefined reference to |
Beta Was this translation helpful? Give feedback.
-
Looks like these are related to IDF 5.x breaking changes. Which version are you using? IDF 5.0 or IDF 5.1? Both are unreleased. You can check this for SPI changes in IDF 5.x as a start since the file name has changed. This is the reason I didn't jump on IDF 5.x and waiting till its released. Unreleased versions are always a moving target. |
Beta Was this translation helpful? Give feedback.
-
@ammaree Also did you switch to |
Beta Was this translation helpful? Give feedback.
-
Using ESP IDF Master, so effectively RC5.0
Yes, switched to Lovyan develop branch
On 2022/11/30, 17:38, "Sukesh Ashok Kumar" ***@***.******@***.***>> wrote:
@ammaree<https://github.com/ammaree> Also did you switch to develop branch in LovyanGFX ?
—
Reply to this email directly, view it on GitHub<#5 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAYT7GFLEZNMKNOXKPMQYJLWK5YFLANCNFSM6AAAAAASPJFM4A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Btw, you said you have Parallel version of the display. The error you mentioned says SPI, so something is not right. Master is 5.1 I believe. |
Beta Was this translation helpful? Give feedback.
-
@ammaree LovyanGFX only (no LVGL) |
Beta Was this translation helpful? Give feedback.
-
Thanks, need to swing build environment back to Makerfabs config to build this, will test bit later tonight |
Beta Was this translation helpful? Give feedback.
-
My link problem, using your email code, remains the same when tested in the IDF v5 environment. Testing in Arduino might be different, not sure if Arduino is using latest from IDF. ESP IDF v5.0 has just been officially released as a stable version, maybe somebody can convince LGFX maintainers to complete their migration. Possibly get it ready and integrated as an official component at https://components.espressif.com I can only hope.... |
Beta Was this translation helpful? Give feedback.
-
What I mean is that there are compile error related to LGFX includes and symbols that need to be changed/fixed for IDF v5.0. Example: |
Beta Was this translation helpful? Give feedback.
@ammaree
Here is a sample you can copy past in Arduino or use in IDF.
Draw using your finger on the screen.
LovyanGFX only (no LVGL)
https://gist.github.com/sukesh-ak/7bcafd2227a2c2fa727208f4ffa47308