feat(newlib): added option for placing functions in flash if flash-auto-suspend

This commit is contained in:
Marius Vikhammer
2025-03-14 10:41:51 +08:00
parent 70371347dc
commit ff3126fa09
2 changed files with 10 additions and 5 deletions

View File

@@ -11,6 +11,10 @@ menu "LibC"
depends on !IDF_TOOLCHAIN_CLANG && IDF_EXPERIMENTAL_FEATURES
endchoice
config LIBC_MISC_IN_IRAM
bool "Place misc libc functions (abort/assert/stdatomics) in IRAM" if SPI_FLASH_AUTO_SUSPEND
default y
config LIBC_LOCKS_PLACE_IN_IRAM
bool "Place lock API in IRAM"
default y

View File

@@ -1,10 +1,11 @@
[mapping:newlib]
archive: libnewlib.a
entries:
if HEAP_PLACE_FUNCTION_INTO_FLASH = n:
heap (noflash)
abort (noflash)
assert (noflash)
stdatomic (noflash)
if LIBC_MISC_IN_IRAM = y:
if HEAP_PLACE_FUNCTION_INTO_FLASH = n:
heap (noflash)
abort (noflash)
assert (noflash)
stdatomic (noflash)
if STDATOMIC_S32C1I_SPIRAM_WORKAROUND = y:
stdatomic_s32c1i (noflash)