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:
Marius Vikhammer
2023-05-12 15:57:31 +08:00
13 changed files with 134 additions and 100 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,2 @@
CONFIG_HEAP_TLSF_USE_ROM_IMPL=n
CONFIG_HEAP_PLACE_FUNCTION_INTO_FLASH=y