Skip to content

Commit 43c4894

Browse files
committed
Free up RAM on the S2
1 parent 07c676c commit 43c4894

4 files changed

Lines changed: 12 additions & 2 deletions

File tree

ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y
3939
#
4040
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4
4141
CONFIG_ESP_WIFI_RX_BA_WIN=4
42+
# CONFIG_ESP_WIFI_RX_IRAM_OPT is not set
4243
# end of Wi-Fi
4344

4445
#

ports/espressif/esp-idf-config/sdkconfig.defaults

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
108108
#
109109
# CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set
110110
CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096
111+
# CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE is not set
111112
# end of SPI Flash driver
112113

113114
#

ports/espressif/supervisor/port.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ void reset_to_bootloader(void) {
407407
}
408408

409409
void reset_cpu(void) {
410-
#ifndef CONFIG_IDF_TARGET_ARCH_RISCV
410+
#if CIRCUITPY_DEBUG
411411
esp_backtrace_print(100);
412412
#endif
413413
esp_restart();

ports/espressif/tools/update_sdkconfig.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"CONFIG_BT_CTRL_PINNED_TO_CORE",
5757
"CONFIG_SPIRAM_SPEED_2",
5858
"CONFIG_SPIRAM_BANKSWITCH_ENABLE", # For ESP32
59+
"CONFIG_ESP_WIFI_RX_IRAM_OPT",
5960
]
6061

6162
BOARD_SETTINGS = [
@@ -360,6 +361,11 @@ def update(debug, board, update_all):
360361
target_kconfig_snippets.add(loc)
361362
target_symbols = target_symbols.union(differing_keys)
362363

364+
# We treat SPIRAM differently so make sure it isn't a target related
365+
# symbol (even though some targets don't support SPIRAM).
366+
if "SPIRAM" in target_symbols:
367+
target_symbols.remove("SPIRAM")
368+
363369
# kconfig settings can be set by others. item.referenced doesn't
364370
# know this. So we collect all things that reference this using
365371
# rev_dep.
@@ -428,7 +434,9 @@ def update(debug, board, update_all):
428434
# Always document the above settings. Settings below should
429435
# be non-default.
430436
pass
431-
elif matches_group(config_string, PSRAM_SETTINGS) or psram_reference:
437+
elif matches_group(config_string, PSRAM_SETTINGS) or (
438+
psram_reference and not target_setting
439+
):
432440
print(" " * (len(current_group) + 1), "psram shared")
433441
last_psram_group = add_group(psram_settings, last_psram_group, current_group)
434442
psram_settings.append(config_string)

0 commit comments

Comments
 (0)