esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

User avatar
山竹君_kk
Posts: 17
Joined: Mon Nov 01, 2021 2:33 am

esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

Postby 山竹君_kk » Fri Nov 19, 2021 8:19 am

系统:win7.
环境:VScode
工具链:esp-idf-v4.4-dev。
问题:
我设置目标芯片为esp32-s3:idf.py --preview set-target esp32s3。然后编译以往esp-idf-v4.2.2能正常编译的带LVGL工程,出现如下错误:
....................
..................
[72/86] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[73/86] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[74/86] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[75/86] Linking C static library esp-idf\log\liblog.a
[76/86] Linking C static library esp-idf\esp_rom\libesp_rom.a
[77/86] Linking C static library esp-idf\esp_hw_support\libesp_hw_support.a
[78/86] Linking C static library esp-idf\efuse\libefuse.a
[79/86] Linking C static library esp-idf\bootloader_support\libbootloader_support.a
[80/86] Linking C static library esp-idf\spi_flash\libspi_flash.a
[81/86] Linking C static library esp-idf\micro-ecc\libmicro-ecc.a
[82/86] Linking C static library esp-idf\soc\libsoc.a
[83/86] Linking C static library esp-idf\hal\libhal.a
[84/86] Linking C static library esp-idf\main\libmain.a
[85/86] Linking C executable bootloader.elf
[86/86] Generating binary image from built executable
esptool.py v3.1-dev
Merged 1 ELF section
Generated D:/ESP32_S3/blufi/build/bootloader/bootloader.bin
[1327/1395] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/esp_lcd_backlight.c.obj
FAILED: esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/esp_lcd_backlight.c.obj
ccache D:\ESP32_S3\.espressif\tools\xtensa-esp32s3-elf\esp-2020r3-8.4.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -Iconfig -I../components/lvgl_esp32_drivers -I../components/lvgl_esp32_drivers/lvgl_tft -ID:/ESP32_S3/esp-idf/components/newlib/platform_include -ID:/ESP32_S3/esp-idf/components/freertos/include -ID:/ESP32_S3/esp-idf/components/freertos/port/xtensa/include -ID:/ESP32_S3/esp-idf/components/esp_hw_support/include -ID:/ESP32_S3/esp-idf/components/esp_hw_support/port/esp32s3/. -ID:/ESP32_S3/esp-idf/components/esp_hw_support/port/esp32s3/private_include -ID:/ESP32_S3/esp-idf/components/heap/include -ID:/ESP32_S3/esp-idf/components/log/include -ID:/ESP32_S3/esp-idf/components/lwip/include/apps -ID:/ESP32_S3/esp-idf/components/lwip/include/apps/sntp -ID:/ESP32_S3/esp-idf/components/lwip/lwip/src/include -ID:/ESP32_S3/esp-idf/components/lwip/port/esp32/include -ID:/ESP32_S3/esp-idf/components/lwip/port/esp32/include/arch -ID:/ESP32_S3/esp-idf/components/soc/include -ID:/ESP32_S3/esp-idf/components/soc/esp32s3/. -ID:/ESP32_S3/esp-idf/components/soc/esp32s3/include -ID:/ESP32_S3/esp-idf/components/hal/esp32s3/include -ID:/ESP32_S3/esp-idf/components/hal/include -ID:/ESP32_S3/esp-idf/components/esp_rom/include -ID:/ESP32_S3/esp-idf/components/esp_rom/esp32s3 -ID:/ESP32_S3/esp-idf/components/esp_common/include -ID:/ESP32_S3/esp-idf/components/esp_system/include -ID:/ESP32_S3/esp-idf/components/esp32s3/include -ID:/ESP32_S3/esp-idf/components/driver/include -ID:/ESP32_S3/esp-idf/components/driver/esp32s3/include -ID:/ESP32_S3/esp-idf/components/esp_ringbuf/include -ID:/ESP32_S3/esp-idf/components/efuse/include -ID:/ESP32_S3/esp-idf/components/efuse/esp32s3/include -ID:/ESP32_S3/esp-idf/components/xtensa/include -ID:/ESP32_S3/esp-idf/components/xtensa/esp32s3/include -ID:/ESP32_S3/esp-idf/components/espcoredump/include -ID:/ESP32_S3/esp-idf/components/esp_timer/include -ID:/ESP32_S3/esp-idf/components/esp_ipc/include -ID:/ESP32_S3/esp-idf/components/esp_pm/include -ID:/ESP32_S3/esp-idf/components/vfs/include -ID:/ESP32_S3/esp-idf/components/esp_wifi/include -ID:/ESP32_S3/esp-idf/components/esp_wifi/esp32s3/include -ID:/ESP32_S3/esp-idf/components/esp_event/include -ID:/ESP32_S3/esp-idf/components/esp_netif/include -ID:/ESP32_S3/esp-idf/components/esp_eth/include -ID:/ESP32_S3/esp-idf/components/tcpip_adapter/include -ID:/ESP32_S3/esp-idf/components/app_trace/include -I../components/lvgl -I../components/lvgl/src -I../components -mlongcalls -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4-dev\" -DESP_PLATFORM -MD -MT esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/esp_lcd_backlight.c.obj -MF esp-idf\lvgl_esp32_drivers\CMakeFiles\__idf_lvgl_esp32_drivers.dir\lvgl_tft\esp_lcd_backlight.c.obj.d -o esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/esp_lcd_backlight.c.obj -c ../components/lvgl_esp32_drivers/lvgl_tft/esp_lcd_backlight.c
../components/lvgl_esp32_drivers/lvgl_tft/esp_lcd_backlight.c: In function 'disp_backlight_new':
../components/lvgl_esp32_drivers/lvgl_tft/esp_lcd_backlight.c:59:9: error: implicit declaration of function 'gpio_matrix_out'; did you mean 'gpio_iomux_out'? [-Werror=implicit-function-declaration]
gpio_matrix_out(config->gpio_num, ledc_periph_signal[LEDC_LOW_SPEED_MODE].sig_out0_idx + config->channel_idx, config->output_invert, 0);
^~~~~~~~~~~~~~~
gpio_iomux_out
../components/lvgl_esp32_drivers/lvgl_tft/esp_lcd_backlight.c:65:9: error: implicit declaration of function 'gpio_pad_select_gpio'; did you mean 'gpio_reset_pin'? [-Werror=implicit-function-declaration]
gpio_pad_select_gpio(config->gpio_num);
^~~~~~~~~~~~~~~~~~~~
gpio_reset_pin
cc1.exe: some warnings being treated as errors
[1330/1395] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_helpers.c.obj
FAILED: esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_helpers.c.obj
ccache D:\ESP32_S3\.espressif\tools\xtensa-esp32s3-elf\esp-2020r3-8.4.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -Iconfig -I../components/lvgl_esp32_drivers -I../components/lvgl_esp32_drivers/lvgl_tft -ID:/ESP32_S3/esp-idf/components/newlib/platform_include -ID:/ESP32_S3/esp-idf/components/freertos/include -ID:/ESP32_S3/esp-idf/components/freertos/port/xtensa/include -ID:/ESP32_S3/esp-idf/components/esp_hw_support/include -ID:/ESP32_S3/esp-idf/components/esp_hw_support/port/esp32s3/. -ID:/ESP32_S3/esp-idf/components/esp_hw_support/port/esp32s3/private_include -ID:/ESP32_S3/esp-idf/components/heap/include -ID:/ESP32_S3/esp-idf/components/log/include -ID:/ESP32_S3/esp-idf/components/lwip/include/apps -ID:/ESP32_S3/esp-idf/components/lwip/include/apps/sntp -ID:/ESP32_S3/esp-idf/components/lwip/lwip/src/include -ID:/ESP32_S3/esp-idf/components/lwip/port/esp32/include -ID:/ESP32_S3/esp-idf/components/lwip/port/esp32/include/arch -ID:/ESP32_S3/esp-idf/components/soc/include -ID:/ESP32_S3/esp-idf/components/soc/esp32s3/. -ID:/ESP32_S3/esp-idf/components/soc/esp32s3/include -ID:/ESP32_S3/esp-idf/components/hal/esp32s3/include -ID:/ESP32_S3/esp-idf/components/hal/include -ID:/ESP32_S3/esp-idf/components/esp_rom/include -ID:/ESP32_S3/esp-idf/components/esp_rom/esp32s3 -ID:/ESP32_S3/esp-idf/components/esp_common/include -ID:/ESP32_S3/esp-idf/components/esp_system/include -ID:/ESP32_S3/esp-idf/components/esp32s3/include -ID:/ESP32_S3/esp-idf/components/driver/include -ID:/ESP32_S3/esp-idf/components/driver/esp32s3/include -ID:/ESP32_S3/esp-idf/components/esp_ringbuf/include -ID:/ESP32_S3/esp-idf/components/efuse/include -ID:/ESP32_S3/esp-idf/components/efuse/esp32s3/include -ID:/ESP32_S3/esp-idf/components/xtensa/include -ID:/ESP32_S3/esp-idf/components/xtensa/esp32s3/include -ID:/ESP32_S3/esp-idf/components/espcoredump/include -ID:/ESP32_S3/esp-idf/components/esp_timer/include -ID:/ESP32_S3/esp-idf/components/esp_ipc/include -ID:/ESP32_S3/esp-idf/components/esp_pm/include -ID:/ESP32_S3/esp-idf/components/vfs/include -ID:/ESP32_S3/esp-idf/components/esp_wifi/include -ID:/ESP32_S3/esp-idf/components/esp_wifi/esp32s3/include -ID:/ESP32_S3/esp-idf/components/esp_event/include -ID:/ESP32_S3/esp-idf/components/esp_netif/include -ID:/ESP32_S3/esp-idf/components/esp_eth/include -ID:/ESP32_S3/esp-idf/components/tcpip_adapter/include -ID:/ESP32_S3/esp-idf/components/app_trace/include -I../components/lvgl -I../components/lvgl/src -I../components -mlongcalls -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4-dev\" -DESP_PLATFORM -MD -MT esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_helpers.c.obj -MF esp-idf\lvgl_esp32_drivers\CMakeFiles\__idf_lvgl_esp32_drivers.dir\lvgl_helpers.c.obj.d -o esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_helpers.c.obj -c ../components/lvgl_esp32_drivers/lvgl_helpers.c
../components/lvgl_esp32_drivers/lvgl_helpers.c: In function 'lvgl_spi_driver_init':
../components/lvgl_esp32_drivers/lvgl_helpers.c:181:2: error: #error "Target chip not selected"
#error "Target chip not selected"
^~~~~
In file included from ../components/lvgl_esp32_drivers/lvgl_helpers.c:11:
../components/lvgl_esp32_drivers/lvgl_helpers.c:184:51: error: 'spi_names' undeclared (first use in this function); did you mean 'gpio_num_t'?
ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host);
^~~~~~~~~
D:/ESP32_S3/esp-idf/components/log/include/esp_log.h:334:137: note: in definition of macro 'ESP_LOG_LEVEL'
if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
^~~~~~~~~~~
D:/ESP32_S3/esp-idf/components/log/include/esp_log.h:301:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
#define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~
../components/lvgl_esp32_drivers/lvgl_helpers.c:184:5: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host);
^~~~~~~~
../components/lvgl_esp32_drivers/lvgl_helpers.c:184:51: note: each undeclared identifier is reported only once for each function it appears in
ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host);
^~~~~~~~~
D:/ESP32_S3/esp-idf/components/log/include/esp_log.h:334:137: note: in definition of macro 'ESP_LOG_LEVEL'
if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } \
^~~~~~~~~~~
D:/ESP32_S3/esp-idf/components/log/include/esp_log.h:301:38: note: in expansion of macro 'ESP_LOG_LEVEL_LOCAL'
#define ESP_LOGI( tag, format, ... ) ESP_LOG_LEVEL_LOCAL(ESP_LOG_INFO, tag, format, ##__VA_ARGS__)
^~~~~~~~~~~~~~~~~~~
../components/lvgl_esp32_drivers/lvgl_helpers.c:184:5: note: in expansion of macro 'ESP_LOGI'
ESP_LOGI(TAG, "Configuring SPI host %s (%d)", spi_names[host], host);
^~~~~~~~
[1331/1395] Building C object esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9341.c.obj
FAILED: esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9341.c.obj
ccache D:\ESP32_S3\.espressif\tools\xtensa-esp32s3-elf\esp-2020r3-8.4.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe -DLV_CONF_INCLUDE_SIMPLE -DLV_LVGL_H_INCLUDE_SIMPLE -Iconfig -I../components/lvgl_esp32_drivers -I../components/lvgl_esp32_drivers/lvgl_tft -ID:/ESP32_S3/esp-idf/components/newlib/platform_include -ID:/ESP32_S3/esp-idf/components/freertos/include -ID:/ESP32_S3/esp-idf/components/freertos/port/xtensa/include -ID:/ESP32_S3/esp-idf/components/esp_hw_support/include -ID:/ESP32_S3/esp-idf/components/esp_hw_support/port/esp32s3/. -ID:/ESP32_S3/esp-idf/components/esp_hw_support/port/esp32s3/private_include -ID:/ESP32_S3/esp-idf/components/heap/include -ID:/ESP32_S3/esp-idf/components/log/include -ID:/ESP32_S3/esp-idf/components/lwip/include/apps -ID:/ESP32_S3/esp-idf/components/lwip/include/apps/sntp -ID:/ESP32_S3/esp-idf/components/lwip/lwip/src/include -ID:/ESP32_S3/esp-idf/components/lwip/port/esp32/include -ID:/ESP32_S3/esp-idf/components/lwip/port/esp32/include/arch -ID:/ESP32_S3/esp-idf/components/soc/include -ID:/ESP32_S3/esp-idf/components/soc/esp32s3/. -ID:/ESP32_S3/esp-idf/components/soc/esp32s3/include -ID:/ESP32_S3/esp-idf/components/hal/esp32s3/include -ID:/ESP32_S3/esp-idf/components/hal/include -ID:/ESP32_S3/esp-idf/components/esp_rom/include -ID:/ESP32_S3/esp-idf/components/esp_rom/esp32s3 -ID:/ESP32_S3/esp-idf/components/esp_common/include -ID:/ESP32_S3/esp-idf/components/esp_system/include -ID:/ESP32_S3/esp-idf/components/esp32s3/include -ID:/ESP32_S3/esp-idf/components/driver/include -ID:/ESP32_S3/esp-idf/components/driver/esp32s3/include -ID:/ESP32_S3/esp-idf/components/esp_ringbuf/include -ID:/ESP32_S3/esp-idf/components/efuse/include -ID:/ESP32_S3/esp-idf/components/efuse/esp32s3/include -ID:/ESP32_S3/esp-idf/components/xtensa/include -ID:/ESP32_S3/esp-idf/components/xtensa/esp32s3/include -ID:/ESP32_S3/esp-idf/components/espcoredump/include -ID:/ESP32_S3/esp-idf/components/esp_timer/include -ID:/ESP32_S3/esp-idf/components/esp_ipc/include -ID:/ESP32_S3/esp-idf/components/esp_pm/include -ID:/ESP32_S3/esp-idf/components/vfs/include -ID:/ESP32_S3/esp-idf/components/esp_wifi/include -ID:/ESP32_S3/esp-idf/components/esp_wifi/esp32s3/include -ID:/ESP32_S3/esp-idf/components/esp_event/include -ID:/ESP32_S3/esp-idf/components/esp_netif/include -ID:/ESP32_S3/esp-idf/components/esp_eth/include -ID:/ESP32_S3/esp-idf/components/tcpip_adapter/include -ID:/ESP32_S3/esp-idf/components/app_trace/include -I../components/lvgl -I../components/lvgl/src -I../components -mlongcalls -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -ggdb -Og -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -std=gnu99 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v4.4-dev\" -DESP_PLATFORM -MD -MT esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9341.c.obj -MF esp-idf\lvgl_esp32_drivers\CMakeFiles\__idf_lvgl_esp32_drivers.dir\lvgl_tft\ili9341.c.obj.d -o esp-idf/lvgl_esp32_drivers/CMakeFiles/__idf_lvgl_esp32_drivers.dir/lvgl_tft/ili9341.c.obj -c ../components/lvgl_esp32_drivers/lvgl_tft/ili9341.c
../components/lvgl_esp32_drivers/lvgl_tft/ili9341.c: In function 'ili9341_init':
../components/lvgl_esp32_drivers/lvgl_tft/ili9341.c:84:5: error: implicit declaration of function 'gpio_pad_select_gpio'; did you mean 'gpio_reset_pin'? [-Werror=implicit-function-declaration]
gpio_pad_select_gpio(ILI9341_DC);
^~~~~~~~~~~~~~~~~~~~
gpio_reset_pin
cc1.exe: some warnings being treated as errors
[1332/1395] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/blufi_example_main.c.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1



我打开menuconfig查看关于LVGL的相关配置,如下:
微信截图_20211119161538.png
微信截图_20211119161538.png (51.12 KiB) Viewed 10083 times
微信截图_20211119161617.png
微信截图_20211119161617.png (34 KiB) Viewed 10083 times






但是当我把目标芯片设置为ESP32时工程就能编译通过。
请各位大佬帮忙看看

ESP_morris
Posts: 290
Joined: Wed Sep 05, 2018 6:23 am

Re: esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

Postby ESP_morris » Mon Nov 22, 2021 7:09 am

不清楚上游lvgl_esp32_driver现在支持的IDF的版本. 另外,IDF中有独立的lvgl移植example: https://github.com/espressif/esp-idf/tr ... s/lcd/lvgl

jr-test
Posts: 100
Joined: Mon Aug 23, 2021 3:04 am

Re: esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

Postby jr-test » Tue Dec 07, 2021 7:20 am

ESP_morris wrote:
Mon Nov 22, 2021 7:09 am
不清楚上游lvgl_esp32_driver现在支持的IDF的版本. 另外,IDF中有独立的lvgl移植example: https://github.com/espressif/esp-idf/tr ... s/lcd/lvgl
lvgl.h没有耶,是8080接口的,那有没有4线spi接口的呢

Summer_Half
Posts: 1
Joined: Mon May 02, 2022 1:29 am

Re: esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

Postby Summer_Half » Mon May 02, 2022 1:32 am

大哥,请问您的这个问题解决了吗?我现在遇到了这个问题,感谢大哥解答

hjyben
Posts: 1
Joined: Mon Nov 28, 2022 6:06 am

Re: esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

Postby hjyben » Mon Nov 28, 2022 6:27 am

我使用esp32s3芯片也遇到相似的问题,使用到的lcd屏驱动芯片是ST7789。编译链的版本是idf-4.4.2。
分享我的解决方法:出现问题的原因是在spi_types.h文件里。如果第66行:#elif CONFIG_IDF_TARGET_ESP32S2 是这样的,把它改成#elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 , 还有在lvgl_helpers.c文件里的第212行改成:#elif defined (CONFIG_IDF_TARGET_ESP32S2) || defined (CONFIG_IDF_TARGET_ESP32S3) 在236行的spi_bus_initialize(host, &buscfg, dma_channel)上方添加 dma_channel=SPI_DMA_CH_AUTO;

charles_yue
Posts: 1
Joined: Sun Nov 06, 2022 9:15 am

Re: esp32-s3芯片esp-idf-v4.4-dev编译带LVGL工程出错

Postby charles_yue » Thu Apr 20, 2023 12:04 pm

thanks

Who is online

Users browsing this forum: No registered users and 74 guests