Seeed-Solution / SenseCAP_Indicator_ESP32

SenseCAP Indicator SDK.
https://wiki.seeedstudio.com/SenseCAP_Indicator_How_To_Flash_The_Default_Firmware/#ESP-IDF
Apache License 2.0
39 stars 30 forks source link

Patch failed with last version of IDF #30

Closed MohammedBENHADINE closed 1 year ago

MohammedBENHADINE commented 1 year ago

Hey, I'm setting the last version of ESP-IDF framework. Most of the examples work with no issue ( demos , button , lora) but with Squareline demo project I've encountred the following errors : In file included from /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.h:17, from /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.c:26: /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.c: In function 'mspi_timing_get_flash_tuning_configs': /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:178:57: error: 'MSPI_TIMING_FLASH_CONFIG_TABLE_CORE_CLK_240M_MODULE_CLK_80M_STR_MODE' undeclared (first use in this function); did you mean 'MSPI_TIMING_FLASH_CONFIG_TABLE_CORE_CLK_160M_MODULE_CLK_80M_STR_MODE'? 178 | (mspi_timing_config_t) { .tuning_config_table = MSPI_TIMING_##type##_CONFIG_TABLE_CORE_CLK_##core_clock##M_MODULE_CLK_##module_clock##M_##mode, \ | ^~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:182:66: note: in expansion of macro '__GET_TUNING_CONFIG' 182 | #define _GET_TUNING_CONFIG(type, core_clock, module_clock, mode) __GET_TUNING_CONFIG(type, core_clock, module_clock, mode) | ^~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:184:85: note: in expansion of macro '_GET_TUNING_CONFIG' 184 | #define MSPI_TIMING_FLASH_GET_TUNING_CONFIG(core_clock_mhz, module_clock_mhz, mode) _GET_TUNING_CONFIG(FLASH, core_clock_mhz, module_clock_mhz, mode) | ^~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.c:78:15: note: in expansion of macro 'MSPI_TIMING_FLASH_GET_TUNING_CONFIG' 78 | *config = MSPI_TIMING_FLASH_GET_TUNING_CONFIG(MSPI_TIMING_CORE_CLOCK_MHZ, 80, FLASH_MODE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:178:57: note: each undeclared identifier is reported only once for each function it appears in 178 | (mspi_timing_config_t) { .tuning_config_table = MSPI_TIMING_##type##_CONFIG_TABLE_CORE_CLK_##core_clock##M_MODULE_CLK_##module_clock##M_##mode, \ | ^~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:182:66: note: in expansion of macro '__GET_TUNING_CONFIG' 182 | #define _GET_TUNING_CONFIG(type, core_clock, module_clock, mode) __GET_TUNING_CONFIG(type, core_clock, module_clock, mode) | ^~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:184:85: note: in expansion of macro '_GET_TUNING_CONFIG' 184 | #define MSPI_TIMING_FLASH_GET_TUNING_CONFIG(core_clock_mhz, module_clock_mhz, mode) _GET_TUNING_CONFIG(FLASH, core_clock_mhz, module_clock_mhz, mode) | ^~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.c:78:15: note: in expansion of macro 'MSPI_TIMING_FLASH_GET_TUNING_CONFIG' 78 | *config = MSPI_TIMING_FLASH_GET_TUNING_CONFIG(MSPI_TIMING_CORE_CLOCK_MHZ, 80, FLASH_MODE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:179:57: error: 'MSPI_TIMING_FLASH_CONFIG_NUM_CORE_CLK_240M_MODULE_CLK_80M_STR_MODE' undeclared (first use in this function); did you mean 'MSPI_TIMING_FLASH_CONFIG_NUM_CORE_CLK_240M_MODULE_CLK_120M_STR_MODE'? 179 | .available_config_num = MSPI_TIMING_##type##_CONFIG_NUM_CORE_CLK_##core_clock##M_MODULE_CLK_##module_clock##M_##mode, \ | ^~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:182:66: note: in expansion of macro '__GET_TUNING_CONFIG' 182 | #define _GET_TUNING_CONFIG(type, core_clock, module_clock, mode) __GET_TUNING_CONFIG(type, core_clock, module_clock, mode) | ^~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:184:85: note: in expansion of macro '_GET_TUNING_CONFIG' 184 | #define MSPI_TIMING_FLASH_GET_TUNING_CONFIG(core_clock_mhz, module_clock_mhz, mode) _GET_TUNING_CONFIG(FLASH, core_clock_mhz, module_clock_mhz, mode) | ^~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.c:78:15: note: in expansion of macro 'MSPI_TIMING_FLASH_GET_TUNING_CONFIG' 78 | *config = MSPI_TIMING_FLASH_GET_TUNING_CONFIG(MSPI_TIMING_CORE_CLOCK_MHZ, 80, FLASH_MODE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:180:54: error: 'MSPI_TIMING_FLASH_DEFAULT_CONFIG_ID_CORE_CLK_240M_MODULE_CLK_80M_STR_MODE' undeclared (first use in this function); did you mean 'MSPI_TIMING_FLASH_DEFAULT_CONFIG_ID_CORE_CLK_240M_MODULE_CLK_120M_STR_MODE'? 180 | .default_config_id = MSPI_TIMING_##type##_DEFAULT_CONFIG_ID_CORE_CLK_##core_clock##M_MODULE_CLK_##module_clock##M_##mode } | ^~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:182:66: note: in expansion of macro '__GET_TUNING_CONFIG' 182 | #define _GET_TUNING_CONFIG(type, core_clock, module_clock, mode) __GET_TUNING_CONFIG(type, core_clock, module_clock, mode) | ^~~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/port/esp32s3/./mspi_timing_tuning_configs.h:184:85: note: in expansion of macro '_GET_TUNING_CONFIG' 184 | #define MSPI_TIMING_FLASH_GET_TUNING_CONFIG(core_clock_mhz, module_clock_mhz, mode) _GET_TUNING_CONFIG(FLASH, core_clock_mhz, module_clock_mhz, mode) | ^~~~~~~~~~~~~~~~~~ /home/med/esp/esp-idf/components/esp_hw_support/mspi_timing_by_mspi_delay.c:78:15: note: in expansion of macro 'MSPI_TIMING_FLASH_GET_TUNING_CONFIG' 78 | *config = MSPI_TIMING_FLASH_GET_TUNING_CONFIG(MSPI_TIMING_CORE_CLOCK_MHZ, 80, FLASH_MODE);

While searching the repo I find out that a patch should be done in order for fix these timing issues. So when I tried applying the patch these errors showed up :

med@med:~/esp/esp-idf$ git apply --whitespace=fix ~/SenseCAP_Indicator_ESP32/tools/patch/release5.0_psram_octal_120m.patch error: patch failed: components/esp_hw_support/port/esp32s3/rtc_clk.c:159 error: components/esp_hw_support/port/esp32s3/rtc_clk.c: patch does not apply error: patch failed: components/esp_psram/esp32s3/Kconfig.spiram:87 error: components/esp_psram/esp32s3/Kconfig.spiram: patch does not apply error: patch failed: components/hal/esp32s3/include/hal/spimem_flash_ll.h:575 error: components/hal/esp32s3/include/hal/spimem_flash_ll.h: patch does not apply error: components/spi_flash/esp32s3/mspi_timing_tuning_configs.h: No such file or directory error: components/spi_flash/esp32s3/spi_timing_config.c: No such file or directory error: components/spi_flash/esp32s3/spi_timing_config.h: No such file or directory error: components/spi_flash/spi_flash_timing_tuning.c: No such file or directory error: tools/test_apps/system/flash_psram/sdkconfig.ci.f8r8_120ddr: already exists in working directory error: tools/test_apps/system/flash_psram/sdkconfig.ci.f8r8_120ddr_120ddr: already exists in working directory I noticed similar issue have been raised but I didn't find a fix to this Could u please guide me through this ?

Love4yzp commented 1 year ago

Hi, you need have the IDF v5.0. the ESP-IDF patch we provided is for IDF v5.0.

12 #19

MohammedBENHADINE commented 1 year ago

v5.1 has some important updates and having an updated patch would be helpful. Thanks

Love4yzp commented 1 year ago

Hello, Currently, this repo already supports V5.1, pls give it a try.