Update new boards. Reduce memory use in S2

This commit is contained in:
Scott Shawcroft 2023-09-14 11:19:38 -07:00
parent a3d37122a7
commit 952118f6c3
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
28 changed files with 200 additions and 315 deletions

2
.gitmodules vendored
View File

@ -342,7 +342,7 @@
url = https://github.com/bablokb/circuitpython-pcf85063a url = https://github.com/bablokb/circuitpython-pcf85063a
[submodule "frozen/Adafruit_CircuitPython_Wave"] [submodule "frozen/Adafruit_CircuitPython_Wave"]
path = frozen/Adafruit_CircuitPython_Wave path = frozen/Adafruit_CircuitPython_Wave
url = http://github.com/adafruit/Adafruit_CircuitPython_Wave.git url = https://github.com/adafruit/Adafruit_CircuitPython_Wave.git
[submodule "ports/raspberrypi/lib/Pico-PIO-USB"] [submodule "ports/raspberrypi/lib/Pico-PIO-USB"]
path = ports/raspberrypi/lib/Pico-PIO-USB path = ports/raspberrypi/lib/Pico-PIO-USB
url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git

View File

@ -5,9 +5,10 @@ USB_MANUFACTURER = "Adafruit"
IDF_TARGET = esp32s3 IDF_TARGET = esp32s3
CIRCUITPY_ESP_FLASH_SIZE = 4MB
CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 4MB
CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB
CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_MODE = qio
CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESP_PSRAM_FREQ = 80m

View File

@ -5,8 +5,12 @@ USB_MANUFACTURER = "Adafruit"
IDF_TARGET = esp32s3 IDF_TARGET = esp32s3
CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = opi
CIRCUITPY_ESP_PSRAM_FREQ = 80m
CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1

View File

@ -1,41 +1,29 @@
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
# #
# SPI RAM config # Espressif IoT Development Framework Configuration
#
#
# Component config
# #
# CONFIG_SPIRAM_MODE_QUAD is not set
CONFIG_SPIRAM_MODE_OCT=y
CONFIG_SPIRAM_TYPE_AUTO=y
# end of SPI RAM config
CONFIG_DEFAULT_PSRAM_CLK_IO=30
# #
# PSRAM Clock and CS IO for ESP32S3 # ESP System Settings
# #
CONFIG_DEFAULT_PSRAM_CS_IO=26 CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_ESP_CONSOLE_NONE is not set
CONFIG_ESP_CONSOLE_UART=y
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_TX_GPIO=43
CONFIG_ESP_CONSOLE_UART_RX_GPIO=44
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
# end of ESP System Settings
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="qualia" CONFIG_LWIP_LOCAL_HOSTNAME="qualia"
# end of LWIP # end of LWIP
#
# CONFIG_ESP_CONSOLE_NONE is not set # end of Component config
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y # end of Espressif IoT Development Framework Configuration
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_RX_GPIO=44
CONFIG_ESP_CONSOLE_UART_TX_GPIO=43
CONFIG_ESP_CONSOLE_UART=y

View File

@ -6,9 +6,17 @@ USB_MANUFACTURER = "Arduino"
IDF_TARGET = esp32s3 IDF_TARGET = esp32s3
# This has a u-blox® NORA-W106-10B module.
# This flash lives outside the module.
CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_SIZE = 16MB
# This PSRAM is in the module.
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = opi
CIRCUITPY_ESP_PSRAM_FREQ = 80m
INTERNAL_FLASH_FILESYSTEM = 0 INTERNAL_FLASH_FILESYSTEM = 0
QSPI_FLASH_FILESYSTEM = 1 QSPI_FLASH_FILESYSTEM = 1

View File

@ -1,43 +1,15 @@
# #
# Espressif IoT Development Framework Configuration
#
#
# Component config # Component config
# #
#
# ESP32S3-Specific
#
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
#
# SPI RAM config
#
# CONFIG_SPIRAM_MODE_QUAD is not set
CONFIG_SPIRAM_MODE_OCT=y
# CONFIG_SPIRAM_TYPE_AUTO is not set
CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
CONFIG_SPIRAM_SIZE=8388608
#
# PSRAM Clock and CS IO for ESP32S3
#
CONFIG_DEFAULT_PSRAM_CLK_IO=30
CONFIG_DEFAULT_PSRAM_CS_IO=26
# end of PSRAM Clock and CS IO for ESP32S3
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# end of SPI RAM config
# end of ESP32S3-Specific
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
# end of LWIP # end of LWIP
# end of Component config
# end of Espressif IoT Development Framework Configuration

View File

@ -6,9 +6,17 @@ USB_MANUFACTURER = "Arduino"
IDF_TARGET = esp32s3 IDF_TARGET = esp32s3
# This has a u-blox® NORA-W106-10B module.
# This flash lives outside the module.
CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_SIZE = 16MB
# This PSRAM is in the module.
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = opi
CIRCUITPY_ESP_PSRAM_FREQ = 80m
INTERNAL_FLASH_FILESYSTEM = 0 INTERNAL_FLASH_FILESYSTEM = 0
QSPI_FLASH_FILESYSTEM = 1 QSPI_FLASH_FILESYSTEM = 1

View File

@ -1,43 +1,15 @@
# #
# Espressif IoT Development Framework Configuration
#
#
# Component config # Component config
# #
#
# ESP32S3-Specific
#
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
#
# SPI RAM config
#
# CONFIG_SPIRAM_MODE_QUAD is not set
CONFIG_SPIRAM_MODE_OCT=y
# CONFIG_SPIRAM_TYPE_AUTO is not set
CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
CONFIG_SPIRAM_SIZE=8388608
#
# PSRAM Clock and CS IO for ESP32S3
#
CONFIG_DEFAULT_PSRAM_CLK_IO=30
CONFIG_DEFAULT_PSRAM_CS_IO=26
# end of PSRAM Clock and CS IO for ESP32S3
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# end of SPI RAM config
# end of ESP32S3-Specific
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="nano-esp32" CONFIG_LWIP_LOCAL_HOSTNAME="nano-esp32"
# end of LWIP # end of LWIP
# end of Component config
# end of Espressif IoT Development Framework Configuration

View File

@ -4,17 +4,6 @@
# #
# Component config # Component config
# #
#
# Hardware Settings
#
#
# Sleep Config
#
CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y
# end of Sleep Config
# end of Hardware Settings
# #
# Camera configuration # Camera configuration
# #

View File

@ -5,10 +5,10 @@ USB_MANUFACTURER = "Espressif"
IDF_TARGET = esp32s2 IDF_TARGET = esp32s2
CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 40m
CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_SIZE = 4MB
CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB
CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_MODE = qio
CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_ESP_PSRAM_FREQ = 80m

View File

@ -9,4 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = opi
CIRCUITPY_ESP_PSRAM_FREQ = 80m
CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1

View File

@ -1,48 +1,21 @@
# #
# Espressif IoT Development Framework Configuration
#
#
# Component config # Component config
# #
# #
# ESP32S3-Specific # ESP System Settings
# #
CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# # CONFIG_ESP_CONSOLE_NONE is not set
# SPI RAM config CONFIG_ESP_CONSOLE_UART=y
# CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y
#CONFIG_SPIRAM_MODE_QUAD=y CONFIG_ESP_CONSOLE_UART_NUM=0
### NEW ### CONFIG_ESP_CONSOLE_UART_TX_GPIO=43
CONFIG_SPIRAM_MODE_OCT=y CONFIG_ESP_CONSOLE_UART_RX_GPIO=44
CONFIG_SPIRAM_TYPE_AUTO=y CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
####### # end of ESP System Settings
# CONFIG_SPIRAM_MODE_OCT is not set
# CONFIG_SPIRAM_TYPE_AUTO is not set
#CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
#CONFIG_SPIRAM_SIZE=2097152
CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
CONFIG_SPIRAM_SIZE=8388608
#
# PSRAM Clock and CS IO for ESP32S3
#
CONFIG_DEFAULT_PSRAM_CLK_IO=30
CONFIG_DEFAULT_PSRAM_CS_IO=26
# end of PSRAM Clock and CS IO for ESP32S3
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
# CONFIG_SPIRAM_SPEED_120M is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# end of SPI RAM config
# end of ESP32S3-Specific
# #
# LWIP # LWIP
@ -50,13 +23,6 @@ CONFIG_SPIRAM_MEMTEST=y
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-hacktablet" CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-hacktablet"
# end of LWIP # end of LWIP
# CONFIG_ESP_CONSOLE_NONE is not set
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_RX_GPIO=44
CONFIG_ESP_CONSOLE_UART_TX_GPIO=43
CONFIG_ESP_CONSOLE_UART=y
# end of Component config # end of Component config
# end of Espressif IoT Development Framework Configuration

View File

@ -1,7 +1,15 @@
CONFIG_ESP32S3_SPIRAM_SUPPORT=n #
# Espressif IoT Development Framework Configuration
#
#
# Component config
#
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
# end of LWIP # end of LWIP
# end of Component config
# end of Espressif IoT Development Framework Configuration

View File

@ -24,12 +24,6 @@ CONFIG_ESP32_REV_MIN_FULL=300
CONFIG_ESP_REV_MIN_FULL=300 CONFIG_ESP_REV_MIN_FULL=300
# end of Chip revision # end of Chip revision
#
# Sleep Config
#
CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y
# end of Sleep Config
# end of Hardware Settings # end of Hardware Settings
# #

View File

@ -6,4 +6,9 @@ IDF_TARGET = esp32
CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_MODE = qio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = qio
CIRCUITPY_ESP_PSRAM_FREQ = 80m
CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_ESPCAMERA = 0

View File

@ -1,58 +1,37 @@
CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y #
CONFIG_ESP32_SPIRAM_SUPPORT=y # Espressif IoT Development Framework Configuration
#
#
# Security features
#
CONFIG_SECURE_BOOT_V2_RSA_SUPPORTED=y
CONFIG_SECURE_BOOT_V2_PREFERRED=y
# end of Security features
#
# Component config
#
#
# Hardware Settings
#
#
# Chip revision
#
# CONFIG_ESP32_REV_MIN_0 is not set
CONFIG_ESP32_REV_MIN_3=y CONFIG_ESP32_REV_MIN_3=y
CONFIG_ESP32_REV_MIN=3
CONFIG_ESP32_REV_MIN_FULL=300
CONFIG_ESP_REV_MIN_FULL=300
# end of Chip revision
# # end of Hardware Settings
# SPI RAM config
#
CONFIG_SPIRAM_TYPE_AUTO=y
# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
#CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
CONFIG_SPIRAM_SIZE=8388608
# end of SPI RAM config
#
# PSRAM clock and cs IO for ESP32
#
CONFIG_D0WD_PSRAM_CLK_IO=17
CONFIG_D0WD_PSRAM_CS_IO=16
# end of PSRAM clock and cs IO for ESP32
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
# CONFIG_SPIRAM_SPEED_26M is not set
# CONFIG_SPIRAM_SPEED_20M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="M5Paper" CONFIG_LWIP_LOCAL_HOSTNAME="M5Paper"
# end of LWIP # end of LWIP
# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins # end of Component config
### #
### # ESP System Settings # end of Espressif IoT Development Framework Configuration
### #
### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set
### CONFIG_ESP_CONSOLE_UART_CUSTOM=y
### CONFIG_ESP_CONSOLE_NONE is not set
### CONFIG_ESP_CONSOLE_UART=y
### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y
### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set
### CONFIG_ESP_CONSOLE_UART_NUM=0
### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17
### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16
### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set
### # end of ESP System Settings

View File

@ -9,4 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_PSRAM_SIZE = 8MB
CIRCUITPY_ESP_PSRAM_MODE = opi
CIRCUITPY_ESP_PSRAM_FREQ = 80m
CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1

View File

@ -1,41 +1,28 @@
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
# #
# SPI RAM config # Espressif IoT Development Framework Configuration
# #
# CONFIG_SPIRAM_MODE_QUAD is not set #
CONFIG_SPIRAM_MODE_OCT=y # Component config
CONFIG_SPIRAM_TYPE_AUTO=y #
# end of SPI RAM config #
# ESP System Settings
#
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
# CONFIG_ESP_CONSOLE_NONE is not set
CONFIG_ESP_CONSOLE_UART=y
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_TX_GPIO=43
CONFIG_ESP_CONSOLE_UART_RX_GPIO=44
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
# end of ESP System Settings
CONFIG_DEFAULT_PSRAM_CLK_IO=30
#
# PSRAM Clock and CS IO for ESP32S3
#
CONFIG_DEFAULT_PSRAM_CS_IO=26
# end of PSRAM Clock and CS IO for ESP32S3
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
#CONFIG_SPIRAM_USE_MEMMAP=y
CONFIG_SPIRAM_USE_CAPS_ALLOC=y
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft"
# end of LWIP # end of LWIP
#
# CONFIG_ESP_CONSOLE_NONE is not set # end of Component config
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y # end of Espressif IoT Development Framework Configuration
CONFIG_ESP_CONSOLE_UART_CUSTOM=y
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_RX_GPIO=44
CONFIG_ESP_CONSOLE_UART_TX_GPIO=43
CONFIG_ESP_CONSOLE_UART=y

View File

@ -8,3 +8,7 @@ IDF_TARGET = esp32s3
CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_MODE = dio
CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_SIZE = 16MB
CIRCUITPY_ESP_PSRAM_SIZE = 2MB
CIRCUITPY_ESP_PSRAM_MODE = qio
CIRCUITPY_ESP_PSRAM_FREQ = 80m

View File

@ -1,43 +1,9 @@
# #
# Espressif IoT Development Framework Configuration
#
#
# Component config # Component config
# #
#
# ESP32S3-Specific
#
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
#
# SPI RAM config
#
CONFIG_SPIRAM_MODE_QUAD=y
# CONFIG_SPIRAM_MODE_OCT is not set
# CONFIG_SPIRAM_TYPE_AUTO is not set
CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
CONFIG_SPIRAM_SIZE=2097152
#
# PSRAM Clock and CS IO for ESP32S3
#
CONFIG_DEFAULT_PSRAM_CLK_IO=30
CONFIG_DEFAULT_PSRAM_CS_IO=26
# end of PSRAM Clock and CS IO for ESP32S3
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set
# CONFIG_SPIRAM_RODATA is not set
# CONFIG_SPIRAM_SPEED_120M is not set
CONFIG_SPIRAM_SPEED_80M=y
# CONFIG_SPIRAM_SPEED_40M is not set
CONFIG_SPIRAM=y
CONFIG_SPIRAM_BOOT_INIT=y
# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
CONFIG_SPIRAM_USE_MEMMAP=y
# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
# CONFIG_SPIRAM_USE_MALLOC is not set
CONFIG_SPIRAM_MEMTEST=y
# end of SPI RAM config
# end of ESP32S3-Specific
# #
# LWIP # LWIP
# #
@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3"
# end of LWIP # end of LWIP
# end of Component config # end of Component config
# end of Espressif IoT Development Framework Configuration

View File

@ -33,6 +33,7 @@
#include "shared/runtime/interrupt_char.h" #include "shared/runtime/interrupt_char.h"
#include "py/mperrno.h" #include "py/mperrno.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "supervisor/port.h"
#include "supervisor/shared/tick.h" #include "supervisor/shared/tick.h"
#include "lwip/sockets.h" #include "lwip/sockets.h"
@ -56,12 +57,16 @@ void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) {
void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self,
const char *host, size_t hostlen, uint32_t port) { const char *host, size_t hostlen, uint32_t port) {
// Yield briefly so that the IDF can clean up memory before we need more.
port_yield();
int result = esp_tls_conn_new_sync(host, hostlen, port, &self->ssl_config, self->tls); int result = esp_tls_conn_new_sync(host, hostlen, port, &self->ssl_config, self->tls);
self->sock->connected = result >= 0; self->sock->connected = result >= 0;
if (result < 0) { if (result < 0) {
int esp_tls_code; int esp_tls_code;
int flags; int flags;
esp_err_t err = esp_tls_get_and_clear_last_error(self->tls_error_handle, &esp_tls_code, &flags); esp_tls_error_handle_t tls_error_handle;
esp_tls_get_error_handle(self->tls, &tls_error_handle);
esp_err_t err = esp_tls_get_and_clear_last_error(tls_error_handle, &esp_tls_code, &flags);
if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) {
mp_raise_espidf_MemoryError(); mp_raise_espidf_MemoryError();
@ -155,7 +160,9 @@ mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t *self, const uint8_t
if (sent < 0) { if (sent < 0) {
int esp_tls_code; int esp_tls_code;
int flags; int flags;
esp_err_t err = esp_tls_get_and_clear_last_error(self->tls_error_handle, &esp_tls_code, &flags); esp_tls_error_handle_t tls_error_handle;
esp_tls_get_error_handle(self->tls, &tls_error_handle);
esp_err_t err = esp_tls_get_and_clear_last_error(tls_error_handle, &esp_tls_code, &flags);
if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) {
mp_raise_espidf_MemoryError(); mp_raise_espidf_MemoryError();

View File

@ -38,7 +38,6 @@ typedef struct ssl_sslsocket_obj {
mp_obj_base_t base; mp_obj_base_t base;
socketpool_socket_obj_t *sock; socketpool_socket_obj_t *sock;
esp_tls_t *tls; esp_tls_t *tls;
esp_tls_error_handle_t tls_error_handle;
ssl_sslcontext_obj_t *ssl_context; ssl_sslcontext_obj_t *ssl_context;
esp_tls_cfg_t ssl_config; esp_tls_cfg_t ssl_config;
} ssl_sslsocket_obj_t; } ssl_sslsocket_obj_t;

View File

@ -32,6 +32,7 @@
#include "shared-bindings/wifi/Monitor.h" #include "shared-bindings/wifi/Monitor.h"
#include "shared-bindings/wifi/Radio.h" #include "shared-bindings/wifi/Radio.h"
#include "py/gc.h"
#include "py/mpstate.h" #include "py/mpstate.h"
#include "py/runtime.h" #include "py/runtime.h"
@ -162,8 +163,8 @@ void common_hal_wifi_init(bool user_initiated) {
if (!wifi_ever_inited) { if (!wifi_ever_inited) {
ESP_ERROR_CHECK(esp_netif_init()); ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_loop_create_default());
wifi_ever_inited = true;
} }
wifi_ever_inited = true;
self->netif = esp_netif_create_default_wifi_sta(); self->netif = esp_netif_create_default_wifi_sta();
self->ap_netif = esp_netif_create_default_wifi_ap(); self->ap_netif = esp_netif_create_default_wifi_ap();
@ -201,9 +202,16 @@ void common_hal_wifi_init(bool user_initiated) {
#endif #endif
esp_err_t result = esp_wifi_init(&config); esp_err_t result = esp_wifi_init(&config);
if (result == ESP_ERR_NO_MEM) { if (result == ESP_ERR_NO_MEM) {
mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate Wifi memory")); if (gc_alloc_possible()) {
mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate Wifi memory"));
}
ESP_LOGE(TAG, "Failed to allocate Wifi memory");
} else if (result != ESP_OK) { } else if (result != ESP_OK) {
raise_esp_error(result); if (gc_alloc_possible()) {
raise_esp_error(result);
}
ESP_LOGE(TAG, "WiFi error code: %d", result);
return;
} }
// set station mode to avoid the default SoftAP // set station mode to avoid the default SoftAP
common_hal_wifi_radio_start_station(self); common_hal_wifi_radio_start_station(self);

View File

@ -46,6 +46,17 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y
# end of ESP System Settings # end of ESP System Settings
#
# Wi-Fi
#
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8
CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=8
CONFIG_ESP32_WIFI_RX_BA_WIN=4
# CONFIG_ESP32_WIFI_NVS_ENABLED is not set
# end of Wi-Fi
# #
# Newlib # Newlib
# #

View File

@ -4,17 +4,6 @@
# #
# Component config # Component config
# #
#
# Hardware Settings
#
#
# Sleep Config
#
# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set
# end of Sleep Config
# end of Hardware Settings
# #
# ESP PSRAM # ESP PSRAM
# #

View File

@ -57,6 +57,12 @@ CONFIG_LWIP_TCP_RTO_TIME=3000
# mbedTLS # mbedTLS
# #
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048
#
# mbedTLS v3.x related
#
# CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE is not set
# end of mbedTLS v3.x related
# #
# Certificate Bundle # Certificate Bundle
# #
@ -65,7 +71,6 @@ CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y
CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem"
# end of Certificate Bundle # end of Certificate Bundle
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=y
# #
# TLS Key Exchange Methods # TLS Key Exchange Methods
# #

View File

@ -251,7 +251,7 @@ safe_mode_t port_init(void) {
// Send the ROM output out of the UART. This includes early logs. // Send the ROM output out of the UART. This includes early logs.
#if DEBUG #if DEBUG
ets_install_uart_printf(); esp_rom_install_uart_printf();
#endif #endif
heap = NULL; heap = NULL;

View File

@ -163,6 +163,7 @@ def update(debug, board, update_all):
board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk")
psram_size = "0" psram_size = "0"
uf2_bootloader = None
for line in board_make.read_text().split("\n"): for line in board_make.read_text().split("\n"):
if "=" not in line or line.startswith("#"): if "=" not in line or line.startswith("#"):
continue continue
@ -171,6 +172,8 @@ def update(debug, board, update_all):
value = value.strip() value = value.strip()
if key == "IDF_TARGET": if key == "IDF_TARGET":
target = value target = value
if uf2_bootloader is None:
uf2_bootloader = target not in ("esp32", "esp32c3")
elif key == "CIRCUITPY_ESP_FLASH_SIZE": elif key == "CIRCUITPY_ESP_FLASH_SIZE":
flash_size = value flash_size = value
elif key == "CIRCUITPY_ESP_FLASH_MODE": elif key == "CIRCUITPY_ESP_FLASH_MODE":
@ -183,6 +186,8 @@ def update(debug, board, update_all):
psram_mode = value psram_mode = value
elif key == "CIRCUITPY_ESP_PSRAM_FREQ": elif key == "CIRCUITPY_ESP_PSRAM_FREQ":
psram_freq = value psram_freq = value
elif key == "UF2_BOOTLOADER":
uf2_bootloader = not (value == "0")
os.environ["IDF_TARGET"] = target os.environ["IDF_TARGET"] = target
os.environ[ os.environ[
@ -209,7 +214,7 @@ def update(debug, board, update_all):
size_options = "" size_options = ""
if flash_size == "2MB": if flash_size == "2MB":
size_options = "-no-ota-no-uf2" size_options = "-no-ota-no-uf2"
elif target in ("esp32", "esp32c3"): elif not uf2_bootloader:
# These boards don't have native USB. # These boards don't have native USB.
size_options = "-no-uf2" size_options = "-no-uf2"
flash_size_config = pathlib.Path( flash_size_config = pathlib.Path(