diff --git a/components/bt/linker.lf b/components/bt/linker.lf index f239404450..e8cbc14628 100644 --- a/components/bt/linker.lf +++ b/components/bt/linker.lf @@ -1,5 +1,5 @@ [mapping:bt] archive: libbt.a entries: - if SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: + if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: * (extram_bss) diff --git a/components/esp32/ld/esp32_fragments.lf b/components/esp32/ld/esp32_fragments.lf index 4c6b0a9ddb..f334beee8a 100644 --- a/components/esp32/ld/esp32_fragments.lf +++ b/components/esp32/ld/esp32_fragments.lf @@ -107,7 +107,7 @@ entries: data -> dram0_data bss -> dram0_bss common -> dram0_bss - if SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: + if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: extram_bss -> extern_ram else: extram_bss -> dram0_bss diff --git a/components/esp_common/Kconfig b/components/esp_common/Kconfig index de0d76afbc..ab0c2277bd 100644 --- a/components/esp_common/Kconfig +++ b/components/esp_common/Kconfig @@ -304,4 +304,9 @@ menu "Common ESP-related" config ESP_MAC_ADDR_UNIVERSE_ETH bool + config ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY + # Invisible option that is set by SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY, but + # exists even if SPIRAM is not supported + bool + endmenu # Common ESP-related diff --git a/components/esp_common/Kconfig.spiram.common b/components/esp_common/Kconfig.spiram.common index bf45f1e0e3..b7229bd49d 100644 --- a/components/esp_common/Kconfig.spiram.common +++ b/components/esp_common/Kconfig.spiram.common @@ -93,6 +93,7 @@ config SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY bool "Allow .bss segment placed in external memory" default n depends on SPIRAM + select ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY help If enabled, variables with EXT_RAM_ATTR attribute will be placed in SPIRAM instead of internal DRAM. BSS section of `lwip`, `net80211`, `pp`, `bt` libraries will be automatically placed diff --git a/components/esp_wifi/linker.lf b/components/esp_wifi/linker.lf index 9acda0dfc8..8ea33b9818 100644 --- a/components/esp_wifi/linker.lf +++ b/components/esp_wifi/linker.lf @@ -17,7 +17,7 @@ entries: if ESP32_WIFI_RX_IRAM_OPT = y: * (wifi_rx_iram) - if SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: + if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: * (extram_bss) [mapping:net80211] @@ -29,5 +29,5 @@ entries: if ESP32_WIFI_RX_IRAM_OPT = y: * (wifi_rx_iram) - if SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: + if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: * (extram_bss) diff --git a/components/lwip/linker.lf b/components/lwip/linker.lf index 6d95da947e..6ee75ab24c 100644 --- a/components/lwip/linker.lf +++ b/components/lwip/linker.lf @@ -86,5 +86,5 @@ entries: * (default) - if SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: + if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y: * (extram_bss)