Skip to content

Commit 4da5de0

Browse files
committed
fix(spi_flash): Fix build fail when rom_patch config disabled,
Closes espressif#15229
1 parent c7e8b68 commit 4da5de0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

components/esp_rom/patches/esp_rom_spiflash.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -21,8 +21,6 @@
2121

2222
#define SPI_IDX 1
2323

24-
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
25-
2624
#if CONFIG_IDF_TARGET_ESP32
2725

2826
extern esp_rom_spiflash_chip_t g_rom_spiflash_chip;
@@ -108,6 +106,12 @@ __attribute__((__unused__)) esp_rom_spiflash_result_t esp_rom_spiflash_clear_bp(
108106
}
109107
esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void) __attribute__((alias("esp_rom_spiflash_clear_bp")));
110108

109+
#endif // CONFIG_IDF_TARGET_ESP32
110+
111+
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
112+
113+
#if CONFIG_IDF_TARGET_ESP32
114+
111115
static esp_rom_spiflash_result_t esp_rom_spiflash_enable_write(esp_rom_spiflash_chip_t *spi);
112116

113117
//only support spi1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n

0 commit comments

Comments
 (0)