diff --git a/soc/xtensa/esp32/Kconfig.soc b/soc/xtensa/esp32/Kconfig.soc index 68810cc8e98..c491d48adcd 100644 --- a/soc/xtensa/esp32/Kconfig.soc +++ b/soc/xtensa/esp32/Kconfig.soc @@ -22,12 +22,40 @@ config ESP32_BT_RESERVE_DRAM default 0xdb5c if BT default 0 +config ESP_HEAP_MEM_POOL_REGION_1_SIZE + int "Internal DRAM region 1 mempool size" + default 49152 + help + ESP32 has two banks of size 192K and 128K which can be used + as DRAM, system heap allocates area from region 0. + This configuration can be used to add memory from region 1 + to heap and can be allocated using k_malloc. + config ESP_SPIRAM bool "Support for external, SPI-connected RAM" help This enables support for an external SPI RAM chip, connected in parallel with the main SPI flash chip. +config ESP_HEAP_MIN_EXTRAM_THRESHOLD + int "Minimum threshold for external RAM allocation" + default 8192 + range 1024 131072 + depends on ESP_SPIRAM + help + Threshold to decide if memory will be allocated from DRAM + or SPIRAM. If value of allocation size is less than this value, + memory will be allocated from internal RAM. + +config ESP_HEAP_SEARCH_ALL_REGIONS + bool "Search for all available heap regions" + depends on ESP_SPIRAM + default y + help + This configuration enables searching all available heap + regions. If the region of desired capability is exhausted, + memory will be allocated from other available region. + menu "SPI RAM config" depends on ESP_SPIRAM @@ -168,4 +196,4 @@ menu "SPI RAM config" default y endmenu -endif # SOC_ESP32 \ No newline at end of file +endif # SOC_ESP32 diff --git a/soc/xtensa/esp32/linker.ld b/soc/xtensa/esp32/linker.ld index 4b316da49ed..74cb1ab7e51 100644 --- a/soc/xtensa/esp32/linker.ld +++ b/soc/xtensa/esp32/linker.ld @@ -468,7 +468,6 @@ __shell_root_cmds_end = __esp_shell_root_cmds_end; *(.noinit) *(".noinit.*") . = ALIGN (8); - _heap_start = ABSOLUTE(.); } GROUP_LINK_IN(RAMABLE_REGION_1) #ifdef CONFIG_GEN_ISR_TABLES