mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-31 14:22:14 +00:00
Merge branch 'feature/heap-in-flash_v5.1' into 'release/v5.1'
heap: Add a configuration that places all the heap component in flash (v5.1) See merge request espressif/esp-idf!23377
This commit is contained in:
@@ -174,7 +174,7 @@ TEST_CASE("heap_caps metadata test", "[heap]")
|
||||
/* Small function runs from IRAM to check that malloc/free/realloc
|
||||
all work OK when cache is disabled...
|
||||
*/
|
||||
#ifndef CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
|
||||
#if !CONFIG_ESP_SYSTEM_MEMPROT_FEATURE && !CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH
|
||||
static IRAM_ATTR __attribute__((noinline)) bool iram_malloc_test(void)
|
||||
{
|
||||
spi_flash_guard_get()->start(); // Disables flash cache
|
||||
|
@@ -20,6 +20,19 @@ def test_heap_poisoning(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c6
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'in_flash'
|
||||
]
|
||||
)
|
||||
def test_heap_in_flash(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32s2
|
||||
|
@@ -0,0 +1,2 @@
|
||||
CONFIG_HEAP_TLSF_USE_ROM_IMPL=n
|
||||
CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH=y
|
Reference in New Issue
Block a user