Skip to content

Commit 46847b7

Browse files
committed
Merge branch 'bugfix/heap_in_flash' into 'master'
fix(heap): fixed CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH not working together with CONFIG_HEAP_TLSF_USE_ROM_IMPL See merge request espressif/esp-idf!37692
2 parents 606f6aa + ab2718d commit 46847b7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/heap/Kconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,11 @@ menu "Heap memory debugging"
120120

121121
config HEAP_PLACE_FUNCTION_INTO_FLASH
122122
bool "Force the entire heap component to be placed in flash memory"
123-
depends on !HEAP_TLSF_USE_ROM_IMPL
124123
default n
125124
help
126125
Enable this flag to save up RAM space by placing the heap component in the flash memory
127126

128127
Note that it is only safe to enable this configuration if no functions from esp_heap_caps.h
129-
or esp_heap_trace.h are called from ISR.
128+
or esp_heap_trace.h are called from IRAM ISR which runs when cache is disabled.
130129

131130
endmenu

components/newlib/src/newlib.lf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[mapping:newlib]
22
archive: libnewlib.a
33
entries:
4-
heap (noflash)
4+
if HEAP_PLACE_FUNCTION_INTO_FLASH = n:
5+
heap (noflash)
56
abort (noflash)
67
assert (noflash)
78
stdatomic (noflash)

0 commit comments

Comments
 (0)