diff --git a/components/esp_rom/patches/esp_rom_spiflash.c b/components/esp_rom/patches/esp_rom_spiflash.c index 4608b61343..ad9e1e6ddc 100644 --- a/components/esp_rom/patches/esp_rom_spiflash.c +++ b/components/esp_rom/patches/esp_rom_spiflash.c @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -18,8 +18,6 @@ #define SPI_IDX 1 -#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH - #if CONFIG_IDF_TARGET_ESP32 extern esp_rom_spiflash_chip_t g_rom_spiflash_chip; @@ -105,6 +103,12 @@ __attribute__((__unused__)) esp_rom_spiflash_result_t esp_rom_spiflash_clear_bp( } esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void) __attribute__((alias("esp_rom_spiflash_clear_bp"))); +#endif // CONFIG_IDF_TARGET_ESP32 + +#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH + +#if CONFIG_IDF_TARGET_ESP32 + static esp_rom_spiflash_result_t esp_rom_spiflash_enable_write(esp_rom_spiflash_chip_t *spi); //only support spi1 diff --git a/components/spi_flash/test_apps/esp_flash/sdkconfig.ci.rom_patch b/components/spi_flash/test_apps/esp_flash/sdkconfig.ci.rom_patch new file mode 100644 index 0000000000..fd63e157f9 --- /dev/null +++ b/components/spi_flash/test_apps/esp_flash/sdkconfig.ci.rom_patch @@ -0,0 +1 @@ +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n