heap: Add a configuration that places all the heap component and related functionalities in flash when enabled

Add test configuration to run all tests with heap component in the flash.
Add reference to this new configuration in performance section of the documentation.
This commit is contained in:
Guillaume Souchere
2023-04-03 15:16:55 +02:00
committed by Marius Vikhammer
parent 5bea8592d9
commit d7b344c97a
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