系统: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 sta
tic library esp-idflogliblog.a
[76/86] Linking C static library esp-idfesp_romlibesp_rom.a
[77/86] Linking C static library esp-idfesp_hw_supportlibesp_hw_support.a
[78/86] Linking C static library esp-idfefuselibefuse.a
[79/86] Linking C static library esp-idfbootloader_supportlibbootloader_support.a
[80/86] Linking C static library esp-idfspi_flashlibspi_flash.a
[81/86] Linking C static library esp-idfmicro-ecclibmicro-ecc.a
[82/86] Linking C static library esp-idfsoclibsoc.a
[83/86] Linking C static library esp-idfhallibhal.a
[84/86] Linking C static library esp-idfmainlibmain.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.espressiftoolsxtensa-esp32s3-elfesp-2020r3-8.4.0xtensa-esp32s3-elfbinxtensa-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-idflvgl_esp32_driversCMakeFiles__idf_lvgl_esp32_drivers.dirlvgl_tftesp_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.espressiftoolsxtensa-esp32s3-elfesp-2020r3-8.4.0xtensa-esp32s3-elfbinxtensa-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-idflvgl_esp32_driversCMakeFiles__idf_lvgl_esp32_drivers.dirlvgl_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.espressiftoolsxtensa-esp32s3-elfesp-2020r3-8.4.0xtensa-esp32s3-elfbinxtensa-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-idflvgl_esp32_driversCMakeFiles__idf_lvgl_esp32_drivers.dirlvgl_tftili9341.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的相关配置,如下:
但是当我把目标芯片设置为ESP32时工程就能编译通过。
请各位大佬帮忙看看