fix(heap): Fix wrong config to enable MALLOC_CAP_EXEC in memory_layout.c

In esp32c2 and esp32c61 memory_layout.c files, the config used to allow
MALLOC_CAP_EXEC was CONFIG_ESP_SYSTEM_MEMPROT_FEATURE when
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT should be used.

Closes https://github.com/espressif/esp-idf/issues/14836
This commit is contained in:
Guillaume Souchere
2024-11-21 12:05:11 +01:00
parent e6aeb3d36d
commit 793382107f
5 changed files with 21 additions and 15 deletions

View File

@@ -29,7 +29,7 @@ TEST_CASE("realloc shrink buffer in place", "[heap]")
#endif
#ifndef CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
#if !(CONFIG_ESP_SYSTEM_MEMPROT_FEATURE || CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT)
TEST_CASE("realloc shrink buffer with EXEC CAPS", "[heap]")
{
const size_t buffer_size = 64;
@@ -68,4 +68,4 @@ TEST_CASE("realloc move data to a new heap type", "[heap]")
free(c);
}
#endif // CONFIG_ESP_SYSTEM_MEMPROT_FEATURE
#endif // !(CONFIG_ESP_SYSTEM_MEMPROT_FEATURE || CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT)