Skip to content

Commit 0cc1671

Browse files
committed
Merge branch 'fix/build_when_rom_patch_disable' into 'master'
fix(spi_flash): Fix build fail when rom_patch config disabled Closes IDFGH-14455 See merge request espressif/esp-idf!36521
2 parents 1d0fa29 + 073bc00 commit 0cc1671

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
*/
@@ -24,8 +24,6 @@
2424

2525
#define SPI_IDX 1
2626

27-
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
28-
2927
#if CONFIG_IDF_TARGET_ESP32
3028

3129
extern esp_rom_spiflash_chip_t g_rom_spiflash_chip;
@@ -111,6 +109,12 @@ __attribute__((__unused__)) esp_rom_spiflash_result_t esp_rom_spiflash_clear_bp(
111109
}
112110
esp_rom_spiflash_result_t esp_rom_spiflash_unlock(void) __attribute__((alias("esp_rom_spiflash_clear_bp")));
113111

112+
#endif // CONFIG_IDF_TARGET_ESP32
113+
114+
#if CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
115+
116+
#if CONFIG_IDF_TARGET_ESP32
117+
114118
static esp_rom_spiflash_result_t esp_rom_spiflash_enable_write(esp_rom_spiflash_chip_t *spi);
115119

116120
//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)