Skip to content

Commit b66e140

Browse files
committed
refactor(spi_flash): optimize flash functions to save iram memory
1 parent 8014ffa commit b66e140

File tree

11 files changed

+139
-61
lines changed

11 files changed

+139
-61
lines changed

components/hal/linker.lf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ archive: libhal.a
33
entries:
44
if APP_BUILD_TYPE_PURE_RAM_APP = n:
55
mmu_hal (noflash)
6-
spi_flash_hal_iram (noflash)
7-
spi_flash_encrypt_hal_iram (noflash)
86
if IDF_TARGET_ESP32 = y:
97
cache_hal_esp32 (noflash)
108
else:
@@ -15,8 +13,6 @@ entries:
1513
wdt_hal_iram (noflash)
1614
if SOC_SYSTIMER_SUPPORTED = y && HAL_SYSTIMER_USE_ROM_IMPL = n:
1715
systimer_hal (noflash)
18-
if SOC_GPSPI_SUPPORTED = y && IDF_TARGET_ESP32 = n:
19-
spi_flash_hal_gpspi (noflash)
2016
if SOC_PMU_SUPPORTED = y:
2117
pmu_hal (noflash)
2218
if SOC_GPIO_PORT != 0:

components/spi_flash/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ menu "Main Flash configuration"
153153
whether suspend is valid instead of waiting for a specific long time, which can save a
154154
lot of time and benefit for performance improvement.
155155

156+
config SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM
157+
bool "Place spi_flash operation functions into IRAM" if SPI_FLASH_AUTO_SUSPEND
158+
default y
159+
help
160+
When disabled, certain functions in `spi_flash` component will be placed into Flash memory
161+
instead of IRAM. Disabling this option will save almost 10KB of IRAM depending on which
162+
functions are used.
163+
164+
When enabled, these functions will be placed in internal RAM, with better performance.
165+
166+
For more information please refer to programming guide.
156167

157168
endmenu
158169
endmenu

components/spi_flash/esp_flash_api.c

Lines changed: 29 additions & 29 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
*/
@@ -183,7 +183,7 @@ extern rom_spiflash_api_func_t *esp_flash_api_funcs;
183183
call rom_spiflash_api_funcs->end() before returning.
184184
*/
185185
#if !CONFIG_SPI_FLASH_ROM_IMPL || ESP_ROM_HAS_ENCRYPTED_WRITES_USING_LEGACY_DRV
186-
static esp_err_t IRAM_ATTR spiflash_start_default(esp_flash_t *chip)
186+
static esp_err_t spiflash_start_default(esp_flash_t *chip)
187187
{
188188
if (chip->os_func != NULL && chip->os_func->start != NULL) {
189189
esp_err_t err = chip->os_func->start(chip->os_func_data);
@@ -197,7 +197,7 @@ static esp_err_t IRAM_ATTR spiflash_start_default(esp_flash_t *chip)
197197

198198
/* Static function to notify OS that SPI flash operation is complete.
199199
*/
200-
static esp_err_t IRAM_ATTR spiflash_end_default(esp_flash_t *chip, esp_err_t err)
200+
static esp_err_t spiflash_end_default(esp_flash_t *chip, esp_err_t err)
201201
{
202202
if (chip->os_func != NULL
203203
&& chip->os_func->end != NULL) {
@@ -210,7 +210,7 @@ static esp_err_t IRAM_ATTR spiflash_end_default(esp_flash_t *chip, esp_err_t err
210210
}
211211

212212
// check that the 'chip' parameter is properly initialised
213-
static IRAM_ATTR esp_err_t check_chip_pointer_default(esp_flash_t **inout_chip)
213+
static esp_err_t check_chip_pointer_default(esp_flash_t **inout_chip)
214214
{
215215
esp_flash_t *chip = *inout_chip;
216216
if (chip == NULL) {
@@ -223,7 +223,7 @@ static IRAM_ATTR esp_err_t check_chip_pointer_default(esp_flash_t **inout_chip)
223223
return ESP_OK;
224224
}
225225

226-
static IRAM_ATTR esp_err_t flash_end_flush_cache(esp_flash_t* chip, esp_err_t err, bool bus_acquired, uint32_t address, uint32_t length)
226+
static esp_err_t flash_end_flush_cache(esp_flash_t* chip, esp_err_t err, bool bus_acquired, uint32_t address, uint32_t length)
227227
{
228228
if (!bus_acquired) {
229229
// Try to acquire the bus again to flush the cache before exit.
@@ -247,13 +247,13 @@ static IRAM_ATTR esp_err_t flash_end_flush_cache(esp_flash_t* chip, esp_err_t er
247247

248248
static esp_err_t detect_spi_flash_chip(esp_flash_t *chip);
249249

250-
bool IRAM_ATTR esp_flash_chip_driver_initialized(const esp_flash_t *chip)
250+
bool esp_flash_chip_driver_initialized(const esp_flash_t *chip)
251251
{
252252
if (!chip->chip_drv) return false;
253253
return true;
254254
}
255255

256-
esp_err_t IRAM_ATTR esp_flash_init(esp_flash_t *chip)
256+
esp_err_t esp_flash_init(esp_flash_t *chip)
257257
{
258258
// Chip init flow
259259
// 1. Read chip id
@@ -324,7 +324,7 @@ esp_err_t IRAM_ATTR esp_flash_init(esp_flash_t *chip)
324324

325325
// Note: This function is only used for internal. Only call this function to initialize the main flash.
326326
// (flash chip on SPI1 CS0)
327-
esp_err_t IRAM_ATTR esp_flash_init_main(esp_flash_t *chip)
327+
esp_err_t esp_flash_init_main(esp_flash_t *chip)
328328
{
329329
// Chip init flow
330330
// 1. Read chip id
@@ -455,7 +455,7 @@ esp_err_t esp_flash_read_id(esp_flash_t* chip, uint32_t* out_id)
455455
}
456456
#endif //CONFIG_SPI_FLASH_ROM_IMPL
457457

458-
static esp_err_t IRAM_ATTR NOINLINE_ATTR read_unique_id(esp_flash_t* chip, uint64_t* out_uid)
458+
static esp_err_t NOINLINE_ATTR read_unique_id(esp_flash_t* chip, uint64_t* out_uid)
459459
{
460460
esp_err_t err = rom_spiflash_api_funcs->start(chip);
461461
if (err != ESP_OK) {
@@ -490,7 +490,7 @@ esp_err_t esp_flash_read_unique_chip_id(esp_flash_t *chip, uint64_t* out_uid)
490490
return read_unique_id(chip, out_uid);
491491
}
492492

493-
static esp_err_t IRAM_ATTR detect_spi_flash_chip(esp_flash_t *chip)
493+
static esp_err_t detect_spi_flash_chip(esp_flash_t *chip)
494494
{
495495
esp_err_t err;
496496
uint32_t flash_id = chip->chip_id;
@@ -526,7 +526,7 @@ static esp_err_t IRAM_ATTR detect_spi_flash_chip(esp_flash_t *chip)
526526
return ESP_OK;
527527
}
528528

529-
esp_err_t IRAM_ATTR esp_flash_get_physical_size(esp_flash_t *chip, uint32_t *flash_size)
529+
esp_err_t esp_flash_get_physical_size(esp_flash_t *chip, uint32_t *flash_size)
530530
{
531531
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
532532
if (err != ESP_OK) {
@@ -556,9 +556,9 @@ esp_err_t IRAM_ATTR esp_flash_get_physical_size(esp_flash_t *chip, uint32_t *fla
556556
#ifndef CONFIG_SPI_FLASH_ROM_IMPL
557557

558558
/* Return true if regions 'a' and 'b' overlap at all, based on their start offsets and lengths. */
559-
inline static bool regions_overlap(uint32_t a_start, uint32_t a_len,uint32_t b_start, uint32_t b_len);
559+
inline static IRAM_ATTR bool regions_overlap(uint32_t a_start, uint32_t a_len,uint32_t b_start, uint32_t b_len);
560560

561-
esp_err_t IRAM_ATTR esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size)
561+
esp_err_t esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size)
562562
{
563563
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
564564
if (err != ESP_OK) {
@@ -576,7 +576,7 @@ esp_err_t IRAM_ATTR esp_flash_get_size(esp_flash_t *chip, uint32_t *out_size)
576576
return esp_flash_get_physical_size(chip, out_size);
577577
}
578578

579-
esp_err_t IRAM_ATTR esp_flash_erase_chip(esp_flash_t *chip)
579+
esp_err_t esp_flash_erase_chip(esp_flash_t *chip)
580580
{
581581
esp_err_t err = ESP_OK;
582582
uint32_t size = 0;
@@ -589,7 +589,7 @@ esp_err_t IRAM_ATTR esp_flash_erase_chip(esp_flash_t *chip)
589589
return err;
590590
}
591591

592-
esp_err_t IRAM_ATTR esp_flash_erase_region(esp_flash_t *chip, uint32_t start, uint32_t len)
592+
esp_err_t esp_flash_erase_region(esp_flash_t *chip, uint32_t start, uint32_t len)
593593
{
594594
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
595595
VERIFY_CHIP_OP(erase_sector);
@@ -711,7 +711,7 @@ esp_err_t IRAM_ATTR esp_flash_erase_region(esp_flash_t *chip, uint32_t start, ui
711711
* done after the other arguments are checked.
712712
*/
713713
extern esp_err_t rom_esp_flash_erase_region(esp_flash_t *chip, uint32_t start, uint32_t len);
714-
esp_err_t IRAM_ATTR esp_flash_erase_region(esp_flash_t *chip, uint32_t start, uint32_t len)
714+
esp_err_t esp_flash_erase_region(esp_flash_t *chip, uint32_t start, uint32_t len)
715715
{
716716
if (len == 0) {
717717
return ESP_OK;
@@ -722,7 +722,7 @@ esp_err_t IRAM_ATTR esp_flash_erase_region(esp_flash_t *chip, uint32_t start, ui
722722

723723
#ifndef CONFIG_SPI_FLASH_ROM_IMPL
724724

725-
esp_err_t IRAM_ATTR esp_flash_get_chip_write_protect(esp_flash_t *chip, bool *out_write_protected)
725+
esp_err_t esp_flash_get_chip_write_protect(esp_flash_t *chip, bool *out_write_protected)
726726
{
727727
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
728728
VERIFY_CHIP_OP(get_chip_write_protect);
@@ -740,7 +740,7 @@ esp_err_t IRAM_ATTR esp_flash_get_chip_write_protect(esp_flash_t *chip, bool *ou
740740
return rom_spiflash_api_funcs->end(chip, err);
741741
}
742742

743-
esp_err_t IRAM_ATTR esp_flash_set_chip_write_protect(esp_flash_t *chip, bool write_protect)
743+
esp_err_t esp_flash_set_chip_write_protect(esp_flash_t *chip, bool write_protect)
744744
{
745745
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
746746
VERIFY_CHIP_OP(set_chip_write_protect);
@@ -789,7 +789,7 @@ static esp_err_t find_region(const esp_flash_t *chip, const esp_flash_region_t *
789789
return ESP_ERR_NOT_FOUND;
790790
}
791791

792-
esp_err_t IRAM_ATTR esp_flash_get_protected_region(esp_flash_t *chip, const esp_flash_region_t *region, bool *out_protected)
792+
esp_err_t esp_flash_get_protected_region(esp_flash_t *chip, const esp_flash_region_t *region, bool *out_protected)
793793
{
794794
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
795795
VERIFY_CHIP_OP(get_protected_regions);
@@ -818,7 +818,7 @@ esp_err_t IRAM_ATTR esp_flash_get_protected_region(esp_flash_t *chip, const esp_
818818
return rom_spiflash_api_funcs->end(chip, err);
819819
}
820820

821-
esp_err_t IRAM_ATTR esp_flash_set_protected_region(esp_flash_t *chip, const esp_flash_region_t *region, bool protect)
821+
esp_err_t esp_flash_set_protected_region(esp_flash_t *chip, const esp_flash_region_t *region, bool protect)
822822
{
823823
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
824824
VERIFY_CHIP_OP(set_protected_regions);
@@ -848,7 +848,7 @@ esp_err_t IRAM_ATTR esp_flash_set_protected_region(esp_flash_t *chip, const esp_
848848
return rom_spiflash_api_funcs->end(chip, err);
849849
}
850850

851-
esp_err_t IRAM_ATTR esp_flash_read(esp_flash_t *chip, void *buffer, uint32_t address, uint32_t length)
851+
esp_err_t esp_flash_read(esp_flash_t *chip, void *buffer, uint32_t address, uint32_t length)
852852
{
853853
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
854854
VERIFY_CHIP_OP(read);
@@ -925,7 +925,7 @@ esp_err_t IRAM_ATTR esp_flash_read(esp_flash_t *chip, void *buffer, uint32_t add
925925
}
926926

927927
#if CONFIG_SPI_FLASH_WARN_SETTING_ZERO_TO_ONE
928-
static esp_err_t IRAM_ATTR s_check_setting_zero_to_one(esp_flash_t *chip, uint32_t verify_address, uint32_t remain_verify_len, const uint32_t *to_write_buf, bool is_encrypted)
928+
static esp_err_t s_check_setting_zero_to_one(esp_flash_t *chip, uint32_t verify_address, uint32_t remain_verify_len, const uint32_t *to_write_buf, bool is_encrypted)
929929
{
930930
esp_err_t err = ESP_FAIL;
931931
uint8_t verify_buffer[VERIFY_BUF_LEN];
@@ -964,7 +964,7 @@ static esp_err_t IRAM_ATTR s_check_setting_zero_to_one(esp_flash_t *chip, uint32
964964
#endif //#if CONFIG_SPI_FLASH_WARN_SETTING_ZERO_TO_ONE
965965

966966
#if CONFIG_SPI_FLASH_VERIFY_WRITE
967-
static esp_err_t IRAM_ATTR s_verify_write(esp_flash_t *chip, uint32_t verify_address, uint32_t remain_verify_len, const uint32_t *expected_buf, bool is_encrypted)
967+
static esp_err_t s_verify_write(esp_flash_t *chip, uint32_t verify_address, uint32_t remain_verify_len, const uint32_t *expected_buf, bool is_encrypted)
968968
{
969969
esp_err_t err = ESP_FAIL;
970970
uint8_t verify_buffer[VERIFY_BUF_LEN];
@@ -1001,7 +1001,7 @@ static esp_err_t IRAM_ATTR s_verify_write(esp_flash_t *chip, uint32_t verify_add
10011001
}
10021002
#endif //#if CONFIG_SPI_FLASH_VERIFY_WRITE
10031003

1004-
esp_err_t IRAM_ATTR esp_flash_write(esp_flash_t *chip, const void *buffer, uint32_t address, uint32_t length)
1004+
esp_err_t esp_flash_write(esp_flash_t *chip, const void *buffer, uint32_t address, uint32_t length)
10051005
{
10061006
esp_err_t ret = ESP_FAIL;
10071007
#if CONFIG_SPI_FLASH_VERIFY_WRITE
@@ -1123,14 +1123,14 @@ esp_err_t IRAM_ATTR esp_flash_write(esp_flash_t *chip, const void *buffer, uint3
11231123
return err;
11241124
}
11251125

1126-
inline static IRAM_ATTR bool regions_overlap(uint32_t a_start, uint32_t a_len,uint32_t b_start, uint32_t b_len)
1126+
inline static bool regions_overlap(uint32_t a_start, uint32_t a_len,uint32_t b_start, uint32_t b_len)
11271127
{
11281128
uint32_t a_end = a_start + a_len;
11291129
uint32_t b_end = b_start + b_len;
11301130
return (a_end > b_start && b_end > a_start);
11311131
}
11321132

1133-
esp_err_t IRAM_ATTR esp_flash_read_encrypted(esp_flash_t *chip, uint32_t address, void *out_buffer, uint32_t length)
1133+
esp_err_t esp_flash_read_encrypted(esp_flash_t *chip, uint32_t address, void *out_buffer, uint32_t length)
11341134
{
11351135
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
11361136
if (err != ESP_OK) return err;
@@ -1163,7 +1163,7 @@ esp_err_t IRAM_ATTR esp_flash_read_encrypted(esp_flash_t *chip, uint32_t address
11631163
}
11641164

11651165
// test only, non-public
1166-
IRAM_ATTR esp_err_t esp_flash_get_io_mode(esp_flash_t* chip, bool* qe)
1166+
esp_err_t esp_flash_get_io_mode(esp_flash_t* chip, bool* qe)
11671167
{
11681168
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
11691169
VERIFY_CHIP_OP(get_io_mode);
@@ -1181,7 +1181,7 @@ IRAM_ATTR esp_err_t esp_flash_get_io_mode(esp_flash_t* chip, bool* qe)
11811181
return err;
11821182
}
11831183

1184-
IRAM_ATTR esp_err_t esp_flash_set_io_mode(esp_flash_t* chip, bool qe)
1184+
esp_err_t esp_flash_set_io_mode(esp_flash_t* chip, bool qe)
11851185
{
11861186
esp_err_t err = rom_spiflash_api_funcs->chip_check(&chip);
11871187
VERIFY_CHIP_OP(set_io_mode);
@@ -1214,7 +1214,7 @@ FORCE_INLINE_ATTR esp_err_t s_encryption_write_unlock(esp_flash_t *chip) {
12141214
return err;
12151215
}
12161216

1217-
esp_err_t IRAM_ATTR esp_flash_write_encrypted(esp_flash_t *chip, uint32_t address, const void *buffer, uint32_t length)
1217+
esp_err_t esp_flash_write_encrypted(esp_flash_t *chip, uint32_t address, const void *buffer, uint32_t length)
12181218
{
12191219
esp_err_t ret = ESP_FAIL;
12201220
#if CONFIG_SPI_FLASH_VERIFY_WRITE

components/spi_flash/esp_flash_spi_init.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929

3030
__attribute__((unused)) static const char TAG[] = "spi_flash";
3131

32+
#if !CONFIG_SPI_FLASH_AUTO_SUSPEND && !CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM
33+
#error "CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM cannot be disabled when CONFIG_SPI_FLASH_AUTO_SUSPEND is disabled."
34+
#endif
35+
3236
/* This pointer is defined in ROM and extern-ed on targets where CONFIG_SPI_FLASH_ROM_IMPL = y*/
3337
#if !CONFIG_SPI_FLASH_ROM_IMPL
3438
esp_flash_t *esp_flash_default_chip = NULL;

components/spi_flash/linker.lf

Lines changed: 74 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,83 @@
22
archive: libspi_flash.a
33
entries:
44
if APP_BUILD_TYPE_PURE_RAM_APP = n:
5-
spi_flash_chip_generic (noflash)
6-
spi_flash_chip_issi (noflash)
7-
spi_flash_chip_mxic (noflash)
8-
spi_flash_chip_gd (noflash)
9-
spi_flash_chip_winbond (noflash)
10-
spi_flash_chip_boya (noflash)
11-
spi_flash_chip_th (noflash)
12-
memspi_host_driver (noflash)
135
flash_brownout_hook (noflash)
14-
spi_flash_wrap (noflash)
156

16-
if IDF_TARGET_ESP32S3 = y:
17-
spi_flash_chip_mxic_opi (noflash)
7+
if SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM = y:
8+
spi_flash_wrap (noflash)
9+
spi_flash_chip_generic (noflash)
10+
spi_flash_chip_issi (noflash)
11+
spi_flash_chip_mxic (noflash)
12+
spi_flash_chip_gd (noflash)
13+
spi_flash_chip_winbond (noflash)
14+
spi_flash_chip_boya (noflash)
15+
spi_flash_chip_th (noflash)
16+
memspi_host_driver (noflash)
17+
18+
esp_flash_api: esp_flash_chip_driver_initialized (noflash)
19+
esp_flash_api: esp_flash_init (noflash)
20+
esp_flash_api: esp_flash_init_main (noflash)
21+
esp_flash_api: read_unique_id (noflash)
22+
esp_flash_api: detect_spi_flash_chip (noflash)
23+
esp_flash_api: esp_flash_get_physical_size (noflash)
24+
25+
spi_flash_os_func_app: spi23_start (noflash)
26+
spi_flash_os_func_app: spi23_end (noflash)
27+
spi_flash_os_func_app: spi_flash_os_check_yield (noflash)
28+
spi_flash_os_func_app: spi_flash_os_yield (noflash)
29+
spi_flash_os_func_app: delay_us (noflash)
30+
spi_flash_os_func_app: get_buffer_malloc (noflash)
31+
spi_flash_os_func_app: release_buffer_malloc (noflash)
32+
spi_flash_os_func_app: main_flash_region_protected (noflash)
33+
spi_flash_os_func_app: main_flash_op_status (noflash)
34+
35+
spi_flash_os_func_noos: esp_flash_app_disable_os_functions (noflash)
36+
spi_flash_os_func_noos: get_temp_buffer_not_supported (noflash)
37+
spi_flash_os_func_noos: delay_us (noflash)
38+
39+
if IDF_TARGET_ESP32S3 = y:
40+
spi_flash_chip_mxic_opi (noflash)
41+
42+
if ESPTOOLPY_OCT_FLASH = y || ESPTOOLPY_FLASH_MODE_AUTO_DETECT = y:
43+
spi_flash_oct_flash_init (noflash)
44+
45+
if SPI_FLASH_VERIFY_WRITE = y:
46+
esp_flash_api: s_verify_write (noflash)
47+
48+
if SPI_FLASH_ROM_IMPL = n || ESP_ROM_HAS_ENCRYPTED_WRITES_USING_LEGACY_DRV = y:
49+
esp_flash_api: spiflash_start_default (noflash)
50+
esp_flash_api: spiflash_end_default (noflash)
51+
esp_flash_api: check_chip_pointer_default (noflash)
52+
esp_flash_api: flash_end_flush_cache (noflash)
53+
esp_flash_api: esp_flash_write_encrypted (noflash)
54+
55+
if SPI_FLASH_ROM_IMPL = n:
56+
esp_flash_api: esp_flash_get_size (noflash)
57+
esp_flash_api: esp_flash_erase_chip (noflash)
58+
esp_flash_api: esp_flash_get_chip_write_protect (noflash)
59+
esp_flash_api: esp_flash_set_chip_write_protect (noflash)
60+
esp_flash_api: esp_flash_get_protected_region (noflash)
61+
esp_flash_api: esp_flash_set_protected_region (noflash)
62+
esp_flash_api: esp_flash_read (noflash)
63+
esp_flash_api: esp_flash_write (noflash)
64+
esp_flash_api: esp_flash_read_encrypted (noflash)
65+
esp_flash_api: esp_flash_get_io_mode (noflash)
66+
esp_flash_api: esp_flash_set_io_mode (noflash)
67+
esp_flash_api: esp_flash_erase_region (noflash)
68+
69+
if SPI_FLASH_WARN_SETTING_ZERO_TO_ONE = y:
70+
esp_flash_api: s_check_setting_zero_to_one (noflash)
71+
1872

1973
if SPI_FLASH_HPM_ON = y:
2074
spi_flash_hpm_enable (noflash)
2175

22-
if ESPTOOLPY_OCT_FLASH = y || ESPTOOLPY_FLASH_MODE_AUTO_DETECT = y:
23-
spi_flash_oct_flash_init (noflash)
76+
[mapping:spi_flash_hal]
77+
archive: libhal.a
78+
entries:
79+
if SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM = y:
80+
spi_flash_hal_iram (noflash)
81+
spi_flash_encrypt_hal_iram (noflash)
82+
83+
if SOC_GPSPI_SUPPORTED = y && IDF_TARGET_ESP32 = n:
84+
spi_flash_hal_gpspi (noflash)

0 commit comments

Comments
 (0)