esp_common: Fix issue with SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY not visible on c3

Create a common symbol name to use from linker.lf fragments
This commit is contained in:
Angus Gratton 2020-12-30 19:12:07 +11:00
parent eed154a583
commit db4fb49432
6 changed files with 11 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -86,5 +86,5 @@ entries:
* (default)
if SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y:
if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y:
* (extram_bss)