From c1144e66a857c265c918251b2c91294ebb40022d Mon Sep 17 00:00:00 2001 From: Jeremy Littler <87398149+BrainBoardz@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:09:06 -0400 Subject: [PATCH 001/129] Add files via upload --- .../boards/brainboardz_neuron/pins.c | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ports/espressif/boards/brainboardz_neuron/pins.c b/ports/espressif/boards/brainboardz_neuron/pins.c index 5c198c20a7..62b95421f8 100755 --- a/ports/espressif/boards/brainboardz_neuron/pins.c +++ b/ports/espressif/boards/brainboardz_neuron/pins.c @@ -23,35 +23,31 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) }, - { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO15) }, - { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO16) }, - { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, - { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, @@ -61,7 +57,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 9bdb57635151c3ef6976eca642f4868e01e64fd9 Mon Sep 17 00:00:00 2001 From: Jeremy Littler <87398149+BrainBoardz@users.noreply.github.com> Date: Mon, 28 Aug 2023 10:10:04 -0400 Subject: [PATCH 002/129] Add files via upload --- ports/espressif/boards/brainboardz_neuron/mpconfigboard.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h index 72cda83c9b..760041ddf4 100755 --- a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h +++ b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.h @@ -35,6 +35,6 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO14) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO15) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO13) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO40) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO41) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO39) From 9daccc08c5f8ef26c9ef537875e4c2bee800cbbd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 28 Aug 2023 15:43:45 -0700 Subject: [PATCH 003/129] Forbidden pins are now correctly "in use" on ESP This removes duplicate code to make debug UART pins in use via never reset. It is done through forbidden pins automatically now. Fixes #8288 --- .gitmodules | 2 +- .../boards/adafruit_funhouse/board.c | 6 ------ .../espressif/boards/adafruit_funhouse/pins.c | 4 ++-- .../adafruit_magtag_2.9_grayscale/board.c | 6 ------ .../board.c | 10 --------- .../adafruit_qtpy_esp32s3_nopsram/board.c | 10 --------- .../boards/ai_thinker_esp32-c3s-2m/board.c | 6 ------ .../boards/ai_thinker_esp32-c3s/board.c | 6 ------ .../boards/ai_thinker_esp_12k_nodemcu/board.c | 10 --------- ports/espressif/boards/artisense_rd00/board.c | 6 ------ .../boards/atmegazero_esp32s2/board.c | 10 --------- ports/espressif/boards/bpi_bit_s2/board.c | 9 -------- ports/espressif/boards/bpi_leaf_s3/board.c | 10 --------- ports/espressif/boards/bpi_picow_s3/board.c | 10 --------- .../boards/brainboardz_neuron/board.c | 10 --------- .../boards/crumpspace_crumps2/board.c | 10 --------- .../boards/electroniccats_bastwifi/board.c | 10 --------- .../espressif_esp32c3_devkitm_1_n4/board.c | 9 -------- .../espressif_esp32s2_devkitc_1_n4/board.c | 10 --------- .../espressif_esp32s2_devkitc_1_n4r2/board.c | 10 --------- .../espressif_esp32s2_devkitc_1_n8r2/board.c | 10 --------- .../boards/espressif_esp32s3_box/board.c | 6 ------ .../boards/espressif_esp32s3_box_lite/board.c | 6 ------ .../espressif_esp32s3_devkitc_1_n32r8/board.c | 21 +------------------ .../espressif_esp32s3_devkitc_1_n8/board.c | 10 --------- .../espressif_esp32s3_devkitc_1_n8r2/board.c | 10 --------- .../espressif_esp32s3_devkitc_1_n8r8/board.c | 10 --------- .../espressif_esp32s3_devkitm_1_n8/board.c | 10 --------- .../espressif_esp32s3_usb_otg_n8/board.c | 4 ---- .../boards/espressif_kaluga_1.3/board.c | 10 --------- .../boards/espressif_kaluga_1/board.c | 10 --------- .../boards/espressif_saola_1_wroom/board.c | 10 --------- .../boards/espressif_saola_1_wrover/board.c | 10 --------- .../boards/franzininho_wifi_wroom/board.c | 10 --------- .../boards/franzininho_wifi_wrover/board.c | 10 --------- .../boards/gravitech_cucumber_m/board.c | 10 --------- .../boards/gravitech_cucumber_ms/board.c | 10 --------- .../boards/gravitech_cucumber_r/board.c | 10 --------- .../boards/gravitech_cucumber_rs/board.c | 10 --------- ports/espressif/boards/hiibot_iots2/board.c | 19 ----------------- .../boards/lilygo_tembed_esp32s3/board.c | 6 ------ .../boards/lilygo_ttgo_t-01c3/board.c | 11 ---------- .../boards/lilygo_ttgo_t-oi-plus/board.c | 11 ---------- .../lilygo_ttgo_t8_esp32_s2_wroom/board.c | 10 --------- .../boards/lilygo_ttgo_t8_s2/board.c | 10 --------- .../boards/lilygo_ttgo_t8_s2_st7789/board.c | 6 ------ ports/espressif/boards/lolin_s2_mini/board.c | 10 --------- ports/espressif/boards/lolin_s2_pico/board.c | 5 ----- ports/espressif/boards/lolin_s3_mini/board.c | 10 --------- ports/espressif/boards/maker_badge/board.c | 10 --------- .../boards/microdev_micro_c3/board.c | 9 -------- .../boards/microdev_micro_s2/board.c | 12 ----------- .../espressif/boards/mixgo_ce_serial/board.c | 6 ------ ports/espressif/boards/mixgo_ce_udisk/board.c | 10 --------- .../boards/morpheans_morphesp-240/board.c | 6 ------ .../boards/muselab_nanoesp32_s2_wroom/board.c | 10 --------- .../muselab_nanoesp32_s2_wrover/board.c | 10 --------- .../boards/seeed_xiao_esp32c3/board.c | 11 ---------- .../smartbeedesigns_bee_data_logger/board.c | 10 --------- .../smartbeedesigns_bee_motion_s3/board.c | 10 --------- .../boards/smartbeedesigns_bee_s3/board.c | 10 --------- .../boards/targett_module_clip_wroom/board.c | 6 ------ .../boards/targett_module_clip_wrover/board.c | 6 ------ .../boards/unexpectedmaker_feathers2/board.c | 10 --------- .../unexpectedmaker_feathers2_neo/board.c | 10 --------- .../board.c | 10 --------- .../boards/unexpectedmaker_feathers3/board.c | 10 --------- .../boards/unexpectedmaker_nanos3/board.c | 10 +-------- .../boards/unexpectedmaker_pros3/board.c | 10 +-------- .../boards/unexpectedmaker_tinys2/board.c | 10 --------- .../boards/unexpectedmaker_tinys3/board.c | 10 --------- .../waveshare_esp32_s2_pico_lcd/board.c | 6 ------ .../boards/waveshare_esp32s2_pico/board.c | 10 --------- .../boards/yd_esp32_s3_n16r8/board.c | 10 --------- .../espressif/boards/yd_esp32_s3_n8r8/board.c | 10 --------- .../common-hal/microcontroller/Pin.c | 9 ++++++-- ports/espressif/peripherals/esp32s3/pins.c | 2 ++ ports/espressif/peripherals/pins.h | 2 +- 78 files changed, 16 insertions(+), 688 deletions(-) diff --git a/.gitmodules b/.gitmodules index 91afffe6a6..7cb54a92dc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -340,4 +340,4 @@ url = https://github.com/bablokb/circuitpython-pcf85063a [submodule "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 diff --git a/ports/espressif/boards/adafruit_funhouse/board.c b/ports/espressif/boards/adafruit_funhouse/board.c index b1a01b2dcb..daa4aa474e 100644 --- a/ports/espressif/boards/adafruit_funhouse/board.c +++ b/ports/espressif/boards/adafruit_funhouse/board.c @@ -50,12 +50,6 @@ uint8_t display_init_sequence[] = { }; void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO37); - common_hal_never_reset_pin(&pin_GPIO38); - #endif /* DEBUG */ - displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; busio_spi_obj_t *spi = &bus->inline_bus; common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL, false); diff --git a/ports/espressif/boards/adafruit_funhouse/pins.c b/ports/espressif/boards/adafruit_funhouse/pins.c index 17c2ac4256..c94aeebf20 100644 --- a/ports/espressif/boards/adafruit_funhouse/pins.c +++ b/ports/espressif/boards/adafruit_funhouse/pins.c @@ -44,8 +44,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO34) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c index da070688ed..bd5ad77c93 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c @@ -114,12 +114,6 @@ const uint8_t refresh_sequence[] = { }; void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; busio_spi_obj_t *spi = &bus->inline_bus; common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL, false); diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c index 2e09e7d9a4..0118b6d8ea 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c @@ -32,12 +32,6 @@ #include "soc/usb_serial_jtag_struct.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif - // This board has LEDs connected to the USB pins USB_SERIAL_JTAG.conf0.usb_pad_enable = 0; USB_SERIAL_JTAG.conf0.dp_pullup = 0; diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c index 2e09e7d9a4..0118b6d8ea 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c @@ -32,12 +32,6 @@ #include "soc/usb_serial_jtag_struct.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif - // This board has LEDs connected to the USB pins USB_SERIAL_JTAG.conf0.usb_pad_enable = 0; USB_SERIAL_JTAG.conf0.dp_pullup = 0; diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/artisense_rd00/board.c b/ports/espressif/boards/artisense_rd00/board.c index fb3f6befc9..a23fe0765b 100644 --- a/ports/espressif/boards/artisense_rd00/board.c +++ b/ports/espressif/boards/artisense_rd00/board.c @@ -29,12 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); diff --git a/ports/espressif/boards/atmegazero_esp32s2/board.c b/ports/espressif/boards/atmegazero_esp32s2/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/board.c +++ b/ports/espressif/boards/atmegazero_esp32s2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/bpi_bit_s2/board.c b/ports/espressif/boards/bpi_bit_s2/board.c index 22cdb31898..164430c88c 100644 --- a/ports/espressif/boards/bpi_bit_s2/board.c +++ b/ports/espressif/boards/bpi_bit_s2/board.c @@ -25,14 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/bpi_leaf_s3/board.c b/ports/espressif/boards/bpi_leaf_s3/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/bpi_leaf_s3/board.c +++ b/ports/espressif/boards/bpi_leaf_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/bpi_picow_s3/board.c b/ports/espressif/boards/bpi_picow_s3/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/bpi_picow_s3/board.c +++ b/ports/espressif/boards/bpi_picow_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/brainboardz_neuron/board.c b/ports/espressif/boards/brainboardz_neuron/board.c index 3b1f5efd87..164430c88c 100755 --- a/ports/espressif/boards/brainboardz_neuron/board.c +++ b/ports/espressif/boards/brainboardz_neuron/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/crumpspace_crumps2/board.c b/ports/espressif/boards/crumpspace_crumps2/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/crumpspace_crumps2/board.c +++ b/ports/espressif/boards/crumpspace_crumps2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/electroniccats_bastwifi/board.c b/ports/espressif/boards/electroniccats_bastwifi/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/board.c +++ b/ports/espressif/boards/electroniccats_bastwifi/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c index b155ed7a7b..f749ee60d2 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_box/board.c b/ports/espressif/boards/espressif_esp32s3_box/board.c index a91a924d04..4a2ce0efed 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/board.c +++ b/ports/espressif/boards/espressif_esp32s3_box/board.c @@ -88,12 +88,6 @@ void board_init(void) { true, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/board.c b/ports/espressif/boards/espressif_esp32s3_box_lite/board.c index ddfab49797..1917e6df4c 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/board.c +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/board.c @@ -89,12 +89,6 @@ void board_init(void) { false, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c index ff9418ec86..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/board.c @@ -25,24 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} - -bool board_requests_safe_mode(void) { - return false; -} - -void reset_board(void) { - -} - -void board_deinit(void) { -} +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c index 3b1f5efd87..164430c88c 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c index afbb5ae8fb..197dea0a49 100644 --- a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c +++ b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/board.c @@ -116,10 +116,6 @@ void board_init(void) { true, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - #if CIRCUITPY_DEBUG - common_hal_never_reset_pin(DEFAULT_UART_BUS_TX); - #endif } bool espressif_board_reset_pin_number(gpio_num_t pin_number) { diff --git a/ports/espressif/boards/espressif_kaluga_1.3/board.c b/ports/espressif/boards/espressif_kaluga_1.3/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/board.c +++ b/ports/espressif/boards/espressif_kaluga_1.3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_kaluga_1/board.c b/ports/espressif/boards/espressif_kaluga_1/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_kaluga_1/board.c +++ b/ports/espressif/boards/espressif_kaluga_1/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_saola_1_wroom/board.c b/ports/espressif/boards/espressif_saola_1_wroom/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/board.c +++ b/ports/espressif/boards/espressif_saola_1_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_saola_1_wrover/board.c b/ports/espressif/boards/espressif_saola_1_wrover/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/board.c +++ b/ports/espressif/boards/espressif_saola_1_wrover/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/franzininho_wifi_wroom/board.c b/ports/espressif/boards/franzininho_wifi_wroom/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/board.c +++ b/ports/espressif/boards/franzininho_wifi_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/franzininho_wifi_wrover/board.c b/ports/espressif/boards/franzininho_wifi_wrover/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/board.c +++ b/ports/espressif/boards/franzininho_wifi_wrover/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_m/board.c b/ports/espressif/boards/gravitech_cucumber_m/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/board.c +++ b/ports/espressif/boards/gravitech_cucumber_m/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_ms/board.c b/ports/espressif/boards/gravitech_cucumber_ms/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/board.c +++ b/ports/espressif/boards/gravitech_cucumber_ms/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_r/board.c b/ports/espressif/boards/gravitech_cucumber_r/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/board.c +++ b/ports/espressif/boards/gravitech_cucumber_r/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/gravitech_cucumber_rs/board.c b/ports/espressif/boards/gravitech_cucumber_rs/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/board.c +++ b/ports/espressif/boards/gravitech_cucumber_rs/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/hiibot_iots2/board.c b/ports/espressif/boards/hiibot_iots2/board.c index 87ee7d0b14..8524c80202 100644 --- a/ports/espressif/boards/hiibot_iots2/board.c +++ b/ports/espressif/boards/hiibot_iots2/board.c @@ -126,25 +126,6 @@ static void display_init(void) { } void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); - // Display display_init(); } diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/board.c b/ports/espressif/boards/lilygo_tembed_esp32s3/board.c index 03a86a48d4..ee48d50288 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/board.c +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/board.c @@ -88,12 +88,6 @@ void board_init(void) { true, // backlight_on_high false, // SH1107_addressing 50000); // backlight pwm frequency - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c b/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c index 67b05e5cd2..e8fec80c7c 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t-01c3/board.c @@ -1,14 +1,3 @@ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c index 7bcdcdba25..164430c88c 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/board.c @@ -24,17 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c index 6597b51c5f..76973aee30 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c index 6597b51c5f..76973aee30 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c index 7ba109dfce..f6ac6ede2d 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c @@ -126,12 +126,6 @@ static void display_init(void) { } void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Display display_init(); } diff --git a/ports/espressif/boards/lolin_s2_mini/board.c b/ports/espressif/boards/lolin_s2_mini/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/lolin_s2_mini/board.c +++ b/ports/espressif/boards/lolin_s2_mini/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lolin_s2_pico/board.c b/ports/espressif/boards/lolin_s2_pico/board.c index 2f987799ad..dfac8d0f57 100644 --- a/ports/espressif/boards/lolin_s2_pico/board.c +++ b/ports/espressif/boards/lolin_s2_pico/board.c @@ -97,11 +97,6 @@ static void display_init(void) { void board_init(void) { // init display display_init(); - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/lolin_s3_mini/board.c b/ports/espressif/boards/lolin_s3_mini/board.c index 9731a30366..00ae21ace8 100644 --- a/ports/espressif/boards/lolin_s3_mini/board.c +++ b/ports/espressif/boards/lolin_s3_mini/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/maker_badge/board.c b/ports/espressif/boards/maker_badge/board.c index 19dba31c57..45a7be2380 100644 --- a/ports/espressif/boards/maker_badge/board.c +++ b/ports/espressif/boards/maker_badge/board.c @@ -37,16 +37,6 @@ #define DELAY 0x80 void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); - - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/microdev_micro_c3/board.c b/ports/espressif/boards/microdev_micro_c3/board.c index b155ed7a7b..f749ee60d2 100644 --- a/ports/espressif/boards/microdev_micro_c3/board.c +++ b/ports/espressif/boards/microdev_micro_c3/board.c @@ -24,15 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/microdev_micro_s2/board.c b/ports/espressif/boards/microdev_micro_s2/board.c index 65bb19aced..f749ee60d2 100644 --- a/ports/espressif/boards/microdev_micro_s2/board.c +++ b/ports/espressif/boards/microdev_micro_s2/board.c @@ -25,17 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/mixgo_ce_serial/board.c b/ports/espressif/boards/mixgo_ce_serial/board.c index e6ffb553b1..187596b3b0 100644 --- a/ports/espressif/boards/mixgo_ce_serial/board.c +++ b/ports/espressif/boards/mixgo_ce_serial/board.c @@ -34,12 +34,6 @@ #include "supervisor/filesystem.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - mp_import_stat_t stat_b = mp_import_stat("boot.py"); if (stat_b != MP_IMPORT_STAT_FILE) { FATFS *fatfs = filesystem_circuitpy(); diff --git a/ports/espressif/boards/mixgo_ce_udisk/board.c b/ports/espressif/boards/mixgo_ce_udisk/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/mixgo_ce_udisk/board.c +++ b/ports/espressif/boards/mixgo_ce_udisk/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/morpheans_morphesp-240/board.c b/ports/espressif/boards/morpheans_morphesp-240/board.c index 9491902161..b4c0db304a 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/board.c +++ b/ports/espressif/boards/morpheans_morphesp-240/board.c @@ -139,12 +139,6 @@ uint8_t display_init_sequence[] = { void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO6); - common_hal_never_reset_pin(&pin_GPIO7); - #endif /* DEBUG */ - // Display displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/board.c b/ports/espressif/boards/seeed_xiao_esp32c3/board.c index 7bcdcdba25..164430c88c 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/board.c +++ b/ports/espressif/boards/seeed_xiao_esp32c3/board.c @@ -24,17 +24,6 @@ * THE SOFTWARE. */ -#include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO20); - common_hal_never_reset_pin(&pin_GPIO21); - #endif -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c b/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c +++ b/ports/espressif/boards/smartbeedesigns_bee_data_logger/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c +++ b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/smartbeedesigns_bee_s3/board.c b/ports/espressif/boards/smartbeedesigns_bee_s3/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_s3/board.c +++ b/ports/espressif/boards/smartbeedesigns_bee_s3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/targett_module_clip_wroom/board.c b/ports/espressif/boards/targett_module_clip_wroom/board.c index ce5a770920..3168e9a0aa 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/board.c +++ b/ports/espressif/boards/targett_module_clip_wroom/board.c @@ -29,12 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); diff --git a/ports/espressif/boards/targett_module_clip_wrover/board.c b/ports/espressif/boards/targett_module_clip_wrover/board.c index ce5a770920..3168e9a0aa 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/board.c +++ b/ports/espressif/boards/targett_module_clip_wrover/board.c @@ -29,12 +29,6 @@ #include "shared-bindings/microcontroller/Pin.h" void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/board.c b/ports/espressif/boards/unexpectedmaker_feathers2/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/board.c b/ports/espressif/boards/unexpectedmaker_feathers3/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_nanos3/board.c b/ports/espressif/boards/unexpectedmaker_nanos3/board.c index 8fd94f6c8b..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_nanos3/board.c +++ b/ports/espressif/boards/unexpectedmaker_nanos3/board.c @@ -25,13 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_pros3/board.c b/ports/espressif/boards/unexpectedmaker_pros3/board.c index 8fd94f6c8b..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/board.c +++ b/ports/espressif/boards/unexpectedmaker_pros3/board.c @@ -25,13 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/board.c b/ports/espressif/boards/unexpectedmaker_tinys2/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinys2/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/board.c b/ports/espressif/boards/unexpectedmaker_tinys3/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinys3/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c index 2898f675c8..c49e1b8d45 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/board.c @@ -126,12 +126,6 @@ static void display_init(void) { void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ - // Display display_init(); } diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/board.c b/ports/espressif/boards/waveshare_esp32s2_pico/board.c index b3c8cb4191..164430c88c 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/board.c +++ b/ports/espressif/boards/waveshare_esp32s2_pico/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif /* DEBUG */ -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/yd_esp32_s3_n16r8/board.c b/ports/espressif/boards/yd_esp32_s3_n16r8/board.c index e218345f59..70ff11b067 100644 --- a/ports/espressif/boards/yd_esp32_s3_n16r8/board.c +++ b/ports/espressif/boards/yd_esp32_s3_n16r8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/yd_esp32_s3_n8r8/board.c b/ports/espressif/boards/yd_esp32_s3_n8r8/board.c index e218345f59..70ff11b067 100644 --- a/ports/espressif/boards/yd_esp32_s3_n8r8/board.c +++ b/ports/espressif/boards/yd_esp32_s3_n8r8/board.c @@ -25,15 +25,5 @@ */ #include "supervisor/board.h" -#include "mpconfigboard.h" -#include "shared-bindings/microcontroller/Pin.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 4e1efa868f..86bd35fa43 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -38,7 +38,7 @@ STATIC uint64_t _skip_reset_once_pin_mask; STATIC uint64_t _preserved_pin_mask; STATIC uint64_t _in_use_pin_mask; -// Bit mask of all pins that should never EVER be reset. +// Bit mask of all pins that should never EVER be reset or used by user code. // Typically these are SPI flash and PSRAM control pins, and communication pins. // "Reset forbidden" is stronger than "never reset" below, which may only be temporary. static const uint64_t pin_mask_reset_forbidden = @@ -98,6 +98,11 @@ static const uint64_t pin_mask_reset_forbidden = GPIO_SEL_19 | // USB D- GPIO_SEL_20 | // USB D+ #endif + #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) && CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0 + // Don't reset/use the IDF UART console. + GPIO_SEL_43 | // UART TX + GPIO_SEL_44 | // UART RX + #endif #endif // ESP32S2, ESP32S3 0; // Terminate last "|". @@ -244,7 +249,7 @@ void reset_all_pins(void) { } _reset_pin(i); } - _in_use_pin_mask = _never_reset_pin_mask; + _in_use_pin_mask = _never_reset_pin_mask | pin_mask_reset_forbidden; // Don't continue to skip resetting these pins. _skip_reset_once_pin_mask = 0; } diff --git a/ports/espressif/peripherals/esp32s3/pins.c b/ports/espressif/peripherals/esp32s3/pins.c index 891cc398ae..ef5b2462c6 100644 --- a/ports/espressif/peripherals/esp32s3/pins.c +++ b/ports/espressif/peripherals/esp32s3/pins.c @@ -26,6 +26,8 @@ #include "peripherals/pins.h" +// NOTE: These numbers do NOT always match the package and module pin number. +// These are by solely by GPIO numbers. const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1); const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2); diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index 9edad560c8..043bc8becc 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -54,7 +54,7 @@ extern const mp_obj_type_t mcu_pin_type; #define NO_TOUCH_CHANNEL TOUCH_PAD_MAX -// This macro is used to simplify pin definition in boards//pins.c +// This macro is used to simplify pin definition in peripherals//pins.c #define PIN(p_number, p_adc_index, p_adc_channel, p_touch_channel) \ { \ { &mcu_pin_type }, \ From 17015b48ad8e04ad7466f8b58263b86731dfe14c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 10 Aug 2023 09:22:10 -0500 Subject: [PATCH 004/129] translations don't always use unicode code points now --- supervisor/shared/translate/compressed_string.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/supervisor/shared/translate/compressed_string.h b/supervisor/shared/translate/compressed_string.h index f524010db5..7e706c549d 100644 --- a/supervisor/shared/translate/compressed_string.h +++ b/supervisor/shared/translate/compressed_string.h @@ -38,12 +38,18 @@ // 9 in some translations sometime in the future. This length excludes // the trailing NUL, though notably decompress_length includes it. // -// - followed by the huffman encoding of the individual UTF-16 code +// - followed by the huffman encoding of the individual code // points that make up the string. The trailing "\0" is not // represented by a huffman code, but is implied by the length. // (building the huffman encoding on UTF-16 code points gave better // compression than building it on UTF-8 bytes) // +// - If possible, the code points are represented as uint8_t values, with +// 0..127 representing themselves and 160..255 representing another range +// of Unicode, controlled by translation_offset and translation_offstart. +// If this is not possible, uint16_t values are used. At present, no translation +// requires code points not in the BMP, so this is adequate. +// // - code points starting at 128 (word_start) and potentially extending // to 255 (word_end) (but never interfering with the target // language's used code points) stand for dictionary entries in a From ed9cacf41d883ddae7fb724ba3fffc8aeba5f82c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 9 Aug 2023 09:33:20 -0500 Subject: [PATCH 005/129] Add DotClockFramebuffer --- locale/circuitpython.pot | 11 +- ports/espressif/CMakeLists.txt | 6 +- ports/espressif/Makefile | 10 +- .../espressif_esp32s3_lcd_ev/mpconfigboard.mk | 13 + .../dotclockframebuffer/DotClockFramebuffer.c | 256 +++++++++++++ .../dotclockframebuffer/DotClockFramebuffer.h | 45 +++ .../common-hal/dotclockframebuffer/__init__.c | 0 .../common-hal/dotclockframebuffer/__init__.h | 0 .../common-hal/microcontroller/Pin.c | 8 + .../common-hal/microcontroller/Pin.h | 2 + ports/espressif/esp-idf | 2 +- ports/espressif/mpconfigport.mk | 1 + ports/espressif/supervisor/port.c | 14 + py/circuitpy_defns.mk | 5 + py/circuitpy_mpconfig.mk | 5 + .../dotclockframebuffer/DotClockFramebuffer.c | 338 ++++++++++++++++++ .../dotclockframebuffer/DotClockFramebuffer.h | 57 +++ .../dotclockframebuffer/__init__.c | 51 +++ .../dotclockframebuffer/__init__.h | 27 ++ shared-module/displayio/__init__.h | 6 + 20 files changed, 849 insertions(+), 8 deletions(-) create mode 100644 ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk create mode 100644 ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c create mode 100644 ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h create mode 100644 ports/espressif/common-hal/dotclockframebuffer/__init__.c create mode 100644 ports/espressif/common-hal/dotclockframebuffer/__init__.h create mode 100644 shared-bindings/dotclockframebuffer/DotClockFramebuffer.c create mode 100644 shared-bindings/dotclockframebuffer/DotClockFramebuffer.h create mode 100644 shared-bindings/dotclockframebuffer/__init__.c create mode 100644 shared-bindings/dotclockframebuffer/__init__.h diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c744c6d3cb..42e576dd9d 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1224,6 +1224,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1378,6 +1379,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" @@ -2948,7 +2953,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3899,10 +3904,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index ce2935a502..b30b32d2b8 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -12,7 +12,11 @@ if("${CIRCUITPY_ESPCAMERA}") message("Including esp32-camera") set(EXTRA_COMPONENT_DIRS "esp32-camera") list(APPEND COMPONENTS "esp32-camera") -message("COMPONENTS = ${COMPONENTS}") +endif() + +if("${CIRCUITPY_DOTCLOCKFRAMEBUFFER}") +message("Including esp32-camera") +list(APPEND COMPONENTS "esp_lcd") endif() include($ENV{IDF_PATH}/tools/cmake/project.cmake) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 320fda78fc..70ea4c0658 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -257,6 +257,11 @@ ifneq ($(CIRCUITPY_BLEIO),0) SRC_C += common-hal/_bleio/ble_events.c endif +ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0) +CFLAGS += -isystem esp-idf/components/esp_lcd/include +CFLAGS += -isystem esp-idf/components/esp_lcd/interface +endif + ifneq ($(CIRCUITPY_ESPCAMERA),0) SRC_CAMERA := \ $(wildcard common-hal/espcamera/*.c) \ @@ -355,7 +360,7 @@ endif do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h QSTR_GLOBAL_REQUIREMENTS += $(BUILD)/esp-idf/config/sdkconfig.h $(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf - IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA) + IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA) -DCIRCUITPY_DOTCLOCKFRAMEBUFFER=$(CIRCUITPY_DOTCLOCKFRAMEBUFFER) # build a lib # Adding -d explain -j 1 -v to the ninja line will output debug info @@ -393,6 +398,9 @@ endif ifneq ($(CIRCUITPY_ESPULP),0) ESP_IDF_COMPONENTS_LINK += ulp endif +ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0) + ESP_IDF_COMPONENTS_LINK += esp_lcd +endif ESP_IDF_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk new file mode 100644 index 0000000000..a6b9038928 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk @@ -0,0 +1,13 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-EV-LCD-Board" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 +UF2_BOOTLOADER = 0 diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c new file mode 100644 index 0000000000..bf6021f0c4 --- /dev/null +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c @@ -0,0 +1,256 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "esp_intr_alloc.h" +#include "esp_lcd_panel_interface.h" +#include "esp_lcd_panel_rgb.h" +#include "esp_pm.h" +#include "esp_private/gdma.h" +#include "hal/dma_types.h" +#include "hal/lcd_hal.h" +#include "hal/lcd_ll.h" +#include "soc/lcd_periph.h" + +// extract from esp-idf esp_lcd_rgb_panel.c +typedef struct +{ + esp_lcd_panel_t base; // Base class of generic lcd panel + int panel_id; // LCD panel ID + lcd_hal_context_t hal; // Hal layer object + size_t data_width; // Number of data lines (e.g. for RGB565, the data width is 16) + size_t sram_trans_align; // Alignment for framebuffer that allocated in SRAM + size_t psram_trans_align; // Alignment for framebuffer that allocated in PSRAM + int disp_gpio_num; // Display control GPIO, which is used to perform action like "disp_off" + intr_handle_t intr; // LCD peripheral interrupt handle + esp_pm_lock_handle_t pm_lock; // Power management lock + size_t num_dma_nodes; // Number of DMA descriptors that used to carry the frame buffer + uint8_t *fb; // Frame buffer + size_t fb_size; // Size of frame buffer + int data_gpio_nums[SOC_LCD_RGB_DATA_WIDTH]; // GPIOs used for data lines, we keep these GPIOs for action like "invert_color" + size_t resolution_hz; // Peripheral clock resolution + esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width) + gdma_channel_handle_t dma_chan; // DMA channel handle + esp_lcd_rgb_panel_frame_trans_done_cb_t on_frame_trans_done; // Callback, invoked after frame trans done + void *user_ctx; // Reserved user's data of callback functions + int x_gap; // Extra gap in x coordinate, it's used when calculate the flush window + int y_gap; // Extra gap in y coordinate, it's used when calculate the flush window + struct + { + unsigned int disp_en_level : 1; // The level which can turn on the screen by `disp_gpio_num` + unsigned int stream_mode : 1; // If set, the LCD transfers data continuously, otherwise, it stops refreshing the LCD when transaction done + unsigned int fb_in_psram : 1; // Whether the frame buffer is in PSRAM + } flags; + dma_descriptor_t dma_nodes[]; // DMA descriptor pool of size `num_dma_nodes` +} esp_rgb_panel_t; + + +#include "esp_log.h" +#define TAG "LCD" + +#include "components/esp_rom/include/esp_rom_sys.h" + + +#include "py/objarray.h" +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" +#include "common-hal/dotclockframebuffer/DotClockFramebuffer.h" +#include "bindings/espidf/__init__.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "py/runtime.h" +#include "components/driver/include/driver/gpio.h" +#include "components/driver/include/driver/periph_ctrl.h" +#include "components/driver/include/esp_private/gdma.h" +#include "components/esp_rom/include/esp_rom_gpio.h" +#include "components/hal/esp32s3/include/hal/lcd_ll.h" +#include "components/hal/include/hal/gpio_hal.h" +#include "components/soc/esp32s3/include/soc/lcd_cam_struct.h" +#include "esp_heap_caps.h" + +// should be from rom/cache.h but it wasn't working +int Cache_WriteBack_Addr(uint32_t addr, uint32_t size); + +#define LCD_RGB_ISR_IRAM_SAFE (1) +#define LCD_RGB_INTR_ALLOC_FLAGS (ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_INTRDISABLED) + +#define common_hal_mcu_pin_number_maybe(x) ((x) ? common_hal_mcu_pin_number((x)) : -1) + +static void claim_and_record(const mcu_pin_obj_t *pin, uint64_t *used_pins_mask) { + if (pin) { + int number = common_hal_mcu_pin_number(pin); + *used_pins_mask |= (UINT64_C(1) << number); + claim_pin_number(number); + never_reset_pin_number(number); + } +} + +static int valid_pin(const mcu_pin_obj_t *pin, qstr name) { + int result = common_hal_mcu_pin_number(pin); + if (result == NO_PIN) { + mp_raise_ValueError_varg(translate("Invalid %q pin"), name); + } + return result; +} + +void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_framebuffer_obj_t *self, + const mcu_pin_obj_t *de, + const mcu_pin_obj_t *vsync, + const mcu_pin_obj_t *hsync, + const mcu_pin_obj_t *dclk, + const mcu_pin_obj_t **red, uint8_t num_red, + const mcu_pin_obj_t **green, uint8_t num_green, + const mcu_pin_obj_t **blue, uint8_t num_blue, + int frequency, int width, int height, + int hsync_pulse_width, int hsync_back_porch, int hsync_front_porch, bool hsync_idle_low, + int vsync_pulse_width, int vsync_back_porch, int vsync_front_porch, bool vsync_idle_low, + bool de_idle_high, bool pclk_active_high, bool pclk_idle_high) { + + if (num_red != 5 || num_green != 6 || num_blue != 5) { + mp_raise_ValueError(translate("Must provide 5/6/5 RGB pins")); + } + + claim_and_record(de, &self->used_pins_mask); + claim_and_record(vsync, &self->used_pins_mask); + claim_and_record(hsync, &self->used_pins_mask); + claim_and_record(dclk, &self->used_pins_mask); + + for (size_t i = 0; i < num_red; i++) { + claim_and_record(red[i], &self->used_pins_mask); + } + for (size_t i = 0; i < num_green; i++) { + claim_and_record(green[i], &self->used_pins_mask); + } + for (size_t i = 0; i < num_blue; i++) { + claim_and_record(blue[i], &self->used_pins_mask); + } + + esp_lcd_rgb_panel_config_t *cfg = &self->panel_config; + cfg->timings.pclk_hz = frequency; + cfg->timings.h_res = width; + cfg->timings.v_res = height; + cfg->timings.hsync_pulse_width = hsync_pulse_width; + cfg->timings.hsync_back_porch = hsync_back_porch; + cfg->timings.hsync_front_porch = hsync_front_porch; + cfg->timings.vsync_pulse_width = vsync_pulse_width; + cfg->timings.vsync_back_porch = vsync_back_porch; + cfg->timings.vsync_front_porch = vsync_front_porch; + cfg->timings.flags.hsync_idle_low = hsync_idle_low; + cfg->timings.flags.vsync_idle_low = hsync_idle_low; + cfg->timings.flags.de_idle_high = de_idle_high; + cfg->timings.flags.pclk_active_neg = !pclk_active_high; + cfg->timings.flags.pclk_idle_high = pclk_idle_high; + + cfg->data_width = 16; + cfg->sram_trans_align = 8; + cfg->psram_trans_align = 64; + cfg->hsync_gpio_num = valid_pin(hsync, MP_QSTR_hsync); + cfg->vsync_gpio_num = valid_pin(vsync, MP_QSTR_vsync); + cfg->de_gpio_num = valid_pin(de, MP_QSTR_de); + cfg->pclk_gpio_num = valid_pin(dclk, MP_QSTR_dclk); + + cfg->data_gpio_nums[0] = valid_pin(blue[0], MP_QSTR_blue); + cfg->data_gpio_nums[1] = valid_pin(blue[1], MP_QSTR_blue); + cfg->data_gpio_nums[2] = valid_pin(blue[2], MP_QSTR_blue); + cfg->data_gpio_nums[3] = valid_pin(blue[3], MP_QSTR_blue); + cfg->data_gpio_nums[4] = valid_pin(blue[4], MP_QSTR_blue); + + cfg->data_gpio_nums[5] = valid_pin(green[0], MP_QSTR_green); + cfg->data_gpio_nums[6] = valid_pin(green[1], MP_QSTR_green); + cfg->data_gpio_nums[7] = valid_pin(green[2], MP_QSTR_green); + cfg->data_gpio_nums[8] = valid_pin(green[3], MP_QSTR_green); + cfg->data_gpio_nums[9] = valid_pin(green[4], MP_QSTR_green); + cfg->data_gpio_nums[10] = valid_pin(green[5], MP_QSTR_green); + + cfg->data_gpio_nums[11] = valid_pin(red[0], MP_QSTR_red); + cfg->data_gpio_nums[12] = valid_pin(red[1], MP_QSTR_red); + cfg->data_gpio_nums[13] = valid_pin(red[2], MP_QSTR_red); + cfg->data_gpio_nums[14] = valid_pin(red[3], MP_QSTR_red); + cfg->data_gpio_nums[15] = valid_pin(red[4], MP_QSTR_red); + + cfg->disp_gpio_num = GPIO_NUM_NC; + + cfg->flags.disp_active_low = 0; + cfg->flags.relax_on_idle = 0; + cfg->flags.fb_in_psram = 1; // allocate frame buffer in PSRAM + + ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(&self->panel_config, &self->panel_handle)); + ESP_ERROR_CHECK(esp_lcd_panel_reset(self->panel_handle)); + ESP_ERROR_CHECK(esp_lcd_panel_init(self->panel_handle)); + + uint16_t color = 0; + ESP_ERROR_CHECK(self->panel_handle->draw_bitmap(self->panel_handle, 0, 0, 1, 1, &color)); + + esp_rgb_panel_t *_rgb_panel = __containerof(self->panel_handle, esp_rgb_panel_t, base); + + self->frequency = frequency; + self->refresh_rate = frequency / (width + hsync_front_porch + hsync_back_porch) / (height + vsync_front_porch + vsync_back_porch); + self->bufinfo.buf = _rgb_panel->fb; + self->bufinfo.len = 2 * width * height; + self->bufinfo.typecode = 'H' | MP_OBJ_ARRAY_TYPECODE_FLAG_RW; + + memset(self->bufinfo.buf, 0xaa, width * height); + memset(self->bufinfo.buf + width * height, 0x55, width * height); + +// LCD_CAM.lcd_ctrl2.lcd_vsync_idle_pol = _vsync_polarity; +// LCD_CAM.lcd_ctrl2.lcd_hsync_idle_pol = _hsync_polarity; + +} + + +void common_hal_dotclockframebuffer_framebuffer_deinit(dotclockframebuffer_framebuffer_obj_t *self) { + if (common_hal_dotclockframebuffer_framebuffer_deinitialized(self)) { + return; + } + + reset_pin_mask(self->used_pins_mask); + self->used_pins_mask = 0; + esp_lcd_panel_del(self->panel_handle); +} + +bool common_hal_dotclockframebuffer_framebuffer_deinitialized(dotclockframebuffer_framebuffer_obj_t *self) { + return self->used_pins_mask == 0; +} + + +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_width(dotclockframebuffer_framebuffer_obj_t *self) { + return self->panel_config.timings.h_res; +} + +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuffer_framebuffer_obj_t *self) { + return self->panel_config.timings.v_res; +} + +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_frequency(dotclockframebuffer_framebuffer_obj_t *self) { + return self->frequency; +} + +void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self) { + Cache_WriteBack_Addr((uint32_t)(self->bufinfo.buf), self->bufinfo.len); +} + +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(dotclockframebuffer_framebuffer_obj_t *self) { + return self->refresh_rate; +} diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h new file mode 100644 index 0000000000..386b9fc586 --- /dev/null +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/obj.h" + +#include "esp_lcd_panel_io.h" +#include "esp_lcd_panel_rgb.h" +#include "esp_lcd_panel_vendor.h" +#include "esp_lcd_panel_ops.h" +#include "esp_lcd_panel_interface.h" + +typedef struct dotclockframebuffer_framebuffer_obj { + mp_obj_base_t base; + mp_buffer_info_t bufinfo; + uint32_t frequency, refresh_rate; + uint64_t used_pins_mask; + volatile int32_t frame_count; + esp_lcd_rgb_panel_config_t panel_config; + esp_lcd_panel_handle_t panel_handle; +} dotclockframebuffer_framebuffer_obj_t; diff --git a/ports/espressif/common-hal/dotclockframebuffer/__init__.c b/ports/espressif/common-hal/dotclockframebuffer/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/espressif/common-hal/dotclockframebuffer/__init__.h b/ports/espressif/common-hal/dotclockframebuffer/__init__.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 4e1efa868f..2ba805eaab 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -218,6 +218,14 @@ void reset_pin_number(gpio_num_t pin_number) { _reset_pin(pin_number); } +void reset_pin_mask(uint64_t mask) { + for (int i = 0; i < 64; i++, mask >>= 1) { + if (mask & 1) { + reset_pin_number(i); + } + } +} + void common_hal_mcu_pin_reset_number(uint8_t i) { reset_pin_number((gpio_num_t)i); } diff --git a/ports/espressif/common-hal/microcontroller/Pin.h b/ports/espressif/common-hal/microcontroller/Pin.h index 05c8fe880d..8551a29a95 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.h +++ b/ports/espressif/common-hal/microcontroller/Pin.h @@ -41,6 +41,8 @@ extern void reset_all_pins(void); // reset_pin_number takes the pin number instead of the pointer so that objects don't // need to store a full pointer. extern void reset_pin_number(gpio_num_t pin_number); +// reset all pins in `bitmask` +extern void reset_pin_mask(uint64_t bitmask); extern void skip_reset_once_pin_number(gpio_num_t pin_number); extern void claim_pin(const mcu_pin_obj_t *pin); extern void claim_pin_number(gpio_num_t pin_number); diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index 630c2724fc..69f9a4f566 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit 630c2724fc8c69eeaaa1bb025de52b99c5cb11aa +Subproject commit 69f9a4f566d49afe97fd8b47444bd394af005e23 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 982e3bde36..01cb22d39a 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -21,6 +21,7 @@ CIRCUITPY_BLEIO ?= 1 CIRCUITPY_BLEIO_HCI = 0 CIRCUITPY_CANIO ?= 1 CIRCUITPY_COUNTIO ?= 1 +CIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION = 0 CIRCUITPY_DUALBANK ?= 1 CIRCUITPY_ESPCAMERA ?= 1 CIRCUITPY_ESPIDF ?= 1 diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index db4a436b13..e9f23de99b 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -25,12 +25,15 @@ * THE SOFTWARE. */ +#include #include #include #include "supervisor/board.h" #include "supervisor/port.h" #include "supervisor/filesystem.h" #include "supervisor/shared/reload.h" +#include "supervisor/serial.h" +#include "py/mpprint.h" #include "py/runtime.h" #include "freertos/FreeRTOS.h" @@ -537,6 +540,17 @@ void port_post_boot_py(bool heap_valid) { } } + +static int vprintf_adapter(const char *fmt, va_list ap) { + return mp_vprintf(&mp_plat_print, fmt, ap); +} + +#if CIRCUITPY_CONSOLE_UART +void port_serial_early_init(void) { + esp_log_set_vprintf(vprintf_adapter); +} +#endif + // Wrap main in app_main that the IDF expects. extern void main(void); extern void app_main(void); diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 8186d24b2a..8be49dca0d 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -296,6 +296,9 @@ endif ifeq ($(CIRCUITPY_RGBMATRIX),1) SRC_PATTERNS += rgbmatrix/% endif +ifeq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),1) +SRC_PATTERNS += dotclockframebuffer/% +endif ifeq ($(CIRCUITPY_RP2PIO),1) SRC_PATTERNS += rp2pio/% endif @@ -435,6 +438,8 @@ SRC_COMMON_HAL_ALL = \ countio/__init__.c \ digitalio/DigitalInOut.c \ digitalio/__init__.c \ + dotclockframebuffer/DotClockFramebuffer.c \ + dotclockframebuffer/__init__.c \ dualbank/__init__.c \ frequencyio/FrequencyIn.c \ frequencyio/__init__.c \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 5ba3f8640b..c400707ac1 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -206,6 +206,11 @@ CIRCUITPY_PARALLELDISPLAY = 0 endif CFLAGS += -DCIRCUITPY_PARALLELDISPLAY=$(CIRCUITPY_PARALLELDISPLAY) +CIRCUITPY_DOTCLOCKFRAMEBUFFER ?= 0 +CFLAGS += -DCIRCUITPY_DOTCLOCKFRAMEBUFFER=$(CIRCUITPY_DOTCLOCKFRAMEBUFFER) +CIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION ?= 1 +CFLAGS += -DCIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION=$(CIRCUITPY_DOTCLOCKFRAMEBUFFER_USES_SUPERVISOR_ALLOCATION) + # bitmaptools and framebufferio rely on displayio CIRCUITPY_BITMAPTOOLS ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_DISPLAYIO)) CIRCUITPY_FRAMEBUFFERIO ?= $(call enable-if-all,$(CIRCUITPY_FULL_BUILD) $(CIRCUITPY_DISPLAYIO)) diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c new file mode 100644 index 0000000000..995bab246e --- /dev/null +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c @@ -0,0 +1,338 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" + +#include "py/binary.h" +#include "py/objarray.h" +#include "py/objproperty.h" +#include "py/runtime.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/util.h" +#include "shared-module/displayio/__init__.h" +#include "supervisor/shared/translate/translate.h" + +//| class DotClockFramebuffer: +//| """Manage updating a 'dot-clock' framebuffer in the background while Python code runs. +//| It doesn't handle display initialization.""" +//| +//| def __init__( +//| self, +//| *, +//| de: microcontroller.Pin, +//| vsync: microcontroller.Pin, +//| hsync: microcontroller.Pin, +//| dclk: microcontroller.Pin, +//| red: Tuple[microcontroller.Pin], +//| green: Tuple[microcontroller.Pin], +//| blue: Tuple[microcontroller.Pin], +//| frequency: int, +//| width: int, +//| height: int, +//| hsync_pulse_width: int, +//| hsync_back_porch: int, +//| hsync_front_porch: int, +//| hsync_idle_low: bool, +//| vsync_back_porch: int, +//| vsync_front_porch: int, +//| vsync_idle_low: bool, +//| de_idle_high: bool, +//| pclk_active_high: bool, +//| pclk_idle_high: bool, +//| ) -> None: +//| """Create a DotClockFramebuffer object associated with the given pins. +//| +//| The pins are then in use by the display until `displayio.release_displays()` +//| is called even after a reload. (It does this so CircuitPython can use the display after your +//| code is done.) So, the first time you initialize a display bus in code.py you should call +//| :py:func:`displayio.release_displays` first, otherwise it will error after the first code.py run. +//| +//| When a board has dedicated dot clock framebuffer pins and/or timings, they are intended to be used in the constructor with ``**`` dictionary unpacking like so: +//| ``DotClockFramebuffer(**board.TFT_PINS, **board.TFT_TIMINGS)`` +//| +//| On Espressif-family microcontrollers, this driver requires that the +//| ``CIRCUITPY_RESERVED_PSRAM`` in ``settings.toml`` be large enough to hold the +//| framebuffer. Generally, boards with built-in displays or display connectors +//| will have a default setting that is large enough for typical use. If the +//| constructor raises a MemoryError or an IDFError, this probably indicates the +//| setting is too small and should be increased. +//| +//| TFT connection parameters: +//| +//| :param microcontroller.Pin de: The "data enable" input to the display +//| :param microcontroller.Pin vsync: The "vertical sync" input to the display +//| :param microcontroller.Pin hsync: The "horizontal sync" input to the display +//| :param microcontroller.Pin dclk: The "data clock" input to the display +//| :param ~tuple red: The red data pins, most significant pin first. +//| :param ~tuple green: The green data pins, most significant pin first. +//| :param ~tuple blue: The blue data pins, most significant pin first. +//| +//| TFT timing parameters: +//| +//| :param int frequency: The requested data clock frequency in Hz. +//| :param int width: The visible width of the display, in pixels +//| :param int height: The visible height of the display, in pixels +//| :param int hsync_pulse_width: Horizontal sync width in pixels +//| :param int hsync_back_porch: Horizontal back porch, number of pixels between hsync and start of line active data +//| :param int hsync_front_porch: Horizontal front porch, number of pixels between the end of active data and the next hsync +//| :param int vsync_back_porch: Vertical back porch, number of lines between vsync and start of frame +//| :param int vsync_front_porch: Vertical front porch, number of lines between the end of frame and the next vsync +//| :param bool hsync_idle_low: True if the hsync signal is low in IDLE state +//| :param bool vsync_idle_low: True if the vsync signal is low in IDLE state +//| :param bool de_idle_high: True if the de signal is high in IDLE state +//| :param bool pclk_active_high: True if the display data is clocked out at the rising edge of dclk +//| :param bool pclk_idle_high: True if the dclk stays at high level in IDLE phase +//| """ +//| ... +STATIC mp_obj_t dotclockframebuffer_framebuffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { + enum { ARG_de, ARG_vsync, ARG_hsync, ARG_dclk, ARG_red, ARG_green, ARG_blue, + ARG_frequency, ARG_width, ARG_height, + ARG_hsync_pulse_width, ARG_hsync_back_porch, ARG_hsync_front_porch, ARG_hsync_idle_low, + ARG_vsync_pulse_width, ARG_vsync_back_porch, ARG_vsync_front_porch, ARG_vsync_idle_low, + ARG_de_idle_high, ARG_pclk_active_high, ARG_pclk_idle_high, }; + + static const mp_arg_t allowed_args[] = { + { MP_QSTR_de, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + { MP_QSTR_vsync, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + { MP_QSTR_hsync, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + { MP_QSTR_dclk, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + { MP_QSTR_red, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + { MP_QSTR_green, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + { MP_QSTR_blue, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, + + { MP_QSTR_frequency, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_width, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_height, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + + { MP_QSTR_hsync_pulse_width, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_hsync_back_porch, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_hsync_front_porch, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_hsync_idle_low, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, + + { MP_QSTR_vsync_pulse_width, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_vsync_back_porch, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_vsync_front_porch, MP_ARG_INT | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_int = 0 } }, + { MP_QSTR_vsync_idle_low, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, + + { MP_QSTR_de_idle_high, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, + { MP_QSTR_pclk_active_high, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, + { MP_QSTR_pclk_idle_high, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + const mcu_pin_obj_t *de = validate_obj_is_free_pin(args[ARG_de].u_obj, MP_QSTR_de); + const mcu_pin_obj_t *vsync = validate_obj_is_free_pin(args[ARG_vsync].u_obj, MP_QSTR_vsync); + const mcu_pin_obj_t *hsync = validate_obj_is_free_pin(args[ARG_hsync].u_obj, MP_QSTR_hsync); + const mcu_pin_obj_t *dclk = validate_obj_is_free_pin(args[ARG_dclk].u_obj, MP_QSTR_dclk); + + uint8_t num_red, num_green, num_blue; + const mcu_pin_obj_t *red_pins[8], *green_pins[8], *blue_pins[8]; + + validate_list_is_free_pins(MP_QSTR_red, red_pins, (mp_int_t)MP_ARRAY_SIZE(red_pins), args[ARG_red].u_obj, &num_red); + validate_list_is_free_pins(MP_QSTR_green, green_pins, (mp_int_t)MP_ARRAY_SIZE(green_pins), args[ARG_green].u_obj, &num_green); + validate_list_is_free_pins(MP_QSTR_blue, blue_pins, (mp_int_t)MP_ARRAY_SIZE(blue_pins), args[ARG_blue].u_obj, &num_blue); + + mp_printf(&mp_plat_print, "#red=%d #green=%d #blue=%d\n", num_red, num_green, num_blue); + + dotclockframebuffer_framebuffer_obj_t *self = &allocate_display_bus_or_raise()->dotclock; + self->base.type = &dotclockframebuffer_framebuffer_type; + + common_hal_dotclockframebuffer_framebuffer_construct( + self, de, vsync, hsync, dclk, red_pins, num_red, green_pins, num_green, blue_pins, num_blue, + args[ARG_frequency].u_int, args[ARG_width].u_int, args[ARG_height].u_int, + args[ARG_hsync_pulse_width].u_int, args[ARG_hsync_back_porch].u_int, args[ARG_hsync_front_porch].u_int, args[ARG_hsync_idle_low].u_bool, + args[ARG_vsync_pulse_width].u_int, args[ARG_vsync_back_porch].u_int, args[ARG_vsync_front_porch].u_int, args[ARG_vsync_idle_low].u_bool, + args[ARG_de_idle_high].u_bool, + args[ARG_pclk_active_high].u_bool, + args[ARG_pclk_idle_high].u_bool + ); + + return self; +} + +static void check_for_deinit(dotclockframebuffer_framebuffer_obj_t *self) { + if (common_hal_dotclockframebuffer_framebuffer_deinitialized(self)) { + raise_deinited_error(); + } +} + +//| def refresh(self) -> None: +//| """Transmits the color data in the buffer to the pixels so that +//| they are shown. +//| +//| If this function is not called, the results are unpredictable; updates may be partially shown. +//| """ +//| ... +STATIC mp_obj_t dotclockframebuffer_framebuffer_refresh(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + common_hal_dotclockframebuffer_framebuffer_refresh(self); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_refresh_obj, dotclockframebuffer_framebuffer_refresh); + + +//| refresh_rate: float +//| """The pixel refresh rate of the display, in Hz""" +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_refresh_rate(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_refresh_rate_obj, dotclockframebuffer_framebuffer_get_refresh_rate); +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_refresh_rate_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_refresh_rate_obj); + +//| frequency: int +//| """The pixel frequency of the display, in Hz""" +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_frequency(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_frequency(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_frequency_obj, dotclockframebuffer_framebuffer_get_frequency); +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_frequency_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_frequency_obj); + +//| width: int +//| """The width of the display, in pixels""" +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_width(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_width_obj, dotclockframebuffer_framebuffer_get_width); +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_width_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_width_obj); + +//| height: int +//| """The height of the display, in pixels""" +//| +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_height(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_height_obj, dotclockframebuffer_framebuffer_get_height); + +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_height_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_height_obj); + +STATIC mp_int_t dotclockframebuffer_framebuffer_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + // a readonly framebuffer would be unusual but not impossible + if ((flags & MP_BUFFER_WRITE) && !(self->bufinfo.typecode & MP_OBJ_ARRAY_TYPECODE_FLAG_RW)) { + return 1; + } + *bufinfo = self->bufinfo; + bufinfo->typecode = 'H'; + return 0; +} + +// These version exists so that the prototype matches the protocol, +// avoiding a type cast that can hide errors +STATIC void dotclockframebuffer_framebuffer_swapbuffers(mp_obj_t self_in, uint8_t *dirty_row_bitmap) { + (void)dirty_row_bitmap; + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + common_hal_dotclockframebuffer_framebuffer_refresh(self); +} + +STATIC void dotclockframebuffer_framebuffer_deinit_proto(mp_obj_t self_in) { + common_hal_dotclockframebuffer_framebuffer_deinit(self_in); +} + +STATIC float dotclockframebuffer_framebuffer_get_brightness_proto(mp_obj_t self_in) { + return 1.0f; +} + +STATIC bool dotclockframebuffer_framebuffer_set_brightness_proto(mp_obj_t self_in, mp_float_t value) { + return false; +} + +STATIC int dotclockframebuffer_framebuffer_get_width_proto(mp_obj_t self_in) { + return common_hal_dotclockframebuffer_framebuffer_get_width(self_in); +} + +STATIC int dotclockframebuffer_framebuffer_get_height_proto(mp_obj_t self_in) { + return common_hal_dotclockframebuffer_framebuffer_get_height(self_in); +} + +STATIC int dotclockframebuffer_framebuffer_get_color_depth_proto(mp_obj_t self_in) { + return 16; +} + +STATIC int dotclockframebuffer_framebuffer_get_bytes_per_cell_proto(mp_obj_t self_in) { + return 1; +} + +STATIC int dotclockframebuffer_framebuffer_get_native_frames_per_second_proto(mp_obj_t self_in) { + return common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(self_in); +} + +STATIC void dotclockframebuffer_framebuffer_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t *bufinfo) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + + *bufinfo = self->bufinfo; +} + + +STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) + .get_bufinfo = dotclockframebuffer_framebuffer_get_bufinfo, + .set_brightness = dotclockframebuffer_framebuffer_set_brightness_proto, + .get_brightness = dotclockframebuffer_framebuffer_get_brightness_proto, + .get_width = dotclockframebuffer_framebuffer_get_width_proto, + .get_height = dotclockframebuffer_framebuffer_get_height_proto, + .get_color_depth = dotclockframebuffer_framebuffer_get_color_depth_proto, + .get_bytes_per_cell = dotclockframebuffer_framebuffer_get_bytes_per_cell_proto, + .get_native_frames_per_second = dotclockframebuffer_framebuffer_get_native_frames_per_second_proto, + .swapbuffers = dotclockframebuffer_framebuffer_swapbuffers, + .deinit = dotclockframebuffer_framebuffer_deinit_proto, +}; + + +STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&dotclockframebuffer_framebuffer_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&dotclockframebuffer_framebuffer_height_obj) }, + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&dotclockframebuffer_framebuffer_frequency_obj) }, + { MP_ROM_QSTR(MP_QSTR_refresh_rate), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_rate_obj) }, + { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_framebuffer_locals_dict, dotclockframebuffer_framebuffer_locals_dict_table); + +const mp_obj_type_t dotclockframebuffer_framebuffer_type = { + { &mp_type_type }, + .flags = MP_TYPE_FLAG_EXTENDED, + .name = MP_QSTR_DotClockFramebuffer, + .make_new = dotclockframebuffer_framebuffer_make_new, + .locals_dict = (mp_obj_dict_t *)&dotclockframebuffer_framebuffer_locals_dict, + MP_TYPE_EXTENDED_FIELDS( + .buffer_p = { .get_buffer = dotclockframebuffer_framebuffer_get_buffer, }, + .protocol = &dotclockframebuffer_framebuffer_proto, + ), +}; diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h new file mode 100644 index 0000000000..acb44d083a --- /dev/null +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h @@ -0,0 +1,57 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "common-hal/microcontroller/Pin.h" +#include "shared-bindings/displayio/__init__.h" +#include "shared-module/displayio/Group.h" + +typedef struct dotclockframebuffer_framebuffer_obj dotclockframebuffer_framebuffer_obj_t; + +extern const mp_obj_type_t dotclockframebuffer_framebuffer_type; + +void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_framebuffer_obj_t *self, + const mcu_pin_obj_t *de, + const mcu_pin_obj_t *vsync, + const mcu_pin_obj_t *hsync, + const mcu_pin_obj_t *dclk, + const mcu_pin_obj_t **red, uint8_t num_red, + const mcu_pin_obj_t **green, uint8_t num_green, + const mcu_pin_obj_t **blue, uint8_t num_blue, + int frequency, int width, int height, + int hsync_pulse_width, int hsync_back_porch, int hsync_front_porch, bool hsync_idle_low, + int vsync_pulse_width, int vsync_back_porch, int vsync_front_porch, bool vsync_idle_low, + bool de_idle_high, bool pclk_active_high, bool pclk_idle_high); + +void common_hal_dotclockframebuffer_framebuffer_deinit(dotclockframebuffer_framebuffer_obj_t *self); +bool common_hal_dotclockframebuffer_framebuffer_deinitialized(dotclockframebuffer_framebuffer_obj_t *self); + +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_width(dotclockframebuffer_framebuffer_obj_t *self); +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuffer_framebuffer_obj_t *self); +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_frequency(dotclockframebuffer_framebuffer_obj_t *self); +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(dotclockframebuffer_framebuffer_obj_t *self); +void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self); diff --git a/shared-bindings/dotclockframebuffer/__init__.c b/shared-bindings/dotclockframebuffer/__init__.c new file mode 100644 index 0000000000..a91964988a --- /dev/null +++ b/shared-bindings/dotclockframebuffer/__init__.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "py/enum.h" +#include "py/obj.h" +#include "py/runtime.h" + +#include "shared-bindings/dotclockframebuffer/__init__.h" +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" + +//| """Native helpers for driving parallel displays""" + + +STATIC const mp_rom_map_elem_t dotclockframebuffer_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_dotclockframebuffer) }, + { MP_ROM_QSTR(MP_QSTR_DotClockFramebuffer), MP_ROM_PTR(&dotclockframebuffer_framebuffer_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_module_globals, dotclockframebuffer_module_globals_table); + +const mp_obj_module_t dotclockframebuffer_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t *)&dotclockframebuffer_module_globals, +}; + +MP_REGISTER_MODULE(MP_QSTR_dotclockframebuffer, dotclockframebuffer_module); diff --git a/shared-bindings/dotclockframebuffer/__init__.h b/shared-bindings/dotclockframebuffer/__init__.h new file mode 100644 index 0000000000..f7b42875a1 --- /dev/null +++ b/shared-bindings/dotclockframebuffer/__init__.h @@ -0,0 +1,27 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 1add0133b6..0695b950ac 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -47,6 +47,9 @@ #if CIRCUITPY_SHARPDISPLAY #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" #endif +#if CIRCUITPY_DOTCLOCKFRAMEBUFFER +#include "common-hal/dotclockframebuffer/DotClockFramebuffer.h" +#endif // Port unique frame buffers. #if CIRCUITPY_VIDEOCORE #include "bindings/videocore/Framebuffer.h" @@ -78,6 +81,9 @@ typedef struct { #if CIRCUITPY_PICODVI picodvi_framebuffer_obj_t picodvi; #endif + #if CIRCUITPY_DOTCLOCKFRAMEBUFFER + dotclockframebuffer_framebuffer_obj_t dotclock; + #endif }; } primary_display_bus_t; From 494aee62b3df847b110d350f9713d99d12d40afa Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 10:30:54 -0500 Subject: [PATCH 006/129] Add makerfabs 7" 800x480 TFT this is working, though it has to be down-clocked to 6.5MHz to prevent display glitching --- ports/espressif/boards/makerfabs_tft7/board.c | 34 ++++++ .../boards/makerfabs_tft7/mpconfigboard.h | 44 +++++++ .../boards/makerfabs_tft7/mpconfigboard.mk | 12 ++ ports/espressif/boards/makerfabs_tft7/pins.c | 108 ++++++++++++++++++ .../espressif/boards/makerfabs_tft7/sdkconfig | 41 +++++++ 5 files changed, 239 insertions(+) create mode 100644 ports/espressif/boards/makerfabs_tft7/board.c create mode 100644 ports/espressif/boards/makerfabs_tft7/mpconfigboard.h create mode 100644 ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk create mode 100644 ports/espressif/boards/makerfabs_tft7/pins.c create mode 100644 ports/espressif/boards/makerfabs_tft7/sdkconfig diff --git a/ports/espressif/boards/makerfabs_tft7/board.c b/ports/espressif/boards/makerfabs_tft7/board.c new file mode 100644 index 0000000000..0639737c35 --- /dev/null +++ b/ports/espressif/boards/makerfabs_tft7/board.c @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h new file mode 100644 index 0000000000..6dc58e9ef3 --- /dev/null +++ b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.h @@ -0,0 +1,44 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "MakerFabs-ESP32-S3-Parallel-TFT-With-Touch-7inch" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO17) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) + +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO11) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO12) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO13) + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) + +// a 1024x768 16BPP framebuffer + some breathing room +#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk new file mode 100644 index 0000000000..5db7f461af --- /dev/null +++ b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk @@ -0,0 +1,12 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "MakerFabs-ESP32-S3-Parallel-TFT-With-Touch-7inch" +USB_MANUFACTURER = "MakerFabs" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/makerfabs_tft7/pins.c b/ports/espressif/boards/makerfabs_tft7/pins.c new file mode 100644 index 0000000000..c75304739d --- /dev/null +++ b/ports/espressif/boards/makerfabs_tft7/pins.c @@ -0,0 +1,108 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t tft_r_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO21), + MP_ROM_PTR(&pin_GPIO47), + MP_ROM_PTR(&pin_GPIO48), + MP_ROM_PTR(&pin_GPIO45), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_g_pins = { + {&mp_type_tuple}, + 6, + { + MP_ROM_PTR(&pin_GPIO4), + MP_ROM_PTR(&pin_GPIO16), + MP_ROM_PTR(&pin_GPIO15), + MP_ROM_PTR(&pin_GPIO7), + MP_ROM_PTR(&pin_GPIO6), + MP_ROM_PTR(&pin_GPIO5), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_b_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO1), + MP_ROM_PTR(&pin_GPIO9), + MP_ROM_PTR(&pin_GPIO46), + MP_ROM_PTR(&pin_GPIO3), + MP_ROM_PTR(&pin_GPIO8), + } +}; + +STATIC const mp_rom_map_elem_t tft_table[] = { + { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_red), MP_ROM_PTR(&tft_r_pins) }, + { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, + { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, +}; +MP_DEFINE_CONST_DICT(tft_dict, tft_table); + +#if 0 +Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel( + bus, + 800 /* width */, 0 /* hsync_polarity */, 210 /* hsync_front_porch */, 30 /* hsync_pulse_width */, 16 /* hsync_back_porch */, + 480 /* height */, 0 /* vsync_polarity */, 22 /* vsync_front_porch */, 13 /* vsync_pulse_width */, 10 /* vsync_back_porch */, + 1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */); +#endif + +STATIC const mp_rom_map_elem_t timings800_table[] = { + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(16000000) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_INT(800) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_INT(480) }, + { MP_ROM_QSTR(MP_QSTR_hsync_pulse_width), MP_ROM_INT(30) }, + { MP_ROM_QSTR(MP_QSTR_hsync_front_porch), MP_ROM_INT(210) }, + { MP_ROM_QSTR(MP_QSTR_hsync_back_porch), MP_ROM_INT(16) }, + { MP_ROM_QSTR(MP_QSTR_hsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_vsync_pulse_width), MP_ROM_INT(13) }, + { MP_ROM_QSTR(MP_QSTR_vsync_front_porch), MP_ROM_INT(22) }, + { MP_ROM_QSTR(MP_QSTR_vsync_back_porch), MP_ROM_INT(10) }, + { MP_ROM_QSTR(MP_QSTR_vsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_de_active_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_active_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_idle_high), MP_ROM_FALSE }, +}; +MP_DEFINE_CONST_DICT(timings800_dict, timings800_table); + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_TIMINGS800), MP_ROM_PTR(&timings800_dict) }, + { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO12) }, + + // boot mode button can be used in SW as well + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO1) }, + + // IO10 <> SD_CS is cut at factory (non-placed resistor position R34) and pulled up. + // Permanent SDIO 1-bit mode? + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/makerfabs_tft7/sdkconfig b/ports/espressif/boards/makerfabs_tft7/sdkconfig new file mode 100644 index 0000000000..4449c672e1 --- /dev/null +++ b/ports/espressif/boards/makerfabs_tft7/sdkconfig @@ -0,0 +1,41 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM 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 +# +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 +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" +# 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 From 9e0993af5b77e39a3782e2211aea0a5d2f201c11 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 10:31:47 -0500 Subject: [PATCH 007/129] Add espressif esp32s3 lcd devkit This is not working/tested. The display requires an initialization sequence, and its SPI bus is on the other side of an I2C GPIO expander making things more difficult. --- .../boards/espressif_esp32s3_lcd_ev/board.c | 34 ++++++++ .../espressif_esp32s3_lcd_ev/mpconfigboard.h | 42 ++++++++++ .../boards/espressif_esp32s3_lcd_ev/pins.c | 79 +++++++++++++++++++ .../boards/espressif_esp32s3_lcd_ev/sdkconfig | 41 ++++++++++ 4 files changed, 196 insertions(+) create mode 100644 ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c create mode 100644 ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c create mode 100644 ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c new file mode 100644 index 0000000000..0639737c35 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h new file mode 100644 index 0000000000..98b0e04122 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.h @@ -0,0 +1,42 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Espressif-ESP32-S3-LCD-EV-Board" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO4) + +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) + +// a 1024x768 16BPP framebuffer + some breathing room +#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c new file mode 100644 index 0000000000..59da0cb910 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -0,0 +1,79 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t tft_r_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO11), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO14), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_g_pins = { + {&mp_type_tuple}, + 6, + { + MP_ROM_PTR(&pin_GPIO21), + MP_ROM_PTR(&pin_GPIO47), + MP_ROM_PTR(&pin_GPIO48), + MP_ROM_PTR(&pin_GPIO45), + MP_ROM_PTR(&pin_GPIO38), + MP_ROM_PTR(&pin_GPIO39), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_b_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO40), + MP_ROM_PTR(&pin_GPIO41), + MP_ROM_PTR(&pin_GPIO42), + MP_ROM_PTR(&pin_GPIO2), + MP_ROM_PTR(&pin_GPIO1), + } +}; + +STATIC const mp_rom_map_elem_t tft_table[] = { + { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_red), MP_ROM_PTR(&tft_r_pins) }, + { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, + { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(9000000) }, +}; +MP_DEFINE_CONST_DICT(tft_dict, tft_table); + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO12) }, + + // boot mode button can be used in SW as well + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig b/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig new file mode 100644 index 0000000000..bc1b20063b --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig @@ -0,0 +1,41 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM 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 +# +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 +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="circuitpy" +# 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 From fb15c7ca5115eea5df6573950b352702bf105dd4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 10:50:16 -0500 Subject: [PATCH 008/129] Fix timings table & remove redundant comment --- ports/espressif/boards/makerfabs_tft7/pins.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ports/espressif/boards/makerfabs_tft7/pins.c b/ports/espressif/boards/makerfabs_tft7/pins.c index c75304739d..1a170035c2 100644 --- a/ports/espressif/boards/makerfabs_tft7/pins.c +++ b/ports/espressif/boards/makerfabs_tft7/pins.c @@ -49,16 +49,8 @@ STATIC const mp_rom_map_elem_t tft_table[] = { }; MP_DEFINE_CONST_DICT(tft_dict, tft_table); -#if 0 -Arduino_RPi_DPI_RGBPanel *gfx = new Arduino_RPi_DPI_RGBPanel( - bus, - 800 /* width */, 0 /* hsync_polarity */, 210 /* hsync_front_porch */, 30 /* hsync_pulse_width */, 16 /* hsync_back_porch */, - 480 /* height */, 0 /* vsync_polarity */, 22 /* vsync_front_porch */, 13 /* vsync_pulse_width */, 10 /* vsync_back_porch */, - 1 /* pclk_active_neg */, 16000000 /* prefer_speed */, true /* auto_flush */); -#endif - STATIC const mp_rom_map_elem_t timings800_table[] = { - { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(16000000) }, + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(6500000) }, // nominal 16MHz, but display is unstable/tears at that frequency { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_INT(800) }, { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_INT(480) }, { MP_ROM_QSTR(MP_QSTR_hsync_pulse_width), MP_ROM_INT(30) }, @@ -69,7 +61,7 @@ STATIC const mp_rom_map_elem_t timings800_table[] = { { MP_ROM_QSTR(MP_QSTR_vsync_front_porch), MP_ROM_INT(22) }, { MP_ROM_QSTR(MP_QSTR_vsync_back_porch), MP_ROM_INT(10) }, { MP_ROM_QSTR(MP_QSTR_vsync_idle_low), MP_ROM_FALSE }, - { MP_ROM_QSTR(MP_QSTR_de_active_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_de_idle_high), MP_ROM_FALSE }, { MP_ROM_QSTR(MP_QSTR_pclk_active_high), MP_ROM_FALSE }, { MP_ROM_QSTR(MP_QSTR_pclk_idle_high), MP_ROM_FALSE }, }; From 227fa8cfc0c9394f45aa94722ad6ed92ab3760c2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 10:54:43 -0500 Subject: [PATCH 009/129] add a link to the faq about this --- tools/ci_check_duplicate_usb_vid_pid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 2f66076086..5078215d54 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -137,7 +137,8 @@ def check_vid_pid(files, clusterlist): f"Duplicate VID/PID usage found!\n{duplicates}\n" f"If you are open source maker, then you can request a PID from http://pid.codes\n" f"For boards without native USB, you can request a Creator ID from https://github.com/creationid/creators/\n" - f"Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id" + f"Otherwise, companies should pay the USB-IF for a vendor ID: https://www.usb.org/getting-vendor-id\n" + f"FAQ: Why does CircuitPython require a unique VID:PID for every board definition? https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython/frequently-asked-questions#faq-3130480" ) sys.exit(duplicate_message) From 9dcc0b5056b1fce358e95bdf49c52e657632de56 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 10:58:52 -0500 Subject: [PATCH 010/129] fix those pesky pid/vid duplicates --- .../boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk | 2 +- .../boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk | 4 ++-- ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk index 78423955bb..d58b1ec7b4 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk @@ -7,4 +7,4 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE=dout CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=32MB +CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk index a6b9038928..cec65ead85 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x303A -USB_PID = 0x7003 +USB_VID = 0x239A +USB_PID = 0x814C USB_PRODUCT = "ESP32-S3-EV-LCD-Board" USB_MANUFACTURER = "Espressif" diff --git a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk index 5db7f461af..e6efc34ef7 100644 --- a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk +++ b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk @@ -1,5 +1,5 @@ -USB_VID = 0x303A -USB_PID = 0x7003 +USB_VID = 0x239A +USB_PID = 0x814A USB_PRODUCT = "MakerFabs-ESP32-S3-Parallel-TFT-With-Touch-7inch" USB_MANUFACTURER = "MakerFabs" From 7dbf9a9b56eb37b974e75cc10156bb3ec4ce0e8b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 11:34:01 -0500 Subject: [PATCH 011/129] fix vprintf_adapter build error --- ports/espressif/supervisor/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index e9f23de99b..37d67595ee 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -541,11 +541,11 @@ void port_post_boot_py(bool heap_valid) { } +#if CIRCUITPY_CONSOLE_UART static int vprintf_adapter(const char *fmt, va_list ap) { return mp_vprintf(&mp_plat_print, fmt, ap); } -#if CIRCUITPY_CONSOLE_UART void port_serial_early_init(void) { esp_log_set_vprintf(vprintf_adapter); } From 1ef4e3c7383fab0b68f3c5915861d13ab9b6f073 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 30 Aug 2023 15:02:39 -0500 Subject: [PATCH 012/129] Add Adafruit TFT Experiment (rev A) There will be a revision but get the basics in for now. This successfully displays on a TL040HDS20-B1502A screen with: ``` import board from framebufferio import FramebufferDisplay from dotclockframebuffer import DotClockFramebuffer from displayio import release_displays tft_pins = board.TFT tft_timings = { "frequency": 6_500_000, "width": 720, "height": 720, "hsync_pulse_width": 20, "hsync_front_porch": 40, "hsync_back_porch": 40, "vsync_pulse_width": 10, "vsync_front_porch": 40, "vsync_back_porch": 40, "hsync_idle_low": False, "vsync_idle_low": False, "de_idle_high": False, "pclk_active_high": False, "pclk_idle_high": False, } release_displays() fb = DotClockFramebuffer(**tft_pins, **tft_timings) disp = FramebufferDisplay(fb) ``` --- .../board.c | 34 ++++++++ .../mpconfigboard.h | 48 +++++++++++ .../mpconfigboard.mk | 12 +++ .../pins.c | 80 +++++++++++++++++++ .../sdkconfig | 41 ++++++++++ 5 files changed, 215 insertions(+) create mode 100644 ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/board.c create mode 100644 ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h create mode 100644 ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk create mode 100644 ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c create mode 100644 ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/board.c b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/board.c new file mode 100644 index 0000000000..0639737c35 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/board.c @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h new file mode 100644 index 0000000000..e93af63614 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h @@ -0,0 +1,48 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Adafruit-ESP32-S3-RGB-TFT-Experiment" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO6) + +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO16) + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO4) + +#define DOUBLE_TAP_PIN (&pin_GPIO5) + +// a 1024x768 16BPP framebuffer + some breathing room +#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk new file mode 100644 index 0000000000..9e66fc4359 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk @@ -0,0 +1,12 @@ +USB_VID = 0x239A +USB_PID = 0x8148 +USB_PRODUCT = "Adafruit-ESP32-S3-RGB-TFT-Experiment" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c new file mode 100644 index 0000000000..6b1e17f766 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c @@ -0,0 +1,80 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t tft_r_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO11), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO46), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_g_pins = { + {&mp_type_tuple}, + 6, + { + MP_ROM_PTR(&pin_GPIO5), // XXX fixed in rev b + MP_ROM_PTR(&pin_GPIO45), + MP_ROM_PTR(&pin_GPIO48), + MP_ROM_PTR(&pin_GPIO47), + MP_ROM_PTR(&pin_GPIO21), + MP_ROM_PTR(&pin_GPIO14), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_b_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO5), // XXX fixed in rev b + MP_ROM_PTR(&pin_GPIO5), // XXX fixed in rev b + MP_ROM_PTR(&pin_GPIO40), + MP_ROM_PTR(&pin_GPIO39), + MP_ROM_PTR(&pin_GPIO38), + } +}; + +STATIC const mp_rom_map_elem_t tft_table[] = { + { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_red), MP_ROM_PTR(&tft_r_pins) }, + { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, + { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, +}; +MP_DEFINE_CONST_DICT(tft_dict, tft_table); + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(MICROPY_HW_NEOPIXEL) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(DEFAULT_SPI_BUS_MOSI) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(DEFAULT_SPI_BUS_MISO) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(DEFAULT_SPI_BUS_SCK) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO16) }, + + // boot mode button can be used in SW as well + { MP_ROM_QSTR(MP_QSTR_BUTTON_UP), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_DOWN), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_TP_IRQ), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig new file mode 100644 index 0000000000..4449c672e1 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig @@ -0,0 +1,41 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM 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 +# +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 +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" +# 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 From 06ccd41294730566c4f3a924702c0fca22c2c399 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 29 Aug 2023 14:34:01 -0700 Subject: [PATCH 013/129] Remove frozen libs from Funhouse --- ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk index 7d5c91f154..808154b78c 100644 --- a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk @@ -12,8 +12,4 @@ CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESPCAMERA = 0 # Include these Python libraries in firmware. -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_PortalBase -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_FakeRequests -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text From 80a1d1a20a59aba9beb4d76251864453ed85025b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 31 Aug 2023 14:52:26 -0500 Subject: [PATCH 014/129] Add support for a non-displayed left portion of screen --- .../dotclockframebuffer/DotClockFramebuffer.c | 16 ++++---- .../dotclockframebuffer/DotClockFramebuffer.h | 1 + .../dotclockframebuffer/DotClockFramebuffer.c | 38 ++++++++++++++++++- .../dotclockframebuffer/DotClockFramebuffer.h | 4 +- 4 files changed, 49 insertions(+), 10 deletions(-) diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c index bf6021f0c4..e9809da38c 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c @@ -126,7 +126,7 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr int frequency, int width, int height, int hsync_pulse_width, int hsync_back_porch, int hsync_front_porch, bool hsync_idle_low, int vsync_pulse_width, int vsync_back_porch, int vsync_front_porch, bool vsync_idle_low, - bool de_idle_high, bool pclk_active_high, bool pclk_idle_high) { + bool de_idle_high, bool pclk_active_high, bool pclk_idle_high, int overscan_left) { if (num_red != 5 || num_green != 6 || num_blue != 5) { mp_raise_ValueError(translate("Must provide 5/6/5 RGB pins")); @@ -149,7 +149,7 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr esp_lcd_rgb_panel_config_t *cfg = &self->panel_config; cfg->timings.pclk_hz = frequency; - cfg->timings.h_res = width; + cfg->timings.h_res = width + overscan_left; cfg->timings.v_res = height; cfg->timings.hsync_pulse_width = hsync_pulse_width; cfg->timings.hsync_back_porch = hsync_back_porch; @@ -206,14 +206,12 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr esp_rgb_panel_t *_rgb_panel = __containerof(self->panel_handle, esp_rgb_panel_t, base); self->frequency = frequency; + self->row_stride = 2 * (width + overscan_left); self->refresh_rate = frequency / (width + hsync_front_porch + hsync_back_porch) / (height + vsync_front_porch + vsync_back_porch); - self->bufinfo.buf = _rgb_panel->fb; - self->bufinfo.len = 2 * width * height; + self->bufinfo.buf = (uint8_t *)_rgb_panel->fb + 2 * overscan_left; // first line starts ater overscan_left pixels + self->bufinfo.len = 2 * (cfg->timings.h_res * cfg->timings.v_res - overscan_left); // no overscan after last line self->bufinfo.typecode = 'H' | MP_OBJ_ARRAY_TYPECODE_FLAG_RW; - memset(self->bufinfo.buf, 0xaa, width * height); - memset(self->bufinfo.buf + width * height, 0x55, width * height); - // LCD_CAM.lcd_ctrl2.lcd_vsync_idle_pol = _vsync_polarity; // LCD_CAM.lcd_ctrl2.lcd_hsync_idle_pol = _hsync_polarity; @@ -247,6 +245,10 @@ mp_int_t common_hal_dotclockframebuffer_framebuffer_get_frequency(dotclockframeb return self->frequency; } +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_row_stride(dotclockframebuffer_framebuffer_obj_t *self) { + return self->row_stride; +} + void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self) { Cache_WriteBack_Addr((uint32_t)(self->bufinfo.buf), self->bufinfo.len); } diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h index 386b9fc586..a40f28ea52 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h @@ -37,6 +37,7 @@ typedef struct dotclockframebuffer_framebuffer_obj { mp_obj_base_t base; mp_buffer_info_t bufinfo; + mp_int_t row_stride; uint32_t frequency, refresh_rate; uint64_t used_pins_mask; volatile int32_t frame_count; diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c index 995bab246e..fb0df57db5 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c @@ -62,6 +62,7 @@ //| de_idle_high: bool, //| pclk_active_high: bool, //| pclk_idle_high: bool, +//| overscan_left: int = 0, //| ) -> None: //| """Create a DotClockFramebuffer object associated with the given pins. //| @@ -105,14 +106,20 @@ //| :param bool de_idle_high: True if the de signal is high in IDLE state //| :param bool pclk_active_high: True if the display data is clocked out at the rising edge of dclk //| :param bool pclk_idle_high: True if the dclk stays at high level in IDLE phase +//| +//| :param int overscan_left: Allocate additional non-visible columns left of the first display column //| """ +//| #:param int overscan_top: Allocate additional non-visible rows above the first display row +//| #:param int overscan_right: Allocate additional non-visible columns right of the last display column +//| #:param int overscan_bottom: Allocate additional non-visible rows below the last display row //| ... STATIC mp_obj_t dotclockframebuffer_framebuffer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_de, ARG_vsync, ARG_hsync, ARG_dclk, ARG_red, ARG_green, ARG_blue, ARG_frequency, ARG_width, ARG_height, ARG_hsync_pulse_width, ARG_hsync_back_porch, ARG_hsync_front_porch, ARG_hsync_idle_low, ARG_vsync_pulse_width, ARG_vsync_back_porch, ARG_vsync_front_porch, ARG_vsync_idle_low, - ARG_de_idle_high, ARG_pclk_active_high, ARG_pclk_idle_high, }; + ARG_de_idle_high, ARG_pclk_active_high, ARG_pclk_idle_high, + ARG_overscan_left}; static const mp_arg_t allowed_args[] = { { MP_QSTR_de, MP_ARG_OBJ | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_obj = mp_const_none } }, @@ -140,6 +147,8 @@ STATIC mp_obj_t dotclockframebuffer_framebuffer_make_new(const mp_obj_type_t *ty { MP_QSTR_de_idle_high, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, { MP_QSTR_pclk_active_high, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, { MP_QSTR_pclk_idle_high, MP_ARG_BOOL | MP_ARG_KW_ONLY | MP_ARG_REQUIRED, {.u_bool = false } }, + + { MP_QSTR_overscan_left, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0 } }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -169,7 +178,8 @@ STATIC mp_obj_t dotclockframebuffer_framebuffer_make_new(const mp_obj_type_t *ty args[ARG_vsync_pulse_width].u_int, args[ARG_vsync_back_porch].u_int, args[ARG_vsync_front_porch].u_int, args[ARG_vsync_idle_low].u_bool, args[ARG_de_idle_high].u_bool, args[ARG_pclk_active_high].u_bool, - args[ARG_pclk_idle_high].u_bool + args[ARG_pclk_idle_high].u_bool, + args[ARG_overscan_left].u_int ); return self; @@ -243,6 +253,24 @@ MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_height_obj, dotclo MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_height_obj, (mp_obj_t)&dotclockframebuffer_framebuffer_get_height_obj); +//| row_stride: int +//| """The row_stride of the display, in bytes +//| +//| Due to overscan or alignment requirements, the memory address for row N+1 may not be exactly ``2*width`` bytes after the memory address for row N. +//| This property gives the stride in **bytes**. +//| +//| On Espressif this value is **guaranteed** to be a multiple of the 2 (i.e., it is a whole number of pixels)""" +//| +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_row_stride(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_row_stride(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_row_stride_obj, dotclockframebuffer_framebuffer_get_row_stride); + +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_row_stride_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_row_stride_obj); + STATIC mp_int_t dotclockframebuffer_framebuffer_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; // a readonly framebuffer would be unusual but not impossible @@ -300,6 +328,10 @@ STATIC void dotclockframebuffer_framebuffer_get_bufinfo(mp_obj_t self_in, mp_buf *bufinfo = self->bufinfo; } +STATIC int dotclockframebuffer_framebuffer_get_row_stride_proto(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + return common_hal_dotclockframebuffer_framebuffer_get_row_stride(self); +} STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) @@ -309,6 +341,7 @@ STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { .get_width = dotclockframebuffer_framebuffer_get_width_proto, .get_height = dotclockframebuffer_framebuffer_get_height_proto, .get_color_depth = dotclockframebuffer_framebuffer_get_color_depth_proto, + .get_row_stride = dotclockframebuffer_framebuffer_get_row_stride_proto, .get_bytes_per_cell = dotclockframebuffer_framebuffer_get_bytes_per_cell_proto, .get_native_frames_per_second = dotclockframebuffer_framebuffer_get_native_frames_per_second_proto, .swapbuffers = dotclockframebuffer_framebuffer_swapbuffers, @@ -319,6 +352,7 @@ STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&dotclockframebuffer_framebuffer_width_obj) }, { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&dotclockframebuffer_framebuffer_height_obj) }, + { MP_ROM_QSTR(MP_QSTR_row_stride), MP_ROM_PTR(&dotclockframebuffer_framebuffer_row_stride_obj) }, { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&dotclockframebuffer_framebuffer_frequency_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh_rate), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_rate_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_obj) }, diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h index acb44d083a..074625c4c0 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h @@ -45,7 +45,8 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr int frequency, int width, int height, int hsync_pulse_width, int hsync_back_porch, int hsync_front_porch, bool hsync_idle_low, int vsync_pulse_width, int vsync_back_porch, int vsync_front_porch, bool vsync_idle_low, - bool de_idle_high, bool pclk_active_high, bool pclk_idle_high); + bool de_idle_high, bool pclk_active_high, bool pclk_idle_high, + int overscan_left); void common_hal_dotclockframebuffer_framebuffer_deinit(dotclockframebuffer_framebuffer_obj_t *self); bool common_hal_dotclockframebuffer_framebuffer_deinitialized(dotclockframebuffer_framebuffer_obj_t *self); @@ -54,4 +55,5 @@ mp_int_t common_hal_dotclockframebuffer_framebuffer_get_width(dotclockframebuffe mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuffer_framebuffer_obj_t *self); mp_int_t common_hal_dotclockframebuffer_framebuffer_get_frequency(dotclockframebuffer_framebuffer_obj_t *self); mp_int_t common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(dotclockframebuffer_framebuffer_obj_t *self); +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_row_stride(dotclockframebuffer_framebuffer_obj_t *self); void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self); From 554f529fdfb7ed3820ae5111259f3f8d6df2421a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 31 Aug 2023 14:52:54 -0500 Subject: [PATCH 015/129] Per review notes, make esp_lcd and esp32-camera unconditional --- ports/espressif/CMakeLists.txt | 13 ++----------- ports/espressif/Makefile | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index b30b32d2b8..c6d180b57d 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -6,18 +6,9 @@ set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf) # The component list here determines what options we get in menuconfig and what the ninja file # can build. -set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls mdns esp_event esp_adc_cal esp_netif esp_wifi lwip ulp wpa_supplicant freertos bt usb) +set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls mdns esp_event esp_adc_cal esp_netif esp_wifi lwip ulp wpa_supplicant freertos bt usb esp32-camera esp_lcd) -if("${CIRCUITPY_ESPCAMERA}") -message("Including esp32-camera") -set(EXTRA_COMPONENT_DIRS "esp32-camera") -list(APPEND COMPONENTS "esp32-camera") -endif() - -if("${CIRCUITPY_DOTCLOCKFRAMEBUFFER}") -message("Including esp32-camera") -list(APPEND COMPONENTS "esp_lcd") -endif() +list(APPEND EXTRA_COMPONENT_DIRS "esp32-camera") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(circuitpython) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 70ea4c0658..c103a79217 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -360,7 +360,7 @@ endif do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h QSTR_GLOBAL_REQUIREMENTS += $(BUILD)/esp-idf/config/sdkconfig.h $(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf - IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA) -DCIRCUITPY_DOTCLOCKFRAMEBUFFER=$(CIRCUITPY_DOTCLOCKFRAMEBUFFER) + IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja # build a lib # Adding -d explain -j 1 -v to the ninja line will output debug info From 5f12e0f9b83dca2f1a64737bfdb297a3ddca3b1b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 31 Aug 2023 14:53:31 -0500 Subject: [PATCH 016/129] Revert mistaken change --- .../boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk index d58b1ec7b4..78423955bb 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk @@ -7,4 +7,4 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE=dout CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=16MB +CIRCUITPY_ESP_FLASH_SIZE=32MB From 66b3eccaf6663e6dbbe171fba2a19821026c993f Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Thu, 31 Aug 2023 20:25:20 -0700 Subject: [PATCH 017/129] 8334: RP2040 lacks raw memory map access --- locale/circuitpython.pot | 29 ++-- .../common-hal/memorymap/AddressRange.c | 4 +- ports/nrf/common-hal/memorymap/AddressRange.c | 4 +- .../common-hal/memorymap/AddressRange.c | 136 ++++++++++++++++++ .../common-hal/memorymap/AddressRange.h | 49 +++++++ .../common-hal/memorymap/__init__.c | 1 + ports/raspberrypi/mpconfigport.mk | 1 + py/argcheck.c | 2 + py/obj.c | 15 ++ py/obj.h | 1 + py/runtime.h | 2 + shared-bindings/memorymap/AddressRange.c | 26 ++-- shared-bindings/memorymap/AddressRange.h | 8 +- 13 files changed, 245 insertions(+), 33 deletions(-) create mode 100644 ports/raspberrypi/common-hal/memorymap/AddressRange.c create mode 100644 ports/raspberrypi/common-hal/memorymap/AddressRange.h create mode 100644 ports/raspberrypi/common-hal/memorymap/__init__.c diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c744c6d3cb..2007eb8b9b 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -89,13 +89,17 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -458,9 +462,14 @@ msgstr "" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" @@ -2127,6 +2136,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaliged IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2180,14 +2193,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" @@ -2948,7 +2961,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3899,10 +3912,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/ports/espressif/common-hal/memorymap/AddressRange.c b/ports/espressif/common-hal/memorymap/AddressRange.c index ed46c159bb..b05283b700 100644 --- a/ports/espressif/common-hal/memorymap/AddressRange.c +++ b/ports/espressif/common-hal/memorymap/AddressRange.c @@ -66,7 +66,7 @@ size_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange return self->len; } -bool common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, +void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, size_t start_index, uint8_t *values, size_t len) { uint8_t *address = self->start_address + start_index; #pragma GCC diagnostic push @@ -83,8 +83,6 @@ bool common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_ob memcpy(address, values, len); } #pragma GCC diagnostic pop - - return true; } void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_obj_t *self, diff --git a/ports/nrf/common-hal/memorymap/AddressRange.c b/ports/nrf/common-hal/memorymap/AddressRange.c index eaef202d0d..11986f2cf5 100644 --- a/ports/nrf/common-hal/memorymap/AddressRange.c +++ b/ports/nrf/common-hal/memorymap/AddressRange.c @@ -95,7 +95,7 @@ uint32_t common_hal_memorymap_addressrange_get_length(const memorymap_addressran } -bool common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, +void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, uint32_t start_index, uint8_t *values, uint32_t len) { uint8_t *address = self->start_address + start_index; #pragma GCC diagnostic push @@ -112,8 +112,6 @@ bool common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_ob memcpy(address, values, len); } #pragma GCC diagnostic pop - - return true; } void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_obj_t *self, diff --git a/ports/raspberrypi/common-hal/memorymap/AddressRange.c b/ports/raspberrypi/common-hal/memorymap/AddressRange.c new file mode 100644 index 0000000000..3eac27fa63 --- /dev/null +++ b/ports/raspberrypi/common-hal/memorymap/AddressRange.c @@ -0,0 +1,136 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 microDev + * Copyright (c) 2023 Bob Abeles + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include + +#include "shared-bindings/memorymap/AddressRange.h" + +#include "py/runtime.h" + +#include "hardware/regs/addressmap.h" + +// RP2 address map ranges, must be arranged in order by ascending start address +addressmap_rp2_range_t rp2_ranges[] = { + {(uint8_t *)ROM_BASE, 0x00004000, ROM}, // boot ROM + {(uint8_t *)XIP_BASE, 0x00100000, XIP}, // XIP normal cache operation + {(uint8_t *)XIP_NOALLOC_BASE, 0x00100000, XIP}, // XIP check for hit, no update on miss + {(uint8_t *)XIP_NOCACHE_BASE, 0x00100000, XIP}, // XIP don't check for hit, no update on miss + {(uint8_t *)XIP_NOCACHE_NOALLOC_BASE, 0x00100000, XIP}, // XIP bypass cache completely + {(uint8_t *)XIP_CTRL_BASE, 0x00004000, IO}, // XIP control registers + {(uint8_t *)XIP_SRAM_BASE, 0x00004000, SRAM}, // XIP SRAM 16KB XIP cache + {(uint8_t *)XIP_SSI_BASE, 0x00004000, IO}, // XIP SSI registers + {(uint8_t *)SRAM_BASE, 0x00042000, SRAM}, // SRAM 256KB striped plus 16KB contiguous + {(uint8_t *)SRAM0_BASE, 0x00040000, SRAM}, // SRAM0 to SRAM3 256KB non-striped + {(uint8_t *)SYSINFO_BASE, 0x00070000, IO}, // APB peripherals + {(uint8_t *)DMA_BASE, 0x00004000, IO}, // DMA registers + {(uint8_t *)USBCTRL_DPRAM_BASE, 0x00001000, SRAM}, // USB DPSRAM 4KB + {(uint8_t *)USBCTRL_REGS_BASE, 0x00004000, IO}, // USB registers + {(uint8_t *)PIO0_BASE, 0x00004000, IO}, // PIO0 registers + {(uint8_t *)PIO1_BASE, 0x00004000, IO}, // PIO1 registers + {(uint8_t *)SIO_BASE, 0x00001000, IO}, // SIO registers, no aliases + {(uint8_t *)PPB_BASE, 0x00004000, IO} // PPB registers +}; + +void common_hal_memorymap_addressrange_construct(memorymap_addressrange_obj_t *self, + uint8_t *start_address, size_t length) { + for (size_t i = 0; i < MP_ARRAY_SIZE(rp2_ranges); i++) { + if (start_address <= rp2_ranges[i].start_address) { + uint8_t *range_end_address = rp2_ranges[i].start_address + rp2_ranges[i].len - 1; + uint8_t *end_address = start_address + length - 1; + if (start_address > range_end_address || end_address > range_end_address) { + break; + } + self->start_address = start_address; + self->len = length; + self->type = rp2_ranges[i].type; + return; + } + } + + mp_raise_ValueError(translate("Address range not allowed")); +} + +size_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self) { + return self->len; +} + +void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, + size_t start_index, uint8_t *values, size_t len) { + uint8_t *dest_addr = self->start_address + start_index; + switch (self->type) { + case SRAM: + // Writes to SRAM may be arbitrary length and alignment. We use memcpy() which + // may optimize aligned writes depending on CIRCUITPY_FULL_BUILD of the CP build. + memcpy(dest_addr, values, len); + break; + case IO: + if ((size_t)dest_addr & 0x03 || len & 0x03) { + // Unaligned access or unaligned length not supported by RP2 for IO registers + mp_raise_RuntimeError(translate("Unable to access unaliged IO register")); + } else { + // Aligned access and length, use 32-bit writes + uint32_t *dest_addr32 = (uint32_t *)dest_addr; + size_t len32 = len >> 2; + for (size_t i = 0; i < len32; i++) { + *dest_addr32++ = ((uint32_t *)values)[i << 2]; + } + } + break; + case XIP: + case ROM: + // XIP and ROM are read-only + mp_raise_RuntimeError(translate("Unable to write to read-only memory")); + break; + } +} + +void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_obj_t *self, + size_t start_index, size_t len, uint8_t *values) { + uint8_t *src_addr = self->start_address + start_index; + switch (self->type) { + case SRAM: + case XIP: + case ROM: + // Reads from these sources may be arbitrary length and alignment. We use memcpy() + // which may optimize aligned writes depending on CIRCUITPY_FULL_BUILD of the CP build. + memcpy(values, src_addr, len); + break; + case IO: + if ((size_t)src_addr & 0x03 || len & 0x03) { + // Unaligned access or unaligned length not supported by RP2 for IO registers + mp_raise_RuntimeError(translate("Unable to access unaliged IO register")); + } else { + // Aligned access and length, use 32-bit writes + uint32_t *src_addr32 = (uint32_t *)src_addr; + size_t len32 = len >> 2; + for (size_t i = 0; i < len32; i++) { + ((uint32_t *)values)[i] = *src_addr32++; + } + } + break; + } +} diff --git a/ports/raspberrypi/common-hal/memorymap/AddressRange.h b/ports/raspberrypi/common-hal/memorymap/AddressRange.h new file mode 100644 index 0000000000..0e929c4305 --- /dev/null +++ b/ports/raspberrypi/common-hal/memorymap/AddressRange.h @@ -0,0 +1,49 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 microDev + * Copyright (c) 2023 Bob Abeles + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MEMORYMAP_ADDRESSRANGE_H +#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MEMORYMAP_ADDRESSRANGE_H + +#include "py/obj.h" + +// depending on the section memory type, different access methods and rules apply +typedef enum { SRAM, ROM, XIP, IO } memorymap_rp2_section_t; + +typedef struct { + mp_obj_base_t base; + uint8_t *start_address; + size_t len; + memorymap_rp2_section_t type; +} memorymap_addressrange_obj_t; + +typedef struct { + uint8_t *start_address; + size_t len; + memorymap_rp2_section_t type; +} addressmap_rp2_range_t; + +#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_MEMORYMAP_ADDRESSRANGE_H diff --git a/ports/raspberrypi/common-hal/memorymap/__init__.c b/ports/raspberrypi/common-hal/memorymap/__init__.c new file mode 100644 index 0000000000..c15b17f451 --- /dev/null +++ b/ports/raspberrypi/common-hal/memorymap/__init__.c @@ -0,0 +1 @@ +// No memorymap module functions. diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index fdc2b0922a..d5e7734be1 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -15,6 +15,7 @@ CIRCUITPY_FULL_BUILD ?= 1 CIRCUITPY_AUDIOMP3 ?= 1 CIRCUITPY_BITOPS ?= 1 CIRCUITPY_IMAGECAPTURE ?= 1 +CIRCUITPY_MEMORYMAP ?= 1 CIRCUITPY_PWMIO ?= 1 CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_DISPLAYIO) CIRCUITPY_ROTARYIO ?= 1 diff --git a/py/argcheck.c b/py/argcheck.c index c3bde804d4..ff939ad828 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -115,6 +115,8 @@ void mp_arg_parse_all(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n out_vals[i].u_bool = mp_obj_is_true(given_arg); } else if ((allowed[i].flags & MP_ARG_KIND_MASK) == MP_ARG_INT) { out_vals[i].u_int = mp_obj_get_int(given_arg); + } else if ((allowed[i].flags & MP_ARG_KIND_MASK) == MP_ARG_UINT) { + out_vals[i].u_uint = mp_obj_get_uint(given_arg); } else { assert((allowed[i].flags & MP_ARG_KIND_MASK) == MP_ARG_OBJ); out_vals[i].u_obj = given_arg; diff --git a/py/obj.c b/py/obj.c index 31d469770c..a8702713d3 100644 --- a/py/obj.c +++ b/py/obj.c @@ -420,6 +420,21 @@ bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value) { return true; } +mp_uint_t mp_obj_get_uint(mp_const_obj_t arg) { + if (arg == mp_const_false) { + return 0; + } else if (arg == mp_const_true) { + return 1; + } else if (mp_obj_is_small_int(arg)) { + return MP_OBJ_SMALL_INT_VALUE(arg); + } else if (mp_obj_is_type(arg, &mp_type_int)) { + return mp_obj_int_get_uint_checked(arg); + } else { + mp_obj_t res = mp_unary_op(MP_UNARY_OP_INT, (mp_obj_t)arg); + return mp_obj_int_get_uint_checked(res); + } +} + #if MICROPY_PY_BUILTINS_FLOAT bool mp_obj_get_float_maybe(mp_obj_t arg, mp_float_t *value) { mp_float_t val; diff --git a/py/obj.h b/py/obj.h index d1874a8cd2..0b9f812e0b 100644 --- a/py/obj.h +++ b/py/obj.h @@ -939,6 +939,7 @@ static MP_INLINE bool mp_obj_is_integer(mp_const_obj_t o) { mp_int_t mp_obj_get_int(mp_const_obj_t arg); mp_int_t mp_obj_get_int_truncated(mp_const_obj_t arg); bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value); +mp_uint_t mp_obj_get_uint(mp_const_obj_t arg); #if MICROPY_PY_BUILTINS_FLOAT mp_float_t mp_obj_get_float(mp_obj_t self_in); bool mp_obj_get_float_maybe(mp_obj_t arg, mp_float_t *value); diff --git a/py/runtime.h b/py/runtime.h index 5ecab91e99..688d8b03fe 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -45,6 +45,7 @@ typedef enum { MP_ARG_BOOL = 0x001, MP_ARG_INT = 0x002, MP_ARG_OBJ = 0x003, + MP_ARG_UINT = 0x004, MP_ARG_KIND_MASK = 0x0ff, MP_ARG_REQUIRED = 0x100, MP_ARG_KW_ONLY = 0x200, @@ -53,6 +54,7 @@ typedef enum { typedef union _mp_arg_val_t { bool u_bool; mp_int_t u_int; + mp_uint_t u_uint; mp_obj_t u_obj; mp_rom_obj_t u_rom_obj; } mp_arg_val_t; diff --git a/shared-bindings/memorymap/AddressRange.c b/shared-bindings/memorymap/AddressRange.c index 7fd1062534..f2f5c28ee4 100644 --- a/shared-bindings/memorymap/AddressRange.c +++ b/shared-bindings/memorymap/AddressRange.c @@ -51,23 +51,25 @@ //| def __init__(self, *, start, length) -> None: //| """Constructs an address range starting at ``start`` and ending at -//| ``start + length``. An exception will be raised if any of the +//| ``start + length - 1``. An exception will be raised if any of the //| addresses are invalid or protected.""" //| ... STATIC mp_obj_t memorymap_addressrange_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_start, ARG_length }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_start, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_start, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_UINT }, { MP_QSTR_length, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - size_t start = - mp_arg_validate_int_min(args[ARG_start].u_int, 0, MP_QSTR_start); + size_t start = args[ARG_start].u_uint; size_t length = mp_arg_validate_int_min(args[ARG_length].u_int, 1, MP_QSTR_length); - + // Check for address range wrap here as this can break port-specific code due to size_t overflow. + if (start + length - 1 < start) { + mp_raise_ValueError(translate("Address range wraps around")); + } memorymap_addressrange_obj_t *self = mp_obj_malloc(memorymap_addressrange_obj_t, &memorymap_addressrange_type); @@ -104,7 +106,8 @@ STATIC MP_DEFINE_CONST_DICT(memorymap_addressrange_locals_dict, memorymap_addres //| def __getitem__(self, index: int) -> int: //| """Returns the value(s) at the given index. //| -//| 1, 2, 4 and 8 byte aligned reads will be done in one transaction. +//| 1, 2, 4 and 8 byte aligned reads will be done in one transaction +//| when possible. //| All others may use multiple transactions.""" //| ... //| @overload @@ -113,7 +116,8 @@ STATIC MP_DEFINE_CONST_DICT(memorymap_addressrange_locals_dict, memorymap_addres //| def __setitem__(self, index: int, value: int) -> None: //| """Set the value(s) at the given index. //| -//| 1, 2, 4 and 8 byte aligned writes will be done in one transaction. +//| 1, 2, 4 and 8 byte aligned writes will be done in one transaction +//| when possible. //| All others may use multiple transactions.""" //| ... //| @@ -154,9 +158,7 @@ STATIC mp_obj_t memorymap_addressrange_subscr(mp_obj_t self_in, mp_obj_t index_i mp_raise_NotImplementedError(translate("array/bytes required on right side")); } - if (!common_hal_memorymap_addressrange_set_bytes(self, slice.start, src_items, src_len)) { - mp_raise_RuntimeError(translate("Unable to write to address.")); - } + common_hal_memorymap_addressrange_set_bytes(self, slice.start, src_items, src_len); return mp_const_none; #else return MP_OBJ_NULL; // op not supported @@ -184,9 +186,7 @@ STATIC mp_obj_t memorymap_addressrange_subscr(mp_obj_t self_in, mp_obj_t index_i mp_arg_validate_int_range(byte_value, 0, 255, MP_QSTR_bytes); uint8_t short_value = byte_value; - if (!common_hal_memorymap_addressrange_set_bytes(self, index, &short_value, 1)) { - mp_raise_RuntimeError(translate("Unable to write to address.")); - } + common_hal_memorymap_addressrange_set_bytes(self, index, &short_value, 1); return mp_const_none; } } diff --git a/shared-bindings/memorymap/AddressRange.h b/shared-bindings/memorymap/AddressRange.h index 74a214d949..93c082c8eb 100644 --- a/shared-bindings/memorymap/AddressRange.h +++ b/shared-bindings/memorymap/AddressRange.h @@ -33,14 +33,14 @@ extern const mp_obj_type_t memorymap_addressrange_type; void common_hal_memorymap_addressrange_construct(memorymap_addressrange_obj_t *self, uint8_t *start_address, size_t length); -uint32_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self); +size_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self); -bool common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, - uint32_t start_index, uint8_t *values, uint32_t len); +void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, + size_t start_index, uint8_t *values, size_t len); // len and values are intentionally swapped to signify values is an output and // also leverage the compiler to validate uses are expected. void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_obj_t *self, - uint32_t start_index, uint32_t len, uint8_t *values); + size_t start_index, size_t len, uint8_t *values); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_MEMORYMAP_ADDRESSRANGE_H From 398b2158c626c75a0cab6f9aca4b302088f018aa Mon Sep 17 00:00:00 2001 From: Deleted User Date: Thu, 31 Aug 2023 16:34:31 +0000 Subject: [PATCH 018/129] Translated using Weblate (Russian) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 196 ++++++++++++++++++++++++++------------------------- 1 file changed, 99 insertions(+), 97 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index 1ae155ffdf..d74f93e70e 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,16 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-05-21 00:49+0000\n" -"Last-Translator: Scott Shawcroft \n" +"PO-Revision-Date: 2023-09-01 11:54+0000\n" +"Last-Translator: Deleted User \n" "Language-Team: none\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Generator: Weblate 4.18-dev\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 5.0.1-dev\n" #: main.c msgid "" @@ -40,18 +40,26 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Пожалуйста, подайте вопрос с вашей программой на github.com/adafruit/" +"circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" "\n" "Press reset to exit safe mode.\n" msgstr "" +"\n" +"Нажмите на сброс, чтобы выйти из безопасного режима.\n" +".\n" #: supervisor/shared/safe_mode.c msgid "" "\n" "You are in safe mode because:\n" msgstr "" +"\n" +"Вы в безопасном режиме, потому что:\n" #: py/obj.c msgid " File \"%q\"" @@ -129,7 +137,7 @@ msgstr "%q сбой: %d" #: py/argcheck.c msgid "%q in %q must be of type %q, not %q" -msgstr "" +msgstr "%q в %q должно быть типа %q, а не %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c @@ -160,7 +168,7 @@ msgstr "%q является %q" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "%q is read-only for this board" -msgstr "" +msgstr "%q читается только для этой доски" #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" @@ -213,21 +221,21 @@ msgstr "%q должно быть bytearray или array типа 'h', 'H', 'b', #: ports/espressif/common-hal/analogbufio/BufferedIn.c msgid "%q must be array of type 'H'" -msgstr "" +msgstr "%q должен быть массивом типа 'H \"" #: shared-module/synthio/__init__.c msgid "%q must be array of type 'h'" -msgstr "" +msgstr "%q должен быть массивом типа 'h \"" #: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c #: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c #: shared-module/synthio/Synthesizer.c msgid "%q must be of type %q or %q, not %q" -msgstr "" +msgstr "%q должно быть типа%q или%q, а не%q" #: py/argcheck.c py/objstrunicode.c shared-module/synthio/__init__.c msgid "%q must be of type %q, not %q" -msgstr "" +msgstr "%q должно быть типа %q, а не %q" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" @@ -264,19 +272,19 @@ msgstr "%q=%q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts in more bits than pin count" -msgstr "" +msgstr "%q [%u] смещается в большем количестве, чем количество пинов" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" -msgstr "" +msgstr "%q[%u] смещает больше битов, чем количество выводов" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" -msgstr "" +msgstr "%q[%u] использует дополнительный контакт" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] waits on input outside of count" -msgstr "" +msgstr "%q [%u] ожидает ввода за пределами графа" #: ports/espressif/common-hal/espidf/__init__.c #, c-format @@ -426,7 +434,7 @@ msgstr "'yield' вне функции" #: py/compile.c msgid "* arg after **" -msgstr "" +msgstr "* arg после **" #: py/compile.c msgid "*x must be assignment target" @@ -456,7 +464,7 @@ msgstr "ADC2 используется WiFi" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" -msgstr "" +msgstr "AP не может быть запущен" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -507,7 +515,7 @@ msgstr "Все каналы уже используются" #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All dma channels in use" -msgstr "" +msgstr "Все используемые каналы dma" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" @@ -569,7 +577,7 @@ msgstr "Поиск сетей wifi уже происходит" #: shared-module/os/getenv.c #, c-format msgid "An error occurred while retrieving '%s':\n" -msgstr "" +msgstr "Произошла ошибка при получении '%s':\n" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" @@ -649,7 +657,7 @@ msgstr "Размер bitmap и количество бит-на-значение #: supervisor/shared/safe_mode.c msgid "Boot device must be first (interface #0)." -msgstr "" +msgstr "Загрузочное устройство должно быть первым (интерфейс #0)." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" @@ -700,7 +708,7 @@ msgstr "Буфер слишком короткий на %d байт" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Слишком маленький буфер" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -832,11 +840,8 @@ msgid "Cannot vary frequency on a timer that is already in use" msgstr "Невозможно изменить частоту на таймере, который уже используется" #: ports/nrf/common-hal/alarm/pin/PinAlarm.c -#, fuzzy msgid "Cannot wake on pin edge, only level" -msgstr "" -"Невозможно проснуться по изменению логического уровня (CHANGE), только по " -"уровню (LEVEL)" +msgstr "Невозможно проснуться по изменению логического уровня, только по уровню" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." @@ -868,11 +873,11 @@ msgstr "" #: shared-bindings/bitmaptools/__init__.c msgid "Coordinate arrays have different lengths" -msgstr "" +msgstr "Координатные массивы имеют разные длины" #: shared-bindings/bitmaptools/__init__.c msgid "Coordinate arrays types have different sizes" -msgstr "" +msgstr "Типы координат имеют разные размеры" #: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" @@ -959,10 +964,9 @@ msgid "Drive mode not used when direction is input." msgstr "Drive mode не используется, когда направление является входным." #: py/obj.c -#, fuzzy msgid "During handling of the above exception, another exception occurred:" msgstr "" -"Во время обработки вышеупомянутого исключения произошло другое исключение:" +"При обращении с вышеуказанным исключением произошло еще одно исключение:" #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" @@ -986,7 +990,7 @@ msgstr "Ошибка в регулярном выражении(regex)" #: supervisor/shared/safe_mode.c msgid "Error in safemode.py." -msgstr "" +msgstr "Ошибка в сейфе. py." #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "Error: Failure to bind" @@ -994,7 +998,7 @@ msgstr "Ошибка: Сбой привязки" #: shared-bindings/alarm/__init__.c msgid "Expected a kind of %q" -msgstr "" +msgstr "Ожидаемый вид %q" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c @@ -1075,14 +1079,12 @@ msgid "Filters too complex" msgstr "Фильтры слишком сложные" #: ports/espressif/common-hal/dualbank/__init__.c -#, fuzzy msgid "Firmware is duplicate" -msgstr "Прошивка является дубликатом" +msgstr "Прошивка дублируется" #: ports/espressif/common-hal/dualbank/__init__.c -#, fuzzy msgid "Firmware is invalid" -msgstr "Прошивка является неправильной" +msgstr "Недопустимая прошивка" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is too big" @@ -1145,7 +1147,7 @@ msgstr "Полудуплексный SPI не реализован" #: supervisor/shared/safe_mode.c msgid "Hard fault: memory access or instruction error." -msgstr "" +msgstr "Жесткая ошибка: доступ к памяти или ошибка инструкции." #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c @@ -1156,12 +1158,14 @@ msgstr "Оборудование используется, попробуйте #: supervisor/shared/safe_mode.c msgid "Heap allocation when VM not running." -msgstr "" +msgstr "Выделение кучи, когда виртуальная машина не запущена." #: supervisor/shared/safe_mode.c msgid "" "Heap was corrupted because the stack was too small. Increase stack size." msgstr "" +"Куча была повреждена, потому что стек был слишком маленьким. Увеличьте " +"размер стека." #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" @@ -1246,13 +1250,12 @@ msgid "Internal error #%d" msgstr "Внутренняя ошибка #%d" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "Internal watchdog timer expired." msgstr "Внутренний сторожевой таймер истек." #: supervisor/shared/safe_mode.c msgid "Interrupt error." -msgstr "" +msgstr "Прерванная ошибка." #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c #: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c @@ -1284,7 +1287,7 @@ msgstr "Неверный BSSID" #: main.c msgid "Invalid CIRCUITPY_PYSTACK_SIZE\n" -msgstr "" +msgstr "Недопустимый CIRCUITPY_PYSTACK_SIZE\n" #: shared-bindings/wifi/Radio.c msgid "Invalid MAC address" @@ -1310,7 +1313,7 @@ msgstr "Неверный data_pins[%d]" #: shared-module/msgpack/__init__.c msgid "Invalid format" -msgstr "" +msgstr "Недопустимый формат" #: shared-module/audiocore/WaveFile.c msgid "Invalid format chunk size" @@ -1318,7 +1321,7 @@ msgstr "Неверный размер блока формата" #: shared-bindings/wifi/Radio.c msgid "Invalid hex password" -msgstr "" +msgstr "Неверный шестнадцатеричный пароль" #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" @@ -1339,7 +1342,7 @@ msgstr "Неверное состояние" #: shared-module/os/getenv.c msgid "Invalid unicode escape" -msgstr "" +msgstr "Недопустимое экранирование Юникода" #: shared-bindings/aesio/aes.c msgid "Key must be 16, 24, or 32 bytes long" @@ -1351,19 +1354,17 @@ msgstr "Ключ не найден" #: shared-module/is31fl3741/FrameBuffer.c msgid "LED mappings must match display size" -msgstr "" +msgstr "Светодиодные сопоставления должны соответствовать размеру дисплея" #: py/compile.c msgid "LHS of keyword arg must be an id" msgstr "LHS ключевого слова arg должен быть идентификатором(id)" #: shared-module/displayio/Group.c -#, fuzzy msgid "Layer already in a group" msgstr "Слой уже в группе (Group)" #: shared-module/displayio/Group.c -#, fuzzy msgid "Layer must be a Group or TileGrid subclass" msgstr "Слой должен быть группой (Group) или субклассом TileGrid." @@ -1373,7 +1374,7 @@ msgstr "MAC адрес был недействительным" #: shared-bindings/is31fl3741/IS31FL3741.c msgid "Mapping must be a tuple" -msgstr "" +msgstr "Сопоставление должно быть кортежом" #: shared-bindings/audiobusio/PDMIn.c msgid "Microphone startup delay must be in range 0.0 to 1.0" @@ -1390,31 +1391,31 @@ msgstr "Несоответствие флага swap" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] reads pin(s)" -msgstr "" +msgstr "Пропущенный первый_in_pin.%q [%u] читает пин (s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] shifts in from pin(s)" -msgstr "" +msgstr "Отсутствует first_in_pin. %q[%u] смещается от контакта (контактов)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] waits based on pin" -msgstr "" +msgstr "Отсутствует first_in_pin. Инструкция %d ожидает на основе пина" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] shifts out to pin(s)" -msgstr "" +msgstr "Отсутствует first_out_pin. %q[%u] переключается на контакты" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] writes pin(s)" -msgstr "" +msgstr "Отсутствует first_out_pin. %q[%u] записывает pin(s)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_set_pin. %q[%u] sets pin(s)" -msgstr "" +msgstr "Отсутствует first_set_pin. %q[%u] устанавливает контакты" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing jmp_pin. %q[%u] jumps on pin" -msgstr "" +msgstr "Не хватает jmp_pin.%q [%u] прыгает на пин" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." @@ -1439,7 +1440,7 @@ msgstr "Ошибка NVS" #: shared-bindings/socketpool/SocketPool.c msgid "Name or service not known" -msgstr "" +msgstr "Имя или услуга не известны" #: py/qstr.c msgid "Name too long" @@ -1451,7 +1452,7 @@ msgstr "Новый bitmap должен быть того же размера ч #: ports/espressif/common-hal/_bleio/__init__.c msgid "Nimble out of memory" -msgstr "" +msgstr "Изображение памяти" #: ports/atmel-samd/common-hal/busio/UART.c #: ports/espressif/common-hal/busio/SPI.c @@ -1484,12 +1485,12 @@ msgstr "Канал DMA не найден" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "No DMA pacing timer found" -msgstr "" +msgstr "Таймер стимуляции DMA не найден" #: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c -#, fuzzy, c-format +#, c-format msgid "No I2C device at address: 0x%x" -msgstr "Не найдено устройство I2C по адресу: %x" +msgstr "Нет устройства I2C по адресу: %x" #: supervisor/shared/web_workflow/web_workflow.c msgid "No IP" @@ -1497,7 +1498,7 @@ msgstr "Нет IP" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "No available clocks" -msgstr "" +msgstr "Нет доступных часов" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "No capture in progress" @@ -1505,7 +1506,7 @@ msgstr "Захват не ведется" #: shared-module/usb/core/Device.c msgid "No configuration set" -msgstr "" +msgstr "Нет конфигураций" #: shared-bindings/_bleio/PacketBuffer.c msgid "No connection: length cannot be determined" @@ -1560,7 +1561,6 @@ msgid "No space left on device" msgstr "На устройстве не осталось свободного места" #: py/moduerrno.c -#, fuzzy msgid "No such device" msgstr "Нет такого устройства" @@ -1574,11 +1574,11 @@ msgstr "Нет доступного таймера" #: shared-module/usb/core/Device.c msgid "No usb host port initialized" -msgstr "" +msgstr "Порт USB-хоста не инициализирован" #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" -msgstr "" +msgstr "Скандинавская система прошивки из памяти" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -1592,7 +1592,6 @@ msgstr "Не подключено" #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c #: shared-bindings/audiopwmio/PWMAudioOut.c -#, fuzzy msgid "Not playing" msgstr "Не воспроизводится (Not playing)" @@ -1610,16 +1609,15 @@ msgstr "" #: ports/nrf/common-hal/busio/UART.c msgid "Odd parity is not supported" -msgstr "" +msgstr "Нечетная четность не поддерживается" #: supervisor/shared/bluetooth/bluetooth.c msgid "Off" msgstr "Выключено" #: supervisor/shared/bluetooth/bluetooth.c -#, fuzzy msgid "Ok" -msgstr "Ok" +msgstr "Да" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -1646,15 +1644,15 @@ msgstr "" #: shared-bindings/_bleio/Adapter.c msgid "Only connectable advertisements can be directed" -msgstr "" +msgstr "Только подключаемые объявления могут быть направлены" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Only edge detection is available on this hardware" -msgstr "" +msgstr "На этом аппаратном обеспечении доступно только обнаружение края" #: shared-bindings/ipaddress/__init__.c msgid "Only int or string supported for ip" -msgstr "" +msgstr "Только int или строка поддерживается для ip" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1662,6 +1660,8 @@ msgid "" "Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " "%d bpp given" msgstr "" +"Только монохром, индексированный 4bpp или 8bpp, и 16bpp или больше BMP " +"поддерживаются: %d bpp" #: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one %q can be set in deep sleep." @@ -1669,85 +1669,87 @@ msgstr "Только один %q может быть погружен в глу #: ports/espressif/common-hal/espulp/ULPAlarm.c msgid "Only one %q can be set." -msgstr "" +msgstr "Можно установить только один %q." #: ports/espressif/common-hal/i2ctarget/I2CTarget.c #: ports/raspberrypi/common-hal/i2ctarget/I2CTarget.c msgid "Only one address is allowed" -msgstr "" +msgstr "Разрешен только один адрес" #: ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set" -msgstr "" +msgstr "Можно установить только один сигнал тревоги.время" #: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." -msgstr "" +msgstr "Можно установить только один будильник alarm.time." #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" -msgstr "" +msgstr "Только один цвет может быть прозрачным одновременно" #: py/moduerrno.c msgid "Operation not permitted" -msgstr "" +msgstr "Операция не разрешена" #: ports/espressif/common-hal/espidf/__init__.c msgid "Operation or feature not supported" -msgstr "" +msgstr "Операция или функция, не поддерживаемые" #: ports/espressif/common-hal/espidf/__init__.c msgid "Operation timed out" -msgstr "" +msgstr "Истекло время ожидания операции" #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Out of MDNS service slots" -msgstr "" +msgstr "Отсутствуют сервисные слоты MDNS" #: ports/espressif/common-hal/espidf/__init__.c msgid "Out of memory" -msgstr "" +msgstr "Не хватает памяти" #: ports/espressif/common-hal/socketpool/Socket.c #: ports/raspberrypi/common-hal/socketpool/Socket.c msgid "Out of sockets" -msgstr "" +msgstr "Вне розеток" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "" +msgstr "Элементы буфера должны быть длиной <= 4 байта" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." -msgstr "" +msgstr "Передискретизация должна быть кратна 8." #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" +"Частота ШИМ не записывается, если variable_frequency имеет значение False " +"при построении." #: ports/stm/common-hal/pwmio/PWMOut.c msgid "PWM restart" -msgstr "" +msgstr "PWM перезагрузка" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice already in use" -msgstr "" +msgstr "PWM уже используется" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "PWM slice channel A already in use" -msgstr "" +msgstr "PWM канал среза A уже используется" #: ports/espressif/common-hal/audiobusio/__init__.c msgid "Peripheral in use" -msgstr "" +msgstr "Периферийные устройства в использовании" #: py/moduerrno.c msgid "Permission denied" -msgstr "" +msgstr "Отказано в разрешении" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Pin cannot wake from Deep Sleep" @@ -1799,19 +1801,19 @@ msgstr "Пины должны иметь общий срез ШИМ" #: shared-module/usb/core/Device.c msgid "Pipe error" -msgstr "" +msgstr "Ошибка трубопровода" #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" -msgstr "" +msgstr "Плюс любые модули в файловой системе\n" #: shared-module/vectorio/Polygon.c msgid "Polygon needs at least 3 points" -msgstr "" +msgstr "Полигон нуждается не менее 3 пунктов" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "" +msgstr "Мощность просела. Убедитесь, что вы обеспечиваете достаточную мощность." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -4389,19 +4391,19 @@ msgstr "" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of condition array" -msgstr "" +msgstr "неправильная длина массива состояния" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of index array" -msgstr "" +msgstr "неправильная длина массива индексов" #: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" -msgstr "" +msgstr "неправильное количество аргументов" #: py/runtime.c msgid "wrong number of values to unpack" -msgstr "" +msgstr "Неправильное количество значений для распаковки" #: extmod/ulab/code/numpy/vector.c msgid "wrong output type" From 7259413be060199222c212f343453089c3b9da18 Mon Sep 17 00:00:00 2001 From: xXx Date: Fri, 1 Sep 2023 01:00:28 +0000 Subject: [PATCH 019/129] Translated using Weblate (Russian) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 1199 ++++++++++++++++++++++++++------------------------ 1 file changed, 616 insertions(+), 583 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index d74f93e70e..957ebf66e2 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2023-09-01 11:54+0000\n" -"Last-Translator: Deleted User \n" +"Last-Translator: xXx \n" "Language-Team: none\n" "Language: ru\n" "MIME-Version: 1.0\n" @@ -1817,7 +1817,7 @@ msgstr "Мощность просела. Убедитесь, что вы обе #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" -msgstr "" +msgstr "Буфер префикса должен находиться в куче" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" @@ -1827,182 +1827,183 @@ msgstr "" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" -msgstr "Притворяюсь глубоко спать до сигнала, CTRL-C или запись в файл.\n" +msgstr "" +"Притворяюсь глубоким сном до сигнала тревоги, CTRL-C или записи файла.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does IN without loading ISR" -msgstr "" +msgstr "Программа делает IN без загрузки ISR" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does OUT without loading OSR" -msgstr "" +msgstr "Программа делает OUT без загрузки OSR" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Program size invalid" -msgstr "" +msgstr "Недопустимый размер программы" #: ports/espressif/common-hal/espulp/ULP.c msgid "Program too long" -msgstr "" +msgstr "Слишком длинная программа" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." -msgstr "" +msgstr "Вытягивание не используется при выводе направления." #: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "RAISE mode is not implemented" -msgstr "" +msgstr "Режим RAISE не реализован" #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" -msgstr "" +msgstr "RISE_AND_FALL недоступен на этом чипе" #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" -msgstr "" +msgstr "Ошибка деинициализации генератора случайных чисел" #: ports/stm/common-hal/os/__init__.c msgid "RNG Init Error" -msgstr "" +msgstr "Ошибка инициализации RNG" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "RS485" -msgstr "" +msgstr "RS485" #: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" -msgstr "" +msgstr "Инверсия RS485 указана, когда она не находится в режиме RS485" #: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c msgid "RTC is not supported on this board" -msgstr "" +msgstr "RTC не поддерживается на этой плате" #: ports/stm/common-hal/os/__init__.c msgid "Random number generation error" -msgstr "" +msgstr "Ошибка генерации случайных чисел" #: shared-bindings/_bleio/__init__.c #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c shared-module/bitmaptools/__init__.c #: shared-module/displayio/Bitmap.c msgid "Read-only" -msgstr "" +msgstr "Только для чтения" #: extmod/vfs_fat.c py/moduerrno.c msgid "Read-only filesystem" -msgstr "" +msgstr "Файловая система только для чтения" #: ports/espressif/common-hal/espidf/__init__.c msgid "Received response was invalid" -msgstr "" +msgstr "Полученный ответ недействителен" #: supervisor/shared/bluetooth/bluetooth.c msgid "Reconnecting" -msgstr "" +msgstr "Повторное соединение" #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" -msgstr "" +msgstr "Слишком раннее обновление" #: shared-bindings/canio/RemoteTransmissionRequest.c msgid "RemoteTransmissionRequests limited to 8 bytes" -msgstr "" +msgstr "RemoteTransmissionRequests ограничен 8 байтами" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" -msgstr "" +msgstr "Запрошенный режим AES не поддерживается" #: ports/espressif/common-hal/espidf/__init__.c msgid "Requested resource not found" -msgstr "" +msgstr "Запрошенный ресурс не найден" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" -msgstr "" +msgstr "Правый канал не поддерживается" #: main.c msgid "Running in safe mode! Not running saved code.\n" -msgstr "" +msgstr "Работает в безопасном режиме! Сохраненный код не выполняется.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" -msgstr "" +msgstr "Формат CSD SD-карты не поддерживается" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "SDCard init" -msgstr "" +msgstr "Инициализация SDCard" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO GetCardInfo Error %d" -msgstr "" +msgstr "Ошибка SDIO GetCardInfo %d" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO Init Error %d" -msgstr "" +msgstr "Ошибка инициализации SDIO %d" #: ports/espressif/common-hal/busio/SPI.c msgid "SPI configuration failed" -msgstr "" +msgstr "Сбой конфигурации SPI" #: ports/stm/common-hal/busio/SPI.c msgid "SPI init error" -msgstr "" +msgstr "Ошибка инициализации SPI" #: ports/raspberrypi/common-hal/busio/SPI.c msgid "SPI peripheral in use" -msgstr "" +msgstr "Используемое периферийное устройство SPI" #: ports/stm/common-hal/busio/SPI.c msgid "SPI re-init" -msgstr "" +msgstr "Повторная инициализация SPI" #: shared-bindings/is31fl3741/FrameBuffer.c msgid "Scale dimensions must divide by 3" -msgstr "" +msgstr "Размеры шкалы необходимо разделить на 3" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Scan already in progress. Stop with stop_scan." -msgstr "" +msgstr "Сканирование уже выполняется. Остановитесь на stop_scan." #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" -msgstr "" +msgstr "Используемый сериализатор" #: shared-bindings/ssl/SSLContext.c msgid "Server side context cannot have hostname" -msgstr "" +msgstr "Контекст на стороне сервера не может иметь имя хоста" #: ports/cxd56/common-hal/camera/Camera.c msgid "Size not supported" -msgstr "" +msgstr "Размер не поддерживается" #: shared-bindings/alarm/SleepMemory.c shared-bindings/memorymap/AddressRange.c #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." -msgstr "" +msgstr "Нарежьте и оцените разную длину." #: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c #: shared-bindings/displayio/TileGrid.c #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c msgid "Slices not supported" -msgstr "" +msgstr "Фрагменты не поддерживаются" #: ports/espressif/common-hal/socketpool/SocketPool.c #: ports/raspberrypi/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" -msgstr "" +msgstr "Socket Бассейн можно использовать только с Wifi. радио" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" -msgstr "" +msgstr "Исходный и конечный буферы должны иметь одинаковую длину" #: shared-bindings/paralleldisplay/ParallelBus.c msgid "Specify exactly one of data0 or data_pins" @@ -2010,35 +2011,37 @@ msgstr "Укажите точно один из data0 или data_pins" #: extmod/modure.c msgid "Splitting with sub-captures" -msgstr "" +msgstr "Разделение с помощью субзахватов" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Stereo left must be on PWM channel A" -msgstr "" +msgstr "Стерео слева должно быть на PWM-канале A" #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Stereo right must be on PWM channel B" -msgstr "" +msgstr "Стерео справа должно быть на PWM-канале B" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" -msgstr "" +msgstr "Поставьте один из monotonic_time или epoch_time" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" -msgstr "" +msgstr "Системная запись должна быть gnss. Спутниковая система" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Temperature read timed out" -msgstr "" +msgstr "Истекло время ожидания считывания температуры" #: supervisor/shared/safe_mode.c msgid "The `microcontroller` module was used to boot into safe mode." msgstr "" +"Модуль «микроконтроллер» был использован для загрузки в безопасный режим." #: py/obj.c msgid "The above exception was the direct cause of the following exception:" msgstr "" +"Вышеупомянутое исключение является прямой причиной следующего исключения:" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2046,27 +2049,27 @@ msgstr "Длина rgb_pins должна быть 6, 12, 18, 24 или 30" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "" +msgstr "bits_per_sample образца не совпадает с смесителя" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's channel count does not match the mixer's" -msgstr "" +msgstr "Количество каналов образца не совпадает с количеством каналов микшера" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's sample rate does not match the mixer's" -msgstr "" +msgstr "Частота дискретизации образца не совпадает с частотой микшера" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's signedness does not match the mixer's" -msgstr "" +msgstr "Частота дискретизации образца не совпадает с частотой микшера" #: supervisor/shared/safe_mode.c msgid "Third-party firmware fatal error." -msgstr "" +msgstr "Неустранимая ошибка прошивки стороннего производителя." #: shared-module/imagecapture/ParallelImageCapture.c msgid "This microcontroller does not support continuous capture." -msgstr "" +msgstr "Этот микроконтроллер не поддерживает непрерывный захват." #: shared-module/paralleldisplay/ParallelBus.c msgid "" @@ -2078,309 +2081,315 @@ msgstr "" #: shared-bindings/displayio/TileGrid.c msgid "Tile height must exactly divide bitmap height" -msgstr "" +msgstr "Высота фрагмента должна в точности делить высоту растрового изображения" #: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c msgid "Tile index out of bounds" -msgstr "" +msgstr "Выход индекса плитки за пределы" #: shared-bindings/displayio/TileGrid.c msgid "Tile width must exactly divide bitmap width" -msgstr "" +msgstr "Ширина плитки должна точно делить ширину растрового изображения" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Time is in the past." -msgstr "" +msgstr "Время осталось в прошлом." #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c #, c-format msgid "Timeout is too long: Maximum timeout length is %d seconds" -msgstr "" +msgstr "Таймаут слишком длинный: максимальная длина таймаута %d секунд" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" -msgstr "" +msgstr "Слишком много каналов в выборке" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." -msgstr "" +msgstr "Слишком много каналов в выборке" #: shared-module/displayio/__init__.c msgid "Too many display busses; forgot displayio.release_displays() ?" -msgstr "" +msgstr "Слишком много дисплеев; забыли Displayio.release_displays()?" #: shared-module/displayio/__init__.c msgid "Too many displays" -msgstr "" +msgstr "Слишком много дисплеев" #: ports/espressif/common-hal/_bleio/PacketBuffer.c #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Total data to write is larger than %q" -msgstr "" +msgstr "Общий объем записываемых данных превышает %q" #: ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.c #: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c #: ports/stm/common-hal/alarm/touch/TouchAlarm.c msgid "Touch alarms not available" -msgstr "" +msgstr "Сенсорные сигналы тревоги недоступны" #: py/obj.c msgid "Traceback (most recent call last):\n" -msgstr "" +msgstr "Трассировка (последний вызов):\n" #: shared-bindings/time/__init__.c msgid "Tuple or struct_time argument required" -msgstr "" +msgstr "Требуется кортеж или struct_time аргумент" #: ports/stm/common-hal/busio/UART.c msgid "UART de-init" -msgstr "" +msgstr "Деинициализация UART" #: ports/cxd56/common-hal/busio/UART.c ports/espressif/common-hal/busio/UART.c #: ports/stm/common-hal/busio/UART.c msgid "UART init" -msgstr "" +msgstr "Инициализация UART" #: ports/raspberrypi/common-hal/busio/UART.c msgid "UART peripheral in use" -msgstr "" +msgstr "Используемое периферийное устройство UART" #: ports/stm/common-hal/busio/UART.c msgid "UART re-init" -msgstr "" +msgstr "Повторная инициализация UART" #: ports/stm/common-hal/busio/UART.c msgid "UART write" -msgstr "" +msgstr "Запись UART" #: main.c msgid "UID:" -msgstr "" +msgstr "UID:" #: shared-module/usb_hid/Device.c msgid "USB busy" -msgstr "" +msgstr "USB занят" #: supervisor/shared/safe_mode.c msgid "USB devices need more endpoints than are available." -msgstr "" +msgstr "USB-устройствам требуется больше конечных точек, чем доступно." #: supervisor/shared/safe_mode.c msgid "USB devices specify too many interface names." -msgstr "" +msgstr "USB-устройства указывают слишком много имен интерфейсов." #: shared-module/usb_hid/Device.c msgid "USB error" -msgstr "" +msgstr "Ошибка USB" #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" -msgstr "" +msgstr "Целое значение UUID должно быть равно 0-0xffff" #: shared-bindings/_bleio/UUID.c msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" -msgstr "" +msgstr "UUID строка не 'xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxx \"" #: shared-bindings/_bleio/UUID.c msgid "UUID value is not str, int or byte buffer" -msgstr "" +msgstr "Значение UUID не является str, int или байтовым буфером" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Unable to allocate buffers for signed conversion" -msgstr "" +msgstr "Не удается выделить буферы для подписанного преобразования" #: supervisor/shared/safe_mode.c msgid "Unable to allocate the heap." -msgstr "" +msgstr "Невозможно выделить кучу." #: ports/espressif/common-hal/analogbufio/BufferedIn.c #, c-format msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" +msgstr "Невозможно настроить контроллер ADC DMA, ErrorCode:%d" #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" -msgstr "" +msgstr "Не удается создать блокировку" #: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" -msgstr "" +msgstr "Не удается найти дисплей I2C в %x" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Unable to find free GCLK" -msgstr "" +msgstr "Не удается найти бесплатный GCLK" #: py/parse.c msgid "Unable to init parser" -msgstr "" +msgstr "Не удается инициировать синтаксический анализатор" #: ports/espressif/common-hal/analogbufio/BufferedIn.c #, c-format msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" +msgstr "Не удается инициализировать контроллер ADC DMA, ErrorCode:%d" #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" -msgstr "" +msgstr "Не удается прочитать данные цветовой палитры" #: ports/espressif/common-hal/analogbufio/BufferedIn.c #, c-format msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" +msgstr "Не удается запустить контроллер ADC DMA, код ошибки:%d" #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" -msgstr "" +msgstr "Не удается запустить запрос mDNS" #: shared-bindings/memorymap/AddressRange.c msgid "Unable to write to address." -msgstr "" +msgstr "Невозможно написать на адрес." #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." -msgstr "" +msgstr "Невозможно выполнить запись в nvm." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." -msgstr "" +msgstr "Не удается написать sleep_memory." #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" -msgstr "" +msgstr "Неожиданный тип nrfx uuid" #: ports/espressif/common-hal/ssl/SSLSocket.c #, c-format msgid "Unhandled ESP TLS error %d %d %x %d" -msgstr "" +msgstr "Необработанная ошибка ESP TLS %d %d %x %d" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format msgid "Unknown BLE error at %s:%d: %d" -msgstr "" +msgstr "Неизвестная ошибка BLE в %s:%d: %d" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format msgid "Unknown BLE error: %d" -msgstr "" +msgstr "Неизвестная ошибка BLE: %d" #: ports/raspberrypi/common-hal/wifi/__init__.c #, c-format msgid "Unknown error code %d" -msgstr "" +msgstr "Неизвестный код ошибки %d" #: shared-bindings/wifi/Radio.c #, c-format msgid "Unknown failure %d" -msgstr "" +msgstr "Неизвестный сбой %d" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown gatt error: 0x%04x" -msgstr "" +msgstr "Неизвестная ошибка gatt: 0x%04x" #: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c #: supervisor/shared/safe_mode.c msgid "Unknown reason." -msgstr "" +msgstr "Причина неизвестна." #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown security error: 0x%04x" -msgstr "" +msgstr "Неизвестная ошибка безопасности: 0x%04x" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error at %s:%d: %d" -msgstr "" +msgstr "Неизвестная системная ошибка прошивки на %s:%d: %d" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %04x" -msgstr "" +msgstr "Неизвестная системная ошибка прошивки: %04x" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %d" -msgstr "" +msgstr "Неизвестная ошибка прошивки системы: %d" #: shared-bindings/adafruit_pixelbuf/PixelBuf.c #: shared-module/_pixelmap/PixelMap.c #, c-format msgid "Unmatched number of items on RHS (expected %d, got %d)." msgstr "" +"Непревзойдённое количество элементов на RHS (ожидаемый %d, полученный %d)." #: ports/nrf/common-hal/_bleio/__init__.c msgid "" "Unspecified issue. Can be that the pairing prompt on the other device was " "declined or ignored." msgstr "" +"Неопределенная проблема. Может случиться так, что запрос на сопряжение на " +"другом устройстве был отклонен или проигнорирован." #: shared-bindings/bitmaptools/__init__.c msgid "Unsupported colorspace" -msgstr "" +msgstr "Неподдерживаемое цветовое пространство" #: shared-module/displayio/display_core.c msgid "Unsupported display bus type" -msgstr "" +msgstr "Неподдерживаемый тип шины дисплея" #: shared-module/audiocore/WaveFile.c msgid "Unsupported format" -msgstr "" +msgstr "Неподдерживаемый формат" #: shared-bindings/hashlib/__init__.c msgid "Unsupported hash algorithm" -msgstr "" +msgstr "Неподдерживаемый алгоритм хеширования" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" -msgstr "" +msgstr "Ошибка обновления" #: ports/espressif/common-hal/_bleio/Characteristic.c #: ports/espressif/common-hal/_bleio/Descriptor.c #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" -msgstr "" +msgstr "Значение length != требуемая фиксированная длина" #: ports/espressif/common-hal/_bleio/Characteristic.c #: ports/espressif/common-hal/_bleio/Descriptor.c #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length > max_length" -msgstr "" +msgstr "Длина значения > максимальная_длина" #: ports/espressif/common-hal/espidf/__init__.c msgid "Version was invalid" -msgstr "" +msgstr "Версия была недействительной" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Voltage read timed out" -msgstr "" +msgstr "Истекло время ожидания считывания напряжения" #: main.c msgid "WARNING: Your code filename has two extensions\n" -msgstr "" +msgstr "ВНИМАНИЕ: Имя файла кода имеет два расширения\n" #: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" +"WatchDogTimer не может быть деинициализирован после установки режима RESET" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer is not currently running" -msgstr "" +msgstr "WatchDogTimer в настоящее время не запущен" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" msgstr "" +"WatchDogTimer.mode не может быть изменен после установки значения " +"WatchDogMode.RESET" #: py/builtinhelp.c #, c-format @@ -2391,551 +2400,559 @@ msgid "" "\n" "To list built-in modules type `help(\"modules\")`.\n" msgstr "" +"Добро пожаловать в Adafruit CircuitPython %s! Посетите circuitpython.org для " +"получения дополнительной информации. Чтобы получить список встроенных " +"модулей, введите 'help(\"modules\")'.\n" #: supervisor/shared/web_workflow/web_workflow.c msgid "Wi-Fi: " -msgstr "" +msgstr "Wi-Fi: " #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" -msgstr "" +msgstr "Wifi не включен" #: main.c msgid "Woken up by alarm.\n" -msgstr "" +msgstr "Проснулся по тревоге.\n" #: ports/espressif/common-hal/_bleio/PacketBuffer.c #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" -msgstr "" +msgstr "Запись не поддерживается в Характеристика" #: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h #: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h #: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "You pressed both buttons at start up." -msgstr "" +msgstr "Вы нажали обе кнопки при запуске." #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c/mpconfigboard.h #: ports/espressif/boards/m5stack_stick_c_plus/mpconfigboard.h msgid "You pressed button A at start up." -msgstr "" +msgstr "Вы нажали кнопку A при запуске." #: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h msgid "You pressed button DOWN at start up." -msgstr "" +msgstr "Вы нажали кнопку ВНИЗ при запуске." #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" -msgstr "" +msgstr "Вы нажали кнопку BOOT при запуске" #: ports/espressif/boards/adafruit_huzzah32_breakout/mpconfigboard.h msgid "You pressed the GPIO0 button at start up." -msgstr "" +msgstr "Вы нажали кнопку GPIO0 при запуске." #: ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.h msgid "You pressed the Rec button at start up." -msgstr "" +msgstr "Вы нажали кнопку «Запись» при запуске." #: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h msgid "You pressed the SW38 button at start up." -msgstr "" +msgstr "Вы нажали кнопку SW38 при запуске." #: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h msgid "You pressed the VOLUME button at start up." -msgstr "" +msgstr "Вы нажали кнопку ГРОМКОСТЬ при запуске." #: ports/espressif/boards/m5stack_atom_echo/mpconfigboard.h #: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h #: ports/espressif/boards/m5stack_atom_matrix/mpconfigboard.h #: ports/espressif/boards/m5stack_atom_u/mpconfigboard.h msgid "You pressed the central button at start up." -msgstr "" +msgstr "Вы нажали центральную кнопку при запуске." #: ports/nrf/boards/aramcon2_badge/mpconfigboard.h msgid "You pressed the left button at start up." -msgstr "" +msgstr "Вы нажали левую кнопку при запуске." #: supervisor/shared/safe_mode.c msgid "You pressed the reset button during boot." -msgstr "" +msgstr "Вы нажали кнопку сброса во время загрузки." #: supervisor/shared/micropython.c msgid "[truncated due to length]" -msgstr "" +msgstr "[отрезается по длине]" #: py/objtype.c msgid "__init__() should return None" -msgstr "" +msgstr "__init__() должен возвращать значение None" #: py/objtype.c msgid "__init__() should return None, not '%q'" -msgstr "" +msgstr "__init__() должен возвращать None, а не '%q'" #: py/objobject.c msgid "__new__ arg must be a user-type" -msgstr "" +msgstr "__new__ arg должен быть пользовательского типа" #: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c msgid "a bytes-like object is required" -msgstr "" +msgstr "Требуется байтоподобный объект" #: shared-bindings/i2ctarget/I2CTarget.c msgid "addresses is empty" -msgstr "" +msgstr "адреса пусты" #: py/compile.c msgid "annotation must be an identifier" -msgstr "" +msgstr "Аннотация должна быть идентификатором" #: extmod/ulab/code/numpy/create.c msgid "arange: cannot compute length" -msgstr "" +msgstr "arange: не удается вычислить длину" #: py/modbuiltins.c msgid "arg is an empty sequence" -msgstr "" +msgstr "arg — пустая последовательность" #: py/objobject.c msgid "arg must be user-type" -msgstr "" +msgstr "ARG должен быть пользовательского типа" #: extmod/ulab/code/numpy/numerical.c msgid "argsort argument must be an ndarray" -msgstr "" +msgstr "Аргумент argsort должен быть ndarray" #: extmod/ulab/code/numpy/numerical.c msgid "argsort is not implemented for flattened arrays" -msgstr "" +msgstr "argsort не реализован для сведенных массивов" #: py/runtime.c shared-bindings/supervisor/__init__.c msgid "argument has wrong type" -msgstr "" +msgstr "аргумент имеет неправильный тип" #: py/compile.c msgid "argument name reused" -msgstr "" +msgstr "Повторное использование имени аргумента" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c msgid "argument num/types mismatch" -msgstr "" +msgstr "Аргумент Несоответствие числа/типов" #: py/runtime.c msgid "argument should be a '%q' not a '%q'" -msgstr "" +msgstr "аргумент должен быть '%q', а не '%q'" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c msgid "arguments must be ndarrays" -msgstr "" +msgstr "Аргументы должны быть ndarrays" #: extmod/ulab/code/ndarray.c msgid "array and index length must be equal" -msgstr "" +msgstr "Длина массива и индекса должна быть равна" #: extmod/ulab/code/numpy/io/io.c msgid "array has too many dimensions" -msgstr "" +msgstr "Массив имеет слишком много измерений" #: extmod/ulab/code/ndarray.c msgid "array is too big" -msgstr "" +msgstr "массив слишком велик" #: py/objarray.c shared-bindings/alarm/SleepMemory.c #: shared-bindings/memorymap/AddressRange.c shared-bindings/nvm/ByteArray.c msgid "array/bytes required on right side" -msgstr "" +msgstr "массив/байты, необходимые справа" #: py/asmxtensa.c msgid "asm overflow" -msgstr "" +msgstr "Переполнение ASM" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" -msgstr "" +msgstr "Попытка получить (arg)min/(arg)max пустой последовательности" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "" +msgstr "Попытка получить (arg)min/(arg)max пустой последовательности" #: py/objstr.c msgid "attributes not supported yet" -msgstr "" +msgstr "Атрибуты пока не поддерживаются" #: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" -msgstr "" +msgstr "Ось выходит за пределы" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" -msgstr "" +msgstr "ось должна иметь значение None или целое число" #: extmod/ulab/code/numpy/numerical.c msgid "axis too long" -msgstr "" +msgstr "Слишком длинная ось" #: shared-bindings/bitmaptools/__init__.c msgid "background value out of range of target" -msgstr "" +msgstr "Фоновое значение вне диапазона цели" #: py/builtinevex.c msgid "bad compile mode" -msgstr "" +msgstr "Неверный режим компиляции" #: py/objstr.c msgid "bad conversion specifier" -msgstr "" +msgstr "Неверный спецификатор преобразования" #: py/objstr.c msgid "bad format string" -msgstr "" +msgstr "Строка неверного формата" #: py/binary.c py/objarray.c msgid "bad typecode" -msgstr "" +msgstr "Неверный шрифт" #: py/emitnative.c msgid "binary op %q not implemented" -msgstr "" +msgstr "Двоичный op %q не реализован" #: shared-bindings/bitmaptools/__init__.c msgid "bitmap sizes must match" -msgstr "" +msgstr "Размеры растровых изображений должны совпадать" #: extmod/modurandom.c msgid "bits must be 32 or less" -msgstr "" +msgstr "биты должны быть 32 или менее" #: shared-bindings/audiomixer/Mixer.c msgid "bits_per_sample must be 8 or 16" -msgstr "" +msgstr "bits_per_sample должно быть 8 или 16" #: py/emitinlinethumb.c msgid "branch not in range" -msgstr "" +msgstr "Ветвь не в пределах досягаемости" #: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" -msgstr "" +msgstr "Размер буфера меньше запрошенного" #: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" -msgstr "" +msgstr "Размер буфера должен быть кратен размеру элемента" #: shared-module/struct/__init__.c msgid "buffer size must match format" -msgstr "" +msgstr "Размер буфера должен соответствовать формату" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "buffer slices must be of equal length" -msgstr "" +msgstr "Буферные фрагменты должны быть одинаковой длины" #: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" -msgstr "" +msgstr "Слишком маленький буфер" #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "buffer too small for requested bytes" -msgstr "" +msgstr "Слишком маленький буфер для запрашиваемых байтов" #: py/emitbc.c msgid "bytecode overflow" -msgstr "" +msgstr "Переполнение байт-кода" #: py/objarray.c msgid "bytes length not a multiple of item size" -msgstr "" +msgstr "длина байтов, не кратная размеру элемента" #: py/objstr.c msgid "bytes value out of range" -msgstr "" +msgstr "Значение байтов вне диапазона" #: ports/atmel-samd/bindings/samd/Clock.c msgid "calibration is out of range" -msgstr "" +msgstr "Калибровка выходит за пределы допустимого диапазона" #: ports/atmel-samd/bindings/samd/Clock.c msgid "calibration is read only" -msgstr "" +msgstr "Калибровка доступна только для чтения" #: shared-module/vectorio/Circle.c shared-module/vectorio/Polygon.c #: shared-module/vectorio/Rectangle.c msgid "can only have one parent" -msgstr "" +msgstr "может иметь только одного родителя" #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" -msgstr "" +msgstr "может иметь только до 4 параметров для сборки большого пальца" #: py/emitinlinextensa.c msgid "can only have up to 4 parameters to Xtensa assembly" -msgstr "" +msgstr "может иметь только до 4 параметров для сборки Xtensa" #: extmod/ulab/code/ndarray.c msgid "can only specify one unknown dimension" -msgstr "" +msgstr "Можно указать только одно неизвестное измерение" #: py/objtype.c msgid "can't add special method to already-subclassed class" -msgstr "" +msgstr "Не удается добавить специальный метод к уже имеющемуся подклассу классу" #: py/compile.c msgid "can't assign to expression" -msgstr "" +msgstr "Не удается назначить выражение" #: extmod/moduasyncio.c msgid "can't cancel self" -msgstr "" +msgstr "Не могу отменить себя" #: py/objint.c py/runtime.c shared-module/adafruit_pixelbuf/PixelBuf.c msgid "can't convert %q to %q" -msgstr "" +msgstr "Не удается преобразовать %q в %q" #: py/obj.c #, c-format msgid "can't convert %s to complex" -msgstr "" +msgstr "не может преобразовать %s в сложный" #: py/obj.c #, c-format msgid "can't convert %s to float" -msgstr "" +msgstr "Не удается преобразовать %s в float" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" -msgstr "" +msgstr "не может конвертировать «%q» в% q косвенно" #: extmod/ulab/code/numpy/vector.c msgid "can't convert complex to float" -msgstr "" +msgstr "Не может преобразовать сложный в плавающий" #: py/obj.c msgid "can't convert to complex" -msgstr "" +msgstr "не может быть преобразован в сложный" #: py/obj.c msgid "can't convert to float" -msgstr "" +msgstr "Не удается преобразовать в float" #: py/runtime.c msgid "can't convert to int" -msgstr "" +msgstr "Не удается преобразовать в int" #: py/objstr.c msgid "can't convert to str implicitly" -msgstr "" +msgstr "не может превратиться в полосу неявно" #: py/compile.c msgid "can't declare nonlocal in outer code" -msgstr "" +msgstr "не может объявить нелокальный во внешнем коде" #: py/compile.c msgid "can't delete expression" -msgstr "" +msgstr "Не удается удалить выражение" #: py/emitnative.c msgid "can't do binary op between '%q' and '%q'" -msgstr "" +msgstr "Не могу выполнить двоичную операцию между '%q' и '%q'" #: py/objcomplex.c msgid "can't do truncated division of a complex number" -msgstr "" +msgstr "Не могу сделать усеченное деление комплексного числа" #: py/emitnative.c msgid "can't implicitly convert '%q' to 'bool'" -msgstr "" +msgstr "не может неявно преобразовать '%q' в 'bool'" #: py/emitnative.c msgid "can't load from '%q'" -msgstr "" +msgstr "Не удается загрузить из '%q'" #: py/emitnative.c msgid "can't load with '%q' index" -msgstr "" +msgstr "Не удается загрузить с индексом '%q'" #: py/builtinimport.c msgid "can't perform relative import" -msgstr "" +msgstr "Не удается выполнить относительный импорт" #: py/objgenerator.c msgid "can't send non-None value to a just-started generator" msgstr "" +"не может отправить значение, отличное от None, только что запущенному " +"генератору" #: shared-module/sdcardio/SDCard.c msgid "can't set 512 block size" -msgstr "" +msgstr "Не удается установить размер блока 512" #: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" -msgstr "" +msgstr "Не удается установить атрибут" #: py/runtime.c shared-bindings/supervisor/Runtime.c msgid "can't set attribute '%q'" -msgstr "" +msgstr "Не удается установить атрибут" #: py/emitnative.c msgid "can't store '%q'" -msgstr "" +msgstr "Не удается сохранить '%q'" #: py/emitnative.c msgid "can't store to '%q'" -msgstr "" +msgstr "Не удается сохранить '%q'" #: py/emitnative.c msgid "can't store with '%q' index" -msgstr "" +msgstr "не может хранить с индексом%q" #: py/objstr.c msgid "" "can't switch from automatic field numbering to manual field specification" msgstr "" +"Не удается переключиться с автоматической нумерации полей на ручную " +"спецификацию полей" #: py/objstr.c msgid "" "can't switch from manual field specification to automatic field numbering" -msgstr "" +msgstr "не может переключаться с ручного поля на автоматическую нумерацию поля" #: extmod/moduasyncio.c msgid "can't wait" -msgstr "" +msgstr "не может ждать" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" -msgstr "" +msgstr "Не удается назначить новую фигуру" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" -msgstr "" +msgstr "Не удается привести выходные данные с помощью правила приведения" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex to dtype" -msgstr "" +msgstr "Не удается преобразовать complex в dtype" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex type" -msgstr "" +msgstr "Не удается преобразовать сложный тип" #: py/objtype.c msgid "cannot create '%q' instances" -msgstr "" +msgstr "Не удается создать экземпляры '%q'" #: py/objtype.c msgid "cannot create instance" -msgstr "" +msgstr "Не удается создать экземпляр" #: extmod/ulab/code/ndarray.c msgid "cannot delete array elements" -msgstr "" +msgstr "Не удается удалить элементы массива" #: py/runtime.c msgid "cannot import name %q" -msgstr "" +msgstr "Не удается импортировать имя %Q" #: extmod/ulab/code/ndarray.c msgid "cannot reshape array" -msgstr "" +msgstr "Не удается изменить форму массива" #: extmod/moductypes.c msgid "cannot unambiguously get sizeof scalar" -msgstr "" +msgstr "не может однозначно получить размер скаляра" #: py/emitnative.c msgid "casting" -msgstr "" +msgstr "кастинг" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "channel re-init" -msgstr "" +msgstr "Реинициализация канала" #: shared-bindings/_stage/Text.c msgid "chars buffer too small" -msgstr "" +msgstr "Слишком маленький буфер символов" #: py/modbuiltins.c msgid "chr() arg not in range(0x110000)" -msgstr "" +msgstr "chr() arg отсутствует в диапазоне(0x110000)" #: py/modbuiltins.c msgid "chr() arg not in range(256)" -msgstr "" +msgstr "chr() arg не в диапазоне(256)" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "" +msgstr "Точка клипа должна быть кортежом (X,Y)" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" -msgstr "" +msgstr "код вне диапазона 0~127" #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "" +msgstr "цветовой буфер должен быть 3 байта (RGB) или 4 байта (RGB + байт пэда)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a buffer, tuple, list, or int" -msgstr "" +msgstr "Цветовой буфер должен быть буфером, кортежом, списком или целым числом" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" +"цветовой буфер должен быть предплечьем или массивом типа \"b\" или \"B\"" #: shared-bindings/displayio/Palette.c msgid "color must be between 0x000000 and 0xffffff" -msgstr "" +msgstr "Цвет должен быть от 0x000000 до 0xffffff" #: py/emitnative.c msgid "comparison of int and uint" -msgstr "" +msgstr "сравнение int и uint" #: py/objfloat.c py/parsenum.c msgid "complex values not supported" -msgstr "" +msgstr "Комплексные значения не поддерживаются" #: extmod/moduzlib.c msgid "compression header" -msgstr "" +msgstr "Заголовок сжатия" #: py/emitnative.c msgid "conversion to object" -msgstr "" +msgstr "Преобразование в объект" #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must be linear arrays" -msgstr "" +msgstr "Аргументы свертки должны быть линейными массивами" #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must be ndarrays" -msgstr "" +msgstr "Аргументы свертки должны быть линейными массивами" #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must not be empty" -msgstr "" +msgstr "Аргументы convolve не должны быть пустыми" #: extmod/ulab/code/numpy/io/io.c msgid "corrupted file" -msgstr "" +msgstr "Поврежденный файл" #: extmod/ulab/code/numpy/poly.c msgid "could not invert Vandermonde matrix" -msgstr "" +msgstr "не удалось инвертировать матрицу Вандермонда" #: shared-module/sdcardio/SDCard.c msgid "couldn't determine SD card version" -msgstr "" +msgstr "Не удалось определить версию SD-карты" #: extmod/ulab/code/numpy/numerical.c msgid "cross is defined for 1D arrays of length 3" -msgstr "" +msgstr "крест определяется для 1D массивов длины 3" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be iterable" -msgstr "" +msgstr "Данные должны быть итерируемыми" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "data must be of equal length" -msgstr "" +msgstr "Данные должны быть одинаковой длины" #: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c #, c-format @@ -2944,986 +2961,1000 @@ msgstr "data-пин #%d уже используется" #: extmod/ulab/code/ndarray.c msgid "data type not understood" -msgstr "" +msgstr "Тип данных не понят" #: py/parsenum.c msgid "decimal numbers not supported" -msgstr "" +msgstr "Десятичные числа не поддерживаются" #: py/compile.c msgid "default 'except' must be last" -msgstr "" +msgstr "по умолчанию \"за исключением\" должно быть последним" #: shared-bindings/msgpack/__init__.c msgid "default is not a function" -msgstr "" +msgstr "По умолчанию не является функцией" #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" +"буфер назначения должен быть байтером или массивом типа \"B\" для " +"бит_глубины = 8" #: shared-bindings/audiobusio/PDMIn.c msgid "destination buffer must be an array of type 'H' for bit_depth = 16" -msgstr "" +msgstr "буфер назначения должен быть массивом типа 'H' для bit_depth = 16" #: py/objdict.c msgid "dict update sequence has wrong length" -msgstr "" +msgstr "последовательность обновления дикта имеет неправильную длину" #: extmod/ulab/code/numpy/numerical.c msgid "diff argument must be an ndarray" -msgstr "" +msgstr "дифф-аргумент, должно быть, ndarray" #: extmod/ulab/code/numpy/numerical.c msgid "differentiation order out of range" -msgstr "" +msgstr "Порядок дифференциации вне диапазона" #: extmod/ulab/code/numpy/transform.c msgid "dimensions do not match" -msgstr "" +msgstr "Размеры не совпадают" #: py/emitnative.c msgid "div/mod not implemented for uint" -msgstr "" +msgstr "div/mod не реализован для uint" #: extmod/ulab/code/numpy/create.c msgid "divide by zero" -msgstr "" +msgstr "Делим на ноль" #: py/runtime.c msgid "division by zero" -msgstr "" +msgstr "Деление на ноль" #: extmod/ulab/code/numpy/vector.c msgid "dtype must be float, or complex" -msgstr "" +msgstr "dtype должен быть поплавком или сложным" #: py/objdeque.c msgid "empty" -msgstr "" +msgstr "пусто" #: extmod/ulab/code/numpy/io/io.c msgid "empty file" -msgstr "" +msgstr "пустой файл" #: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c msgid "empty heap" -msgstr "" +msgstr "пустая куча" #: py/objstr.c msgid "empty separator" -msgstr "" +msgstr "пустой сепаратор" #: shared-bindings/random/__init__.c msgid "empty sequence" -msgstr "" +msgstr "пустая последовательность" #: py/objstr.c msgid "end of format while looking for conversion specifier" -msgstr "" +msgstr "конец формата при поиске спецификатора преобразования" #: shared-bindings/alarm/time/TimeAlarm.c msgid "epoch_time not supported on this board" -msgstr "" +msgstr "epoch_time не поддерживается на этой плате" #: ports/nrf/common-hal/busio/UART.c #, c-format msgid "error = 0x%08lX" -msgstr "" +msgstr "ошибка = 0x%08lX" #: ports/espressif/common-hal/espcamera/Camera.c msgid "" "espcamera.Camera requires reserved PSRAM to be configured. See the " "documentation for instructions." msgstr "" +"Эспкамера. Камера требует настройки зарезервированной PSRAM. Инструкции см. " +"в документации." #: py/runtime.c msgid "exceptions must derive from BaseException" -msgstr "" +msgstr "исключения должны быть производными от BaseException" #: py/objstr.c msgid "expected ':' after format specifier" -msgstr "" +msgstr "Ожидаемый ':' после спецификатора формата" #: py/obj.c msgid "expected tuple/list" -msgstr "" +msgstr "Ожидаемый кортеж/список" #: py/modthread.c msgid "expecting a dict for keyword args" -msgstr "" +msgstr "Ожидание дикта для args ключевых слов" #: py/compile.c msgid "expecting an assembler instruction" -msgstr "" +msgstr "Ожидание инструкции ассемблера" #: py/compile.c msgid "expecting just a value for set" -msgstr "" +msgstr "ожидание только значения для набора" #: py/compile.c msgid "expecting key:value for dict" -msgstr "" +msgstr "ожидание ключа: значение для дикта" #: shared-bindings/msgpack/__init__.c msgid "ext_hook is not a function" -msgstr "" +msgstr "ext_hook не является функцией" #: py/argcheck.c msgid "extra keyword arguments given" -msgstr "" +msgstr "Приведены дополнительные аргументы ключевых слов" #: py/argcheck.c msgid "extra positional arguments given" -msgstr "" +msgstr "Приведены дополнительные позиционные аргументы" #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c #: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/gifio/OnDiskGif.c #: shared-bindings/synthio/__init__.c shared-module/gifio/GifWriter.c msgid "file must be a file opened in byte mode" -msgstr "" +msgstr "Файл должен быть файлом, открытым в байтовом режиме" #: shared-bindings/traceback/__init__.c msgid "file write is not available" -msgstr "" +msgstr "Запись файлов недоступна" #: shared-bindings/storage/__init__.c msgid "filesystem must provide mount method" -msgstr "" +msgstr "Файловая система должна предусматривать метод монтирования" #: extmod/ulab/code/numpy/vector.c msgid "first argument must be a callable" -msgstr "" +msgstr "Первый аргумент должен быть вызываемым" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "first argument must be a function" -msgstr "" +msgstr "первый аргумент должен быть функцией" #: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" -msgstr "" +msgstr "Первым аргументом должен быть кортеж ндарреев" #: extmod/ulab/code/numpy/transform.c extmod/ulab/code/numpy/vector.c msgid "first argument must be an ndarray" -msgstr "" +msgstr "Первым аргументом должен быть Ндаррей" #: py/objtype.c msgid "first argument to super() must be type" -msgstr "" +msgstr "первый аргумент супер() должен быть типом" #: extmod/ulab/code/scipy/linalg/linalg.c msgid "first two arguments must be ndarrays" -msgstr "" +msgstr "первые два аргумента должны быть ndarrays" #: extmod/ulab/code/ndarray.c msgid "flattening order must be either 'C', or 'F'" -msgstr "" +msgstr "порядок сглаживания должен быть либо 'C', либо 'F'" #: extmod/ulab/code/numpy/numerical.c msgid "flip argument must be an ndarray" -msgstr "" +msgstr "Аргумент flip должен быть ndarray" #: py/objint.c msgid "float too big" -msgstr "" +msgstr "Поплавок слишком большой" #: py/nativeglue.c msgid "float unsupported" -msgstr "" +msgstr "Плавающий без поддержки" #: shared-bindings/_stage/Text.c msgid "font must be 2048 bytes long" -msgstr "" +msgstr "Длина шрифта должна составлять 2048 байт" #: py/objstr.c msgid "format requires a dict" -msgstr "" +msgstr "Формат требует диктата" #: py/objdeque.c msgid "full" -msgstr "" +msgstr "полный" #: py/argcheck.c msgid "function doesn't take keyword arguments" -msgstr "" +msgstr "функция не принимает аргументы ключевых слов" #: py/argcheck.c #, c-format msgid "function expected at most %d arguments, got %d" -msgstr "" +msgstr "функция, ожидаемая в большинстве %d аргументов, получила %d" #: py/bc.c py/objnamedtuple.c msgid "function got multiple values for argument '%q'" -msgstr "" +msgstr "функция имеет несколько значений для аргументации%q \"" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "function has the same sign at the ends of interval" -msgstr "" +msgstr "функция имеет один и тот же знак в конце интервала" #: extmod/ulab/code/ndarray.c msgid "function is defined for ndarrays only" -msgstr "" +msgstr "функция определяется только для ndarrays" #: extmod/ulab/code/numpy/carray/carray.c msgid "function is implemented for ndarrays only" -msgstr "" +msgstr "функция реализована только для ndarrays" #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" -msgstr "" +msgstr "Функция отсутствует %d обязательные позиционные аргументы" #: py/bc.c msgid "function missing keyword-only argument" -msgstr "" +msgstr "функция отсутствует аргумент только по ключевому слову" #: py/bc.c msgid "function missing required keyword argument '%q'" -msgstr "" +msgstr "В функции отсутствует обязательный аргумент ключевого слова '%q'" #: py/bc.c #, c-format msgid "function missing required positional argument #%d" -msgstr "" +msgstr "В функции отсутствует обязательный позиционный аргумент #%d" #: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c #, c-format msgid "function takes %d positional arguments but %d were given" -msgstr "" +msgstr "функция принимает %d позиционные аргументы, но %d были заданы" #: shared-bindings/time/__init__.c msgid "function takes exactly 9 arguments" -msgstr "" +msgstr "функция принимает ровно 9 аргументов" #: py/objgenerator.c msgid "generator already executing" -msgstr "" +msgstr "генератор уже работает" #: py/objgenerator.c msgid "generator ignored GeneratorExit" -msgstr "" +msgstr "генератор проигнорировал Выход" #: py/objgenerator.c py/runtime.c msgid "generator raised StopIteration" -msgstr "" +msgstr "генератор поднял StopIteration" #: shared-bindings/_stage/Layer.c msgid "graphic must be 2048 bytes long" -msgstr "" +msgstr "Длина рисунка должна составлять 2048 байт" #: extmod/moduhashlib.c msgid "hash is final" -msgstr "" +msgstr "хэш является окончательным" #: extmod/moduheapq.c msgid "heap must be a list" -msgstr "" +msgstr "куча должна быть списком;" #: py/compile.c msgid "identifier redefined as global" -msgstr "" +msgstr "идентификатор переопределен как глобальный" #: py/compile.c msgid "identifier redefined as nonlocal" -msgstr "" +msgstr "идентификатор переопределен как нелокальный" #: py/compile.c msgid "import * not at module level" -msgstr "" +msgstr "Импорт * не на уровне модуля" #: py/persistentcode.c msgid "incompatible .mpy arch" -msgstr "" +msgstr "несовместимые .mpy арка" #: py/persistentcode.c msgid "incompatible .mpy file" -msgstr "" +msgstr "несовместимый файл .mpy" #: py/objstr.c msgid "incomplete format" -msgstr "" +msgstr "Неполный формат" #: py/objstr.c msgid "incomplete format key" -msgstr "" +msgstr "Неполный ключ форматирования" #: extmod/modubinascii.c msgid "incorrect padding" -msgstr "" +msgstr "Неправильная набивка" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/transform.c msgid "index is out of bounds" -msgstr "" +msgstr "индекс выходит из границ" #: shared-bindings/_pixelmap/PixelMap.c msgid "index must be tuple or int" -msgstr "" +msgstr "Индекс должен быть кортежом или целым кортежом" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c #: ports/espressif/common-hal/pulseio/PulseIn.c #: shared-bindings/bitmaptools/__init__.c msgid "index out of range" -msgstr "" +msgstr "индекс вне диапазона" #: py/obj.c msgid "indices must be integers" -msgstr "" +msgstr "индексы должны быть целыми числами" #: extmod/ulab/code/ndarray.c msgid "indices must be integers, slices, or Boolean lists" -msgstr "" +msgstr "индексы должны быть целыми числами, срезами или логическими списками" #: ports/espressif/common-hal/busio/I2C.c msgid "init I2C" -msgstr "" +msgstr "инициализация I2C" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "initial values must be iterable" -msgstr "" +msgstr "Начальные значения должны быть итерируемыми" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c msgid "initial_value length is wrong" -msgstr "" +msgstr "длина первоначального_значения ошибочна" #: py/compile.c msgid "inline assembler must be a function" -msgstr "" +msgstr "Встроенный ассемблер должен быть функцией" #: extmod/ulab/code/numpy/vector.c msgid "input and output dimensions differ" -msgstr "" +msgstr "Входные и выходные размеры различаются" #: extmod/ulab/code/numpy/vector.c msgid "input and output shapes differ" -msgstr "" +msgstr "Входные и выходные формы различаются" #: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" -msgstr "" +msgstr "Входной аргумент должен быть целым числом, кортежом или списком" #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "input array length must be power of 2" -msgstr "" +msgstr "Длина входного массива должна быть равна степени 2" #: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" -msgstr "" +msgstr "Входные массивы несовместимы" #: extmod/ulab/code/numpy/poly.c msgid "input data must be an iterable" -msgstr "" +msgstr "Входные данные должны быть итерируемыми" #: extmod/ulab/code/numpy/vector.c msgid "input dtype must be float or complex" -msgstr "" +msgstr "Входной тип dtype должен быть плавающим или сложным" #: extmod/ulab/code/numpy/poly.c msgid "input is not iterable" -msgstr "" +msgstr "Ввод не является итерируемым" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" -msgstr "" +msgstr "Входная матрица асимметрична" #: extmod/ulab/code/numpy/linalg/linalg.c #: extmod/ulab/code/scipy/linalg/linalg.c msgid "input matrix is singular" -msgstr "" +msgstr "Входная матрица является сингулярной" #: extmod/ulab/code/numpy/create.c msgid "input must be 1- or 2-d" -msgstr "" +msgstr "Вход должен быть 1- или 2-D" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be a 1D ndarray" -msgstr "" +msgstr "входные данные должны быть 1D ndarray" #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" -msgstr "" +msgstr "Входные данные должны быть плотным ndarray" #: extmod/ulab/code/user/user.c msgid "input must be an ndarray" -msgstr "" +msgstr "Входные данные должны быть ndarray" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be an ndarray, or a scalar" msgstr "" +"Входные данные должны быть входными данными, должны быть ndarray или " +"скалярными" #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" -msgstr "" +msgstr "Входные данные должны быть одномерными" #: extmod/ulab/code/ulab_tools.c msgid "input must be square matrix" -msgstr "" +msgstr "Входные данные должны быть квадратной матрицей" #: extmod/ulab/code/numpy/numerical.c msgid "input must be tuple, list, range, or ndarray" -msgstr "" +msgstr "Входные данные должны быть кортежом, списком, диапазоном или ndarray" #: extmod/ulab/code/numpy/poly.c msgid "input vectors must be of equal length" -msgstr "" +msgstr "Входные векторы должны быть одинаковой длины" #: extmod/ulab/code/numpy/approx.c msgid "interp is defined for 1D iterables of equal length" -msgstr "" +msgstr "interp определен для 1D-итераций одинаковой длины" #: shared-bindings/_bleio/Adapter.c #, c-format msgid "interval must be in range %s-%s" -msgstr "" +msgstr "Интервал должен находиться в диапазоне %S-%S" #: py/compile.c msgid "invalid architecture" -msgstr "" +msgstr "Недопустимая архитектура" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" -msgstr "" +msgstr "Недопустимые bits_per_pixel %d, должно быть, 1, 2, 4, 8, 16, 24 или 32" #: ports/raspberrypi/common-hal/ssl/SSLSocket.c msgid "invalid cert" -msgstr "" +msgstr "Неверный сертификат" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "" +msgstr "Недопустимый размер элемента %d для bits_per_pixel %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element_size %d, must be, 1, 2, or 4" -msgstr "" +msgstr "аннулированный элемент_размер %d, должен быть, 1, 2 или 4" #: shared-bindings/traceback/__init__.c msgid "invalid exception" -msgstr "" +msgstr "Недопустимое исключение" #: py/objstr.c msgid "invalid format specifier" -msgstr "" +msgstr "Недопустимый спецификатор формата" #: shared-bindings/wifi/Radio.c msgid "invalid hostname" -msgstr "" +msgstr "Недопустимое имя хоста" #: ports/raspberrypi/common-hal/ssl/SSLSocket.c msgid "invalid key" -msgstr "" +msgstr "Неверный ключ." #: py/compile.c msgid "invalid micropython decorator" -msgstr "" +msgstr "Недопустимый декоратор MicroPython" #: ports/espressif/common-hal/espcamera/Camera.c msgid "invalid setting" -msgstr "" +msgstr "Недопустимый параметр" #: shared-bindings/random/__init__.c msgid "invalid step" -msgstr "" +msgstr "недействительный шаг" #: py/compile.c py/parse.c msgid "invalid syntax" -msgstr "" +msgstr "недействительный синтаксис" #: py/parsenum.c msgid "invalid syntax for integer" -msgstr "" +msgstr "недействительный синтаксис для целых чисел" #: py/parsenum.c #, c-format msgid "invalid syntax for integer with base %d" -msgstr "" +msgstr "недействительный синтаксис для целых чисел с основанием %d" #: py/parsenum.c msgid "invalid syntax for number" -msgstr "" +msgstr "недействительный синтаксис для номера" #: py/objtype.c msgid "issubclass() arg 1 must be a class" -msgstr "" +msgstr "issubclass() arg 1 должен быть классом" #: py/objtype.c msgid "issubclass() arg 2 must be a class or a tuple of classes" -msgstr "" +msgstr "issubclass() arg 2 должен быть классом или кортежом классов" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "iterations did not converge" -msgstr "" +msgstr "итерации не сходятся" #: py/objstr.c msgid "join expects a list of str/bytes objects consistent with self object" msgstr "" +"присоединяйтесь к ожидающему список стр/байт объектов, совместимых с " +"самообъектом" #: py/argcheck.c msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" +"аргумент(ы) ключевых слов еще не реализован - вместо этого используйте " +"обычные арги" #: py/emitinlinethumb.c py/emitinlinextensa.c msgid "label '%q' not defined" -msgstr "" +msgstr "Метка '%q' не определена" #: py/compile.c msgid "label redefined" -msgstr "" +msgstr "Метка переопределена" #: py/stream.c msgid "length argument not allowed for this type" -msgstr "" +msgstr "аргумент длины не допускается для этого типа" #: shared-bindings/audiomixer/MixerVoice.c msgid "level must be between 0 and 1" -msgstr "" +msgstr "уровень должен быть между 0 и 1" #: py/objarray.c msgid "lhs and rhs should be compatible" -msgstr "" +msgstr "lhs и rhs должны быть совместимыми" #: py/emitnative.c msgid "local '%q' has type '%q' but source is '%q'" -msgstr "" +msgstr "Локальный '%q' имеет тип '%q', но источник '%q'" #: py/emitnative.c msgid "local '%q' used before type known" -msgstr "" +msgstr "местный '%q' используется перед типом" #: py/vm.c msgid "local variable referenced before assignment" -msgstr "" +msgstr "локальная переменная, на которую ссылается перед присвоением" #: ports/espressif/common-hal/canio/CAN.c msgid "loopback + silent mode not supported by peripheral" msgstr "" +"Замыкание на себя + бесшумный режим, не поддерживаемый периферийными " +"устройствами" #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "mDNS already initialized" -msgstr "" +msgstr "mDNS уже инициализирован" #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "mDNS only works with built-in WiFi" -msgstr "" +msgstr "mDNS работает только со встроенным Wi-Fi" #: py/parse.c msgid "malformed f-string" -msgstr "" +msgstr "Неправильно сформированная F-строка" #: shared-bindings/_stage/Layer.c msgid "map buffer too small" -msgstr "" +msgstr "Слишком маленький буфер карты" #: py/modmath.c shared-bindings/math/__init__.c msgid "math domain error" -msgstr "" +msgstr "Ошибка математической области" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "matrix is not positive definite" -msgstr "" +msgstr "матрица не является положительно определенной" #: ports/espressif/common-hal/_bleio/Descriptor.c #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format msgid "max_length must be 0-%d when fixed_length is %s" -msgstr "" +msgstr "max_длина должна быть 0-%d, когда фиксированная длина %s" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is " -msgstr "" +msgstr "Максимальное количество измерений составляет " #: py/runtime.c msgid "maximum recursion depth exceeded" -msgstr "" +msgstr "Превышена максимальная глубина рекурсии" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter must be > 0" -msgstr "" +msgstr "maxiter должен быть > 0" #: extmod/ulab/code/scipy/optimize/optimize.c msgid "maxiter should be > 0" -msgstr "" +msgstr "макситер должен быть > 0" #: extmod/ulab/code/numpy/numerical.c msgid "median argument must be an ndarray" -msgstr "" +msgstr "Медианный аргумент должен быть ndarray" #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" -msgstr "" +msgstr "Сбой выделения памяти, выделение %U байт" #: py/runtime.c msgid "memory allocation failed, heap is locked" -msgstr "" +msgstr "Не удалось выделить память, куча заблокирована" #: py/objarray.c msgid "memoryview: length is not a multiple of itemsize" -msgstr "" +msgstr "вид памяти: длина не является множеством элементов" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "mode must be complete, or reduced" -msgstr "" +msgstr "Режим должен быть завершенным или уменьшенным" #: py/builtinimport.c msgid "module not found" -msgstr "" +msgstr "модуль не найден" #: ports/espressif/common-hal/wifi/Monitor.c msgid "monitor init failed" -msgstr "" +msgstr "Сбой инициализации монитора" #: extmod/ulab/code/numpy/poly.c msgid "more degrees of freedom than data points" -msgstr "" +msgstr "Больше степеней свободы, чем точек данных" #: py/compile.c msgid "multiple *x in assignment" -msgstr "" +msgstr "Несколько *x в назначении" #: py/objtype.c msgid "multiple bases have instance lay-out conflict" -msgstr "" +msgstr "Несколько баз имеют конфликт расположения экземпляров" #: py/objtype.c msgid "multiple inheritance not supported" -msgstr "" +msgstr "Множественное наследование не поддерживается" #: py/emitnative.c msgid "must raise an object" -msgstr "" +msgstr "должен поднять объект" #: py/modbuiltins.c msgid "must use keyword argument for key function" -msgstr "" +msgstr "Необходимо использовать аргумент ключевого слова для ключевой функции" #: py/runtime.c msgid "name '%q' is not defined" -msgstr "" +msgstr "Имя '%q' не определено" #: py/runtime.c msgid "name not defined" -msgstr "" +msgstr "Имя не определено" #: py/asmthumb.c msgid "native method too big" -msgstr "" +msgstr "родной метод слишком большой" #: py/emitnative.c msgid "native yield" -msgstr "" +msgstr "родной урожай" #: extmod/ulab/code/ndarray.c msgid "ndarray length overflows" -msgstr "" +msgstr "Длина Ндаррея переливается" #: py/runtime.c #, c-format msgid "need more than %d values to unpack" -msgstr "" +msgstr "Для распаковки требуется более % значений %d" #: py/modmath.c msgid "negative factorial" -msgstr "" +msgstr "отрицательный факториал" #: py/objint_longlong.c py/objint_mpz.c py/runtime.c msgid "negative power with no float support" -msgstr "" +msgstr "Отрицательная мощность без поплавковой опоры" #: py/objint_mpz.c py/runtime.c msgid "negative shift count" -msgstr "" +msgstr "Количество отрицательных сдвигов" #: shared-bindings/_pixelmap/PixelMap.c msgid "nested index must be int" -msgstr "" +msgstr "вложенный индекс должен быть int" #: shared-module/sdcardio/SDCard.c msgid "no SD card" -msgstr "" +msgstr "нет SD-карты" #: py/vm.c msgid "no active exception to reraise" -msgstr "" +msgstr "Нет активного исключения для повторного создания" #: py/compile.c msgid "no binding for nonlocal found" -msgstr "" +msgstr "Привязка для нелокальных не найдена" #: shared-module/msgpack/__init__.c msgid "no default packer" -msgstr "" +msgstr "Нет упаковщика по умолчанию" #: extmod/modurandom.c msgid "no default seed" -msgstr "" +msgstr "Нет начального числа по умолчанию" #: py/builtinimport.c msgid "no module named '%q'" -msgstr "" +msgstr "Нет модуля с именем '%Q'" #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" -msgstr "" +msgstr "нет ответа с SD-карты" #: ports/espressif/common-hal/espcamera/Camera.c py/objobject.c py/runtime.c msgid "no such attribute" -msgstr "" +msgstr "нет такого атрибута" #: ports/espressif/common-hal/_bleio/Connection.c #: ports/nrf/common-hal/_bleio/Connection.c msgid "non-UUID found in service_uuids_whitelist" -msgstr "" +msgstr "неUUID найден в service_uuids_whitelist" #: py/compile.c msgid "non-default argument follows default argument" msgstr "" +"Аргумент, отличный от аргумента по умолчанию, следует за аргументом по " +"умолчанию" #: extmod/modubinascii.c msgid "non-hex digit found" -msgstr "" +msgstr "Ненайдена шестнадцатеричная цифра" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "non-zero timeout must be > 0.01" -msgstr "" +msgstr "Ненулевое время ожидания должно быть > 0,01" #: shared-bindings/_bleio/Adapter.c msgid "non-zero timeout must be >= interval" -msgstr "" +msgstr "Ненулевое время ожидания должно быть >= интервал" #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" -msgstr "" +msgstr "не 128-битный UUID" #: py/parse.c msgid "not a constant" -msgstr "" +msgstr "не константа" #: py/objstr.c msgid "not all arguments converted during string formatting" -msgstr "" +msgstr "Не все аргументы преобразуются при форматировании строки" #: py/objstr.c msgid "not enough arguments for format string" -msgstr "" +msgstr "Недостаточно аргументов для строки форматирования" #: extmod/ulab/code/numpy/carray/carray_tools.c msgid "not implemented for complex dtype" -msgstr "" +msgstr "Не реализовано для сложного DTYPE" #: extmod/ulab/code/numpy/bitwise.c msgid "not supported for input types" -msgstr "" +msgstr "Не поддерживается для типов ввода" #: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" -msgstr "" +msgstr "Количество баллов должно быть не менее 2" #: py/builtinhelp.c msgid "object " -msgstr "" +msgstr "объект " #: py/obj.c #, c-format msgid "object '%s' isn't a tuple or list" -msgstr "" +msgstr "Объект \"%S\" не является кортежом или списком" #: py/obj.c msgid "object doesn't support item assignment" -msgstr "" +msgstr "Объект не поддерживает назначение элементов" #: py/obj.c msgid "object doesn't support item deletion" -msgstr "" +msgstr "Объект не поддерживает удаление элементов" #: py/obj.c msgid "object has no len" -msgstr "" +msgstr "Объект не имеет объектива" #: py/obj.c msgid "object isn't subscriptable" -msgstr "" +msgstr "Объект не имеет индекса" #: py/runtime.c msgid "object not an iterator" -msgstr "" +msgstr "объект не итератор" #: py/objtype.c py/runtime.c msgid "object not callable" -msgstr "" +msgstr "Объект не вызывается" #: py/sequence.c shared-bindings/displayio/Group.c msgid "object not in sequence" -msgstr "" +msgstr "объект не в последовательности" #: py/runtime.c msgid "object not iterable" -msgstr "" +msgstr "Объект не итерируемый" #: py/obj.c #, c-format msgid "object of type '%s' has no len()" -msgstr "" +msgstr "объект типа «%s» не имеет len()" #: py/obj.c msgid "object with buffer protocol required" -msgstr "" +msgstr "Объект с обязательным буферным протоколом" #: extmod/modubinascii.c msgid "odd-length string" -msgstr "" +msgstr "Строка нечетной длины" #: supervisor/shared/web_workflow/web_workflow.c msgid "off" -msgstr "" +msgstr "выключить" #: extmod/ulab/code/utils/utils.c msgid "offset is too large" -msgstr "" +msgstr "Смещение слишком большое" #: shared-bindings/dualbank/__init__.c msgid "offset must be >= 0" -msgstr "" +msgstr "Смещение должно быть >= 0" #: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" -msgstr "" +msgstr "Смещение должно быть неотрицательным и не превышать длину буфера" #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" -msgstr "" +msgstr "Смещение за пределы" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" -msgstr "" +msgstr "поддерживается только bit_depth=16" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only mono is supported" -msgstr "" +msgstr "Поддерживается только моно" #: extmod/ulab/code/numpy/create.c msgid "only ndarrays can be concatenated" -msgstr "" +msgstr "Только ндарреи могут быть объединены" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only oversample=64 is supported" -msgstr "" +msgstr "поддерживается только oversample=64" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" -msgstr "" +msgstr "только образец_рейт=16000 поддерживается" #: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c #: shared-bindings/alarm/SleepMemory.c shared-bindings/memorymap/AddressRange.c #: shared-bindings/nvm/ByteArray.c msgid "only slices with step=1 (aka None) are supported" -msgstr "" +msgstr "поддерживаются только срезы с шагом = 1 (так как нет)" #: py/vm.c msgid "opcode" -msgstr "" +msgstr "код операции" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/bitwise.c #: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/vector.c msgid "operands could not be broadcast together" -msgstr "" +msgstr "Операнды не могут транслироваться вместе" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for 2D arrays only" -msgstr "" +msgstr "операция определена только для 2D-массивов" #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for ndarrays only" -msgstr "" +msgstr "Операция определена только для ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" -msgstr "" +msgstr "операция реализована только для 1D логических массивов" #: extmod/ulab/code/numpy/numerical.c msgid "operation is not implemented on ndarrays" -msgstr "" +msgstr "Операция не реализована на ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is not supported for given type" -msgstr "" +msgstr "Операция не поддерживается для данного типа" #: py/modbuiltins.c msgid "ord expects a character" -msgstr "" +msgstr "Орд ожидает персонажа" #: py/modbuiltins.c #, c-format msgid "ord() expected a character, but string of length %d found" -msgstr "" +msgstr "ord() ожидал символ, но строка длины %d найдена" #: extmod/ulab/code/utils/utils.c msgid "out array is too small" -msgstr "" +msgstr "Наш массив слишком мал" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for complex dtype" -msgstr "" +msgstr "ключевое слово не поддерживается для сложного dtype" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for function" -msgstr "" +msgstr "ключевое слово не поддерживается для функции" #: extmod/ulab/code/utils/utils.c msgid "out must be a float dense array" -msgstr "" +msgstr "Out должен быть плотным массивом с плавающей запятой" #: extmod/ulab/code/numpy/vector.c msgid "out must be an ndarray" -msgstr "" +msgstr "Входные данные должны быть ndarray" #: extmod/ulab/code/numpy/vector.c msgid "out must be of float dtype" -msgstr "" +msgstr "Выход должен быть поплавкового типа" #: shared-bindings/bitmaptools/__init__.c msgid "out of range of target" -msgstr "" +msgstr "вне досягаемости цели" #: py/objint_mpz.c msgid "overflow converting long int to machine word" -msgstr "" +msgstr "переполнение, преобразование длинного int в машинное слово" #: py/modstruct.c #, c-format msgid "pack expected %d items for packing (got %d)" -msgstr "" +msgstr "Упаковка ожидаемых %d товаров для упаковки (получил %d)" #: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c msgid "palette must be 32 bytes long" -msgstr "" +msgstr "Длина палитры должна составлять 32 байта" #: py/emitinlinextensa.c msgid "parameters must be registers in sequence a2 to a5" -msgstr "" +msgstr "Параметры должны быть регистрами в последовательности от A2 до A5" #: py/emitinlinethumb.c msgid "parameters must be registers in sequence r0 to r3" -msgstr "" +msgstr "Параметры должны быть регистрами в последовательности от R0 до R3" #: shared-bindings/bitmaptools/__init__.c msgid "pixel coordinates out of bounds" -msgstr "" +msgstr "пиксельные координаты за пределами границ" #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" -msgstr "" +msgstr "Опрос в файле недоступен в Win32" #: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" -msgstr "" +msgstr "поп из пустого PulseIn" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -3932,64 +3963,64 @@ msgstr "" #: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c #: shared-bindings/ps2io/Ps2.c msgid "pop from empty %q" -msgstr "" +msgstr "Всплывающее окно из пустого %q" #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "port must be >= 0" -msgstr "" +msgstr "порт должен быть >= 0" #: py/compile.c msgid "positional arg after **" -msgstr "" +msgstr "позиционный arg после **" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "" +msgstr "позиционный arg после ключевого слова arg" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" -msgstr "" +msgstr "3-й аргумент pow() не может быть равен 0" #: py/objint_mpz.c msgid "pow() with 3 arguments requires integers" -msgstr "" +msgstr "pow() с 3 аргументами требует целых чисел" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" -msgstr "" +msgstr "Маски вытягивания конфликтуют с масками направления" #: extmod/modutimeq.c msgid "queue overflow" -msgstr "" +msgstr "Переполнение очереди" #: py/parse.c msgid "raw f-strings are not supported" -msgstr "" +msgstr "Необработанные F-строки не поддерживаются" #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "real and imaginary parts must be of equal length" -msgstr "" +msgstr "реальные и воображаемые части должны быть одинаковой длины" #: py/builtinimport.c msgid "relative import" -msgstr "" +msgstr "Относительный импорт" #: py/obj.c #, c-format msgid "requested length %d but object has length %d" -msgstr "" +msgstr "запрашиваемая длина %d, но объект имеет длину %d" #: extmod/ulab/code/ndarray_operators.c msgid "results cannot be cast to specified type" -msgstr "" +msgstr "Результаты не могут быть приведены к указанному типу" #: py/compile.c msgid "return annotation must be an identifier" -msgstr "" +msgstr "Возвращаемая аннотация должна быть идентификатором" #: py/emitnative.c msgid "return expected '%q' but got '%q'" -msgstr "" +msgstr "Возврат ожидался '%q', но получил '%q'" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -4003,144 +4034,144 @@ msgstr "rgb_pins[%d] не находится на том же порту, что #: extmod/ulab/code/numpy/numerical.c msgid "roll argument must be an ndarray" -msgstr "" +msgstr "Аргумент roll должен быть массивом ND" #: py/objstr.c msgid "rsplit(None,n)" -msgstr "" +msgstr "rsplit(Нет;n)" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c msgid "sampling rate out of range" -msgstr "" +msgstr "Частота дискретизации выходит за пределы допустимого диапазона" #: py/modmicropython.c msgid "schedule queue full" -msgstr "" +msgstr "Расписание Очередь заполнена" #: py/builtinimport.c msgid "script compilation not supported" -msgstr "" +msgstr "Компиляция скриптов не поддерживается" #: py/nativeglue.c msgid "set unsupported" -msgstr "" +msgstr "Установить не поддерживается" #: extmod/ulab/code/ndarray.c msgid "shape must be integer or tuple of integers" -msgstr "" +msgstr "фигура должна быть целым числом или кортежом целых чисел" #: shared-module/msgpack/__init__.c msgid "short read" -msgstr "" +msgstr "короткое чтение" #: py/objstr.c msgid "sign not allowed in string format specifier" -msgstr "" +msgstr "Знак не разрешен в спецификаторе строкового формата" #: py/objstr.c msgid "sign not allowed with integer format specifier 'c'" -msgstr "" +msgstr "Знак не разрешен со спецификатором целочисленного формата 'c'" #: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" -msgstr "" +msgstr "Размер определяется только для массивов ND" #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" -msgstr "" +msgstr "Продолжительность сна должна быть неотрицательной" #: extmod/ulab/code/ndarray.c msgid "slice step can't be zero" -msgstr "" +msgstr "Шаг среза не может быть равен нулю" #: py/nativeglue.c msgid "slice unsupported" -msgstr "" +msgstr "Фрагмент не поддерживается" #: py/objint.c py/sequence.c msgid "small int overflow" -msgstr "" +msgstr "Маленькое переполнение int" #: main.c msgid "soft reboot\n" -msgstr "" +msgstr "Мягкая перезагрузка\n" #: extmod/ulab/code/numpy/numerical.c msgid "sort argument must be an ndarray" -msgstr "" +msgstr "Аргумент sort должен быть массивом ND" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" -msgstr "" +msgstr "Массив SOS должен иметь форму (n_section, 6)" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" -msgstr "" +msgstr "sos[:, 3] должны быть все единицы" #: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" -msgstr "" +msgstr "Sosfilt требует итерируемых аргументов" #: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" -msgstr "" +msgstr "Исходная палитра слишком велика" #: shared-bindings/bitmaptools/__init__.c msgid "source_bitmap must have value_count of 2 or 65536" -msgstr "" +msgstr "source_bitmap должен иметь значение_счет 2 или 65536" #: shared-bindings/bitmaptools/__init__.c msgid "source_bitmap must have value_count of 65536" -msgstr "" +msgstr "source_bitmap должен иметь значение_счет 65536" #: shared-bindings/bitmaptools/__init__.c msgid "source_bitmap must have value_count of 8" -msgstr "" +msgstr "source_bitmap должен иметь значение_счет 8" #: py/objstr.c msgid "start/end indices" -msgstr "" +msgstr "Начальные/конечные индексы" #: shared-bindings/random/__init__.c msgid "stop not reachable from start" -msgstr "" +msgstr "Остановка недоступна с начального запуска" #: py/stream.c shared-bindings/getpass/__init__.c msgid "stream operation not supported" -msgstr "" +msgstr "Потоковая операция не поддерживается" #: py/stream.c msgid "string not supported; use bytes or bytearray" -msgstr "" +msgstr "строка не поддерживается; Использование байтов или массива байтов" #: extmod/moductypes.c msgid "struct: can't index" -msgstr "" +msgstr "struct: не может индексировать" #: extmod/moductypes.c msgid "struct: index out of range" -msgstr "" +msgstr "struct: индекс вне диапазона" #: extmod/moductypes.c msgid "struct: no fields" -msgstr "" +msgstr "Структура: Нет полей" #: py/objarray.c py/objstr.c msgid "substring not found" -msgstr "" +msgstr "Подстрока не найдена" #: py/compile.c msgid "super() can't find self" -msgstr "" +msgstr "super() не может найти себя" #: extmod/modujson.c msgid "syntax error in JSON" -msgstr "" +msgstr "синтаксис ошибка в JSON" #: extmod/moductypes.c msgid "syntax error in uctypes descriptor" -msgstr "" +msgstr "Синтаксическая ошибка в дескрипторе UCTYPES" #: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -4148,246 +4179,248 @@ msgstr "" #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" +"Продолжительность тайм-аута превысила максимальное поддерживаемое значение" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "timeout must be < 655.35 secs" -msgstr "" +msgstr "тайм-аут должен быть < 655.35 сек" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" -msgstr "" +msgstr "Тайм-аут в ожидании карты V1" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v2 card" -msgstr "" +msgstr "Тайм-аут ожидания карты V2" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "timer re-init" -msgstr "" +msgstr "Повторное инициализация таймера" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" msgstr "" +"Временная метка выходит за пределы допустимого диапазона для платформы time_t" #: extmod/ulab/code/ndarray.c msgid "tobytes can be invoked for dense arrays only" -msgstr "" +msgstr "Тобайты могут быть вызваны только для плотных массивов" #: py/compile.c msgid "too many args" -msgstr "" +msgstr "Слишком много ARG" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" -msgstr "" +msgstr "Слишком много измерений" #: extmod/ulab/code/ndarray.c msgid "too many indices" -msgstr "" +msgstr "Слишком много индексов" #: py/asmthumb.c msgid "too many locals for native method" -msgstr "" +msgstr "Слишком много местных жителей для нативного метода" #: py/runtime.c #, c-format msgid "too many values to unpack (expected %d)" -msgstr "" +msgstr "Слишком много значений для распаковки (ожидаемый %d)" #: extmod/ulab/code/numpy/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "" +msgstr "trapz определяется для 1D-массивов одинаковой длины" #: extmod/ulab/code/numpy/approx.c msgid "trapz is defined for 1D iterables" -msgstr "" +msgstr "trapz определен для 1D-итераций" #: py/obj.c msgid "tuple/list has wrong length" -msgstr "" +msgstr "Кортеж/список имеет неправильную длину" #: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_driver_install returned esp-idf error #%d" -msgstr "" +msgstr "twai_driver_install вернул ошибку esp-idf #%d" #: ports/espressif/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" -msgstr "" +msgstr "twai_start вернул ошибку esp-idf #%d" #: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c msgid "tx and rx cannot both be None" -msgstr "" +msgstr "tx и rx не могут быть одновременно None" #: py/objtype.c msgid "type '%q' is not an acceptable base type" -msgstr "" +msgstr "Тип '%Q' не является допустимым базовым типом" #: py/objtype.c msgid "type is not an acceptable base type" -msgstr "" +msgstr "Тип не является приемлемым базовым типом" #: py/runtime.c msgid "type object '%q' has no attribute '%q'" -msgstr "" +msgstr "тип объекта '%q' не имеет атрибута '%q \"" #: py/objtype.c msgid "type takes 1 or 3 arguments" -msgstr "" +msgstr "тип занимает 1 или 3 аргумента" #: py/objint_longlong.c msgid "ulonglong too large" -msgstr "" +msgstr "ulonglong слишком большой" #: py/emitnative.c msgid "unary op %q not implemented" -msgstr "" +msgstr "Двоичный op %q не реализован" #: py/parse.c msgid "unexpected indent" -msgstr "" +msgstr "Неожиданный отступ" #: py/bc.c msgid "unexpected keyword argument" -msgstr "" +msgstr "Неожиданный аргумент ключевого слова" #: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" -msgstr "" +msgstr "неожиданный аргумент ключевого слова '%q'" #: py/lexer.c msgid "unicode name escapes" -msgstr "" +msgstr "Экранирование имен в Юникоде" #: py/parse.c msgid "unindent doesn't match any outer indent level" -msgstr "" +msgstr "Отступ не совпадает ни с одним уровнем внешнего отступа" #: py/objstr.c #, c-format msgid "unknown conversion specifier %c" -msgstr "" +msgstr "Неизвестный спецификатор преобразования %C" #: py/objstr.c msgid "unknown format code '%c' for object of type '%q'" -msgstr "" +msgstr "Неизвестный код формата '%c' для объекта типа '%q'" #: py/compile.c msgid "unknown type" -msgstr "" +msgstr "Неизвестный тип" #: py/compile.c msgid "unknown type '%q'" -msgstr "" +msgstr "Неизвестный тип '%q'" #: py/objstr.c #, c-format msgid "unmatched '%c' in format" -msgstr "" +msgstr "Несовпадающий '%c' в формате" #: py/objtype.c py/runtime.c msgid "unreadable attribute" -msgstr "" +msgstr "Нечитаемый атрибут" #: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c msgid "unsupported %q type" -msgstr "" +msgstr "Неподдерживаемый тип %Q" #: py/emitinlinethumb.c #, c-format msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "" +msgstr "неподдерживаемая инструкция Thumb '%s' с аргументами %d" #: py/emitinlinextensa.c #, c-format msgid "unsupported Xtensa instruction '%s' with %d arguments" -msgstr "" +msgstr "неподдерживаемая инструкция Xtensa '%s' с аргументами %d" #: shared-module/gifio/GifWriter.c msgid "unsupported colorspace for GifWriter" -msgstr "" +msgstr "неподдерживаемое цветовое пространство для GifWriter" #: shared-bindings/bitmaptools/__init__.c msgid "unsupported colorspace for dither" -msgstr "" +msgstr "Неподдерживаемое цветовое пространство для дизеринга" #: py/objstr.c #, c-format msgid "unsupported format character '%c' (0x%x) at index %d" -msgstr "" +msgstr "Неподдерживаемый символ формата '%c' (0x%x) при индексе %d" #: py/runtime.c msgid "unsupported type for %q: '%q'" -msgstr "" +msgstr "Неподдерживаемый тип для %q: '%q'" #: py/runtime.c msgid "unsupported type for operator" -msgstr "" +msgstr "Неподдерживаемый тип для оператора" #: py/runtime.c msgid "unsupported types for %q: '%q', '%q'" -msgstr "" +msgstr "Неподдерживаемые типы для %q: '%q', '%q'" #: extmod/ulab/code/numpy/io/io.c msgid "usecols is too high" -msgstr "" +msgstr "Usecols слишком высок" #: extmod/ulab/code/numpy/io/io.c msgid "usecols keyword must be specified" -msgstr "" +msgstr "Ключевое слово usecols должно быть указано" #: py/objint.c #, c-format msgid "value must fit in %d byte(s)" -msgstr "" +msgstr "Значение должно совпадать с байтами %d" #: shared-bindings/bitmaptools/__init__.c msgid "value out of range of target" -msgstr "" +msgstr "Величина, выходящая за пределы диапазона цели" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" -msgstr "" +msgstr "Сторожевой таймер не инициализирован" #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" -msgstr "" +msgstr "ширина должна быть больше нуля" #: ports/espressif/common-hal/wifi/Radio.c #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "wifi is not enabled" -msgstr "" +msgstr "Wi-Fi не включен" #: ports/raspberrypi/common-hal/wifi/Monitor.c msgid "wifi.Monitor not available" -msgstr "" +msgstr "Wi-Fi. Монитор недоступен" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" -msgstr "" +msgstr "окно должно быть" #: extmod/ulab/code/numpy/numerical.c msgid "wrong axis index" -msgstr "" +msgstr "Неправильный индекс оси" #: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" -msgstr "" +msgstr "Указана неправильная ось" #: extmod/ulab/code/numpy/io/io.c msgid "wrong dtype" -msgstr "" +msgstr "Неправильный тип" #: extmod/ulab/code/numpy/transform.c msgid "wrong index type" -msgstr "" +msgstr "Неправильный тип индекса" #: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/create.c #: extmod/ulab/code/numpy/io/io.c extmod/ulab/code/numpy/transform.c #: extmod/ulab/code/numpy/vector.c msgid "wrong input type" -msgstr "" +msgstr "Неправильный тип ввода" #: extmod/ulab/code/numpy/transform.c msgid "wrong length of condition array" From ab59e366137eadde54a6739786c8e93c46c7935d Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Fri, 1 Sep 2023 08:34:53 -0700 Subject: [PATCH 020/129] Correct problems found by CI --- ports/nrf/common-hal/memorymap/AddressRange.c | 6 +++--- py/objint.c | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/nrf/common-hal/memorymap/AddressRange.c b/ports/nrf/common-hal/memorymap/AddressRange.c index 11986f2cf5..b829cbb253 100644 --- a/ports/nrf/common-hal/memorymap/AddressRange.c +++ b/ports/nrf/common-hal/memorymap/AddressRange.c @@ -90,13 +90,13 @@ void common_hal_memorymap_addressrange_construct(memorymap_addressrange_obj_t *s self->len = length; } -uint32_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self) { +size_t common_hal_memorymap_addressrange_get_length(const memorymap_addressrange_obj_t *self) { return self->len; } void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_obj_t *self, - uint32_t start_index, uint8_t *values, uint32_t len) { + size_t start_index, uint8_t *values, size_t len) { uint8_t *address = self->start_address + start_index; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" @@ -115,7 +115,7 @@ void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_ob } void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_obj_t *self, - uint32_t start_index, uint32_t len, uint8_t *values) { + size_t start_index, size_t len, uint8_t *values) { uint8_t *address = self->start_address + start_index; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-align" diff --git a/py/objint.c b/py/objint.c index 83987d690a..7cc6376733 100644 --- a/py/objint.c +++ b/py/objint.c @@ -438,6 +438,11 @@ mp_int_t mp_obj_int_get_checked(mp_const_obj_t self_in) { return MP_OBJ_SMALL_INT_VALUE(self_in); } +mp_uint_t mp_obj_int_get_uint_checked(mp_const_obj_t self_in) { + return MP_OBJ_SMALL_INT_VALUE(self_in); +} + + #endif // MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE // This dispatcher function is expected to be independent of the implementation of long int From 84aadf3a6492e40c1ade2a3f6783be5d3383011e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 9 Aug 2023 09:33:20 -0500 Subject: [PATCH 021/129] Update TFT experiment for rev b --- .../mpconfigboard.h | 12 +++---- .../pins.c | 34 +++++++++---------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h index e93af63614..2762cd4208 100644 --- a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h @@ -29,20 +29,16 @@ #define MICROPY_HW_BOARD_NAME "Adafruit-ESP32-S3-RGB-TFT-Experiment" #define MICROPY_HW_MCU_NAME "ESP32S3" -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO3) -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO6) - -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO16) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) -#define MICROPY_HW_NEOPIXEL (&pin_GPIO4) +#define MICROPY_HW_NEOPIXEL (&pin_GPIO4) // also DBLTAP -#define DOUBLE_TAP_PIN (&pin_GPIO5) +#define DOUBLE_TAP_PIN (&pin_GPIO4) // also NEOPIXEL // a 1024x768 16BPP framebuffer + some breathing room #define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c index 6b1e17f766..4bd25d26cb 100644 --- a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c +++ b/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c @@ -5,11 +5,11 @@ STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, 5, { - MP_ROM_PTR(&pin_GPIO13), - MP_ROM_PTR(&pin_GPIO12), MP_ROM_PTR(&pin_GPIO11), MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO9), MP_ROM_PTR(&pin_GPIO46), + MP_ROM_PTR(&pin_GPIO3), } }; @@ -17,12 +17,12 @@ STATIC const mp_rom_obj_tuple_t tft_g_pins = { {&mp_type_tuple}, 6, { - MP_ROM_PTR(&pin_GPIO5), // XXX fixed in rev b - MP_ROM_PTR(&pin_GPIO45), MP_ROM_PTR(&pin_GPIO48), MP_ROM_PTR(&pin_GPIO47), MP_ROM_PTR(&pin_GPIO21), MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO12), } }; @@ -30,11 +30,11 @@ STATIC const mp_rom_obj_tuple_t tft_b_pins = { {&mp_type_tuple}, 5, { - MP_ROM_PTR(&pin_GPIO5), // XXX fixed in rev b - MP_ROM_PTR(&pin_GPIO5), // XXX fixed in rev b MP_ROM_PTR(&pin_GPIO40), MP_ROM_PTR(&pin_GPIO39), MP_ROM_PTR(&pin_GPIO38), + MP_ROM_PTR(&pin_GPIO0), + MP_ROM_PTR(&pin_GPIO45), } }; @@ -59,22 +59,20 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(DEFAULT_SPI_BUS_MOSI) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(DEFAULT_SPI_BUS_MISO) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(DEFAULT_SPI_BUS_SCK) }, - { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO16) }, - - // boot mode button can be used in SW as well - { MP_ROM_QSTR(MP_QSTR_BUTTON_UP), MP_ROM_PTR(&pin_GPIO0) }, - { MP_ROM_QSTR(MP_QSTR_BUTTON_DOWN), MP_ROM_PTR(&pin_GPIO5) }, - - { MP_ROM_QSTR(MP_QSTR_TP_IRQ), MP_ROM_PTR(&pin_GPIO9) }, + // I/O expander pin numbers + { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_INT(0) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_INT(1) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_INT(2) }, + { MP_ROM_QSTR(MP_QSTR_TP_IRQ), MP_ROM_INT(3) }, + { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_INT(4) }, + { MP_ROM_QSTR(MP_QSTR_BTN_UP), MP_ROM_INT(5) }, + { MP_ROM_QSTR(MP_QSTR_BTN_DN), MP_ROM_INT(6) }, + { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_INT(7) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 1648a3db1efae2554f61d8c472bca6fe581000a5 Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Fri, 1 Sep 2023 11:23:30 -0700 Subject: [PATCH 022/129] Fix IO register stores of multiple words --- .../raspberrypi/common-hal/memorymap/AddressRange.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ports/raspberrypi/common-hal/memorymap/AddressRange.c b/ports/raspberrypi/common-hal/memorymap/AddressRange.c index 3eac27fa63..6f6731a5ec 100644 --- a/ports/raspberrypi/common-hal/memorymap/AddressRange.c +++ b/ports/raspberrypi/common-hal/memorymap/AddressRange.c @@ -94,9 +94,9 @@ void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_ob } else { // Aligned access and length, use 32-bit writes uint32_t *dest_addr32 = (uint32_t *)dest_addr; - size_t len32 = len >> 2; - for (size_t i = 0; i < len32; i++) { - *dest_addr32++ = ((uint32_t *)values)[i << 2]; + size_t access_count = len >> 2; + for (size_t i = 0; i < access_count; i++) { + *dest_addr32++ = ((uint32_t *)values)[i]; } } break; @@ -124,10 +124,10 @@ void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_ob // Unaligned access or unaligned length not supported by RP2 for IO registers mp_raise_RuntimeError(translate("Unable to access unaliged IO register")); } else { - // Aligned access and length, use 32-bit writes + // Aligned access and length, use 32-bit reads uint32_t *src_addr32 = (uint32_t *)src_addr; - size_t len32 = len >> 2; - for (size_t i = 0; i < len32; i++) { + size_t access_count = len >> 2; + for (size_t i = 0; i < access_count; i++) { ((uint32_t *)values)[i] = *src_addr32++; } } From b8c6fce6f28489cf23edbfae6257d83c3c0c3ef1 Mon Sep 17 00:00:00 2001 From: xXx Date: Fri, 1 Sep 2023 14:16:15 +0000 Subject: [PATCH 023/129] Translated using Weblate (Russian) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 451 ++++++++++++++++++++++++++------------------------- 1 file changed, 229 insertions(+), 222 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index 957ebf66e2..5fd796a4c3 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-09-01 11:54+0000\n" +"PO-Revision-Date: 2023-09-03 02:59+0000\n" "Last-Translator: xXx \n" "Language-Team: none\n" "Language: ru\n" @@ -41,7 +41,7 @@ msgid "" "issues." msgstr "" "\n" -"Пожалуйста, подайте вопрос с вашей программой на github.com/adafruit/" +"Пожалуйста подайте вопрос с вашей программой на github.com/adafruit/" "circuitpython/issues." #: supervisor/shared/safe_mode.c @@ -50,8 +50,7 @@ msgid "" "Press reset to exit safe mode.\n" msgstr "" "\n" -"Нажмите на сброс, чтобы выйти из безопасного режима.\n" -".\n" +"Нажмите на сброс чтобы выйти из безопасного режима.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -59,7 +58,7 @@ msgid "" "You are in safe mode because:\n" msgstr "" "\n" -"Вы в безопасном режиме, потому что:\n" +"Вы в безопасном режиме потому что:\n" #: py/obj.c msgid " File \"%q\"" @@ -101,7 +100,8 @@ msgstr "" msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" -"%d адресных пинов, %d rgb пинов и %d тайлов указывают высоту %d а не %d" +"Адресные контакты %d, контакты rgb %d и плитки %d обозначают высоту %d, а не " +"%d" #: ports/atmel-samd/common-hal/alarm/__init__.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c @@ -121,7 +121,7 @@ msgstr "%q" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "%q и %q содержат пины-дупликаты" +msgstr "%q и %q содержат пины дупликаты" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "%q and %q must be different" @@ -129,7 +129,7 @@ msgstr "%q и %q должны быть разными" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "%q содержит пины-дупликаты" +msgstr "%q содержит пины дупликаты" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" @@ -200,7 +200,7 @@ msgstr "%q должно быть %d-%d" #: shared-bindings/displayio/Display.c msgid "%q must be 1 when %q is True" -msgstr "%q должно быть 1 когда %q is True" +msgstr "%q должен быть равен 1, если %q имеет значение True" #: py/argcheck.c shared-bindings/gifio/GifWriter.c #: shared-module/gifio/OnDiskGif.c @@ -213,11 +213,11 @@ msgstr "%q должно быть >= %d" #: shared-bindings/analogbufio/BufferedIn.c msgid "%q must be a bytearray or array of type 'H' or 'B'" -msgstr "%q должно быть bytearray или array типа 'H' или 'B'" +msgstr "%q должен быть массивом байтов или массивом типа «H» или «B»" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" -msgstr "%q должно быть bytearray или array типа 'h', 'H', 'b', или 'B'" +msgstr "%q должен быть массивом байтов или массивом типа «h», «H», «b» или «B»" #: ports/espressif/common-hal/analogbufio/BufferedIn.c msgid "%q must be array of type 'H'" @@ -272,11 +272,11 @@ msgstr "%q=%q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts in more bits than pin count" -msgstr "%q [%u] смещается в большем количестве, чем количество пинов" +msgstr "%q [%u] смещается в большем количестве чем количество пинов" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" -msgstr "%q[%u] смещает больше битов, чем количество выводов" +msgstr "%q[%u] смещает больше битов чем количество выводов" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" @@ -390,51 +390,52 @@ msgstr "'S' и 'O' не являются поддерживаемыми типа #: py/compile.c msgid "'align' requires 1 argument" -msgstr "'align' требует 1 аргумент" +msgstr "«выравнивание» требует 1 аргумента" #: py/compile.c msgid "'await' outside function" -msgstr "'await' вне функции" +msgstr "«ожидание» внешняя функция" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "'await', 'async for' или 'async with' вне асинхронной функции" +msgstr "" +"«ожидание», «асинхронность для» или «асинхронность с» вне асинхронной функции" #: py/compile.c msgid "'break' outside loop" -msgstr "'break' вне цикла" +msgstr "«разорвать» внешний цикл" #: py/compile.c msgid "'continue' outside loop" -msgstr "'continue' вне цикла" +msgstr "«продолжить» вне цикла" #: py/compile.c msgid "'data' requires at least 2 arguments" -msgstr "'data' требует как минимум 2 аргумента" +msgstr "«данные» требуют как минимум 2 аргумента" #: py/compile.c msgid "'data' requires integer arguments" -msgstr "'data' требует целочисленные аргументы" +msgstr "«данные» требуют целочисленных аргументов" #: py/compile.c msgid "'label' requires 1 argument" -msgstr "'label' требует 1 аргумент" +msgstr "«метка» требует 1 аргумент" #: py/compile.c msgid "'return' outside function" -msgstr "'return' вне функции" +msgstr "«возврат» внешняя функция" #: py/compile.c msgid "'yield from' inside async function" -msgstr "'yield from' внутри асинхронной функции" +msgstr "«выход из» внутри асинхронной функции" #: py/compile.c msgid "'yield' outside function" -msgstr "'yield' вне функции" +msgstr "внешняя функция \"выход\"" #: py/compile.c msgid "* arg after **" -msgstr "* arg после **" +msgstr "* аргумент после **" #: py/compile.c msgid "*x must be assignment target" @@ -450,7 +451,7 @@ msgstr "0.0 в комплексную степень" #: py/modbuiltins.c msgid "3-arg pow() not supported" -msgstr "3-аргументный pow() не поддерживается" +msgstr "Pow() с 3 аргументами не поддерживается" #: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c #: ports/atmel-samd/common-hal/countio/Counter.c @@ -556,7 +557,7 @@ msgstr "Все таймеры уже используются" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Already advertising." -msgstr "Уже объявляемся (advertising)." +msgstr "Уже реклама." #: ports/atmel-samd/common-hal/canio/Listener.c msgid "Already have all-matches listener" @@ -581,7 +582,7 @@ msgstr "Произошла ошибка при получении '%s':\n" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" -msgstr "Другой PWMAudioOut уже активен" +msgstr "Другой аудиовыход PWM уже активен" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -628,8 +629,7 @@ msgstr "" #: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" -"Скорость обмена данными (Baudrate) не поддерживается периферийным устройством" +msgstr "Скорость передачи данных не поддерживается периферийным устройством" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c @@ -653,7 +653,8 @@ msgstr "Битовая глубина должна быть кратна 8." #: shared-bindings/bitmaptools/__init__.c msgid "Bitmap size and bits per value must match" -msgstr "Размер bitmap и количество бит-на-значение должны совпадать" +msgstr "" +"Размер растрового изображения и число битов на значение должны совпадать" #: supervisor/shared/safe_mode.c msgid "Boot device must be first (interface #0)." @@ -661,7 +662,7 @@ msgstr "Загрузочное устройство должно быть пер #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" -msgstr "Для управления потоком требуется как RX, так и TX" +msgstr "Для управления потоком требуется как RX так и TX" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -683,7 +684,7 @@ msgstr "Элементы буфера должны иметь длину не б #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Buffer is not a bytearray." -msgstr "Буфер не является байтовым массивом (bytearray)." +msgstr "Буфер не является байтовым массивом." #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format @@ -720,7 +721,7 @@ msgstr "Буферы должны быть одинакового размера #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" -msgstr "Пин шины %d уже используется" +msgstr "Вывод шины %d уже используется" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." @@ -732,7 +733,7 @@ msgstr "Блоки CBC должны быть кратны 16 байтам" #: supervisor/shared/safe_mode.c msgid "CIRCUITPY drive could not be found or created." -msgstr "Не удалось найти или создать диск CIRCUITPY." +msgstr "Диск CIRCUTPY не удалось найти или создать." #: ports/espressif/common-hal/espidf/__init__.c msgid "CRC or checksum was invalid" @@ -740,7 +741,7 @@ msgstr "CRC или контрольная сумма неправильная" #: py/objtype.c msgid "Call super().__init__() before accessing native object." -msgstr "Вызовите super().__init__() перед обращением к родному объекту." +msgstr "Вызовите super().__init__() перед доступом к собственному объекту." #: ports/cxd56/common-hal/camera/Camera.c msgid "Camera init" @@ -748,29 +749,27 @@ msgstr "Иницализация камеры" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." -msgstr "Сигнал из глубокого сна может подаваться только на пине RTC IO." +msgstr "Возможен только сигнал тревоги по RTC IO из глубокого сна." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" -"Сигнал из глубокого сна может подаваться по низкому уровню только на одном " -"пане, пока остальные подают сигнал по высокому уровню." +"Может сигнализировать только по одному низкому контакту в то время как " +"другие сигнализируют о высоком уровне после глубокого сна." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." -msgstr "" -"Сигнал из глубокого сна может подаваться только на двух пинах по низкому " -"уровню." +msgstr "Из глубокого сна может сигнализировать только по двум низким контактам." #: ports/espressif/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" -msgstr "Невозможно установить CCCD на локальную Characteristic" +msgstr "Невозможно установить CCCD для локальной характеристики" #: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c #: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c msgid "Cannot change USB devices now" -msgstr "Сейчас невозможно изменить USB-устройства" +msgstr "Невозможно изменить USB устройство сейчас" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" @@ -787,7 +786,7 @@ msgstr "Невозможно удалить значения" #: ports/nrf/common-hal/digitalio/DigitalInOut.c #: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c msgid "Cannot get pull while in output mode" -msgstr "Невозможно установить подтяжку в режиме output" +msgstr "Невозможно получить pull в режиме вывода" #: ports/nrf/common-hal/microcontroller/Processor.c msgid "Cannot get temperature" @@ -796,13 +795,12 @@ msgstr "Невозможно получить температуру" #: shared-bindings/_bleio/Adapter.c msgid "Cannot have scan responses for extended, connectable advertisements." msgstr "" -"Невозможно иметь ответы сканирования для расширенных, подключаемых " -"объявлений (advertisements)." +"Не может быть ответов на сканирование для расширенных подключаемых рекламных " +"объявлений." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." -msgstr "" -"Невозможно установить подтяжку на пине, предназначенном только для ввода." +msgstr "Невозможно вытащить контакт только для ввода." #: shared-bindings/audiobusio/PDMIn.c msgid "Cannot record to a file" @@ -824,7 +822,7 @@ msgstr "Невозможно установить параметры сокет #: shared-bindings/digitalio/DigitalInOut.c msgid "Cannot set value when direction is input." -msgstr "Невозможно установить значение в режиме input." +msgstr "Невозможно установить значение при вводе направления." #: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c @@ -833,11 +831,11 @@ msgstr "Невозможно указать RTS или CTS в режиме RS485 #: py/objslice.c msgid "Cannot subclass slice" -msgstr "Срез субкласса невозможен" +msgstr "Невозможно создать подкласс среза" #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" -msgstr "Невозможно изменить частоту на таймере, который уже используется" +msgstr "Невозможно изменить частоту на таймере который уже используется" #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge, only level" @@ -845,15 +843,15 @@ msgstr "Невозможно проснуться по изменению лог #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." -msgstr "Невозможно проснуться по спаду/росту на пине. Только по уровню." +msgstr "Невозможно проснуться по спаду росту на пине. Только по уровню." #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" -msgstr "Запись в CharacteristicBuffer не предусмотрена" +msgstr "ХарактеристикаЗапись в буфер не предусмотрена" #: supervisor/shared/safe_mode.c msgid "CircuitPython core code crashed hard. Whoops!\n" -msgstr "Код ядра CircuitPython сильно крашнулся. Упс!\n" +msgstr "Основной код CircuitPython сильно разбился. Упс!\n" #: shared-module/bitbangio/I2C.c msgid "Clock stretch too long" @@ -889,7 +887,7 @@ msgstr "Не удалось задать адрес" #: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" -msgstr "Не удалось запустить ШИМ" +msgstr "Не удалось запустить PWM" #: ports/stm/common-hal/busio/UART.c msgid "Could not start interrupt, RX busy" @@ -901,15 +899,15 @@ msgstr "Не удалось выделить место для декодера" #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Channel Init Error" -msgstr "Ошибка инициализации канала ЦАП" +msgstr "Ошибка инициализации канала DAC" #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Device Init Error" -msgstr "Ошибка инициализации устройства ЦАП" +msgstr "Ошибка инициализации устройства DAC" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" -msgstr "ЦАП уже используется" +msgstr "DAC уже используется" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c @@ -938,7 +936,7 @@ msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." -msgstr "Емкость destination меньше, чем destination_length." +msgstr "Емкость места назначения меньше чем Destination_length." #: ports/nrf/common-hal/audiobusio/I2SOut.c msgid "Device in use" @@ -947,7 +945,7 @@ msgstr "Устройство используется" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c msgid "Display must have a 16 bit colorspace." -msgstr "Дисплей должен иметь 16-битное цветовое пространство." +msgstr "Дисплей должен иметь 16 битное цветовое пространство." #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c @@ -961,7 +959,7 @@ msgstr "Выполнено" #: shared-bindings/digitalio/DigitalInOut.c msgid "Drive mode not used when direction is input." -msgstr "Drive mode не используется, когда направление является входным." +msgstr "Режим движения не используется при вводе направления." #: py/obj.c msgid "During handling of the above exception, another exception occurred:" @@ -986,7 +984,7 @@ msgstr "Канал EXTINT уже используется" #: extmod/modure.c msgid "Error in regex" -msgstr "Ошибка в регулярном выражении(regex)" +msgstr "Ошибка в регулярном выражении" #: supervisor/shared/safe_mode.c msgid "Error in safemode.py." @@ -1007,15 +1005,15 @@ msgstr "Расширенные объявления с ответом скани #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" -msgstr "БПФ определено только для ndarrays" +msgstr "FFT определено только для массивов nd" #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" -msgstr "БПФ реализовано только для линейных массивов" +msgstr "FFT реализовано только для линейных массивов" #: ports/espressif/common-hal/ssl/SSLSocket.c msgid "Failed SSL handshake" -msgstr "Не удался SSL handshake" +msgstr "Не удалось установить соединение SSL" #: shared-bindings/ps2io/Ps2.c msgid "Failed sending command." @@ -1049,7 +1047,7 @@ msgstr "Не удалось подключиться: внутренняя ош #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: timeout" -msgstr "Не удалось подключиться: тайм-аут" +msgstr "Не удалось подключиться: таймаут" #: shared-module/audiomp3/MP3Decoder.c msgid "Failed to parse MP3 file" @@ -1093,12 +1091,14 @@ msgstr "Прошивка слишком большая" #: shared-bindings/bitmaptools/__init__.c msgid "For L8 colorspace, input bitmap must have 8 bits per pixel" msgstr "" -"Для цветового пространства L8 входной bitmap должен иметь 8 бит на пиксель" +"Для цветового пространства L8 входное растровое изображение должно иметь 8 " +"бит на пиксель" #: shared-bindings/bitmaptools/__init__.c msgid "For RGB colorspaces, input bitmap must have 16 bits per pixel" msgstr "" -"Для цветового пространства RGB входной bitmap должен иметь 16 бит на пиксель" +"Для цветовых пространств RGB входное растровое изображение должно иметь 16 " +"бит на пиксель" #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" @@ -1114,8 +1114,8 @@ msgstr "" #: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" -"Частота должна соответствовать существующему PWMOut, использующему этот " -"таймер" +"Частота должна соответствовать существующему PWMOut с использованием этого " +"таймера" #: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c #: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c @@ -1195,12 +1195,14 @@ msgstr "Неверный размер программы инициализац #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Initial set pin direction conflicts with initial out pin direction" msgstr "" -"Начальное направление пина set конфликтует с начальным направлением пина out" +"Исходное установленное направление штифта конфликтует с исходным " +"направлением вывода" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -"Начальное состояние пина set конфликтует с начальным состоянием пина out" +"Исходное установленное состояние контакта конфликтует с исходным состоянием " +"выхода" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" @@ -1209,7 +1211,7 @@ msgstr "Инициализация не удалась из-за нехватк #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" -msgstr "Длина входного буфера (%d) должна быть кратна количеству strand (%d)" +msgstr "Длина входного буфера (%d) должна быть кратна количеству цепочек (%d)" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" @@ -1274,7 +1276,7 @@ msgstr "Недопустимый пин %q" #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" -msgstr "Недопустимое значение единицы АЦП" +msgstr "Недопустимое значение единицы ADC" #: ports/espressif/common-hal/_bleio/__init__.c #: ports/nrf/common-hal/_bleio/__init__.c @@ -1325,7 +1327,7 @@ msgstr "Неверный шестнадцатеричный пароль" #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" -msgstr "Неверный MAC-адрес multicast" +msgstr "Неверный MAC-адрес многоадресной рассылки" #: ports/espressif/common-hal/espidf/__init__.c msgid "Invalid size" @@ -1366,7 +1368,7 @@ msgstr "Слой уже в группе (Group)" #: shared-module/displayio/Group.c msgid "Layer must be a Group or TileGrid subclass" -msgstr "Слой должен быть группой (Group) или субклассом TileGrid." +msgstr "Слой должен быть группой (Group) или субклассом TileGrid" #: ports/espressif/common-hal/espidf/__init__.c msgid "MAC address was invalid" @@ -1387,11 +1389,11 @@ msgstr "Размер данных различается" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Mismatched swap flag" -msgstr "Несоответствие флага swap" +msgstr "Несоответствующий флаг подкачки" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] reads pin(s)" -msgstr "Пропущенный первый_in_pin.%q [%u] читает пин (s)" +msgstr "Отсутствует first_in_pin. %q[%u] читает выводы" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] shifts in from pin(s)" @@ -1407,7 +1409,7 @@ msgstr "Отсутствует first_out_pin. %q[%u] переключается #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] writes pin(s)" -msgstr "Отсутствует first_out_pin. %q[%u] записывает pin(s)" +msgstr "Отсутствует first_out_pin. %q[%u] записывает выводы" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_set_pin. %q[%u] sets pin(s)" @@ -1432,7 +1434,7 @@ msgstr "Количество используемых rgb-пинов должн #: supervisor/shared/safe_mode.c msgid "NLR jump failed. Likely memory corruption." -msgstr "Не удалось выполнить NLR jump. Вероятно, повреждение памяти." +msgstr "Прыжок NLR не удался. Вероятно повреждение памяти." #: ports/espressif/common-hal/nvm/ByteArray.c msgid "NVS Error" @@ -1448,7 +1450,9 @@ msgstr "Имя слишком длинное" #: shared-bindings/displayio/TileGrid.c msgid "New bitmap must be same size as old bitmap" -msgstr "Новый bitmap должен быть того же размера что и старый" +msgstr "" +"Новое растровое изображение должно быть того же размера, что и старое " +"растровое изображение" #: ports/espressif/common-hal/_bleio/__init__.c msgid "Nimble out of memory" @@ -1469,12 +1473,12 @@ msgstr "Нет пина %q" #: ports/espressif/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "No CCCD for this Characteristic" -msgstr "Нет CCCD для этой Characteristic" +msgstr "Для этой характеристики нет CCCD" #: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c msgid "No DAC on chip" -msgstr "ЦАП отсутствует на чипе" +msgstr "DAC отсутствует на чипе" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -1526,7 +1530,7 @@ msgstr "Отсутствует аппаратный генератор случ #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in in program" -msgstr "Нет in в программе" +msgstr "Нет в программе" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in or out in program" @@ -1549,8 +1553,7 @@ msgstr "В программе отсутствует вывод" #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/busio/I2C.c msgid "No pull up found on SDA or SCL; check your wiring" -msgstr "" -"Подтяжка на выводах SDA или SCL не обнаружена; проверь схему подключения" +msgstr "На SDA или SCL не обнаружено подтягивания; проверь свою проводку" #: shared-module/touchio/TouchIn.c msgid "No pulldown on pin; 1Mohm recommended" @@ -1652,7 +1655,7 @@ msgstr "На этом аппаратном обеспечении доступн #: shared-bindings/ipaddress/__init__.c msgid "Only int or string supported for ip" -msgstr "Только int или строка поддерживается для ip" +msgstr "Для IP поддерживаются только int или строка" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1665,7 +1668,7 @@ msgstr "" #: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one %q can be set in deep sleep." -msgstr "Только один %q может быть погружен в глубокий сон." +msgstr "Только один %q может быть переведен в режим глубокого сна." #: ports/espressif/common-hal/espulp/ULPAlarm.c msgid "Only one %q can be set." @@ -1680,7 +1683,7 @@ msgstr "Разрешен только один адрес" #: ports/nrf/common-hal/alarm/time/TimeAlarm.c #: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set" -msgstr "Можно установить только один сигнал тревоги.время" +msgstr "Можно установить только один будильник" #: ports/espressif/common-hal/alarm/time/TimeAlarm.c #: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c @@ -1718,7 +1721,7 @@ msgstr "Вне розеток" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Out-buffer elements must be <= 4 bytes long" -msgstr "Элементы буфера должны быть длиной <= 4 байта" +msgstr "Элементы вне буфера должны иметь длину <= 4 байта" #: shared-bindings/audiobusio/PDMIn.c msgid "Oversample must be multiple of 8." @@ -1728,7 +1731,7 @@ msgstr "Передискретизация должна быть кратна 8. msgid "" "PWM frequency not writable when variable_frequency is False on construction." msgstr "" -"Частота ШИМ не записывается, если variable_frequency имеет значение False " +"Частота PWM не записывается, если variable_frequency имеет значение False " "при построении." #: ports/stm/common-hal/pwmio/PWMOut.c @@ -1783,9 +1786,8 @@ msgid "" "bytes. If this cannot be avoided, pass allow_inefficient=True to the " "constructor" msgstr "" -"Pinout использует %d байт на элемент, что потребляет больше, чем идеальные " -"%d байт. Если этого нельзя избежать, передайте allow_inefficient=True в " -"конструктор" +"Распиновка использует %d байт на элемент, что превышает идеальное %d байт. " +"Если этого нельзя избежать, передайте конструктору allow_inefficient=True" #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" @@ -1797,7 +1799,7 @@ msgstr "Пины должны быть последовательными выв #: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c msgid "Pins must share PWM slice" -msgstr "Пины должны иметь общий срез ШИМ" +msgstr "Пины должны иметь общий срез PWM" #: shared-module/usb/core/Device.c msgid "Pipe error" @@ -1809,7 +1811,7 @@ msgstr "Плюс любые модули в файловой системе\n" #: shared-module/vectorio/Polygon.c msgid "Polygon needs at least 3 points" -msgstr "Полигон нуждается не менее 3 пунктов" +msgstr "Полигону необходимо как минимум 3 точки" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." @@ -1832,11 +1834,11 @@ msgstr "" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does IN without loading ISR" -msgstr "Программа делает IN без загрузки ISR" +msgstr "Программа выполняет IN без загрузки ISR" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does OUT without loading OSR" -msgstr "Программа делает OUT без загрузки OSR" +msgstr "Программа выполняет ВЫХОД без загрузки OSR" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Program size invalid" @@ -1848,7 +1850,7 @@ msgstr "Слишком длинная программа" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." -msgstr "Вытягивание не используется при выводе направления." +msgstr "Тяга не используется, когда выводится направление." #: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c @@ -1910,7 +1912,7 @@ msgstr "Слишком раннее обновление" #: shared-bindings/canio/RemoteTransmissionRequest.c msgid "RemoteTransmissionRequests limited to 8 bytes" -msgstr "RemoteTransmissionRequests ограничен 8 байтами" +msgstr "Запросы на удаленную передачу ограничены 8 байтами" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" @@ -1934,12 +1936,12 @@ msgstr "Формат CSD SD-карты не поддерживается" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "SDCard init" -msgstr "Инициализация SDCard" +msgstr "Инициализация SD-карты" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO GetCardInfo Error %d" -msgstr "Ошибка SDIO GetCardInfo %d" +msgstr "Ошибка получения информации о карте SDIO %d" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format @@ -1974,7 +1976,7 @@ msgstr "Сканирование уже выполняется. Останови #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "Serializer in use" -msgstr "Используемый сериализатор" +msgstr "Сериализатор используется" #: shared-bindings/ssl/SSLContext.c msgid "Server side context cannot have hostname" @@ -1999,7 +2001,7 @@ msgstr "Фрагменты не поддерживаются" #: ports/espressif/common-hal/socketpool/SocketPool.c #: ports/raspberrypi/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" -msgstr "Socket Бассейн можно использовать только с Wifi. радио" +msgstr "Пул сокетов можно использовать только с wifi.radio" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" @@ -2036,12 +2038,13 @@ msgstr "Истекло время ожидания считывания темп #: supervisor/shared/safe_mode.c msgid "The `microcontroller` module was used to boot into safe mode." msgstr "" -"Модуль «микроконтроллер» был использован для загрузки в безопасный режим." +"Модуль «микроконтроллер» использовался для загрузки в безопасном режиме." #: py/obj.c msgid "The above exception was the direct cause of the following exception:" msgstr "" -"Вышеупомянутое исключение является прямой причиной следующего исключения:" +"Вышеупомянутое исключение было непосредственной причиной следующего " +"исключения:" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2049,7 +2052,7 @@ msgstr "Длина rgb_pins должна быть 6, 12, 18, 24 или 30" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "bits_per_sample образца не совпадает с смесителя" +msgstr "Bits_per_sample сэмпла не соответствует битам микшера" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's channel count does not match the mixer's" @@ -2057,11 +2060,11 @@ msgstr "Количество каналов образца не совпадае #: shared-module/audiomixer/MixerVoice.c msgid "The sample's sample rate does not match the mixer's" -msgstr "Частота дискретизации образца не совпадает с частотой микшера" +msgstr "Частота дискретизации семпла не соответствует частоте микшера" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's signedness does not match the mixer's" -msgstr "Частота дискретизации образца не совпадает с частотой микшера" +msgstr "Подпись семпла не совпадает с подписью микшера" #: supervisor/shared/safe_mode.c msgid "Third-party firmware fatal error." @@ -2081,7 +2084,7 @@ msgstr "" #: shared-bindings/displayio/TileGrid.c msgid "Tile height must exactly divide bitmap height" -msgstr "Высота фрагмента должна в точности делить высоту растрового изображения" +msgstr "Высота плитки должна точно делить высоту растрового изображения" #: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c msgid "Tile index out of bounds" @@ -2093,7 +2096,7 @@ msgstr "Ширина плитки должна точно делить шири #: shared-bindings/alarm/time/TimeAlarm.c msgid "Time is in the past." -msgstr "Время осталось в прошлом." +msgstr "Время в прошлом." #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c @@ -2107,11 +2110,11 @@ msgstr "Слишком много каналов в выборке" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." -msgstr "Слишком много каналов в выборке" +msgstr "Слишком много каналов в выборке." #: shared-module/displayio/__init__.c msgid "Too many display busses; forgot displayio.release_displays() ?" -msgstr "Слишком много дисплеев; забыли Displayio.release_displays()?" +msgstr "Слишком много шин дисплея; забыл displayio.release_displays()?" #: shared-module/displayio/__init__.c msgid "Too many displays" @@ -2120,13 +2123,13 @@ msgstr "Слишком много дисплеев" #: ports/espressif/common-hal/_bleio/PacketBuffer.c #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Total data to write is larger than %q" -msgstr "Общий объем записываемых данных превышает %q" +msgstr "Общее количество данных для записи превышает %q" #: ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.c #: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c #: ports/stm/common-hal/alarm/touch/TouchAlarm.c msgid "Touch alarms not available" -msgstr "Сенсорные сигналы тревоги недоступны" +msgstr "Сенсорные сигналы недоступны" #: py/obj.c msgid "Traceback (most recent call last):\n" @@ -2187,7 +2190,7 @@ msgstr "UUID строка не 'xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxx #: shared-bindings/_bleio/UUID.c msgid "UUID value is not str, int or byte buffer" -msgstr "Значение UUID не является str, int или байтовым буфером" +msgstr "Значение UUID не является строковым, целым или байтовым буфером" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2203,7 +2206,7 @@ msgstr "Невозможно выделить кучу." #: ports/espressif/common-hal/analogbufio/BufferedIn.c #, c-format msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Невозможно настроить контроллер ADC DMA, ErrorCode:%d" +msgstr "Невозможно настроить контроллер ADC DMA, код ошибки:%d" #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" @@ -2226,7 +2229,7 @@ msgstr "Не удается инициировать синтаксически #: ports/espressif/common-hal/analogbufio/BufferedIn.c #, c-format msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Не удается инициализировать контроллер ADC DMA, ErrorCode:%d" +msgstr "Невозможно инициализировать контроллер ADC DMA, код ошибки:%d" #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" @@ -2252,7 +2255,7 @@ msgstr "Невозможно выполнить запись в nvm." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." -msgstr "Не удается написать sleep_memory." +msgstr "Невозможно записать в Sleep_memory." #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" @@ -2318,15 +2321,15 @@ msgstr "Неизвестная ошибка прошивки системы: %d" #, c-format msgid "Unmatched number of items on RHS (expected %d, got %d)." msgstr "" -"Непревзойдённое количество элементов на RHS (ожидаемый %d, полученный %d)." +"Непревзойденное количество элементов на RHS (ожидалось %d, получено %d)." #: ports/nrf/common-hal/_bleio/__init__.c msgid "" "Unspecified issue. Can be that the pairing prompt on the other device was " "declined or ignored." msgstr "" -"Неопределенная проблема. Может случиться так, что запрос на сопряжение на " -"другом устройстве был отклонен или проигнорирован." +"Неуказанная проблема. Возможно, запрос на сопряжение на другом устройстве " +"был отклонен или проигнорирован." #: shared-bindings/bitmaptools/__init__.c msgid "Unsupported colorspace" @@ -2353,7 +2356,7 @@ msgstr "Ошибка обновления" #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" -msgstr "Значение length != требуемая фиксированная длина" +msgstr "Длина значения! = требуемая фиксированная длина" #: ports/espressif/common-hal/_bleio/Characteristic.c #: ports/espressif/common-hal/_bleio/Descriptor.c @@ -2379,11 +2382,12 @@ msgstr "ВНИМАНИЕ: Имя файла кода имеет два расш #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" msgstr "" -"WatchDogTimer не может быть деинициализирован после установки режима RESET" +"Сторожевой таймер не может быть деинициализирован, если установлен режим " +"RESET" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer в настоящее время не запущен" +msgstr "Таймер Watch Dog в настоящее время не работает" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" @@ -2400,9 +2404,11 @@ msgid "" "\n" "To list built-in modules type `help(\"modules\")`.\n" msgstr "" -"Добро пожаловать в Adafruit CircuitPython %s! Посетите circuitpython.org для " -"получения дополнительной информации. Чтобы получить список встроенных " -"модулей, введите 'help(\"modules\")'.\n" +"Добро пожаловать в Adafruit CircuitPython %s! \n" +"\n" +"Посетите circuitpython.org для получения дополнительной информации. \n" +"\n" +"Чтобы получить список встроенных модулей, введите 'help(\"modules\")'.\n" #: supervisor/shared/web_workflow/web_workflow.c msgid "Wi-Fi: " @@ -2516,11 +2522,11 @@ msgstr "ARG должен быть пользовательского типа" #: extmod/ulab/code/numpy/numerical.c msgid "argsort argument must be an ndarray" -msgstr "Аргумент argsort должен быть ndarray" +msgstr "Аргумент сортировки arg должен быть массивом nd" #: extmod/ulab/code/numpy/numerical.c msgid "argsort is not implemented for flattened arrays" -msgstr "argsort не реализован для сведенных массивов" +msgstr "сортировка arg не реализована для сглаженных массивов" #: py/runtime.c shared-bindings/supervisor/__init__.c msgid "argument has wrong type" @@ -2541,7 +2547,7 @@ msgstr "аргумент должен быть '%q', а не '%q'" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c msgid "arguments must be ndarrays" -msgstr "Аргументы должны быть ndarrays" +msgstr "аргументы должны быть массивами" #: extmod/ulab/code/ndarray.c msgid "array and index length must be equal" @@ -2570,7 +2576,7 @@ msgstr "Попытка получить (arg)min/(arg)max пустой посл #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "Попытка получить (arg)min/(arg)max пустой последовательности" +msgstr "Попытка получить argmin/argmax пустой последовательности" #: py/objstr.c msgid "attributes not supported yet" @@ -2582,7 +2588,7 @@ msgstr "Ось выходит за пределы" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c msgid "axis must be None, or an integer" -msgstr "ось должна иметь значение None или целое число" +msgstr "ось должна быть None или целым числом" #: extmod/ulab/code/numpy/numerical.c msgid "axis too long" @@ -2610,7 +2616,7 @@ msgstr "Неверный шрифт" #: py/emitnative.c msgid "binary op %q not implemented" -msgstr "Двоичный op %q не реализован" +msgstr "двоичная операция %q не реализована" #: shared-bindings/bitmaptools/__init__.c msgid "bitmap sizes must match" @@ -2646,7 +2652,7 @@ msgstr "Буферные фрагменты должны быть одинако #: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" -msgstr "Слишком маленький буфер" +msgstr "буфер слишком мал" #: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c msgid "buffer too small for requested bytes" @@ -2713,7 +2719,7 @@ msgstr "не может преобразовать %s в сложный" #: py/obj.c #, c-format msgid "can't convert %s to float" -msgstr "Не удается преобразовать %s в float" +msgstr "не могу преобразовать %s в число с плавающей запятой" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" @@ -2787,7 +2793,7 @@ msgstr "Не удается установить атрибут" #: py/runtime.c shared-bindings/supervisor/Runtime.c msgid "can't set attribute '%q'" -msgstr "Не удается установить атрибут" +msgstr "Не удается установить атрибут '%q'" #: py/emitnative.c msgid "can't store '%q'" @@ -2795,7 +2801,7 @@ msgstr "Не удается сохранить '%q'" #: py/emitnative.c msgid "can't store to '%q'" -msgstr "Не удается сохранить '%q'" +msgstr "невозможно сохранить в «%q»" #: py/emitnative.c msgid "can't store with '%q' index" @@ -2827,7 +2833,7 @@ msgstr "Не удается привести выходные данные с п #: extmod/ulab/code/ndarray.c msgid "cannot convert complex to dtype" -msgstr "Не удается преобразовать complex в dtype" +msgstr "невозможно преобразовать комплекс в тип d" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex type" @@ -2871,15 +2877,15 @@ msgstr "Слишком маленький буфер символов" #: py/modbuiltins.c msgid "chr() arg not in range(0x110000)" -msgstr "chr() arg отсутствует в диапазоне(0x110000)" +msgstr "chr() аргумент вне диапазона (0x110000)" #: py/modbuiltins.c msgid "chr() arg not in range(256)" -msgstr "chr() arg не в диапазоне(256)" +msgstr "chr() аргумент вне диапазона (256)" #: shared-bindings/bitmaptools/__init__.c msgid "clip point must be (x,y) tuple" -msgstr "Точка клипа должна быть кортежом (X,Y)" +msgstr "Точка клипа должна быть кортежом (x,y)" #: shared-bindings/msgpack/ExtType.c msgid "code outside range 0~127" @@ -2887,7 +2893,9 @@ msgstr "код вне диапазона 0~127" #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" -msgstr "цветовой буфер должен быть 3 байта (RGB) или 4 байта (RGB + байт пэда)" +msgstr "" +"Цветовой буфер должен иметь размер 3 байта (RGB) или 4 байта (RGB + байт " +"заполнения)" #: shared-bindings/displayio/Palette.c msgid "color buffer must be a buffer, tuple, list, or int" @@ -2924,11 +2932,11 @@ msgstr "Аргументы свертки должны быть линейным #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must be ndarrays" -msgstr "Аргументы свертки должны быть линейными массивами" +msgstr "Аргументы свертки должны быть линейными массивами nd" #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must not be empty" -msgstr "Аргументы convolve не должны быть пустыми" +msgstr "аргументы свертки не должны быть пустыми" #: extmod/ulab/code/numpy/io/io.c msgid "corrupted file" @@ -2940,7 +2948,7 @@ msgstr "не удалось инвертировать матрицу Ванде #: shared-module/sdcardio/SDCard.c msgid "couldn't determine SD card version" -msgstr "Не удалось определить версию SD-карты" +msgstr "Не удалось определить версию SD карты" #: extmod/ulab/code/numpy/numerical.c msgid "cross is defined for 1D arrays of length 3" @@ -2984,7 +2992,7 @@ msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "destination buffer must be an array of type 'H' for bit_depth = 16" -msgstr "буфер назначения должен быть массивом типа 'H' для bit_depth = 16" +msgstr "буфер назначения должен быть массивом типа «H» для битовой_глубины = 16" #: py/objdict.c msgid "dict update sequence has wrong length" @@ -2992,7 +3000,7 @@ msgstr "последовательность обновления дикта и #: extmod/ulab/code/numpy/numerical.c msgid "diff argument must be an ndarray" -msgstr "дифф-аргумент, должно быть, ndarray" +msgstr "Аргумент diff должен быть массивом nd" #: extmod/ulab/code/numpy/numerical.c msgid "differentiation order out of range" @@ -3016,7 +3024,7 @@ msgstr "Деление на ноль" #: extmod/ulab/code/numpy/vector.c msgid "dtype must be float, or complex" -msgstr "dtype должен быть поплавком или сложным" +msgstr "Тип d должен быть плавающим или сложным" #: py/objdeque.c msgid "empty" @@ -3056,12 +3064,12 @@ msgid "" "espcamera.Camera requires reserved PSRAM to be configured. See the " "documentation for instructions." msgstr "" -"Эспкамера. Камера требует настройки зарезервированной PSRAM. Инструкции см. " -"в документации." +"espcamera.Для настройки камеры требуется зарезервированная PSRAM. Инструкции " +"см. в документации." #: py/runtime.c msgid "exceptions must derive from BaseException" -msgstr "исключения должны быть производными от BaseException" +msgstr "исключения должны быть производными от базового исключения" #: py/objstr.c msgid "expected ':' after format specifier" @@ -3073,7 +3081,7 @@ msgstr "Ожидаемый кортеж/список" #: py/modthread.c msgid "expecting a dict for keyword args" -msgstr "Ожидание дикта для args ключевых слов" +msgstr "ожидание определения аргументов ключевых слов" #: py/compile.c msgid "expecting an assembler instruction" @@ -3123,11 +3131,11 @@ msgstr "первый аргумент должен быть функцией" #: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" -msgstr "Первым аргументом должен быть кортеж ндарреев" +msgstr "первый аргумент должен быть кортежем из nd массивов" #: extmod/ulab/code/numpy/transform.c extmod/ulab/code/numpy/vector.c msgid "first argument must be an ndarray" -msgstr "Первым аргументом должен быть Ндаррей" +msgstr "первый аргумент должен быть массивом nd" #: py/objtype.c msgid "first argument to super() must be type" @@ -3135,7 +3143,7 @@ msgstr "первый аргумент супер() должен быть тип #: extmod/ulab/code/scipy/linalg/linalg.c msgid "first two arguments must be ndarrays" -msgstr "первые два аргумента должны быть ndarrays" +msgstr "первые два аргумента должны быть массивами nd" #: extmod/ulab/code/ndarray.c msgid "flattening order must be either 'C', or 'F'" @@ -3143,7 +3151,7 @@ msgstr "порядок сглаживания должен быть либо 'C' #: extmod/ulab/code/numpy/numerical.c msgid "flip argument must be an ndarray" -msgstr "Аргумент flip должен быть ndarray" +msgstr "аргумент переворота должен быть массивом nd" #: py/objint.c msgid "float too big" @@ -3184,11 +3192,11 @@ msgstr "функция имеет один и тот же знак в конце #: extmod/ulab/code/ndarray.c msgid "function is defined for ndarrays only" -msgstr "функция определяется только для ndarrays" +msgstr "функция определена только для массивов nd" #: extmod/ulab/code/numpy/carray/carray.c msgid "function is implemented for ndarrays only" -msgstr "функция реализована только для ndarrays" +msgstr "функция реализована только для массивов nd" #: py/argcheck.c #, c-format @@ -3227,7 +3235,7 @@ msgstr "генератор проигнорировал Выход" #: py/objgenerator.c py/runtime.c msgid "generator raised StopIteration" -msgstr "генератор поднял StopIteration" +msgstr "генератор поднят Остановить итерацию" #: shared-bindings/_stage/Layer.c msgid "graphic must be 2048 bytes long" @@ -3239,7 +3247,7 @@ msgstr "хэш является окончательным" #: extmod/moduheapq.c msgid "heap must be a list" -msgstr "куча должна быть списком;" +msgstr "куча должна быть списком" #: py/compile.c msgid "identifier redefined as global" @@ -3358,21 +3366,19 @@ msgstr "Вход должен быть 1- или 2-D" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be a 1D ndarray" -msgstr "входные данные должны быть 1D ndarray" +msgstr "входные данные должны быть 1D-массивом nd" #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" -msgstr "Входные данные должны быть плотным ndarray" +msgstr "входные данные должны быть плотным массивом nd" #: extmod/ulab/code/user/user.c msgid "input must be an ndarray" -msgstr "Входные данные должны быть ndarray" +msgstr "ввод должен быть массивом nd" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be an ndarray, or a scalar" -msgstr "" -"Входные данные должны быть входными данными, должны быть ndarray или " -"скалярными" +msgstr "входные данные должны быть массивом nd или скаляром" #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" @@ -3384,7 +3390,8 @@ msgstr "Входные данные должны быть квадратной #: extmod/ulab/code/numpy/numerical.c msgid "input must be tuple, list, range, or ndarray" -msgstr "Входные данные должны быть кортежом, списком, диапазоном или ndarray" +msgstr "" +"входные данные должны быть кортежем, списком, диапазоном или массивом nd" #: extmod/ulab/code/numpy/poly.c msgid "input vectors must be of equal length" @@ -3397,7 +3404,7 @@ msgstr "interp определен для 1D-итераций одинаково #: shared-bindings/_bleio/Adapter.c #, c-format msgid "interval must be in range %s-%s" -msgstr "Интервал должен находиться в диапазоне %S-%S" +msgstr "Интервал должен находиться в диапазоне %s-%s" #: py/compile.c msgid "invalid architecture" @@ -3406,7 +3413,7 @@ msgstr "Недопустимая архитектура" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" -msgstr "Недопустимые bits_per_pixel %d, должно быть, 1, 2, 4, 8, 16, 24 или 32" +msgstr "неверный бит_на_пиксель %d, должно быть 1, 2, 4, 8, 16, 24 или 32" #: ports/raspberrypi/common-hal/ssl/SSLSocket.c msgid "invalid cert" @@ -3415,7 +3422,7 @@ msgstr "Неверный сертификат" #: shared-bindings/bitmaptools/__init__.c #, c-format msgid "invalid element size %d for bits_per_pixel %d\n" -msgstr "Недопустимый размер элемента %d для bits_per_pixel %d\n" +msgstr "недопустимый размер элемента %d для битов на_пиксель %d\n" #: shared-bindings/bitmaptools/__init__.c #, c-format @@ -3436,11 +3443,11 @@ msgstr "Недопустимое имя хоста" #: ports/raspberrypi/common-hal/ssl/SSLSocket.c msgid "invalid key" -msgstr "Неверный ключ." +msgstr "Неверный ключ" #: py/compile.c msgid "invalid micropython decorator" -msgstr "Недопустимый декоратор MicroPython" +msgstr "неверный декоратор микропитона" #: ports/espressif/common-hal/espcamera/Camera.c msgid "invalid setting" @@ -3488,8 +3495,8 @@ msgstr "" #: py/argcheck.c msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -"аргумент(ы) ключевых слов еще не реализован - вместо этого используйте " -"обычные арги" +"Аргументы ключевого слова еще не реализованы — вместо этого используйте " +"обычные аргументы" #: py/emitinlinethumb.c py/emitinlinextensa.c msgid "label '%q' not defined" @@ -3560,7 +3567,7 @@ msgstr "матрица не является положительно опред #: ports/nrf/common-hal/_bleio/Descriptor.c #, c-format msgid "max_length must be 0-%d when fixed_length is %s" -msgstr "max_длина должна быть 0-%d, когда фиксированная длина %s" +msgstr "максимальная_длина должна быть 0-%d когда фиксированная длина %s" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is " @@ -3580,12 +3587,12 @@ msgstr "макситер должен быть > 0" #: extmod/ulab/code/numpy/numerical.c msgid "median argument must be an ndarray" -msgstr "Медианный аргумент должен быть ndarray" +msgstr "Медианный аргумент должен быть массивом nd" #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" -msgstr "Сбой выделения памяти, выделение %U байт" +msgstr "Сбой выделения памяти, выделение %u байт" #: py/runtime.c msgid "memory allocation failed, heap is locked" @@ -3609,7 +3616,7 @@ msgstr "Сбой инициализации монитора" #: extmod/ulab/code/numpy/poly.c msgid "more degrees of freedom than data points" -msgstr "Больше степеней свободы, чем точек данных" +msgstr "Больше степеней свободы чем точек данных" #: py/compile.c msgid "multiple *x in assignment" @@ -3649,12 +3656,12 @@ msgstr "родной урожай" #: extmod/ulab/code/ndarray.c msgid "ndarray length overflows" -msgstr "Длина Ндаррея переливается" +msgstr "Переполнение длины массива nd" #: py/runtime.c #, c-format msgid "need more than %d values to unpack" -msgstr "Для распаковки требуется более % значений %d" +msgstr "Для распаковки требуется более значений %d" #: py/modmath.c msgid "negative factorial" @@ -3674,7 +3681,7 @@ msgstr "вложенный индекс должен быть int" #: shared-module/sdcardio/SDCard.c msgid "no SD card" -msgstr "нет SD-карты" +msgstr "нет SD карты" #: py/vm.c msgid "no active exception to reraise" @@ -3698,7 +3705,7 @@ msgstr "Нет модуля с именем '%Q'" #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" -msgstr "нет ответа с SD-карты" +msgstr "нет ответа с SD карты" #: ports/espressif/common-hal/espcamera/Camera.c py/objobject.c py/runtime.c msgid "no such attribute" @@ -3707,12 +3714,12 @@ msgstr "нет такого атрибута" #: ports/espressif/common-hal/_bleio/Connection.c #: ports/nrf/common-hal/_bleio/Connection.c msgid "non-UUID found in service_uuids_whitelist" -msgstr "неUUID найден в service_uuids_whitelist" +msgstr "не-UUID найден в service_uuids_whitelist" #: py/compile.c msgid "non-default argument follows default argument" msgstr "" -"Аргумент, отличный от аргумента по умолчанию, следует за аргументом по " +"Аргумент отличный от аргумента по умолчанию следует за аргументом по " "умолчанию" #: extmod/modubinascii.c @@ -3745,7 +3752,7 @@ msgstr "Недостаточно аргументов для строки фор #: extmod/ulab/code/numpy/carray/carray_tools.c msgid "not implemented for complex dtype" -msgstr "Не реализовано для сложного DTYPE" +msgstr "не реализовано для сложного типа d" #: extmod/ulab/code/numpy/bitwise.c msgid "not supported for input types" @@ -3762,7 +3769,7 @@ msgstr "объект " #: py/obj.c #, c-format msgid "object '%s' isn't a tuple or list" -msgstr "Объект \"%S\" не является кортежом или списком" +msgstr "Объект \"%s\" не является кортежом или списком" #: py/obj.c msgid "object doesn't support item assignment" @@ -3832,7 +3839,7 @@ msgstr "Смещение за пределы" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" -msgstr "поддерживается только bit_depth=16" +msgstr "поддерживается только бит_глубина=16" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only mono is supported" @@ -3840,11 +3847,11 @@ msgstr "Поддерживается только моно" #: extmod/ulab/code/numpy/create.c msgid "only ndarrays can be concatenated" -msgstr "Только ндарреи могут быть объединены" +msgstr "только nd массивы могут быть объединены" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only oversample=64 is supported" -msgstr "поддерживается только oversample=64" +msgstr "поддерживается только выборка = 64" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c @@ -3872,7 +3879,7 @@ msgstr "операция определена только для 2D-масси #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for ndarrays only" -msgstr "Операция определена только для ndarrays" +msgstr "операция определена только для массивов nd" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" @@ -3880,7 +3887,7 @@ msgstr "операция реализована только для 1D логи #: extmod/ulab/code/numpy/numerical.c msgid "operation is not implemented on ndarrays" -msgstr "Операция не реализована на ndarrays" +msgstr "операция не реализована на массивах nd" #: extmod/ulab/code/ndarray.c msgid "operation is not supported for given type" @@ -3901,7 +3908,7 @@ msgstr "Наш массив слишком мал" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for complex dtype" -msgstr "ключевое слово не поддерживается для сложного dtype" +msgstr "Ключевое слово out не поддерживается для сложного типа d" #: extmod/ulab/code/numpy/vector.c msgid "out keyword is not supported for function" @@ -3913,7 +3920,7 @@ msgstr "Out должен быть плотным массивом с плава #: extmod/ulab/code/numpy/vector.c msgid "out must be an ndarray" -msgstr "Входные данные должны быть ndarray" +msgstr "Входные данные должны быть массивом nd" #: extmod/ulab/code/numpy/vector.c msgid "out must be of float dtype" @@ -3925,7 +3932,7 @@ msgstr "вне досягаемости цели" #: py/objint_mpz.c msgid "overflow converting long int to machine word" -msgstr "переполнение, преобразование длинного int в машинное слово" +msgstr "переполнение преобразование длинного целого в машинное слово" #: py/modstruct.c #, c-format @@ -3938,11 +3945,11 @@ msgstr "Длина палитры должна составлять 32 байт #: py/emitinlinextensa.c msgid "parameters must be registers in sequence a2 to a5" -msgstr "Параметры должны быть регистрами в последовательности от A2 до A5" +msgstr "Параметры должны быть регистрами в последовательности от a2 до a5" #: py/emitinlinethumb.c msgid "parameters must be registers in sequence r0 to r3" -msgstr "Параметры должны быть регистрами в последовательности от R0 до R3" +msgstr "Параметры должны быть регистрами в последовательности от r0 до r3" #: shared-bindings/bitmaptools/__init__.c msgid "pixel coordinates out of bounds" @@ -3954,7 +3961,7 @@ msgstr "Опрос в файле недоступен в Win32" #: ports/espressif/common-hal/pulseio/PulseIn.c msgid "pop from an empty PulseIn" -msgstr "поп из пустого PulseIn" +msgstr "вытолкнуть из пустого импульсного входа" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -3971,11 +3978,11 @@ msgstr "порт должен быть >= 0" #: py/compile.c msgid "positional arg after **" -msgstr "позиционный arg после **" +msgstr "позиционный аргумент после **" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "позиционный arg после ключевого слова arg" +msgstr "позиционный аргумент после ключевого слова аргумента" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -4030,11 +4037,11 @@ msgstr "rgb_pins[%d] дублирует другое назначение пин #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "rgb_pins[%d] is not on the same port as clock" -msgstr "rgb_pins[%d] не находится на том же порту, что и clock" +msgstr "rgb_pins[%d] не находится на том же порту что и часы" #: extmod/ulab/code/numpy/numerical.c msgid "roll argument must be an ndarray" -msgstr "Аргумент roll должен быть массивом ND" +msgstr "Аргумент roll должен быть массивом nd" #: py/objstr.c msgid "rsplit(None,n)" @@ -4075,7 +4082,7 @@ msgstr "Знак не разрешен со спецификатором цел #: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" -msgstr "Размер определяется только для массивов ND" +msgstr "Размер определяется только для массивов nd" #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" @@ -4099,7 +4106,7 @@ msgstr "Мягкая перезагрузка\n" #: extmod/ulab/code/numpy/numerical.c msgid "sort argument must be an ndarray" -msgstr "Аргумент sort должен быть массивом ND" +msgstr "Аргумент сортировки должен быть массивом nd" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" @@ -4111,7 +4118,7 @@ msgstr "sos[:, 3] должны быть все единицы" #: extmod/ulab/code/scipy/signal/signal.c msgid "sosfilt requires iterable arguments" -msgstr "Sosfilt требует итерируемых аргументов" +msgstr "sosфильтр требует повторяющихся аргументов" #: shared-bindings/bitmaptools/__init__.c msgid "source palette too large" @@ -4147,11 +4154,11 @@ msgstr "строка не поддерживается; Использовани #: extmod/moductypes.c msgid "struct: can't index" -msgstr "struct: не может индексировать" +msgstr "структура: невозможно индексировать" #: extmod/moductypes.c msgid "struct: index out of range" -msgstr "struct: индекс вне диапазона" +msgstr "структура: индекс вне диапазона" #: extmod/moductypes.c msgid "struct: no fields" @@ -4179,19 +4186,19 @@ msgstr "Синтаксическая ошибка в дескрипторе UCTY #: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" -"Продолжительность тайм-аута превысила максимальное поддерживаемое значение" +"Продолжительность таймаута превысила максимальное поддерживаемое значение" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "timeout must be < 655.35 secs" -msgstr "тайм-аут должен быть < 655.35 сек" +msgstr "таймаут должен быть < 655.35 сек" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v1 card" -msgstr "Тайм-аут в ожидании карты V1" +msgstr "Таймаут в ожидании карты v1" #: shared-module/sdcardio/SDCard.c msgid "timeout waiting for v2 card" -msgstr "Тайм-аут ожидания карты V2" +msgstr "Таймаут ожидания карты v2" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "timer re-init" @@ -4208,7 +4215,7 @@ msgstr "Тобайты могут быть вызваны только для п #: py/compile.c msgid "too many args" -msgstr "Слишком много ARG" +msgstr "слишком много аргументов" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" @@ -4229,11 +4236,11 @@ msgstr "Слишком много значений для распаковки ( #: extmod/ulab/code/numpy/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "trapz определяется для 1D-массивов одинаковой длины" +msgstr "ловушка определена для одномерных 1D массивов одинаковой длины" #: extmod/ulab/code/numpy/approx.c msgid "trapz is defined for 1D iterables" -msgstr "trapz определен для 1D-итераций" +msgstr "ловушка определена для одномерных 1D итераций" #: py/obj.c msgid "tuple/list has wrong length" @@ -4271,11 +4278,11 @@ msgstr "тип занимает 1 или 3 аргумента" #: py/objint_longlong.c msgid "ulonglong too large" -msgstr "ulonglong слишком большой" +msgstr "голова длинная слишком большая" #: py/emitnative.c msgid "unary op %q not implemented" -msgstr "Двоичный op %q не реализован" +msgstr "унарная операция %q не реализована" #: py/parse.c msgid "unexpected indent" @@ -4300,7 +4307,7 @@ msgstr "Отступ не совпадает ни с одним уровнем #: py/objstr.c #, c-format msgid "unknown conversion specifier %c" -msgstr "Неизвестный спецификатор преобразования %C" +msgstr "Неизвестный спецификатор преобразования %c" #: py/objstr.c msgid "unknown format code '%c' for object of type '%q'" @@ -4377,7 +4384,7 @@ msgstr "Значение должно совпадать с байтами %d" #: shared-bindings/bitmaptools/__init__.c msgid "value out of range of target" -msgstr "Величина, выходящая за пределы диапазона цели" +msgstr "Величина выходящая за пределы диапазона цели" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" @@ -4398,7 +4405,7 @@ msgstr "Wi-Fi. Монитор недоступен" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" -msgstr "окно должно быть" +msgstr "окно должно быть <= интервал" #: extmod/ulab/code/numpy/numerical.c msgid "wrong axis index" @@ -4444,11 +4451,11 @@ msgstr "неверный тип вывода" #: ports/espressif/common-hal/audiobusio/__init__.c msgid "xTaskCreate failed" -msgstr "xTaskCreate провалился" +msgstr "x Создать задачу не удалось" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" -msgstr "zi должен быть bytearray" +msgstr "zi должен быть массивом nd" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" From 6784e0e720d2e59e6bb08ae18b86ebb2b0619f14 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 5 Sep 2023 11:59:35 -0500 Subject: [PATCH 024/129] Ensure debug is defined earlier --- ports/espressif/supervisor/port.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 37d67595ee..a314ce58fe 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -246,16 +246,17 @@ safe_mode_t port_init(void) { circuitpython_task = xTaskGetCurrentTaskHandle(); + #if !defined(DEBUG) + #define DEBUG (0) + #endif + // Send the ROM output out of the UART. This includes early logs. - #ifdef DEBUG + #if DEBUG ets_install_uart_printf(); #endif heap = NULL; - - #ifndef DEBUG - #define DEBUG (0) - #endif + heap_size = 0; #define pin_GPIOn(n) pin_GPIO##n #define pin_GPIOn_EXPAND(x) pin_GPIOn(x) From b7d1147f67b7169202939dd6567b73c8d327a01b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 5 Sep 2023 11:59:13 -0500 Subject: [PATCH 025/129] Bump the stack size of the uart task With DEBUG build and a consle UART, this would occur early during startup on makerfabs tft7: ``` I (0) cpu_start: Starting scheduler on APP CPU. I (10) uart: queue free spaces: 20 ***ERROR*** A stack overflow in task uart_event_task has been detected. Backtrace: 0x403786f2:0x3fce9f40 0x403820a9:0x3fce9f60 0x403850da:0x3fce9f80 0x40383a7d:0x3fcea000 0x40382158:0x3fcea030 0x4038214e:0xa5a5a5a5 |<-CORRUPTED ``` Decoded backtrace was not enlightening: ``` 0x403786f2: panic_abort at /home/jepler/src/circuitpython/ports/espressif/build-makerfabs_tft7/esp-idf/../../esp-idf/components/esp_system/panic.c:408 0x403820a9: esp_system_abort at /home/jepler/src/circuitpython/ports/espressif/build-makerfabs_tft7/esp-idf/../../esp-idf/components/esp_system/esp_system.c:137 0x403850da: vApplicationStackOverflowHook at /home/jepler/src/circuitpython/ports/espressif/build-makerfabs_tft7/esp-idf/../../esp-idf/components/freertos/port/xtensa/port.c:407 0x40383a7d: vTaskSwitchContext at /home/jepler/src/circuitpython/ports/espressif/build-makerfabs_tft7/esp-idf/../../esp-idf/components/freertos/tasks.c:3505 0x40382158: _frxt_dispatch at /home/jepler/src/circuitpython/ports/espressif/build-makerfabs_tft7/esp-idf/../../esp-idf/components/freertos/port/xtensa/portasm.S:436 0x4038214e: _frxt_int_exit at /home/jepler/src/circuitpython/ports/espressif/build-makerfabs_tft7/esp-idf/../../esp-idf/components/freertos/port/xtensa/portasm.S:231 0x00000000: ?? ??:0 ``` Adding an additional 512 bytes of stack allowed CircuitPython to start successfully. --- ports/espressif/common-hal/busio/UART.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c index 37e0092726..bee199fb17 100644 --- a/ports/espressif/common-hal/busio/UART.c +++ b/ports/espressif/common-hal/busio/UART.c @@ -175,7 +175,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, xTaskCreatePinnedToCore( uart_event_task, "uart_event_task", - configMINIMAL_STACK_SIZE, + configMINIMAL_STACK_SIZE + 512, self, CONFIG_PTHREAD_TASK_PRIO_DEFAULT, &self->event_task, From 5e26862b2c1dcdb6579d007437762462b602dba3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 5 Sep 2023 12:08:05 -0500 Subject: [PATCH 026/129] Allow use of CONFIG_SPIRAM_USE_CAPS_ALLOC .. and switch makerfabs tft7 over to it as a test. We have our existing way of "reserving" PSRAM for esp-idf (we actually control it all but add back the "reserved" part). However, this does not work with off the shelf esp_lcd, which only will allocate a framebuffer in PSRAM if CONFIG_SPIRAM_USE_CAPS_ALLOC (or CONFIG_SPIRAM_USE_ALLOC) is defined, not if CONFIG_SPIRAM_USE_MEMMAP is. This new way is possibly compatible with more esp-idf code, but it complicates CircuitPython's initial startup since nothing until port_heap_init is permitted to use the CP heap or supervisor allocator. In practice this seems to be OK today. Right now this doesn't change the setting across all boards with PSRAM and so it does not revert esp-idf to its prior state. Instead, what I'm thinking is that we can do it during or just after the IDF5 update when sdkconfig files will be getting an overhaul anyway. --- main.c | 11 +++ .../espressif/boards/makerfabs_tft7/sdkconfig | 4 +- ports/espressif/common-hal/espidf/__init__.c | 2 +- ports/espressif/supervisor/port.c | 81 ++++++++++++------- supervisor/port.h | 5 ++ 5 files changed, 70 insertions(+), 33 deletions(-) diff --git a/main.c b/main.c index c37c17dab2..d89777bc5e 100644 --- a/main.c +++ b/main.c @@ -1042,6 +1042,10 @@ int __attribute__((used)) main(void) { set_safe_mode(SAFE_MODE_NO_CIRCUITPY); } + // We maybe can't initialize the heap until here, because on espressif port we need to be able to check for reserved psram in settings.toml + // (but it's OK if this is a no-op due to the heap beinig initialized in port_init()) + set_safe_mode(port_heap_init(get_safe_mode())); + #if CIRCUITPY_ALARM // Record which alarm woke us up, if any. // common_hal_alarm_record_wake_alarm() should return a static, non-heap object @@ -1171,6 +1175,13 @@ void gc_collect(void) { MP_WEAK void port_gc_collect() { } +// A port may initialize the heap in port_init but if it cannot (for instance +// in espressif it must be done after CIRCUITPY is mounted) then it must provde +// an implementation of this function. +MP_WEAK safe_mode_t port_heap_init(safe_mode_t safe_mode_in) { + return safe_mode_in; +} + void NORETURN nlr_jump_fail(void *val) { reset_into_safe_mode(SAFE_MODE_NLR_JUMP_FAIL); while (true) { diff --git a/ports/espressif/boards/makerfabs_tft7/sdkconfig b/ports/espressif/boards/makerfabs_tft7/sdkconfig index 4449c672e1..2514dd506b 100644 --- a/ports/espressif/boards/makerfabs_tft7/sdkconfig +++ b/ports/espressif/boards/makerfabs_tft7/sdkconfig @@ -21,8 +21,8 @@ CONFIG_SPIRAM_SPEED_80M=y 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_MEMMAP=y +CONFIG_SPIRAM_USE_CAPS_ALLOC=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index 379d7c5ab4..7acf912077 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -79,7 +79,7 @@ bool common_hal_espidf_set_reserved_psram(size_t amount) { supervisor_allocation *psram_for_idf; void common_hal_espidf_reserve_psram(void) { - #ifdef CONFIG_SPIRAM + #ifdef CONFIG_SPIRAM_USE_MEMMAP if (!psram_for_idf) { ESP_LOGI(TAG, "Reserving %d bytes of psram", reserved_psram); if (reserved_psram == 0) { diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index a314ce58fe..688ceafcae 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -299,33 +299,8 @@ safe_mode_t port_init(void) { #endif #endif - #ifdef CONFIG_SPIRAM - { - intptr_t heap_start = common_hal_espidf_get_psram_start(); - intptr_t heap_end = common_hal_espidf_get_psram_end(); - size_t spiram_size = heap_end - heap_start; - if (spiram_size > 0) { - heap = (uint32_t *)heap_start; - heap_size = (heap_end - heap_start) / sizeof(uint32_t); - } else { - ESP_LOGE(TAG, "CONFIG_SPIRAM enabled but no spiram heap available"); - } - } - #endif - _never_reset_spi_ram_flash(); - if (heap == NULL) { - size_t heap_total = heap_caps_get_total_size(MALLOC_CAP_8BIT); - heap_size = MIN(heap_caps_get_largest_free_block(MALLOC_CAP_8BIT), heap_total / 2); - heap = malloc(heap_size); - heap_size = heap_size / sizeof(uint32_t); - } - if (heap == NULL) { - heap_size = 0; - return SAFE_MODE_NO_HEAP; - } - esp_reset_reason_t reason = esp_reset_reason(); switch (reason) { case ESP_RST_BROWNOUT: @@ -344,6 +319,57 @@ safe_mode_t port_init(void) { return SAFE_MODE_NONE; } +safe_mode_t port_heap_init(safe_mode_t sm) { + mp_int_t reserved = 0; + if (filesystem_present() && common_hal_os_getenv_int("CIRCUITPY_RESERVED_PSRAM", &reserved) == GETENV_OK) { + common_hal_espidf_set_reserved_psram(reserved); + } + + #ifdef CONFIG_SPIRAM_USE_MEMMAP + { + intptr_t heap_start = common_hal_espidf_get_psram_start(); + intptr_t heap_end = common_hal_espidf_get_psram_end(); + size_t spiram_size = heap_end - heap_start; + if (spiram_size > 0) { + heap = (uint32_t *)heap_start; + heap_size = (heap_end - heap_start) / sizeof(uint32_t); + common_hal_espidf_reserve_psram(); + } else { + ESP_LOGE(TAG, "CONFIG_SPIRAM_USE_MMAP enabled but no spiram heap available"); + } + } + #elif CONFIG_SPIRAM_USE_CAPS_ALLOC + { + intptr_t psram_start = common_hal_espidf_get_psram_start(); + intptr_t psram_end = common_hal_espidf_get_psram_end(); + size_t psram_amount = psram_end - psram_start; + size_t biggest_block = heap_caps_get_largest_free_block(MALLOC_CAP_SPIRAM); + size_t try_alloc = MIN(biggest_block, psram_amount - common_hal_espidf_get_reserved_psram()); + heap = heap_caps_malloc(try_alloc, MALLOC_CAP_SPIRAM); + + if (heap) { + heap_size = try_alloc; + } else { + ESP_LOGE(TAG, "CONFIG_SPIRAM_USE_CAPS_ALLOC but no spiram heap available"); + } + } + #endif + + if (heap == NULL) { + size_t heap_total = heap_caps_get_total_size(MALLOC_CAP_8BIT); + heap_size = MIN(heap_caps_get_largest_free_block(MALLOC_CAP_8BIT), heap_total / 2); + heap = malloc(heap_size); + heap_size = heap_size / sizeof(uint32_t); + } + if (heap == NULL) { + heap_size = 0; + return SAFE_MODE_NO_HEAP; + } + + return sm; + +} + void reset_port(void) { // TODO deinit for esp32-camera #if CIRCUITPY_ESPCAMERA @@ -533,11 +559,6 @@ void port_idle_until_interrupt(void) { void port_post_boot_py(bool heap_valid) { if (!heap_valid && filesystem_present()) { - mp_int_t reserved; - if (common_hal_os_getenv_int("CIRCUITPY_RESERVED_PSRAM", &reserved) == GETENV_OK) { - common_hal_espidf_set_reserved_psram(reserved); - } - common_hal_espidf_reserve_psram(); } } diff --git a/supervisor/port.h b/supervisor/port.h index 7b48a3f13b..ebfa8473f2 100644 --- a/supervisor/port.h +++ b/supervisor/port.h @@ -43,6 +43,11 @@ extern uint32_t _ebss; safe_mode_t port_init(void); +// If the port does not initialize the heap during port_init(), it must provide +// this function which is called after CIRCUITPY is mounted. +// If not required, a default (weak) implementation that does nothing is used. +safe_mode_t port_heap_init(safe_mode_t); + // Reset the microcontroller completely. void reset_cpu(void) NORETURN; From 9d191b52232959309e83981b7d7ccce2979a6fac Mon Sep 17 00:00:00 2001 From: xXx Date: Mon, 4 Sep 2023 08:44:23 +0000 Subject: [PATCH 027/129] Translated using Weblate (Russian) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 89 +++++++++++++++++++++++++++------------------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index 5fd796a4c3..e1a5d75074 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-09-03 02:59+0000\n" +"PO-Revision-Date: 2023-09-05 20:12+0000\n" "Last-Translator: xXx \n" "Language-Team: none\n" "Language: ru\n" @@ -609,7 +609,7 @@ msgstr "Преобразование звука не реализовано" #: shared-bindings/wifi/Radio.c msgid "AuthMode.OPEN is not used with password" -msgstr "AuthMode.OPEN не используется с паролем" +msgstr "Режим авторизации.OPEN не используется с паролем" #: shared-bindings/wifi/Radio.c supervisor/shared/web_workflow/web_workflow.c msgid "Authentication failure" @@ -875,7 +875,7 @@ msgstr "Координатные массивы имеют разные длин #: shared-bindings/bitmaptools/__init__.c msgid "Coordinate arrays types have different sizes" -msgstr "Типы координат имеют разные размеры" +msgstr "Типы массивов координат имеют разные размеры" #: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" @@ -936,7 +936,7 @@ msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." -msgstr "Емкость места назначения меньше чем Destination_length." +msgstr "Емкость места назначения меньше длины места назначения." #: ports/nrf/common-hal/audiobusio/I2SOut.c msgid "Device in use" @@ -1005,7 +1005,7 @@ msgstr "Расширенные объявления с ответом скани #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is defined for ndarrays only" -msgstr "FFT определено только для массивов nd" +msgstr "FFT определено только для массивов ndarrays" #: extmod/ulab/code/numpy/fft/fft_tools.c msgid "FFT is implemented for linear arrays only" @@ -1114,8 +1114,8 @@ msgstr "" #: shared-bindings/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" -"Частота должна соответствовать существующему PWMOut с использованием этого " -"таймера" +"Частота должна соответствовать существующему выходу PWM с использованием " +"этого таймера" #: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c #: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c @@ -2001,7 +2001,7 @@ msgstr "Фрагменты не поддерживаются" #: ports/espressif/common-hal/socketpool/SocketPool.c #: ports/raspberrypi/common-hal/socketpool/SocketPool.c msgid "SocketPool can only be used with wifi.radio" -msgstr "Пул сокетов можно использовать только с wifi.radio" +msgstr "SocketPool можно использовать только с wifi.radio" #: shared-bindings/aesio/aes.c msgid "Source and destination buffers must be the same length" @@ -2518,11 +2518,11 @@ msgstr "arg — пустая последовательность" #: py/objobject.c msgid "arg must be user-type" -msgstr "ARG должен быть пользовательского типа" +msgstr "arg должен быть пользовательского типа" #: extmod/ulab/code/numpy/numerical.c msgid "argsort argument must be an ndarray" -msgstr "Аргумент сортировки arg должен быть массивом nd" +msgstr "аргумент сортировки должен быть аргументом массива ndarray" #: extmod/ulab/code/numpy/numerical.c msgid "argsort is not implemented for flattened arrays" @@ -2547,7 +2547,7 @@ msgstr "аргумент должен быть '%q', а не '%q'" #: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c msgid "arguments must be ndarrays" -msgstr "аргументы должны быть массивами" +msgstr "Аргументы должны быть массивами ndarrays" #: extmod/ulab/code/ndarray.c msgid "array and index length must be equal" @@ -2572,11 +2572,15 @@ msgstr "Переполнение ASM" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" -msgstr "Попытка получить (arg)min/(arg)max пустой последовательности" +msgstr "" +"Попытка получить (аргумент)минимальный/(аргумент)максимальный пустой " +"последовательности" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "Попытка получить argmin/argmax пустой последовательности" +msgstr "" +"Попытка получить аргумент минимальный/аргумент максимальный пустой " +"последовательности" #: py/objstr.c msgid "attributes not supported yet" @@ -2833,7 +2837,7 @@ msgstr "Не удается привести выходные данные с п #: extmod/ulab/code/ndarray.c msgid "cannot convert complex to dtype" -msgstr "невозможно преобразовать комплекс в тип d" +msgstr "не может превратить комплекс в dtype" #: extmod/ulab/code/ndarray.c msgid "cannot convert complex type" @@ -2904,7 +2908,7 @@ msgstr "Цветовой буфер должен быть буфером, кор #: shared-bindings/displayio/Palette.c msgid "color buffer must be a bytearray or array of type 'b' or 'B'" msgstr "" -"цветовой буфер должен быть предплечьем или массивом типа \"b\" или \"B\"" +"цветовой буфер должен быть байтом массива или массивом типа \"b\" или \"B\"" #: shared-bindings/displayio/Palette.c msgid "color must be between 0x000000 and 0xffffff" @@ -2932,7 +2936,7 @@ msgstr "Аргументы свертки должны быть линейным #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must be ndarrays" -msgstr "Аргументы свертки должны быть линейными массивами nd" +msgstr "переплетение аргументов должно быть массивами ndarrays" #: extmod/ulab/code/numpy/filter.c msgid "convolve arguments must not be empty" @@ -2987,7 +2991,7 @@ msgstr "По умолчанию не является функцией" msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" msgstr "" -"буфер назначения должен быть байтером или массивом типа \"B\" для " +"буфер назначения должен быть байтоммассива или массивом типа \"B\" для " "бит_глубины = 8" #: shared-bindings/audiobusio/PDMIn.c @@ -3000,7 +3004,7 @@ msgstr "последовательность обновления дикта и #: extmod/ulab/code/numpy/numerical.c msgid "diff argument must be an ndarray" -msgstr "Аргумент diff должен быть массивом nd" +msgstr "аргумент DIFF должен быть массивом ndarray" #: extmod/ulab/code/numpy/numerical.c msgid "differentiation order out of range" @@ -3131,11 +3135,11 @@ msgstr "первый аргумент должен быть функцией" #: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" -msgstr "первый аргумент должен быть кортежем из nd массивов" +msgstr "Первый аргумент должен быть кортежом массива ndarrays" #: extmod/ulab/code/numpy/transform.c extmod/ulab/code/numpy/vector.c msgid "first argument must be an ndarray" -msgstr "первый аргумент должен быть массивом nd" +msgstr "Первым аргументом должен быть массивом ndarray" #: py/objtype.c msgid "first argument to super() must be type" @@ -3143,7 +3147,7 @@ msgstr "первый аргумент супер() должен быть тип #: extmod/ulab/code/scipy/linalg/linalg.c msgid "first two arguments must be ndarrays" -msgstr "первые два аргумента должны быть массивами nd" +msgstr "Первые два аргумента должны быть массивами ndarrays" #: extmod/ulab/code/ndarray.c msgid "flattening order must be either 'C', or 'F'" @@ -3151,7 +3155,7 @@ msgstr "порядок сглаживания должен быть либо 'C' #: extmod/ulab/code/numpy/numerical.c msgid "flip argument must be an ndarray" -msgstr "аргумент переворота должен быть массивом nd" +msgstr "Флип -аргумент должен быть массивом ndarray" #: py/objint.c msgid "float too big" @@ -3192,11 +3196,11 @@ msgstr "функция имеет один и тот же знак в конце #: extmod/ulab/code/ndarray.c msgid "function is defined for ndarrays only" -msgstr "функция определена только для массивов nd" +msgstr "Функция определяется только для массивов ndarrays" #: extmod/ulab/code/numpy/carray/carray.c msgid "function is implemented for ndarrays only" -msgstr "функция реализована только для массивов nd" +msgstr "Функция реализована только для массивов ndarrays" #: py/argcheck.c #, c-format @@ -3366,19 +3370,19 @@ msgstr "Вход должен быть 1- или 2-D" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be a 1D ndarray" -msgstr "входные данные должны быть 1D-массивом nd" +msgstr "Ввод должен быть 1D массивом ndarray" #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" -msgstr "входные данные должны быть плотным массивом nd" +msgstr "Ввод должен быть плотным массивом ndarray" #: extmod/ulab/code/user/user.c msgid "input must be an ndarray" -msgstr "ввод должен быть массивом nd" +msgstr "Ввод должен быть массивом ndarray" #: extmod/ulab/code/numpy/carray/carray.c msgid "input must be an ndarray, or a scalar" -msgstr "входные данные должны быть массивом nd или скаляром" +msgstr "Ввод должен быть массивом ndarray или скаляр" #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" @@ -3390,8 +3394,7 @@ msgstr "Входные данные должны быть квадратной #: extmod/ulab/code/numpy/numerical.c msgid "input must be tuple, list, range, or ndarray" -msgstr "" -"входные данные должны быть кортежем, списком, диапазоном или массивом nd" +msgstr "Ввод должен быть кортеж, список, диапазон или массивом ndarray" #: extmod/ulab/code/numpy/poly.c msgid "input vectors must be of equal length" @@ -3544,7 +3547,7 @@ msgstr "mDNS уже инициализирован" #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "mDNS only works with built-in WiFi" -msgstr "mDNS работает только со встроенным Wi-Fi" +msgstr "mDNS работает только со встроенным WiFi" #: py/parse.c msgid "malformed f-string" @@ -3587,7 +3590,7 @@ msgstr "макситер должен быть > 0" #: extmod/ulab/code/numpy/numerical.c msgid "median argument must be an ndarray" -msgstr "Медианный аргумент должен быть массивом nd" +msgstr "Средний аргумент должен быть массивом ndarray" #: py/runtime.c #, c-format @@ -3656,7 +3659,7 @@ msgstr "родной урожай" #: extmod/ulab/code/ndarray.c msgid "ndarray length overflows" -msgstr "Переполнение длины массива nd" +msgstr "Переполнение длины массива ndarray" #: py/runtime.c #, c-format @@ -3714,7 +3717,7 @@ msgstr "нет такого атрибута" #: ports/espressif/common-hal/_bleio/Connection.c #: ports/nrf/common-hal/_bleio/Connection.c msgid "non-UUID found in service_uuids_whitelist" -msgstr "не-UUID найден в service_uuids_whitelist" +msgstr "не-UUID найден в сервисе_uuids_белый список" #: py/compile.c msgid "non-default argument follows default argument" @@ -3847,7 +3850,7 @@ msgstr "Поддерживается только моно" #: extmod/ulab/code/numpy/create.c msgid "only ndarrays can be concatenated" -msgstr "только nd массивы могут быть объединены" +msgstr "только массивы ndarrays могут быть объединены" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only oversample=64 is supported" @@ -3879,7 +3882,7 @@ msgstr "операция определена только для 2D-масси #: extmod/ulab/code/numpy/linalg/linalg.c msgid "operation is defined for ndarrays only" -msgstr "операция определена только для массивов nd" +msgstr "операция определена только для массивов ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is implemented for 1D Boolean arrays only" @@ -3887,7 +3890,7 @@ msgstr "операция реализована только для 1D логи #: extmod/ulab/code/numpy/numerical.c msgid "operation is not implemented on ndarrays" -msgstr "операция не реализована на массивах nd" +msgstr "операция не реализована на массивах ndarrays" #: extmod/ulab/code/ndarray.c msgid "operation is not supported for given type" @@ -3920,7 +3923,7 @@ msgstr "Out должен быть плотным массивом с плава #: extmod/ulab/code/numpy/vector.c msgid "out must be an ndarray" -msgstr "Входные данные должны быть массивом nd" +msgstr "out должен быть массивом ndarray" #: extmod/ulab/code/numpy/vector.c msgid "out must be of float dtype" @@ -4041,7 +4044,7 @@ msgstr "rgb_pins[%d] не находится на том же порту что #: extmod/ulab/code/numpy/numerical.c msgid "roll argument must be an ndarray" -msgstr "Аргумент roll должен быть массивом nd" +msgstr "аргумент roll должен быть массивом ndarray" #: py/objstr.c msgid "rsplit(None,n)" @@ -4082,7 +4085,7 @@ msgstr "Знак не разрешен со спецификатором цел #: extmod/ulab/code/ulab_tools.c msgid "size is defined for ndarrays only" -msgstr "Размер определяется только для массивов nd" +msgstr "размер определен только для массива ndarrays" #: shared-bindings/time/__init__.c msgid "sleep length must be non-negative" @@ -4106,11 +4109,11 @@ msgstr "Мягкая перезагрузка\n" #: extmod/ulab/code/numpy/numerical.c msgid "sort argument must be an ndarray" -msgstr "Аргумент сортировки должен быть массивом nd" +msgstr "аргумент сортировки должен быть массивом ndarray" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos array must be of shape (n_section, 6)" -msgstr "Массив SOS должен иметь форму (n_section, 6)" +msgstr "Массив sos должен иметь форму (n_section, 6)" #: extmod/ulab/code/scipy/signal/signal.c msgid "sos[:, 3] should be all ones" @@ -4455,7 +4458,7 @@ msgstr "x Создать задачу не удалось" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" -msgstr "zi должен быть массивом nd" +msgstr "зи, должно быть, массивом ndarray" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of float type" From a75996a98cd2c7c9c2a8aeb9e3515816eebbdbeb Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 5 Sep 2023 23:29:27 +0200 Subject: [PATCH 028/129] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 15 +++++++++------ locale/cs.po | 12 ++++++------ locale/de_DE.po | 15 +++++++++------ locale/el.po | 12 ++++++------ locale/en_GB.po | 15 +++++++++------ locale/es.po | 15 +++++++++------ locale/fil.po | 15 +++++++++------ locale/fr.po | 15 +++++++++------ locale/hi.po | 12 ++++++------ locale/it_IT.po | 15 +++++++++------ locale/ja.po | 15 +++++++++------ locale/ko.po | 12 ++++++------ locale/nl.po | 15 +++++++++------ locale/pl.po | 15 +++++++++------ locale/pt_BR.po | 15 +++++++++------ locale/ru.po | 34 +++++++++++++++++++++------------- locale/sv.po | 15 +++++++++------ locale/tr.po | 12 ++++++------ locale/zh_Latn_pinyin.po | 15 +++++++++------ 19 files changed, 168 insertions(+), 121 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 19484df074..e4b9559f65 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -92,13 +92,17 @@ msgstr "" "%d pin alamat, %d rgb pin dan %d ubin menunjukkan ketinggian %d, bukan %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2974,7 +2978,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "heap kosong" @@ -3926,10 +3930,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "antrian meluap (overflow)" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" @@ -4393,6 +4393,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "queue overflow" +#~ msgstr "antrian meluap (overflow)" + #~ msgid "Buffer is too small" #~ msgstr "Buffer terlalu kecil" diff --git a/locale/cs.po b/locale/cs.po index 0c22cfffbe..a71c63adea 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -93,13 +93,17 @@ msgid "" msgstr "%d adresní pin, %d rgb pin a %d dlaždice indikuje výšku %d, ne %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2961,7 +2965,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3912,10 +3916,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 26ab1022ce..5ad4b0ba95 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -98,13 +98,17 @@ msgstr "" "nicht %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -3025,7 +3029,7 @@ msgstr "leer" msgid "empty file" msgstr "Leere Datei" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "leerer heap" @@ -3992,10 +3996,6 @@ msgstr "pow() mit 3 Argumenten erfordert ganze Zahlen" msgid "pull masks conflict with direction masks" msgstr "Pull-Masken kollidieren mit Richtungsmasken" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "Warteschlangenüberlauf" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "unformatierte F-Strings werden nicht unterstützt" @@ -4461,6 +4461,9 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "queue overflow" +#~ msgstr "Warteschlangenüberlauf" + #~ msgid "Stopping AP is not supported." #~ msgstr "Das Stoppen des AP wird nicht unterstützt." diff --git a/locale/el.po b/locale/el.po index 657ab83f20..e2fa69ec51 100644 --- a/locale/el.po +++ b/locale/el.po @@ -101,13 +101,17 @@ msgstr "" "%d pin διεύθυνσης, %d rgb ping και %d πλακίδια αναδεικνύουν ύψος %d, όχι %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2974,7 +2978,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3925,10 +3929,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 73b5028849..fd18f4812a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -99,13 +99,17 @@ msgstr "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2984,7 +2988,7 @@ msgstr "empty" msgid "empty file" msgstr "empty file" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "empty heap" @@ -3937,10 +3941,6 @@ msgstr "pow() with 3 arguments requires integers" msgid "pull masks conflict with direction masks" msgstr "pull masks conflict with direction masks" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "queue overflow" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "raw f-strings are not supported" @@ -4404,6 +4404,9 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "queue overflow" +#~ msgstr "queue overflow" + #~ msgid "Stopping AP is not supported." #~ msgstr "Stopping AP is not supported." diff --git a/locale/es.po b/locale/es.po index 8066a3bba5..a4cc31a820 100644 --- a/locale/es.po +++ b/locale/es.po @@ -104,13 +104,17 @@ msgstr "" "no de %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -3031,7 +3035,7 @@ msgstr "vacío" msgid "empty file" msgstr "archivo vacio" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "heap vacío" @@ -3989,10 +3993,6 @@ msgstr "pow() con 3 argumentos requiere enteros" msgid "pull masks conflict with direction masks" msgstr "máscara de pull en conflicto con máscara de dirección" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "desbordamiento de cola(queue)" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "raw f-strings no esta soportadas" @@ -4457,6 +4457,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "queue overflow" +#~ msgstr "desbordamiento de cola(queue)" + #~ msgid "Stopping AP is not supported." #~ msgstr "Parar el AP no esta soportado." diff --git a/locale/fil.po b/locale/fil.po index 226de0e449..123d399267 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -90,13 +90,17 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2975,7 +2979,7 @@ msgstr "walang laman" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "walang laman ang heap" @@ -3933,10 +3937,6 @@ msgstr "pow() na may 3 argumento kailangan ng integers" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "puno na ang pila (overflow)" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" @@ -4400,6 +4400,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "queue overflow" +#~ msgstr "puno na ang pila (overflow)" + #~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" #~ msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter" diff --git a/locale/fr.po b/locale/fr.po index 55e1cad427..fe501834dd 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -101,13 +101,17 @@ msgstr "" "%d, et non %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -3045,7 +3049,7 @@ msgstr "vide" msgid "empty file" msgstr "fichier vide" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "tas vide" @@ -4009,10 +4013,6 @@ msgstr "pow() avec 3 arguments nécessite des entiers" msgid "pull masks conflict with direction masks" msgstr "masque pull est en conflit avec les masques de direction" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "dépassement de file" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "les f-strings bruts ne sont pas supportées" @@ -4477,6 +4477,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "queue overflow" +#~ msgstr "dépassement de file" + #~ msgid "Stopping AP is not supported." #~ msgstr "Stopper n'est pas supporté." diff --git a/locale/hi.po b/locale/hi.po index 8b6daab54f..b2041ad82e 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -89,13 +89,17 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2948,7 +2952,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3899,10 +3903,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index e0f719cb5a..4801b2e158 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -93,13 +93,17 @@ msgstr "" "%d pin indirizzo, %d pin rgb e %d tessere indicano l'altezza di %d, non %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2980,7 +2984,7 @@ msgstr "vuoto" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "heap vuoto" @@ -3943,10 +3947,6 @@ msgstr "pow() con 3 argomenti richiede interi" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "overflow della coda" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" @@ -4410,6 +4410,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "queue overflow" +#~ msgstr "overflow della coda" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "L'oggetto 'coroutine' non è un iteratore" diff --git a/locale/ja.po b/locale/ja.po index 90608bca7e..aa5bf7a2f5 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -95,13 +95,17 @@ msgid "" msgstr "%dアドレスピン、%dRGBピン、%dタイルは%dの高さを指示する。%dではない。" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2967,7 +2971,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3919,10 +3923,6 @@ msgstr "pow()の第3引数には整数が必要" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "キューがオーバーフローしました" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" @@ -4386,6 +4386,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "queue overflow" +#~ msgstr "キューがオーバーフローしました" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "'coroutine' オブジェクトはイテレータではありません" diff --git a/locale/ko.po b/locale/ko.po index 0f1329a029..4ee9a3e872 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -90,13 +90,17 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2952,7 +2956,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3903,10 +3907,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 424b229068..edfc54cfe8 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -89,13 +89,17 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2976,7 +2980,7 @@ msgstr "leeg" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "lege heap" @@ -3931,10 +3935,6 @@ msgstr "pow() met 3 argumenten vereist integers" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "wachtrij overloop" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" @@ -4398,6 +4398,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "queue overflow" +#~ msgstr "wachtrij overloop" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "'coroutine' object is geen iterator" diff --git a/locale/pl.po b/locale/pl.po index 80067e391b..f918f5a345 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -91,13 +91,17 @@ msgid "" msgstr "" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2955,7 +2959,7 @@ msgstr "puste" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "pusta sterta" @@ -3906,10 +3910,6 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "przepełnienie kolejki" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" @@ -4373,6 +4373,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "queue overflow" +#~ msgstr "przepełnienie kolejki" + #~ msgid "Buffer is too small" #~ msgstr "Bufor jest za mały" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 18dfbc65ce..83f1a4a95a 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -102,13 +102,17 @@ msgstr "" "não %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -3034,7 +3038,7 @@ msgstr "vazio" msgid "empty file" msgstr "arquivo vazio" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "a área de alocação dinâmica de variáveis (heap) está vazia" @@ -3998,10 +4002,6 @@ msgstr "o pow() com 3 argumentos requer números inteiros" msgid "pull masks conflict with direction masks" msgstr "puxe as máscaras em conflito com as máscaras de direção" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "estouro de fila" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "os f-strings brutos não são suportados" @@ -4465,6 +4465,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "queue overflow" +#~ msgstr "estouro de fila" + #~ msgid "Stopping AP is not supported." #~ msgstr "Não há suporte para a interrupção do AP." diff --git a/locale/ru.po b/locale/ru.po index e1a5d75074..9991c01e7f 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 5.0.1-dev\n" #: main.c @@ -104,13 +104,17 @@ msgstr "" "%d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -759,7 +763,8 @@ msgstr "" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on two low pins from deep sleep." -msgstr "Из глубокого сна может сигнализировать только по двум низким контактам." +msgstr "" +"Из глубокого сна может сигнализировать только по двум низким контактам." #: ports/espressif/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Characteristic.c @@ -839,7 +844,8 @@ msgstr "Невозможно изменить частоту на таймере #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge, only level" -msgstr "Невозможно проснуться по изменению логического уровня, только по уровню" +msgstr "" +"Невозможно проснуться по изменению логического уровня, только по уровню" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." @@ -1815,7 +1821,8 @@ msgstr "Полигону необходимо как минимум 3 точки #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "Мощность просела. Убедитесь, что вы обеспечиваете достаточную мощность." +msgstr "" +"Мощность просела. Убедитесь, что вы обеспечиваете достаточную мощность." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -2701,7 +2708,8 @@ msgstr "Можно указать только одно неизвестное #: py/objtype.c msgid "can't add special method to already-subclassed class" -msgstr "Не удается добавить специальный метод к уже имеющемуся подклассу классу" +msgstr "" +"Не удается добавить специальный метод к уже имеющемуся подклассу классу" #: py/compile.c msgid "can't assign to expression" @@ -2996,7 +3004,8 @@ msgstr "" #: shared-bindings/audiobusio/PDMIn.c msgid "destination buffer must be an array of type 'H' for bit_depth = 16" -msgstr "буфер назначения должен быть массивом типа «H» для битовой_глубины = 16" +msgstr "" +"буфер назначения должен быть массивом типа «H» для битовой_глубины = 16" #: py/objdict.c msgid "dict update sequence has wrong length" @@ -3038,7 +3047,7 @@ msgstr "пусто" msgid "empty file" msgstr "пустой файл" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "пустая куча" @@ -3999,10 +4008,6 @@ msgstr "pow() с 3 аргументами требует целых чисел" msgid "pull masks conflict with direction masks" msgstr "Маски вытягивания конфликтуют с масками направления" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "Переполнение очереди" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "Необработанные F-строки не поддерживаются" @@ -4468,6 +4473,9 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "queue overflow" +#~ msgstr "Переполнение очереди" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "Объект 'coroutine' не является итератором" diff --git a/locale/sv.po b/locale/sv.po index 10ff982bad..44dec9a9e8 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -101,13 +101,17 @@ msgstr "" "%d adresspinnar, %d rgb-pinnar och %d brickor anger en höjd på %d, inte %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -3001,7 +3005,7 @@ msgstr "tom" msgid "empty file" msgstr "tom fil" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "tom heap" @@ -3957,10 +3961,6 @@ msgstr "pow() med 3 argument kräver heltal" msgid "pull masks conflict with direction masks" msgstr "pull-mask är i konflikt med riktnings-mask" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "köstorlek överskreds" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "råa f-strängar stöds inte" @@ -4424,6 +4424,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "queue overflow" +#~ msgstr "köstorlek överskreds" + #~ msgid "Stopping AP is not supported." #~ msgstr "Stoppa AP stöds inte." diff --git a/locale/tr.po b/locale/tr.po index 6f245c9862..c55b90b95d 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -97,13 +97,17 @@ msgstr "" "gösterir, %d'nin değil" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -2968,7 +2972,7 @@ msgstr "" msgid "empty file" msgstr "" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "" @@ -3919,10 +3923,6 @@ msgstr "" msgid "pull masks conflict with direction masks" msgstr "" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 245a4cc759..2e92a3c292 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -103,13 +103,17 @@ msgstr "" "bù shì %d" #: ports/atmel-samd/common-hal/alarm/__init__.c +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/cxd56/common-hal/analogio/AnalogOut.c ports/cxd56/common-hal/rtc/RTC.c +#: ports/espressif/common-hal/audiobusio/I2SOut.c #: ports/espressif/common-hal/rtc/RTC.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/alarm/__init__.c -#: ports/nrf/common-hal/analogio/AnalogOut.c ports/nrf/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/audiobusio/I2SOut.c ports/nrf/common-hal/rtc/RTC.c #: ports/raspberrypi/common-hal/alarm/__init__.c #: ports/raspberrypi/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c #: ports/raspberrypi/common-hal/rtc/RTC.c ports/stm/common-hal/alarm/__init__.c #: ports/stm/common-hal/canio/Listener.c ports/stm/common-hal/rtc/RTC.c #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audiobusio/PDMIn.c @@ -3005,7 +3009,7 @@ msgstr "kòngxián" msgid "empty file" msgstr "kōng de wénjiàn" -#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +#: extmod/moduasyncio.c extmod/moduheapq.c msgid "empty heap" msgstr "kōng yīn yīnxiào" @@ -3959,10 +3963,6 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" msgid "pull masks conflict with direction masks" msgstr "lā kǒu zhào yǔ fāng xiàng miàn mó chōng tū" -#: extmod/modutimeq.c -msgid "queue overflow" -msgstr "duìliè yìchū" - #: py/parse.c msgid "raw f-strings are not supported" msgstr "bù zhī chí yuán shǐ f-strings" @@ -4429,6 +4429,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "queue overflow" +#~ msgstr "duìliè yìchū" + #~ msgid "Stopping AP is not supported." #~ msgstr "bù zhī chí tíng zhǐ AP." From 6153d23ed8eff6b09d1a2c3a079c587de667d46d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 5 Sep 2023 21:30:35 -0500 Subject: [PATCH 029/129] Fix build with no psram these are conditionally-defined identifiers so have to use if defined. --- ports/espressif/supervisor/port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 688ceafcae..0224fe0073 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -325,7 +325,7 @@ safe_mode_t port_heap_init(safe_mode_t sm) { common_hal_espidf_set_reserved_psram(reserved); } - #ifdef CONFIG_SPIRAM_USE_MEMMAP + #if defined(CONFIG_SPIRAM_USE_MEMMAP) { intptr_t heap_start = common_hal_espidf_get_psram_start(); intptr_t heap_end = common_hal_espidf_get_psram_end(); @@ -338,7 +338,7 @@ safe_mode_t port_heap_init(safe_mode_t sm) { ESP_LOGE(TAG, "CONFIG_SPIRAM_USE_MMAP enabled but no spiram heap available"); } } - #elif CONFIG_SPIRAM_USE_CAPS_ALLOC + #elif defined(CONFIG_SPIRAM_USE_CAPS_ALLOC) { intptr_t psram_start = common_hal_espidf_get_psram_start(); intptr_t psram_end = common_hal_espidf_get_psram_end(); From 258141a9b32d01f76f1d7674d5ae24fdce493069 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 6 Sep 2023 13:55:53 +0000 Subject: [PATCH 030/129] Translated using Weblate (Russian) Currently translated at 100.0% (999 of 999 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index 9991c01e7f..720e1fad0c 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-09-05 20:12+0000\n" -"Last-Translator: xXx \n" +"PO-Revision-Date: 2023-09-06 13:57+0000\n" +"Last-Translator: Jeff Epler \n" "Language-Team: none\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 5.0.1-dev\n" #: main.c @@ -2521,7 +2521,7 @@ msgstr "arange: не удается вычислить длину" #: py/modbuiltins.c msgid "arg is an empty sequence" -msgstr "arg — пустая последовательность" +msgstr "arg - пустая последовательность" #: py/objobject.c msgid "arg must be user-type" @@ -3507,7 +3507,7 @@ msgstr "" #: py/argcheck.c msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -"Аргументы ключевого слова еще не реализованы — вместо этого используйте " +"Аргументы ключевого слова еще не реализованы - вместо этого используйте " "обычные аргументы" #: py/emitinlinethumb.c py/emitinlinextensa.c From 0c0b927843de46cca2c12557aec149efb1d186e8 Mon Sep 17 00:00:00 2001 From: Tirtharaj Sinha Date: Wed, 6 Sep 2023 21:48:41 +0530 Subject: [PATCH 031/129] added waveshare_esp32_s3_pico for circuitpython version 8.2.x --- .../boards/waveshare_esp32_s3_pico/board.c | 39 +++++++++++++++ .../waveshare_esp32_s3_pico/mpconfigboard.h | 35 ++++++++++++++ .../waveshare_esp32_s3_pico/mpconfigboard.mk | 11 +++++ .../boards/waveshare_esp32_s3_pico/pins.c | 44 +++++++++++++++++ .../boards/waveshare_esp32_s3_pico/sdkconfig | 47 +++++++++++++++++++ 5 files changed, 176 insertions(+) create mode 100644 ports/espressif/boards/waveshare_esp32_s3_pico/board.c create mode 100644 ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h create mode 100644 ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk create mode 100644 ports/espressif/boards/waveshare_esp32_s3_pico/pins.c create mode 100644 ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/board.c b/ports/espressif/boards/waveshare_esp32_s3_pico/board.c new file mode 100644 index 0000000000..3b1f5efd87 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h new file mode 100644 index 0000000000..61f4213b3b --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h @@ -0,0 +1,35 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-Pico" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO21) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk new file mode 100644 index 0000000000..c5bd5e350f --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x303a +USB_PID = 0x81A3 +USB_PRODUCT = "ESP32-S3-Pico" +USB_MANUFACTURER = "Waveshare Electronics" + + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c new file mode 100644 index 0000000000..c7a984161b --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c @@ -0,0 +1,44 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig new file mode 100644 index 0000000000..3e366f0172 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig @@ -0,0 +1,47 @@ +# +# 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 +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + +# end of Component config From 1eb8822febe25919cec2e19a91cf48f28f0e5eb6 Mon Sep 17 00:00:00 2001 From: Tirtharaj Sinha Date: Wed, 6 Sep 2023 22:47:34 +0530 Subject: [PATCH 032/129] added SCL and SDA --- .../boards/waveshare_esp32_s3_pico/mpconfigboard.h | 3 +++ ports/espressif/boards/waveshare_esp32_s3_pico/pins.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h index 61f4213b3b..0217374f3a 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h @@ -33,3 +33,6 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO44) #define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO17) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c index c7a984161b..1f16d0a800 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c @@ -38,7 +38,14 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO12) }, - + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + + }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 896be9edb31bfa34cab53712132a1457af40d58e Mon Sep 17 00:00:00 2001 From: Tirtharaj Sinha Date: Wed, 6 Sep 2023 23:12:47 +0530 Subject: [PATCH 033/129] added precommit --- ports/espressif/boards/waveshare_esp32_s3_pico/pins.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c index 1f16d0a800..213294aaae 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c @@ -33,19 +33,17 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, - + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO12) }, - + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, - + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO17) }, - - { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From d7edec67ce2b405e7bf91f5b1d5e9d3b5ff5ab58 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 5 Sep 2023 14:31:08 -0700 Subject: [PATCH 034/129] 8.2.x backport Added Arduino Nano ESP32-S3 --- .../boards/arduino_nano_esp32s3/board.c | 51 +++++++++++++++ .../arduino_nano_esp32s3/mpconfigboard.h | 57 +++++++++++++++++ .../arduino_nano_esp32s3/mpconfigboard.mk | 17 +++++ .../boards/arduino_nano_esp32s3/pins.c | 64 +++++++++++++++++++ .../boards/arduino_nano_esp32s3/sdkconfig | 43 +++++++++++++ .../board.c | 51 +++++++++++++++ .../mpconfigboard.h | 54 ++++++++++++++++ .../mpconfigboard.mk | 17 +++++ .../pins.c | 64 +++++++++++++++++++ .../sdkconfig | 43 +++++++++++++ tools/ci_check_duplicate_usb_vid_pid.py | 2 + 11 files changed, 463 insertions(+) create mode 100644 ports/espressif/boards/arduino_nano_esp32s3/board.c create mode 100644 ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h create mode 100644 ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk create mode 100644 ports/espressif/boards/arduino_nano_esp32s3/pins.c create mode 100644 ports/espressif/boards/arduino_nano_esp32s3/sdkconfig create mode 100644 ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c create mode 100644 ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h create mode 100644 ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk create mode 100644 ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/pins.c create mode 100644 ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig diff --git a/ports/espressif/boards/arduino_nano_esp32s3/board.c b/ports/espressif/boards/arduino_nano_esp32s3/board.c new file mode 100644 index 0000000000..8952a19c5d --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "components/driver/include/driver/gpio.h" + +void board_init(void) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool espressif_board_reset_pin_number(gpio_num_t pin_number) { + if (pin_number == 13) { + // Set D13 LED to input when not in use + gpio_set_direction(pin_number, GPIO_MODE_DEF_INPUT); + gpio_set_pull_mode(pin_number, GPIO_PULLDOWN_ONLY); + return true; + } + + return false; +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h new file mode 100644 index 0000000000..7c046d9b72 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h @@ -0,0 +1,57 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Arduino Nano ESP32" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +// Status LED +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO46) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO0) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO45) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO13) + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 (&pin_GPIO32) +#define MICROPY_QSPI_DATA1 (&pin_GPIO31) +#define MICROPY_QSPI_DATA2 (&pin_GPIO28) +#define MICROPY_QSPI_DATA3 (&pin_GPIO27) +#define MICROPY_QSPI_SCK (&pin_GPIO30) +#define MICROPY_QSPI_CS (&pin_GPIO29) +#endif + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO12) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO11) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO48) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO38) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO47) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk new file mode 100644 index 0000000000..c9af3af25e --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x2341 +USB_PID = 0x0070 + +USB_PRODUCT = "Arduino Nano ESP32" +USB_MANUFACTURER = "Arduino" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +INTERNAL_FLASH_FILESYSTEM = 0 +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = GD25WQ128E + +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/arduino_nano_esp32s3/pins.c b/ports/espressif/boards/arduino_nano_esp32s3/pins.c new file mode 100644 index 0000000000..ca56c8900c --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/pins.c @@ -0,0 +1,64 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_B0), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_B1), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO47) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig new file mode 100644 index 0000000000..2acf08a4a7 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig @@ -0,0 +1,43 @@ +# +# 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 +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c new file mode 100644 index 0000000000..8952a19c5d --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "components/driver/include/driver/gpio.h" + +void board_init(void) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool espressif_board_reset_pin_number(gpio_num_t pin_number) { + if (pin_number == 13) { + // Set D13 LED to input when not in use + gpio_set_direction(pin_number, GPIO_MODE_DEF_INPUT); + gpio_set_pull_mode(pin_number, GPIO_PULLDOWN_ONLY); + return true; + } + + return false; +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h new file mode 100644 index 0000000000..4d4adcf1cb --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h @@ -0,0 +1,54 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Arduino Nano ESP32" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +// Status LED +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO46) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO45) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO0) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO13) + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 (&pin_GPIO32) +#define MICROPY_QSPI_DATA1 (&pin_GPIO31) +#define MICROPY_QSPI_DATA2 (&pin_GPIO28) +#define MICROPY_QSPI_DATA3 (&pin_GPIO27) +#define MICROPY_QSPI_SCK (&pin_GPIO30) +#define MICROPY_QSPI_CS (&pin_GPIO29) +#endif + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO12) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO11) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO48) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO38) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO47) diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk new file mode 100644 index 0000000000..925c4ab6e2 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x2341 +USB_PID = 0x056B + +USB_PRODUCT = "Arduino Nano ESP32" +USB_MANUFACTURER = "Arduino" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +INTERNAL_FLASH_FILESYSTEM = 0 +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = GD25WQ128E + +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/pins.c b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/pins.c new file mode 100644 index 0000000000..aa89a58ee4 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/pins.c @@ -0,0 +1,64 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_B0), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_B1), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO47) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig new file mode 100644 index 0000000000..26a26b5fe8 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig @@ -0,0 +1,43 @@ +# +# 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 +# +CONFIG_LWIP_LOCAL_HOSTNAME="nano-esp32" +# end of LWIP diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index f20630e886..f22225007b 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -63,6 +63,8 @@ DEFAULT_CLUSTERLIST = { ], "0x239A:0x102E": ["weact_studio_pico", "weact_studio_pico_16mb"], "0x303A:0x8166": ["yd_esp32_s3_n8r8", "yd_esp32_s3_n16r8"], + "0x2341:0x056B": ["arduino_nano_esp32s3", "arduino_nano_esp32s3_inverted_statusled"], + "0x2E8A:0x1020": ["waveshare_rp2040_plus_4mb", "waveshare_rp2040_plus_16mb"], } cli_parser = argparse.ArgumentParser( From d871bc37c560db18971c3eea4e3d0ce043f95721 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 6 Sep 2023 15:49:51 -0400 Subject: [PATCH 035/129] remove lib/certificates/nina-fw submodule --- .gitmodules | 3 --- lib/certificates/README.md | 3 --- lib/certificates/nina-fw | 1 - 3 files changed, 7 deletions(-) delete mode 100644 lib/certificates/README.md delete mode 160000 lib/certificates/nina-fw diff --git a/.gitmodules b/.gitmodules index 7cb54a92dc..4ddbc618b7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -144,9 +144,6 @@ path = ports/espressif/esp-idf url = https://github.com/adafruit/esp-idf.git branch = release/v4.4-circuitpython -[submodule "ports/espressif/certificates/nina-fw"] - path = lib/certificates/nina-fw - url = https://github.com/adafruit/nina-fw.git [submodule "frozen/Adafruit_CircuitPython_ST7789"] path = frozen/Adafruit_CircuitPython_ST7789 url = https://github.com/adafruit/Adafruit_CircuitPython_ST7789 diff --git a/lib/certificates/README.md b/lib/certificates/README.md deleted file mode 100644 index dd5cf25b00..0000000000 --- a/lib/certificates/README.md +++ /dev/null @@ -1,3 +0,0 @@ -We share root certificates with the nina-fw to ensure they both use the same roots. - -https://github.com/adafruit/nina-fw diff --git a/lib/certificates/nina-fw b/lib/certificates/nina-fw deleted file mode 160000 index 21205e4005..0000000000 --- a/lib/certificates/nina-fw +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 21205e400515a698266abaaea902bd1ea897bb5d From 58a21326b2da50ad47d14c353f884f8d5213541b Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 6 Sep 2023 16:22:42 -0400 Subject: [PATCH 036/129] Update to new certificates submodule. --- .gitmodules | 3 +++ lib/certificates | 1 + ports/espressif/esp-idf-config/sdkconfig-esp32.defaults | 2 +- ports/espressif/esp-idf-config/sdkconfig.defaults | 2 +- ports/raspberrypi/Makefile | 2 +- tools/ci_fetch_deps.py | 4 ++-- 6 files changed, 9 insertions(+), 5 deletions(-) create mode 160000 lib/certificates diff --git a/.gitmodules b/.gitmodules index 4ddbc618b7..e4b59e8e42 100644 --- a/.gitmodules +++ b/.gitmodules @@ -338,3 +338,6 @@ [submodule "frozen/Adafruit_CircuitPython_Wave"] path = frozen/Adafruit_CircuitPython_Wave url = https://github.com/adafruit/Adafruit_CircuitPython_Wave.git +[submodule "lib/certificates"] + path = lib/certificates + url = https://github.com/adafruit/certificates diff --git a/lib/certificates b/lib/certificates new file mode 160000 index 0000000000..5c85c604a0 --- /dev/null +++ b/lib/certificates @@ -0,0 +1 @@ +Subproject commit 5c85c604a0d77a08df93435e4afad5f541c38923 diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index b6c5a938b1..54e800cd62 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -776,7 +776,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/nina-fw/data/roots.pem" +CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle CONFIG_MBEDTLS_ECP_RESTARTABLE=y diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index b183cd630d..b27d846f2c 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -572,7 +572,7 @@ CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/nina-fw/data/roots.pem" +CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle CONFIG_MBEDTLS_ECP_RESTARTABLE=y diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 7eb67b77ba..e6cbcfbbce 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -345,7 +345,7 @@ CFLAGS += \ -isystem $(TOP)/lib/mbedtls/include \ -DMBEDTLS_CONFIG_FILE='"mbedtls/mbedtls_config.h"' \ -$(BUILD)/x509_crt_bundle.S: $(TOP)/lib/certificates/nina-fw/data/roots.pem $(TOP)/tools/gen_crt_bundle.py +$(BUILD)/x509_crt_bundle.S: $(TOP)/lib/certificates/data/roots.pem $(TOP)/tools/gen_crt_bundle.py $(Q)$(PYTHON) $(TOP)/tools/gen_crt_bundle.py -i $< -o $@ --asm OBJ_MBEDTLS := $(BUILD)/x509_crt_bundle.o $(patsubst %.c,$(BUILD)/%.o,$(SRC_MBEDTLS))): CFLAGS += -Wno-suggest-attribute=format diff --git a/tools/ci_fetch_deps.py b/tools/ci_fetch_deps.py index 15ef6a51cd..30ab7ca5a4 100644 --- a/tools/ci_fetch_deps.py +++ b/tools/ci_fetch_deps.py @@ -24,7 +24,7 @@ PORT_DEPS = { "cxd56": ["extmod/ulab/", "lib/tinyusb/"], "espressif": [ "extmod/ulab/", - "lib/certificates/nina-fw/", + "lib/certificates/", "lib/protomatter/", "lib/quirc/", "lib/tinyusb/", @@ -37,7 +37,7 @@ PORT_DEPS = { "lib/adafruit_floppy/", "lib/mbedtls/", "lib/mp3/", - "lib/certificates/nina-fw/", + "lib/certificates/", "lib/protomatter/", "lib/quirc/", "lib/tinyusb/", From e71c39736e05d599918749a1e81d731218180bde Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 7 Sep 2023 12:13:37 +1000 Subject: [PATCH 037/129] Added UM FeatherS3 second I2C STEMMAQT --- .../unexpectedmaker_feathers3/mpconfigboard.h | 5 +-- .../boards/unexpectedmaker_feathers3/pins.c | 32 +++++++++++++++---- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h index 67054b8664..1d51cb77d9 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h +++ b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.h @@ -34,8 +34,9 @@ #define MICROPY_HW_LED_STATUS (&pin_GPIO13) -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO9, .sda = &pin_GPIO8}, \ + {.scl = &pin_GPIO15, .sda = &pin_GPIO16}} #define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/pins.c b/ports/espressif/boards/unexpectedmaker_feathers3/pins.c index 9a2fde5a0c..5cdfc69ed2 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/pins.c +++ b/ports/espressif/boards/unexpectedmaker_feathers3/pins.c @@ -1,5 +1,7 @@ #include "shared-bindings/board/__init__.h" +CIRCUITPY_BOARD_BUS_SINGLETON(stemma_i2c, i2c, 1) + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS @@ -89,11 +91,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED + // Blue LED + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + + // STEMMA QT Vertical Connector I2C IO + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_SCL2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_GPIO16) }, // Battery voltage sense pin - // I really don't know what name to use here. Adafruit use BATTERY & VOLTAGE_MONITOR - // I prefer VBAT or VBAT_SENSE { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_VBAT), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_VBAT_SENSE), MP_ROM_PTR(&pin_GPIO2) }, @@ -103,18 +110,29 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_VBUS), MP_ROM_PTR(&pin_GPIO34) }, { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO34) }, + // Neopixel pins { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO40) }, - { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor - { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor + // Ambient Light Sensor + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO39) }, // Second LDO Enable control - { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, // Second LDO Enable control + // Second LDO Enable control + { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + // I2C { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_VERTICAL_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C2), MP_ROM_PTR(&board_stemma_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2C2), MP_ROM_PTR(&board_stemma_i2c_obj) }, + + // SPI { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + + // UART { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 1e178318cf19adc18ff9f656cdc0c5a27ee755d6 Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Wed, 6 Sep 2023 19:59:40 -0700 Subject: [PATCH 038/129] review update, add RP2040 example --- locale/circuitpython.pot | 8 ++++ .../common-hal/memorymap/AddressRange.c | 2 +- py/argcheck.c | 2 - py/obj.c | 15 ------- py/obj.h | 1 - py/objint.c | 4 -- py/runtime.h | 1 - shared-bindings/memorymap/AddressRange.c | 41 +++++++++++++++++-- 8 files changed, 47 insertions(+), 27 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 2007eb8b9b..0d814b0ee6 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2140,6 +2140,10 @@ msgstr "" msgid "Unable to access unaliged IO register" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -4048,6 +4052,10 @@ msgstr "" msgid "source_bitmap must have value_count of 8" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "start must be an int" +msgstr "" + #: py/objstr.c msgid "start/end indices" msgstr "" diff --git a/ports/raspberrypi/common-hal/memorymap/AddressRange.c b/ports/raspberrypi/common-hal/memorymap/AddressRange.c index 6f6731a5ec..1defb0389f 100644 --- a/ports/raspberrypi/common-hal/memorymap/AddressRange.c +++ b/ports/raspberrypi/common-hal/memorymap/AddressRange.c @@ -90,7 +90,7 @@ void common_hal_memorymap_addressrange_set_bytes(const memorymap_addressrange_ob case IO: if ((size_t)dest_addr & 0x03 || len & 0x03) { // Unaligned access or unaligned length not supported by RP2 for IO registers - mp_raise_RuntimeError(translate("Unable to access unaliged IO register")); + mp_raise_RuntimeError(translate("Unable to access unaligned IO register")); } else { // Aligned access and length, use 32-bit writes uint32_t *dest_addr32 = (uint32_t *)dest_addr; diff --git a/py/argcheck.c b/py/argcheck.c index ff939ad828..c3bde804d4 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -115,8 +115,6 @@ void mp_arg_parse_all(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n out_vals[i].u_bool = mp_obj_is_true(given_arg); } else if ((allowed[i].flags & MP_ARG_KIND_MASK) == MP_ARG_INT) { out_vals[i].u_int = mp_obj_get_int(given_arg); - } else if ((allowed[i].flags & MP_ARG_KIND_MASK) == MP_ARG_UINT) { - out_vals[i].u_uint = mp_obj_get_uint(given_arg); } else { assert((allowed[i].flags & MP_ARG_KIND_MASK) == MP_ARG_OBJ); out_vals[i].u_obj = given_arg; diff --git a/py/obj.c b/py/obj.c index a8702713d3..31d469770c 100644 --- a/py/obj.c +++ b/py/obj.c @@ -420,21 +420,6 @@ bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value) { return true; } -mp_uint_t mp_obj_get_uint(mp_const_obj_t arg) { - if (arg == mp_const_false) { - return 0; - } else if (arg == mp_const_true) { - return 1; - } else if (mp_obj_is_small_int(arg)) { - return MP_OBJ_SMALL_INT_VALUE(arg); - } else if (mp_obj_is_type(arg, &mp_type_int)) { - return mp_obj_int_get_uint_checked(arg); - } else { - mp_obj_t res = mp_unary_op(MP_UNARY_OP_INT, (mp_obj_t)arg); - return mp_obj_int_get_uint_checked(res); - } -} - #if MICROPY_PY_BUILTINS_FLOAT bool mp_obj_get_float_maybe(mp_obj_t arg, mp_float_t *value) { mp_float_t val; diff --git a/py/obj.h b/py/obj.h index 0b9f812e0b..d1874a8cd2 100644 --- a/py/obj.h +++ b/py/obj.h @@ -939,7 +939,6 @@ static MP_INLINE bool mp_obj_is_integer(mp_const_obj_t o) { mp_int_t mp_obj_get_int(mp_const_obj_t arg); mp_int_t mp_obj_get_int_truncated(mp_const_obj_t arg); bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value); -mp_uint_t mp_obj_get_uint(mp_const_obj_t arg); #if MICROPY_PY_BUILTINS_FLOAT mp_float_t mp_obj_get_float(mp_obj_t self_in); bool mp_obj_get_float_maybe(mp_obj_t arg, mp_float_t *value); diff --git a/py/objint.c b/py/objint.c index 7cc6376733..b5de5ebdc5 100644 --- a/py/objint.c +++ b/py/objint.c @@ -438,10 +438,6 @@ mp_int_t mp_obj_int_get_checked(mp_const_obj_t self_in) { return MP_OBJ_SMALL_INT_VALUE(self_in); } -mp_uint_t mp_obj_int_get_uint_checked(mp_const_obj_t self_in) { - return MP_OBJ_SMALL_INT_VALUE(self_in); -} - #endif // MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE diff --git a/py/runtime.h b/py/runtime.h index 688d8b03fe..4a00752402 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -45,7 +45,6 @@ typedef enum { MP_ARG_BOOL = 0x001, MP_ARG_INT = 0x002, MP_ARG_OBJ = 0x003, - MP_ARG_UINT = 0x004, MP_ARG_KIND_MASK = 0x0ff, MP_ARG_REQUIRED = 0x100, MP_ARG_KW_ONLY = 0x200, diff --git a/shared-bindings/memorymap/AddressRange.c b/shared-bindings/memorymap/AddressRange.c index f2f5c28ee4..74df9efecf 100644 --- a/shared-bindings/memorymap/AddressRange.c +++ b/shared-bindings/memorymap/AddressRange.c @@ -47,23 +47,58 @@ //| import memorymap //| rtc_slow_mem = memorymap.AddressRange(start=0x50000000, length=0x2000) //| rtc_slow_mem[0:3] = b"\xcc\x10\x00" +//| +//| Example I/O register usage on RP2040:: +//| +//| import binascii +//| import board +//| import digitalio +//| import memorymap +//| +//| def rp2040_set_pad_drive(p, d): +//| pads_bank0 = memorymap.AddressRange(start=0x4001C000, length=0x4000) +//| pad_ctrl = int.from_bytes(pads_bank0[p*4+4:p*4+8], "little") +//| # Pad control register is updated using an MP-safe atomic XOR +//| pad_ctrl ^= (d << 4) +//| pad_ctrl &= 0x00000030 +//| pads_bank0[p*4+0x3004:p*4+0x3008] = pad_ctrl.to_bytes(4, "little") +//| +//| def rp2040_get_pad_drive(p): +//| pads_bank0 = memorymap.AddressRange(start=0x4001C000, length=0x4000) +//| pad_ctrl = int.from_bytes(pads_bank0[p*4+4:p*4+8], "little") +//| return (pad_ctrl >> 4) & 0x3 +//| +//| # set GPIO16 pad drive strength to 12 mA +//| rp2040_set_pad_drive(16, 3) +//| +//| # print GPIO16 pad drive strength +//| print(rp2040_get_pad_drive(16)) //| """ //| def __init__(self, *, start, length) -> None: //| """Constructs an address range starting at ``start`` and ending at -//| ``start + length - 1``. An exception will be raised if any of the +//| ``start + length``. An exception will be raised if any of the //| addresses are invalid or protected.""" //| ... STATIC mp_obj_t memorymap_addressrange_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_start, ARG_length }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_start, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_UINT }, + { MP_QSTR_start, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_length, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - size_t start = args[ARG_start].u_uint; + // Argument start is a pointer into the address map, so we validate it here because a + // signed int argument will overflow if it is in the upper half of the map. + size_t start; + if (mp_obj_is_small_int(args[ARG_start].u_obj)) { + start = MP_OBJ_SMALL_INT_VALUE(args[ARG_start].u_obj); + } else if (mp_obj_is_type(args[ARG_start].u_obj, &mp_type_int)) { + start = mp_obj_int_get_uint_checked(args[ARG_start].u_obj); + } else { + mp_raise_TypeError(translate("start must be an int")); + } size_t length = mp_arg_validate_int_min(args[ARG_length].u_int, 1, MP_QSTR_length); // Check for address range wrap here as this can break port-specific code due to size_t overflow. From 65fc79e31f186ffd6ae7ca153c4ce3a453bedea3 Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Wed, 6 Sep 2023 20:25:39 -0700 Subject: [PATCH 039/129] backout remaining changes to py --- py/objint.c | 1 - py/runtime.h | 1 - 2 files changed, 2 deletions(-) diff --git a/py/objint.c b/py/objint.c index b5de5ebdc5..83987d690a 100644 --- a/py/objint.c +++ b/py/objint.c @@ -438,7 +438,6 @@ mp_int_t mp_obj_int_get_checked(mp_const_obj_t self_in) { return MP_OBJ_SMALL_INT_VALUE(self_in); } - #endif // MICROPY_LONGINT_IMPL == MICROPY_LONGINT_IMPL_NONE // This dispatcher function is expected to be independent of the implementation of long int diff --git a/py/runtime.h b/py/runtime.h index 4a00752402..5ecab91e99 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -53,7 +53,6 @@ typedef enum { typedef union _mp_arg_val_t { bool u_bool; mp_int_t u_int; - mp_uint_t u_uint; mp_obj_t u_obj; mp_rom_obj_t u_rom_obj; } mp_arg_val_t; From c5bc59e692ddc91fd442bc29979c4ea0c9c20728 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 7 Sep 2023 08:32:21 -0400 Subject: [PATCH 040/129] update protomatter to 1.6.1 (used for RGBMatrix) --- lib/protomatter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protomatter b/lib/protomatter index ed2e701871..c9c1189e9d 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit ed2e7018718caebba2b7550517b556e7734357ef +Subproject commit c9c1189e9d6200bb09bf4a87d84be9459cae481b From 79edcbe97ded330706b2b32303f4afab5da7e91f Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Thu, 7 Sep 2023 09:25:02 -0700 Subject: [PATCH 041/129] second instance of misspelled 'unaligned' --- ports/raspberrypi/common-hal/memorymap/AddressRange.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/memorymap/AddressRange.c b/ports/raspberrypi/common-hal/memorymap/AddressRange.c index 1defb0389f..185be10ab4 100644 --- a/ports/raspberrypi/common-hal/memorymap/AddressRange.c +++ b/ports/raspberrypi/common-hal/memorymap/AddressRange.c @@ -122,7 +122,7 @@ void common_hal_memorymap_addressrange_get_bytes(const memorymap_addressrange_ob case IO: if ((size_t)src_addr & 0x03 || len & 0x03) { // Unaligned access or unaligned length not supported by RP2 for IO registers - mp_raise_RuntimeError(translate("Unable to access unaliged IO register")); + mp_raise_RuntimeError(translate("Unable to access unaligned IO register")); } else { // Aligned access and length, use 32-bit reads uint32_t *src_addr32 = (uint32_t *)src_addr; From c3c2b8458457c1095d80f2d16410c3be441fdf20 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 7 Sep 2023 12:57:45 -0500 Subject: [PATCH 042/129] fix typo, copyright notice --- main.c | 2 +- shared-bindings/dotclockframebuffer/DotClockFramebuffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d89777bc5e..72f9fd6fab 100644 --- a/main.c +++ b/main.c @@ -1043,7 +1043,7 @@ int __attribute__((used)) main(void) { } // We maybe can't initialize the heap until here, because on espressif port we need to be able to check for reserved psram in settings.toml - // (but it's OK if this is a no-op due to the heap beinig initialized in port_init()) + // (but it's OK if this is a no-op due to the heap being initialized in port_init()) set_safe_mode(port_heap_init(get_safe_mode())); #if CIRCUITPY_ALARM diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c index fb0df57db5..aac695e3ee 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2023 Jeff Epler for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From eb060184c2acfdf51032032de59ccb9ac46e779b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 7 Sep 2023 12:59:42 -0500 Subject: [PATCH 043/129] Add hack tablet --- .../board.c | 39 ++++++ .../mpconfigboard.h | 42 ++++++ .../mpconfigboard.mk | 12 ++ .../pins.c | 122 ++++++++++++++++++ .../sdkconfig | 62 +++++++++ tools/ci_check_duplicate_usb_vid_pid.py | 1 + 6 files changed, 278 insertions(+) create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/board.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/pins.c create mode 100644 ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/board.c new file mode 100644 index 0000000000..3b1f5efd87 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/board.c @@ -0,0 +1,39 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h new file mode 100644 index 0000000000..093a2ffc8c --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h @@ -0,0 +1,42 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-DevKitC-1-N8R8-with-HACKTABLET" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) + +// a 1024x768 16BPP framebuffer + some breathing room +#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk new file mode 100644 index 0000000000..1bd9c0ac8d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk @@ -0,0 +1,12 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8R8" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/pins.c new file mode 100644 index 0000000000..8f792769e5 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/pins.c @@ -0,0 +1,122 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t tft_r_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO15), + MP_ROM_PTR(&pin_GPIO16), + MP_ROM_PTR(&pin_GPIO17), + MP_ROM_PTR(&pin_GPIO18), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_g_pins = { + {&mp_type_tuple}, + 6, + { + MP_ROM_PTR(&pin_GPIO8), + MP_ROM_PTR(&pin_GPIO9), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO11), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO13), + } +}; + +STATIC const mp_rom_obj_tuple_t tft_b_pins = { + {&mp_type_tuple}, + 5, + { + MP_ROM_PTR(&pin_GPIO3), + MP_ROM_PTR(&pin_GPIO4), + MP_ROM_PTR(&pin_GPIO5), + MP_ROM_PTR(&pin_GPIO6), + MP_ROM_PTR(&pin_GPIO7), + } +}; + +STATIC const mp_rom_map_elem_t tft_table[] = { + { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_red), MP_ROM_PTR(&tft_r_pins) }, + { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, + { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, +}; +MP_DEFINE_CONST_DICT(tft_dict, tft_table); + +STATIC const mp_rom_map_elem_t timings800_table[] = { + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(6500000) }, // nominal 16MHz, but display is unstable/tears at that frequency + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_INT(800) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_INT(480) }, + { MP_ROM_QSTR(MP_QSTR_hsync_pulse_width), MP_ROM_INT(30) }, + { MP_ROM_QSTR(MP_QSTR_hsync_front_porch), MP_ROM_INT(210) }, + { MP_ROM_QSTR(MP_QSTR_hsync_back_porch), MP_ROM_INT(16) }, + { MP_ROM_QSTR(MP_QSTR_hsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_vsync_pulse_width), MP_ROM_INT(13) }, + { MP_ROM_QSTR(MP_QSTR_vsync_front_porch), MP_ROM_INT(22) }, + { MP_ROM_QSTR(MP_QSTR_vsync_back_porch), MP_ROM_INT(10) }, + { MP_ROM_QSTR(MP_QSTR_vsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_de_idle_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_active_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_idle_high), MP_ROM_FALSE }, +}; +MP_DEFINE_CONST_DICT(timings800_dict, timings800_table); + + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_TIMINGS800), MP_ROM_PTR(&timings800_dict) }, + { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_TFTB1), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_TFTB2), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_TFTB3), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_TFTB4), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_TFTB5), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_TFTG1), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_TFTG2), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_TFTG3), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_TFTG4), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_TFTG5), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_TFTG6), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_TFTR1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TFTR2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_TFTR3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_TFTR4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_TFTR5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig new file mode 100644 index 0000000000..40da78d506 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig @@ -0,0 +1,62 @@ +# +# Component config +# +# +# ESP32S3-Specific +# +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM config +# +#CONFIG_SPIRAM_MODE_QUAD=y +### NEW ### +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_TYPE_AUTO=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 +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 +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-hacktablet" +# 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 diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 5078215d54..f52a85d5b9 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -55,6 +55,7 @@ DEFAULT_CLUSTERLIST = { "espressif_esp32s3_devkitc_1_n8r2", "espressif_esp32s3_devkitc_1_n8r8", "espressif_esp32s3_devkitc_1_n32r8", + "espressif_esp32s3_devkitc_1_n8r8_hacktablet", ], "0x303A:0x7009": [ "espressif_esp32s2_devkitc_1_n4", From 0196401d08c8825b2dbb51ee8e5246df5109034c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 7 Sep 2023 13:01:16 -0500 Subject: [PATCH 044/129] reduce reserved psram --- .../mpconfigboard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h index 093a2ffc8c..e39cbaad98 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.h @@ -38,5 +38,5 @@ #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) -// a 1024x768 16BPP framebuffer + some breathing room -#define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) +// a 800x480 16BPP framebuffer + some breathing room +#define DEFAULT_RESERVED_PSRAM (800 * 800 * 2) From 67843f6cfe55ae15e90b95671562bb5fa19393b4 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 7 Sep 2023 22:21:41 +0200 Subject: [PATCH 045/129] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 5 +++++ locale/cs.po | 5 +++++ locale/de_DE.po | 5 +++++ locale/el.po | 5 +++++ locale/en_GB.po | 5 +++++ locale/es.po | 5 +++++ locale/fil.po | 5 +++++ locale/fr.po | 5 +++++ locale/hi.po | 5 +++++ locale/it_IT.po | 5 +++++ locale/ja.po | 5 +++++ locale/ko.po | 5 +++++ locale/nl.po | 5 +++++ locale/pl.po | 5 +++++ locale/pt_BR.po | 5 +++++ locale/ru.po | 9 +++++++-- locale/sv.po | 5 +++++ locale/tr.po | 5 +++++ locale/zh_Latn_pinyin.po | 5 +++++ 19 files changed, 97 insertions(+), 2 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index e4b9559f65..0fbd6c2a51 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -1238,6 +1238,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1392,6 +1393,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "Harus berupa subclass %q." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Harus menyediakan pin MISO atau MOSI" diff --git a/locale/cs.po b/locale/cs.po index a71c63adea..e6659f7aea 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -1238,6 +1238,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1392,6 +1393,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "Musí být podtřída %q." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Musí poskytnout pin MISO nebo MOSI" diff --git a/locale/de_DE.po b/locale/de_DE.po index 5ad4b0ba95..41eb8dcf22 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1259,6 +1259,7 @@ msgid "Invalid %q" msgstr "Ungültiger %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1414,6 +1415,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "Muss eine %q Unterklasse sein." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Muss MISO- oder MOSI-Pin bereitstellen" diff --git a/locale/el.po b/locale/el.po index e2fa69ec51..20ee429652 100644 --- a/locale/el.po +++ b/locale/el.po @@ -1252,6 +1252,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1406,6 +1407,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index fd18f4812a..9b8f7e6ee9 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -1244,6 +1244,7 @@ msgid "Invalid %q" msgstr "Invalid %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1398,6 +1399,10 @@ msgstr "Missing jmp_pin. %q[%u] jumps on pin" msgid "Must be a %q subclass." msgstr "Must be a %q subclass." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Must provide MISO or MOSI pin" diff --git a/locale/es.po b/locale/es.po index a4cc31a820..7e267f12b1 100644 --- a/locale/es.po +++ b/locale/es.po @@ -1271,6 +1271,7 @@ msgid "Invalid %q" msgstr "%q inválido" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1425,6 +1426,10 @@ msgstr "Falta jmp_pin. %q[%u] salta en pin" msgid "Must be a %q subclass." msgstr "Debe de ser una subclase de %q." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Debe proporcionar un pin MISO o MOSI" diff --git a/locale/fil.po b/locale/fil.po index 123d399267..6aac262576 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -1238,6 +1238,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1392,6 +1393,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index fe501834dd..2beabfa3a4 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -1276,6 +1276,7 @@ msgid "Invalid %q" msgstr "%q invalide" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1431,6 +1432,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "Doit être une sous-classe de %q." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Doit fournir une broche MISO ou MOSI" diff --git a/locale/hi.po b/locale/hi.po index b2041ad82e..93f039352e 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -1228,6 +1228,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1382,6 +1383,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 4801b2e158..d05baee044 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -1240,6 +1240,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1395,6 +1396,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index aa5bf7a2f5..b107a4bc18 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -1239,6 +1239,7 @@ msgid "Invalid %q" msgstr "不正な %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1393,6 +1394,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "%q のサブクラスでなければなりません" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "MISOピンまたはMOSIピンが必要" diff --git a/locale/ko.po b/locale/ko.po index 4ee9a3e872..6b9ca9f1b0 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -1231,6 +1231,7 @@ msgid "Invalid %q" msgstr "" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1385,6 +1386,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index edfc54cfe8..7d070b4348 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -1234,6 +1234,7 @@ msgid "Invalid %q" msgstr "Ongeldige %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1388,6 +1389,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "%q moet een subklasse zijn." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "MISO of MOSI moeten worden gegeven" diff --git a/locale/pl.po b/locale/pl.po index f918f5a345..1c06559739 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -1234,6 +1234,7 @@ msgid "Invalid %q" msgstr "Nieprawidłowe %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1388,6 +1389,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Należy podać pin MISO lub MOSI" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 83f1a4a95a..daf77c1c94 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -1268,6 +1268,7 @@ msgid "Invalid %q" msgstr "%q Inválido" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1422,6 +1423,10 @@ msgstr "Falta jmp_pin. %q[%u] jumper no pino" msgid "Must be a %q subclass." msgstr "Deve ser uma subclasse %q." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Deve informar os pinos MISO ou MOSI" diff --git a/locale/ru.po b/locale/ru.po index 720e1fad0c..6ddf967794 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -14,8 +14,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " -"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 5.0.1-dev\n" #: main.c @@ -1275,6 +1275,7 @@ msgid "Invalid %q" msgstr "Недопустимый %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1429,6 +1430,10 @@ msgstr "Не хватает jmp_pin.%q [%u] прыгает на пин" msgid "Must be a %q subclass." msgstr "Должен быть субклассом %q." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Пин MISO или MOSI должен быть предоставлен" diff --git a/locale/sv.po b/locale/sv.po index 44dec9a9e8..eadb239290 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -1253,6 +1253,7 @@ msgid "Invalid %q" msgstr "Ogiltig %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1408,6 +1409,10 @@ msgstr "Saknad jmp_pin. %q[%u] hoppar på pin" msgid "Must be a %q subclass." msgstr "Måste vara en %q-subklass." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Måste ange MISO- eller MOSI-pinne" diff --git a/locale/tr.po b/locale/tr.po index c55b90b95d..ec87faadcb 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -1244,6 +1244,7 @@ msgid "Invalid %q" msgstr "Geçersiz %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1399,6 +1400,10 @@ msgstr "" msgid "Must be a %q subclass." msgstr "" +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 2e92a3c292..e805fff144 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -1259,6 +1259,7 @@ msgid "Invalid %q" msgstr "wú xiào %q" #: ports/atmel-samd/common-hal/microcontroller/Pin.c +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c #: ports/mimxrt10xx/common-hal/microcontroller/Pin.c #: shared-bindings/microcontroller/Pin.c msgid "Invalid %q pin" @@ -1413,6 +1414,10 @@ msgstr "quēshǎo jmp_pin. %q[%u] tiàodào yǐn jiǎoshàng" msgid "Must be a %q subclass." msgstr "Bìxū shì %q zi lèi." +#: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +msgid "Must provide 5/6/5 RGB pins" +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo" From 0e0941d6fdd90adc0b638d4e19d3b59d17b338b4 Mon Sep 17 00:00:00 2001 From: Bob Abeles Date: Thu, 7 Sep 2023 16:45:45 -0700 Subject: [PATCH 046/129] Review changes --- locale/circuitpython.pot | 8 -------- shared-bindings/memorymap/AddressRange.c | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0d814b0ee6..21c69ff393 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2136,10 +2136,6 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" -#: ports/raspberrypi/common-hal/memorymap/AddressRange.c -msgid "Unable to access unaliged IO register" -msgstr "" - #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" msgstr "" @@ -4052,10 +4048,6 @@ msgstr "" msgid "source_bitmap must have value_count of 8" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "start must be an int" -msgstr "" - #: py/objstr.c msgid "start/end indices" msgstr "" diff --git a/shared-bindings/memorymap/AddressRange.c b/shared-bindings/memorymap/AddressRange.c index 74df9efecf..4ea7c680f5 100644 --- a/shared-bindings/memorymap/AddressRange.c +++ b/shared-bindings/memorymap/AddressRange.c @@ -97,7 +97,8 @@ STATIC mp_obj_t memorymap_addressrange_make_new(const mp_obj_type_t *type, size_ } else if (mp_obj_is_type(args[ARG_start].u_obj, &mp_type_int)) { start = mp_obj_int_get_uint_checked(args[ARG_start].u_obj); } else { - mp_raise_TypeError(translate("start must be an int")); + mp_obj_t arg = mp_unary_op(MP_UNARY_OP_INT, args[ARG_start].u_obj); + start = mp_obj_int_get_uint_checked(arg); } size_t length = mp_arg_validate_int_min(args[ARG_length].u_int, 1, MP_QSTR_length); From 34ccee686d94d7d4da154236519b24869145b5cf Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Thu, 7 Sep 2023 21:05:38 +0000 Subject: [PATCH 047/129] Translated using Weblate (Swedish) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index eadb239290..0d47864de6 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-08-29 18:34+0000\n" +"PO-Revision-Date: 2023-09-08 12:22+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -1411,7 +1411,7 @@ msgstr "Måste vara en %q-subklass." #: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c msgid "Must provide 5/6/5 RGB pins" -msgstr "" +msgstr "Måset ange 5/6/5 RGB-pinnar" #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" From 756815d1276a92d3c0a36536d4279f4b9df7a6bb Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 8 Sep 2023 16:15:04 +0000 Subject: [PATCH 048/129] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index daf77c1c94..467ec8f1e4 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-08-29 18:34+0000\n" +"PO-Revision-Date: 2023-09-08 18:28+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -1425,7 +1425,7 @@ msgstr "Deve ser uma subclasse %q." #: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c msgid "Must provide 5/6/5 RGB pins" -msgstr "" +msgstr "É preciso fornecer os pinos RGB 5/6/5" #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" From afff8e51eb01b8b6ba7f2a2b16d6cd5ec5f02adf Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 8 Sep 2023 20:28:25 +0200 Subject: [PATCH 049/129] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 17 +++++++++++++---- locale/cs.po | 17 +++++++++++++---- locale/de_DE.po | 20 ++++++++++++++++---- locale/el.po | 17 +++++++++++++---- locale/en_GB.po | 20 ++++++++++++++++---- locale/es.po | 20 ++++++++++++++++---- locale/fil.po | 17 +++++++++++++---- locale/fr.po | 20 ++++++++++++++++---- locale/hi.po | 17 +++++++++++++---- locale/it_IT.po | 17 +++++++++++++---- locale/ja.po | 17 +++++++++++++---- locale/ko.po | 17 +++++++++++++---- locale/nl.po | 17 +++++++++++++---- locale/pl.po | 17 +++++++++++++---- locale/pt_BR.po | 20 ++++++++++++++++---- locale/ru.po | 20 ++++++++++++++++---- locale/sv.po | 20 ++++++++++++++++---- locale/tr.po | 17 +++++++++++++---- locale/zh_Latn_pinyin.po | 20 ++++++++++++++++---- 19 files changed, 271 insertions(+), 76 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 0fbd6c2a51..9bbc16b76e 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -465,9 +465,14 @@ msgstr "Alamat harus sepanjang %d byte" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" @@ -2160,6 +2165,10 @@ msgstr "String UUID bukan 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "Nilai UUID bukan str, int atau byte buffer" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2213,14 +2222,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Tidak dapat menulis ke nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/cs.po b/locale/cs.po index e6659f7aea..564fdb4689 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -466,9 +466,14 @@ msgstr "Adresa musí být %d bajtů dlouhá" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Všechny CAN periferie jsou používány" @@ -2149,6 +2154,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2202,14 +2211,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 41eb8dcf22..7282d7a399 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -473,9 +473,14 @@ msgstr "Die Adresse muss %d Bytes lang sein" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Adressbereich nicht erlaubt" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Alle CAN-Schnittstellen sind in Benutzung" @@ -2187,6 +2192,10 @@ msgstr "UUID string ist nicht 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "Der UUID-Wert ist kein str-, int- oder Byte-Puffer" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2240,14 +2249,14 @@ msgstr "ADC-DMA-Controller konnte nicht gestartet werden, Fehlercode: %d" msgid "Unable to start mDNS query" msgstr "mDNS-Abfrage kann nicht gestartet werden" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "An die Adresse kann nicht geschrieben werden." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Schreiben in nvm nicht möglich." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Schreiben in sleep_memory nicht möglich." @@ -4466,6 +4475,9 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "Unable to write to address." +#~ msgstr "An die Adresse kann nicht geschrieben werden." + #~ msgid "queue overflow" #~ msgstr "Warteschlangenüberlauf" diff --git a/locale/el.po b/locale/el.po index 20ee429652..350c6cf713 100644 --- a/locale/el.po +++ b/locale/el.po @@ -474,9 +474,14 @@ msgstr "Η διεύθυνση πρέπει να είναι %d bytes μεγάλη #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Όλα τα περιφεριακά CAN είναι σε χρήση" @@ -2162,6 +2167,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2215,14 +2224,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 9b8f7e6ee9..c79e5056f1 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -472,9 +472,14 @@ msgstr "Address must be %d bytes long" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Address range not allowed" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "All CAN peripherals are in use" @@ -2162,6 +2167,10 @@ msgstr "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "UUID value is not str, int or byte buffer" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2215,14 +2224,14 @@ msgstr "Unable to start ADC DMA controller, ErrorCode:%d" msgid "Unable to start mDNS query" msgstr "Unable to start mDNS query" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "Unable to write to address." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Unable to write to nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Unable to write to sleep_memory." @@ -4409,6 +4418,9 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Unable to write to address." +#~ msgstr "Unable to write to address." + #~ msgid "queue overflow" #~ msgstr "queue overflow" diff --git a/locale/es.po b/locale/es.po index 7e267f12b1..d1f2891c54 100644 --- a/locale/es.po +++ b/locale/es.po @@ -477,9 +477,14 @@ msgstr "La dirección debe tener %d bytes de longitud" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Rango de dirección no permitido" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Todos los periféricos CAN están en uso" @@ -2201,6 +2206,10 @@ msgstr "UUID string no es 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "UUID valor no es un str, int o byte buffer" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2255,14 +2264,14 @@ msgstr "Imposible de iniciar el controlador ADC DMA, código de error:%d" msgid "Unable to start mDNS query" msgstr "Imposible de incializar una consulta mDNS" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "Imposible de escribir en esa dirección." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Imposible escribir en nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Imposible de escribir en sleep_memory." @@ -4462,6 +4471,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Unable to write to address." +#~ msgstr "Imposible de escribir en esa dirección." + #~ msgid "queue overflow" #~ msgstr "desbordamiento de cola(queue)" diff --git a/locale/fil.po b/locale/fil.po index 6aac262576..739d957998 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -464,9 +464,14 @@ msgstr "ang palette ay dapat 32 bytes ang haba" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" @@ -2150,6 +2155,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2203,14 +2212,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Hindi ma i-sulat sa NVM." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 2beabfa3a4..10b20a3d51 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -476,9 +476,14 @@ msgstr "L'adresse doit être longue de %d octets" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Plage d'adresses non autorisée" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Tous les périphériques CAN sont utilisés" @@ -2208,6 +2213,10 @@ msgstr "" "La valeur de l'UUID n'est pas une chaîne de caractères, un chiffre entier ou " "un tampon d'octets" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2261,14 +2270,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "Impossible de lancer la requête mDNS" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "L'écriture a échoué." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Écriture impossible vers nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Écriture impossible vers sleep_memory." @@ -4482,6 +4491,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Unable to write to address." +#~ msgstr "L'écriture a échoué." + #~ msgid "queue overflow" #~ msgstr "dépassement de file" diff --git a/locale/hi.po b/locale/hi.po index 93f039352e..87f0f9ec35 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -462,9 +462,14 @@ msgstr "" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" @@ -2136,6 +2141,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2189,14 +2198,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index d05baee044..f4b862ac4c 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -467,9 +467,14 @@ msgstr "L'indirizzo deve essere lungo %d byte" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Tutte le periferiche CAN sono in uso" @@ -2157,6 +2162,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2210,14 +2219,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Imposibile scrivere su nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/ja.po b/locale/ja.po index b107a4bc18..efe1ba664e 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -469,9 +469,14 @@ msgstr "アドレスは、%dバイト長でなければなりません" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "全てのCAN周辺機器が使用中" @@ -2151,6 +2156,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "UUIDの値がstr, int, bufferのいずれでもありません" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2204,14 +2213,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "nvmに書き込みできません" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 6b9ca9f1b0..1ff7ddc557 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -463,9 +463,14 @@ msgstr "" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" @@ -2140,6 +2145,10 @@ msgid "UUID value is not str, int or byte buffer" msgstr "" "UUID값이 문자열(str), 정수(int) 또는 바이트버퍼가(byte buffer) 아닙니다" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2193,14 +2202,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 7d070b4348..6ddb299e45 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -462,9 +462,14 @@ msgstr "Adres moet %d bytes lang zijn" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Alle CAN-peripherals zijn in gebruik" @@ -2155,6 +2160,10 @@ msgstr "UUID string is niet 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "UUID waarde is geen str, int, of byte buffer" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2208,14 +2217,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Niet in staat om naar nvm te schrijven." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Kan niet naar sleep_memory schrijven." diff --git a/locale/pl.po b/locale/pl.po index 1c06559739..77e5af1268 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -464,9 +464,14 @@ msgstr "Adres musi mieć %d bajtów" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "" @@ -2142,6 +2147,10 @@ msgstr "UUID inny, niż `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "UUID nie jest typu str, int lub bytes" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2195,14 +2204,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Błąd zapisu do NVM." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 467ec8f1e4..b03adde224 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -479,9 +479,14 @@ msgstr "O endereço deve ter %d bytes de comprimento" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Intervalo de endereços não permitido" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Todos os periféricos CAN estão em uso" @@ -2202,6 +2207,10 @@ msgstr "A cadeia de caracteres UUID não 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "O valor UUID não é um buffer str, int ou byte" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2255,14 +2264,14 @@ msgstr "Não foi possível iniciar o controlador ADC DMA, ErrorCode:%d" msgid "Unable to start mDNS query" msgstr "Não é possível iniciar a consulta mDNS" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "Não é possível gravar no endereço." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Não é possível gravar no nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Não foi possível escrever no sleep_memory." @@ -4470,6 +4479,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Unable to write to address." +#~ msgstr "Não é possível gravar no endereço." + #~ msgid "queue overflow" #~ msgstr "estouro de fila" diff --git a/locale/ru.po b/locale/ru.po index 6ddf967794..a1f4452d95 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -478,9 +478,14 @@ msgstr "Адрес должен быть длиной %d байт" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Диапазон адресов не разрешен" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Все периферийные устройства CAN уже используются" @@ -2204,6 +2209,10 @@ msgstr "UUID строка не 'xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxxxxxx msgid "UUID value is not str, int or byte buffer" msgstr "Значение UUID не является строковым, целым или байтовым буфером" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2257,14 +2266,14 @@ msgstr "Не удается запустить контроллер ADC DMA, к msgid "Unable to start mDNS query" msgstr "Не удается запустить запрос mDNS" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "Невозможно написать на адрес." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Невозможно выполнить запись в nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Невозможно записать в Sleep_memory." @@ -4478,6 +4487,9 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "Unable to write to address." +#~ msgstr "Невозможно написать на адрес." + #~ msgid "queue overflow" #~ msgstr "Переполнение очереди" diff --git a/locale/sv.po b/locale/sv.po index 0d47864de6..0311244e6d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -476,9 +476,14 @@ msgstr "Adressen måste vara %d byte lång" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "Adressintervallet är inte tillåtet" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "All CAN-kringutrustning används" @@ -2176,6 +2181,10 @@ msgstr "UUID-sträng inte \"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"" msgid "UUID value is not str, int or byte buffer" msgstr "UUID-värdet är inte str, int eller byte-buffert" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2229,14 +2238,14 @@ msgstr "Kan inte starta ADC DMA controller, Felkod:%d" msgid "Unable to start mDNS query" msgstr "Det gick inte att starta mDNS-frågan" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "Det går inte att skriva till adress." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Det gick inte att skriva till nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "Det gick inte att skriva till sleep_memory." @@ -4429,6 +4438,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Unable to write to address." +#~ msgstr "Det går inte att skriva till adress." + #~ msgid "queue overflow" #~ msgstr "köstorlek överskreds" diff --git a/locale/tr.po b/locale/tr.po index ec87faadcb..66aee1321d 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -471,9 +471,14 @@ msgstr "Adres %d byte uzunluğunda olmalıdır" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "Tüm CAN çevre birimleri kullanımda" @@ -2156,6 +2161,10 @@ msgstr "" msgid "UUID value is not str, int or byte buffer" msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2209,14 +2218,14 @@ msgstr "" msgid "Unable to start mDNS query" msgstr "" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "" - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index e805fff144..09527f8b87 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -477,9 +477,14 @@ msgstr "dìzhǐ chángdù bìxū shì %d zìjié" #: ports/espressif/common-hal/memorymap/AddressRange.c #: ports/nrf/common-hal/memorymap/AddressRange.c +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" msgstr "bù yǔn xǔ de dì zhǐ fàn wéi" +#: shared-bindings/memorymap/AddressRange.c +msgid "Address range wraps around" +msgstr "" + #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" msgstr "suǒyǒu CAN wàishè dōu zài shǐyòng zhōng" @@ -2179,6 +2184,10 @@ msgstr "UUID Zìfú chuàn bùshì 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID value is not str, int or byte buffer" msgstr "UUID zhí bùshì str,int huò zì jié huǎnchōng qū" +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to access unaligned IO register" +msgstr "" + #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -2232,14 +2241,14 @@ msgstr "wú fǎ qǐ dòng ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" msgid "Unable to start mDNS query" msgstr "wú fǎ qǐ dòng mDNS chá xún" -#: shared-bindings/memorymap/AddressRange.c -msgid "Unable to write to address." -msgstr "Wú fǎ xiě rù dì zhǐ." - #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." msgstr "Wúfǎ xiě rù nvm." +#: ports/raspberrypi/common-hal/memorymap/AddressRange.c +msgid "Unable to write to read-only memory" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." msgstr "wú fǎ xiě rù sleep_memory." @@ -4434,6 +4443,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Unable to write to address." +#~ msgstr "Wú fǎ xiě rù dì zhǐ." + #~ msgid "queue overflow" #~ msgstr "duìliè yìchū" From 92eaf6236f73f3b1b52a1dd9121b16607284b0b6 Mon Sep 17 00:00:00 2001 From: Elviss Kustans Date: Sat, 9 Sep 2023 01:38:08 +0000 Subject: [PATCH 050/129] Add M5Stack AtomS3U --- .../espressif/boards/m5stack_atoms3u/board.c | 29 ++++++++++++++ .../boards/m5stack_atoms3u/mpconfigboard.h | 35 +++++++++++++++++ .../boards/m5stack_atoms3u/mpconfigboard.mk | 11 ++++++ ports/espressif/boards/m5stack_atoms3u/pins.c | 38 +++++++++++++++++++ .../boards/m5stack_atoms3u/sdkconfig | 7 ++++ 5 files changed, 120 insertions(+) create mode 100644 ports/espressif/boards/m5stack_atoms3u/board.c create mode 100644 ports/espressif/boards/m5stack_atoms3u/mpconfigboard.h create mode 100644 ports/espressif/boards/m5stack_atoms3u/mpconfigboard.mk create mode 100644 ports/espressif/boards/m5stack_atoms3u/pins.c create mode 100644 ports/espressif/boards/m5stack_atoms3u/sdkconfig diff --git a/ports/espressif/boards/m5stack_atoms3u/board.c b/ports/espressif/boards/m5stack_atoms3u/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/m5stack_atoms3u/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/m5stack_atoms3u/mpconfigboard.h b/ports/espressif/boards/m5stack_atoms3u/mpconfigboard.h new file mode 100644 index 0000000000..1c3376cee4 --- /dev/null +++ b/ports/espressif/boards/m5stack_atoms3u/mpconfigboard.h @@ -0,0 +1,35 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "M5Stack AtomS3U" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO35) + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO1, .sda = &pin_GPIO2}} diff --git a/ports/espressif/boards/m5stack_atoms3u/mpconfigboard.mk b/ports/espressif/boards/m5stack_atoms3u/mpconfigboard.mk new file mode 100644 index 0000000000..dc65fefc4b --- /dev/null +++ b/ports/espressif/boards/m5stack_atoms3u/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x303A +USB_PID = 0x8187 +USB_PRODUCT = "M5Stack AtomS3U" +USB_MANUFACTURER = "M5Stack" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_atoms3u/pins.c b/ports/espressif/boards/m5stack_atoms3u/pins.c new file mode 100644 index 0000000000..716efa593b --- /dev/null +++ b/ports/espressif/boards/m5stack_atoms3u/pins.c @@ -0,0 +1,38 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_A17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, + + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_IR_LED), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_PDM_MIC_CLK), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_PDM_MIC_DATA), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_atoms3u/sdkconfig b/ports/espressif/boards/m5stack_atoms3u/sdkconfig new file mode 100644 index 0000000000..9d924272ec --- /dev/null +++ b/ports/espressif/boards/m5stack_atoms3u/sdkconfig @@ -0,0 +1,7 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=n + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP From 0391983c96c0cb7d2842cd9e283262d159be50c9 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 8 Sep 2023 23:43:05 +0000 Subject: [PATCH 051/129] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1002 of 1002 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b03adde224..a3bbce9653 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-09-08 18:28+0000\n" +"PO-Revision-Date: 2023-09-10 08:50+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -485,7 +485,7 @@ msgstr "Intervalo de endereços não permitido" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" -msgstr "" +msgstr "O intervalo de endereços envolve" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -2209,7 +2209,7 @@ msgstr "O valor UUID não é um buffer str, int ou byte" #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" -msgstr "" +msgstr "Não foi possível acessar o registro IO não solicitado" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2270,7 +2270,7 @@ msgstr "Não é possível gravar no nvm." #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to write to read-only memory" -msgstr "" +msgstr "Não foi possível escrever na memória de somente leitura" #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." From b6c5858e9603c13f1809f2e049ead0a2c60ade25 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 8 Sep 2023 18:39:22 +0000 Subject: [PATCH 052/129] Translated using Weblate (Swedish) Currently translated at 100.0% (1002 of 1002 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 0311244e6d..90ba90457a 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-09-08 12:22+0000\n" +"PO-Revision-Date: 2023-09-10 08:50+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -482,7 +482,7 @@ msgstr "Adressintervallet är inte tillåtet" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" -msgstr "" +msgstr "Adressintervall ger överflödesfel" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -2183,7 +2183,7 @@ msgstr "UUID-värdet är inte str, int eller byte-buffert" #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" -msgstr "" +msgstr "Kan inte komma åt ojusterat IO-register" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2244,7 +2244,7 @@ msgstr "Det gick inte att skriva till nvm." #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to write to read-only memory" -msgstr "" +msgstr "Kan inte skriva till skrivskyddat minne" #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." From 485929bab9c43c0169de7af4c3a26c87340d3faa Mon Sep 17 00:00:00 2001 From: Andi Chandler Date: Fri, 8 Sep 2023 21:10:38 +0000 Subject: [PATCH 053/129] Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (1002 of 1002 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/ --- locale/en_GB.po | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/locale/en_GB.po b/locale/en_GB.po index c79e5056f1..158b5a1c9c 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-08-14 01:48+0000\n" +"PO-Revision-Date: 2023-09-10 08:50+0000\n" "Last-Translator: Andi Chandler \n" "Language-Team: none\n" "Language: en_GB\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 5.0-dev\n" +"X-Generator: Weblate 5.0.1-dev\n" #: main.c msgid "" @@ -39,6 +39,9 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." #: supervisor/shared/safe_mode.c msgid "" @@ -433,7 +436,7 @@ msgstr "'yield' outside function" #: py/compile.c msgid "* arg after **" -msgstr "" +msgstr "* arg after **" #: py/compile.c msgid "*x must be assignment target" @@ -463,7 +466,7 @@ msgstr "ADC2 is being used by WiFi" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" -msgstr "" +msgstr "AP could not be started" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -478,7 +481,7 @@ msgstr "Address range not allowed" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" -msgstr "" +msgstr "Address range wraps around" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -708,7 +711,7 @@ msgstr "Buffer too short by %d bytes" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Buffer too small" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -1132,7 +1135,7 @@ msgstr "Half duplex SPI is not implemented" #: supervisor/shared/safe_mode.c msgid "Hard fault: memory access or instruction error." -msgstr "" +msgstr "Hard fault: memory access or instruction error." #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c @@ -1406,7 +1409,7 @@ msgstr "Must be a %q subclass." #: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c msgid "Must provide 5/6/5 RGB pins" -msgstr "" +msgstr "Must provide 5/6/5 RGB pins" #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" @@ -1796,7 +1799,7 @@ msgstr "Polygon needs at least 3 points" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "" +msgstr "Power dipped. Make sure you are providing enough power." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -2169,7 +2172,7 @@ msgstr "UUID value is not str, int or byte buffer" #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" -msgstr "" +msgstr "Unable to access unaligned IO register" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2230,7 +2233,7 @@ msgstr "Unable to write to nvm." #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to write to read-only memory" -msgstr "" +msgstr "Unable to write to read-only memory" #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." @@ -2417,7 +2420,7 @@ msgstr "You pressed button A at start up." #: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h msgid "You pressed button DOWN at start up." -msgstr "" +msgstr "You pressed button DOWN at start up." #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" @@ -2542,7 +2545,7 @@ msgstr "array/bytes required on right side" #: py/asmxtensa.c msgid "asm overflow" -msgstr "" +msgstr "asm overflow" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" @@ -2634,7 +2637,7 @@ msgstr "Buffer too small for requested bytes" #: py/emitbc.c msgid "bytecode overflow" -msgstr "" +msgstr "bytecode overflow" #: py/objarray.c msgid "bytes length not a multiple of item size" @@ -2693,7 +2696,7 @@ msgstr "can't convert %s to complex" #: py/obj.c #, c-format msgid "can't convert %s to float" -msgstr "" +msgstr "can't convert %s to float" #: py/objstr.c msgid "can't convert '%q' object to %q implicitly" @@ -2709,7 +2712,7 @@ msgstr "can't convert to complex" #: py/obj.c msgid "can't convert to float" -msgstr "" +msgstr "can't convert to float" #: py/runtime.c msgid "can't convert to int" @@ -2793,7 +2796,7 @@ msgstr "" #: extmod/moduasyncio.c msgid "can't wait" -msgstr "" +msgstr "can't wait" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" @@ -3231,11 +3234,11 @@ msgstr "import * not at module level" #: py/persistentcode.c msgid "incompatible .mpy arch" -msgstr "" +msgstr "incompatible .mpy arch" #: py/persistentcode.c msgid "incompatible .mpy file" -msgstr "" +msgstr "incompatible .mpy file" #: py/objstr.c msgid "incomplete format" @@ -3699,7 +3702,7 @@ msgstr "not a 128-bit UUID" #: py/parse.c msgid "not a constant" -msgstr "" +msgstr "not a constant" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -3937,11 +3940,11 @@ msgstr "port must be >= 0" #: py/compile.c msgid "positional arg after **" -msgstr "" +msgstr "positional arg after **" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "" +msgstr "positional arg after keyword arg" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -4168,7 +4171,7 @@ msgstr "tobytes can be invoked for dense arrays only" #: py/compile.c msgid "too many args" -msgstr "" +msgstr "too many args" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" From 2003d237c4ecae1de8d30c1a875798e0b1082b1b Mon Sep 17 00:00:00 2001 From: xXx Date: Sat, 9 Sep 2023 08:47:13 +0000 Subject: [PATCH 054/129] Translated using Weblate (Russian) Currently translated at 100.0% (1002 of 1002 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ru/ --- locale/ru.po | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/locale/ru.po b/locale/ru.po index a1f4452d95..7f4b6088bb 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2023-09-06 13:57+0000\n" -"Last-Translator: Jeff Epler \n" +"PO-Revision-Date: 2023-09-10 08:50+0000\n" +"Last-Translator: xXx \n" "Language-Team: none\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " +"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 5.0.1-dev\n" #: main.c @@ -484,7 +484,7 @@ msgstr "Диапазон адресов не разрешен" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" -msgstr "" +msgstr "Обертывание диапазона адресов" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -1437,7 +1437,7 @@ msgstr "Должен быть субклассом %q." #: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c msgid "Must provide 5/6/5 RGB pins" -msgstr "" +msgstr "Должен иметь 5/6/5 контактов RGB" #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" @@ -2211,7 +2211,7 @@ msgstr "Значение UUID не является строковым, целы #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" -msgstr "" +msgstr "Невозможно получить доступ к невыровненному регистру ввода-вывода" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2272,7 +2272,7 @@ msgstr "Невозможно выполнить запись в nvm." #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to write to read-only memory" -msgstr "" +msgstr "Невозможно записать в постоянную память" #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." From 722d64b0e7a53b240eaa395a5716e6cbbb482ae4 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 11 Sep 2023 12:07:45 -0400 Subject: [PATCH 055/129] Add root cert DST Root CA X3 for Let's Encrypt --- lib/certificates | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/certificates b/lib/certificates index 5c85c604a0..cbb33c111f 160000 --- a/lib/certificates +++ b/lib/certificates @@ -1 +1 @@ -Subproject commit 5c85c604a0d77a08df93435e4afad5f541c38923 +Subproject commit cbb33c111f245411370c1e571012472323df3f07 From 5a966960256884459de11203cf9e5774851a6a5a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 11 Sep 2023 13:46:08 -0500 Subject: [PATCH 056/129] This board got a KICKIN marketing name --- .../board.c | 0 .../mpconfigboard.h | 2 +- .../mpconfigboard.mk | 2 +- .../pins.c | 0 .../sdkconfig | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename ports/espressif/boards/{adafruit_esp32s3_rgb_tft_experiment => adafruit_qualia_s3_rgb666}/board.c (100%) rename ports/espressif/boards/{adafruit_esp32s3_rgb_tft_experiment => adafruit_qualia_s3_rgb666}/mpconfigboard.h (95%) rename ports/espressif/boards/{adafruit_esp32s3_rgb_tft_experiment => adafruit_qualia_s3_rgb666}/mpconfigboard.mk (80%) rename ports/espressif/boards/{adafruit_esp32s3_rgb_tft_experiment => adafruit_qualia_s3_rgb666}/pins.c (100%) rename ports/espressif/boards/{adafruit_esp32s3_rgb_tft_experiment => adafruit_qualia_s3_rgb666}/sdkconfig (95%) diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/board.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/board.c similarity index 100% rename from ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/board.c rename to ports/espressif/boards/adafruit_qualia_s3_rgb666/board.c diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h similarity index 95% rename from ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h rename to ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h index 2762cd4208..9acfe8cf06 100644 --- a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h @@ -26,7 +26,7 @@ // Micropython setup -#define MICROPY_HW_BOARD_NAME "Adafruit-ESP32-S3-RGB-TFT-Experiment" +#define MICROPY_HW_BOARD_NAME "Adafruit-Qualia-S3-RGB666" #define MICROPY_HW_MCU_NAME "ESP32S3" #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk similarity index 80% rename from ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk rename to ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk index 9e66fc4359..1bde6abfe4 100644 --- a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x239A USB_PID = 0x8148 -USB_PRODUCT = "Adafruit-ESP32-S3-RGB-TFT-Experiment" +USB_PRODUCT = "Qualia-S3-RGB666" USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c similarity index 100% rename from ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/pins.c rename to ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c diff --git a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig similarity index 95% rename from ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig rename to ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig index 4449c672e1..79d78825fc 100644 --- a/ports/espressif/boards/adafruit_esp32s3_rgb_tft_experiment/sdkconfig +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig @@ -28,7 +28,7 @@ CONFIG_SPIRAM_MEMTEST=y # # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" +CONFIG_LWIP_LOCAL_HOSTNAME="qualia" # end of LWIP # # CONFIG_ESP_CONSOLE_NONE is not set From 6e9c21baba423958893d14aa7b3945563628e0b0 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 11 Sep 2023 23:35:54 +0300 Subject: [PATCH 057/129] Deinit all the pins. --- ports/espressif/common-hal/espcamera/Camera.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ports/espressif/common-hal/espcamera/Camera.c b/ports/espressif/common-hal/espcamera/Camera.c index 574b4e846b..7db8a4b4c1 100644 --- a/ports/espressif/common-hal/espcamera/Camera.c +++ b/ports/espressif/common-hal/espcamera/Camera.c @@ -161,6 +161,10 @@ extern void common_hal_espcamera_camera_deinit(espcamera_camera_obj_t *self) { esp_camera_deinit(); + reset_pin_number(self->camera_config.pin_pclk); + reset_pin_number(self->camera_config.pin_vsync); + reset_pin_number(self->camera_config.pin_href); + self->camera_config.xclk_freq_hz = 0; } From 05267948b4639316b87899428a0bdf112bdb53f4 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 12 Sep 2023 11:24:02 -0400 Subject: [PATCH 058/129] Revert "formatting" (from #8089) This reverts commit 4bb475b930d4237f09f26ac3a6f841fbd690d026. --- ports/nrf/common-hal/busio/UART.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 626956946f..94201774de 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -266,7 +266,7 @@ bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) { } void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { - volatile uint32_t *power_cycle = (void *)(self->uarte->p_reg) + 0xFFC; + volatile uint32_t *power_cycle = (void*)(self->uarte->p_reg) + 0xFFC; if (!common_hal_busio_uart_deinited(self)) { nrfx_uarte_rx_abort(self->uarte); nrfx_uarte_tx_abort(self->uarte); From 46bcd103a7a52cc1c80aedbc20928422115b2345 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 12 Sep 2023 11:24:49 -0400 Subject: [PATCH 059/129] Revert "Reset UART on deinit, reduces power consumption" (from #8089) This reverts commit ec1e7a03b38c625664a4615e60d26956205d7a67. --- ports/nrf/common-hal/busio/UART.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 94201774de..10a34e09df 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -266,15 +266,8 @@ bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) { } void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { - volatile uint32_t *power_cycle = (void*)(self->uarte->p_reg) + 0xFFC; if (!common_hal_busio_uart_deinited(self)) { - nrfx_uarte_rx_abort(self->uarte); - nrfx_uarte_tx_abort(self->uarte); nrfx_uarte_uninit(self->uarte); - // power cycle the peripheral as per https://devzone.nordicsemi.com/f/nordic-q-a/26030/how-to-reach-nrf52840-uarte-current-supply-specification/102605#102605 - *power_cycle = 0; - *power_cycle; - *power_cycle = 1; reset_pin_number(self->tx_pin_number); reset_pin_number(self->rx_pin_number); reset_pin_number(self->rts_pin_number); From d8aeceb70686d5e23a121be8bf92715d6105c21f Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 12 Sep 2023 12:45:46 -0400 Subject: [PATCH 060/129] SSLContext.load_verify_locations - no kw-only args --- shared-bindings/ssl/SSLContext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index ac5f7ad42d..5695cf1b9b 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -101,7 +101,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_load_cert_chain_obj, 1, ssl_ssl STATIC mp_obj_t ssl_sslcontext_load_verify_locations(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_cadata }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_cadata, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + { MP_QSTR_cadata, MP_ARG_OBJ, {.u_obj = mp_const_none} }, }; ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); From c65dbf3f0d8a073549dc53fe9174086145664a2a Mon Sep 17 00:00:00 2001 From: hexthat Date: Tue, 12 Sep 2023 16:55:15 +0000 Subject: [PATCH 061/129] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (1002 of 1002 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 09527f8b87..3cf7b93b0d 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-08-29 18:34+0000\n" +"PO-Revision-Date: 2023-09-13 17:49+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -483,7 +483,7 @@ msgstr "bù yǔn xǔ de dì zhǐ fàn wéi" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" -msgstr "" +msgstr "dìzhǐ fànwéi huánrào" #: ports/espressif/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -1421,7 +1421,7 @@ msgstr "Bìxū shì %q zi lèi." #: ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c msgid "Must provide 5/6/5 RGB pins" -msgstr "" +msgstr "bìxū tígòng 5/6/5RGB yǐnjiǎo" #: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c msgid "Must provide MISO or MOSI pin" @@ -2186,7 +2186,7 @@ msgstr "UUID zhí bùshì str,int huò zì jié huǎnchōng qū" #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to access unaligned IO register" -msgstr "" +msgstr "wúfǎ fǎngwèn wèi duìqí de IO jìcúnqì" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -2247,7 +2247,7 @@ msgstr "Wúfǎ xiě rù nvm." #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Unable to write to read-only memory" -msgstr "" +msgstr "wúfǎ xiěrù zhǐdú nèicún" #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." From a18e015888a347f182161458666c1447c1e29efc Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Fri, 6 Jan 2023 12:15:06 +0530 Subject: [PATCH 062/129] update idf to v5.0 --- .gitmodules | 15 +- ports/espressif/CMakeLists.txt | 8 +- ports/espressif/Makefile | 66 +- ports/espressif/README.rst | 2 +- ports/espressif/common-hal/_bleio/Adapter.c | 1 - .../espressif/common-hal/alarm/pin/PinAlarm.c | 4 +- .../espressif/common-hal/analogio/AnalogIn.c | 7 +- .../common-hal/audiobusio/__init__.c | 12 +- ports/espressif/common-hal/busio/SPI.c | 2 +- ports/espressif/common-hal/countio/Counter.c | 2 + .../espressif/common-hal/dualbank/__init__.c | 5 +- ports/espressif/common-hal/espidf/__init__.c | 10 +- ports/espressif/common-hal/espulp/ULP.c | 17 +- ports/espressif/common-hal/espulp/ULPAlarm.c | 4 +- .../common-hal/frequencyio/FrequencyIn.c | 20 +- ports/espressif/common-hal/hashlib/Hash.c | 4 +- ports/espressif/common-hal/hashlib/__init__.c | 2 +- .../espressif/common-hal/mdns/RemoteService.h | 2 +- ports/espressif/common-hal/mdns/Server.c | 29 +- .../common-hal/memorymap/AddressRange.c | 2 - .../common-hal/microcontroller/Pin.c | 58 +- .../common-hal/microcontroller/Processor.c | 18 +- .../common-hal/neopixel_write/__init__.c | 1 - ports/espressif/common-hal/os/__init__.c | 3 +- .../common-hal/paralleldisplay/ParallelBus.c | 9 +- ports/espressif/common-hal/pulseio/PulseIn.h | 1 - ports/espressif/common-hal/pulseio/PulseOut.h | 1 - ports/espressif/common-hal/pwmio/PWMOut.c | 5 +- .../espressif/common-hal/socketpool/Socket.c | 4 +- .../espressif/common-hal/socketpool/Socket.h | 1 + .../common-hal/socketpool/SocketPool.c | 4 +- ports/espressif/common-hal/ssl/SSLContext.c | 1 + ports/espressif/common-hal/ssl/SSLSocket.c | 5 +- ports/espressif/common-hal/ssl/SSLSocket.h | 1 + .../common-hal/watchdog/WatchDogTimer.c | 7 +- ports/espressif/common-hal/wifi/Radio.c | 2 +- ports/espressif/common-hal/wifi/Radio.h | 2 + ports/espressif/common-hal/wifi/__init__.c | 2 +- ports/espressif/esp-idf | 2 +- .../esp-idf-config/sdkconfig-esp32c3.defaults | 171 +--- .../esp-idf-config/sdkconfig-esp32s2.defaults | 166 +--- .../esp-idf-config/sdkconfig-esp32s3.defaults | 221 +---- .../esp-idf-config/sdkconfig-opt.defaults | 113 +-- .../esp-idf-config/sdkconfig.defaults | 879 +----------------- ports/espressif/esp-iot-solution | 1 + ports/espressif/esp-protocols | 1 + ports/espressif/esp32-camera | 2 +- ports/espressif/esp32c3_fix.h | 42 - ports/espressif/i2s_lcd_driver.h | 135 --- ports/espressif/i2s_lcd_esp32s2_driver.c | 489 ---------- ports/espressif/mpconfigport.mk | 2 + ports/espressif/peripherals/i2c.c | 4 +- ports/espressif/peripherals/pins.h | 2 +- ports/espressif/peripherals/rmt.h | 6 +- ports/espressif/peripherals/timer.h | 1 + ports/espressif/supervisor/port.c | 13 +- ports/espressif/supervisor/usb.c | 4 +- 57 files changed, 261 insertions(+), 2332 deletions(-) create mode 160000 ports/espressif/esp-iot-solution create mode 160000 ports/espressif/esp-protocols delete mode 100644 ports/espressif/esp32c3_fix.h delete mode 100644 ports/espressif/i2s_lcd_esp32s2_driver.c diff --git a/.gitmodules b/.gitmodules index 32105e4744..80fcc99133 100644 --- a/.gitmodules +++ b/.gitmodules @@ -143,7 +143,16 @@ [submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf url = https://github.com/adafruit/esp-idf.git - branch = release/v4.4-circuitpython +[submodule "ports/espressif/esp-protocols"] + path = ports/espressif/esp-protocols + url = https://github.com/espressif/esp-protocols.git +[submodule "ports/espressif/esp-iot-solution"] + path = ports/espressif/esp-iot-solution + url = https://github.com/espressif/esp-iot-solution.git +[submodule "ports/espressif/esp-camera"] + path = ports/espressif/esp-camera + url = https://github.com/espressif/esp32-camera.git + branch = circuitpython [submodule "frozen/Adafruit_CircuitPython_ST7789"] path = frozen/Adafruit_CircuitPython_ST7789 url = https://github.com/adafruit/Adafruit_CircuitPython_ST7789 @@ -297,10 +306,6 @@ [submodule "frozen/circuitpython_picoed"] path = frozen/circuitpython_picoed url = https://github.com/elecfreaks/circuitpython_picoed.git -[submodule "ports/espressif/esp32-camera"] - path = ports/espressif/esp32-camera - url = https://github.com/adafruit/esp32-camera/ - branch = circuitpython [submodule "ports/raspberrypi/lib/cyw43-driver"] path = ports/raspberrypi/lib/cyw43-driver url = https://github.com/georgerobotics/cyw43-driver.git diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index c6d180b57d..f129b8b4bf 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -1,12 +1,12 @@ # The following five lines of boilerplate have to be in your project's # CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf) -# The component list here determines what options we get in menuconfig and what the ninja file -# can build. -set(COMPONENTS esptool_py soc driver log main esp-tls mbedtls mdns esp_event esp_adc_cal esp_netif esp_wifi lwip ulp wpa_supplicant freertos bt usb esp32-camera esp_lcd) +# The component list here determines what options we get in menuconfig and what the ninja file can build. +set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp_lcd) +set(EXTRA_COMPONENT_DIRS esp-protocols/components/mdns) list(APPEND EXTRA_COMPONENT_DIRS "esp32-camera") diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index c103a79217..6397a95e44 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -51,6 +51,7 @@ INC += \ -isystem esp-idf \ -isystem esp-idf/components/app_update/include \ -isystem esp-idf/components/bootloader_support/include \ + -isystem esp-idf/components/bootloader_support/bootloader_flash/include \ -isystem esp-idf/components/bt/include/$(IDF_TARGET)/include \ -isystem esp-idf/components/bt/host/nimble/esp-hci/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/controller/include \ @@ -62,28 +63,31 @@ INC += \ -isystem esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include \ -isystem esp-idf/components/bt/host/nimble/port/include \ -isystem esp-idf/components/driver/include \ + -isystem esp-idf/components/driver/deprecated \ -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ -isystem esp-idf/components/efuse/include \ -isystem esp-idf/components/efuse/$(IDF_TARGET)/include \ -isystem esp-idf/components/$(IDF_TARGET)/include \ - -isystem esp-idf/components/esp_adc_cal/include \ + -isystem esp-idf/components/esp_adc/deprecated/include \ + -isystem esp-idf/components/esp_app_format/include \ -isystem esp-idf/components/esp_common/include \ -isystem esp-idf/components/esp_event/include \ -isystem esp-idf/components/esp_hw_support/include \ -isystem esp-idf/components/esp_hw_support/include/soc \ - -isystem esp-idf/components/esp_ipc/include \ -isystem esp-idf/components/esp_netif/include \ + -isystem esp-idf/components/esp_partition/include \ -isystem esp-idf/components/esp_pm/include \ + -isystem esp-idf/components/esp_psram/include \ -isystem esp-idf/components/esp_ringbuf/include \ -isystem esp-idf/components/esp_rom/include \ -isystem esp-idf/components/esp_system/include \ -isystem esp-idf/components/esp_timer/include \ -isystem esp-idf/components/esp_wifi/include \ - -isystem esp-idf/components/freertos/include \ - -isystem esp-idf/components/freertos/include/freertos \ - -isystem esp-idf/components/freertos/include/esp_additions \ - -isystem esp-idf/components/freertos/include/esp_additions/freertos \ - -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/freertos/esp_additions/include \ + -isystem esp-idf/components/freertos/esp_additions/include/freertos \ + -isystem esp-idf/components/freertos/FreeRTOS-Kernel/include \ + -isystem esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos \ + -isystem esp-idf/components/freertos/FreeRTOS-Kernel/portable/$(IDF_TARGET_ARCH)/include \ -isystem esp-idf/components/hal/include \ -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ -isystem esp-idf/components/hal/platform_port/include \ @@ -100,13 +104,13 @@ INC += \ -isystem esp-idf/components/soc/include \ -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ -isystem esp-idf/components/spi_flash/include \ + -isystem esp-idf/components/ulp/include \ + -isystem esp-idf/components/ulp/ulp_riscv/include \ + -isystem esp-idf/components/ulp/ulp_common/include \ + -isystem esp-idf/components/ulp/ulp_common/include/$(IDF_TARGET) \ -isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \ - -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include - -# See https://github.com/espressif/esp-idf/issues/6906 -ifeq ($(IDF_TARGET),esp32c3) -CFLAGS += -include "esp32c3_fix.h" -endif + -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include \ + -isystem esp-protocols/components/mdns/include CFLAGS += \ -DHAVE_CONFIG_H \ @@ -232,22 +236,15 @@ SRC_C += \ peripherals/timer.c \ peripherals/$(IDF_TARGET)/pins.c -ifneq ($(IDF_TARGET),esp32c3) +SRC_C += $(wildcard common-hal/espidf/*.c) + +ifeq ($(IDF_TARGET),esp32c3) +SRC_C += supervisor/usb_serial_jtag.c +else SRC_C += \ peripherals/pcnt.c \ peripherals/touch.c -ifeq ($(IDF_TARGET),esp32s2) -SRC_C += \ - i2s_lcd_esp32s2_driver.c endif -endif - -ifeq ($(IDF_TARGET),esp32c3) -SRC_C += \ - supervisor/usb_serial_jtag.c -endif - -$(BUILD)/i2s_lcd_esp32s2_driver.o: CFLAGS += -Wno-sign-compare ifneq ($(CIRCUITPY_USB),0) SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c @@ -257,6 +254,17 @@ ifneq ($(CIRCUITPY_BLEIO),0) SRC_C += common-hal/_bleio/ble_events.c endif +ifneq ($(CIRCUITPY_PARALLELDISPLAY),0) +ifeq ($(IDF_TARGET),esp32s3) +LCD_SRC = 8080_lcd_$(IDF_TARGET) +else +LCD_SRC = i2s_lcd_$(IDF_TARGET)_driver +endif +SRC_C += esp-iot-solution/components/bus/$(LCD_SRC).c +$(BUILD)/esp-iot-solution/components/bus/$(LCD_SRC).o: CFLAGS += -Wno-sign-compare +CFLAGS += -isystem esp-iot-solution/components/bus/include +endif + ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0) CFLAGS += -isystem esp-idf/components/esp_lcd/include CFLAGS += -isystem esp-idf/components/esp_lcd/interface @@ -290,8 +298,6 @@ SRC_ULP := \ $(wildcard common-hal/espulp/*.c) \ $(wildcard bindings/espulp/*.c) SRC_C += $(SRC_ULP) -CFLAGS += -isystem esp-idf/components/ulp/include -CFLAGS += -isystem esp-idf/components/ulp/ulp_riscv/include endif SRC_COMMON_HAL_EXPANDED = \ @@ -389,7 +395,7 @@ ifeq ($(IDF_TARGET),esp32) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a endif -ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_ipc esp_netif esp_pm esp_phy esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ifneq ($(CIRCUITPY_BLEIO),0) ESP_IDF_COMPONENTS_LINK += bt BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ @@ -440,8 +446,6 @@ IDF_CMAKE_TARGETS = \ PARTITION_TABLE_OFFSET = 0x8000 FIRMWARE_OFFSET = 0x10000 -ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld - FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset --baud 921600 @@ -460,7 +464,7 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h $(BUILD)/firmware.elf: $(OBJ) | esp-idf-stamp $(IDF_CMAKE_TARGETS) $(STEPECHO) "LINK $@" - $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(BUILD)/esp-idf/esp-idf/newlib/libnewlib.a -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -Wl,--start-group $(LIBS) -Wl,--end-group $(BUILD)/esp-idf/esp-idf/pthread/libpthread.a -u __cxx_fatal_exception + $(Q)$(CC) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(ESP_IDF_COMPONENTS_EXPANDED) $(BINARY_BLOBS) $(MBEDTLS_COMPONENTS_LINK_EXPANDED) $(LIBS) -Wl,--end-group -u newlib_include_pthread_impl -u ld_include_highint_hdl -u __cxx_fatal_exception $(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_info.py $(STEPECHO) "Create $@" diff --git a/ports/espressif/README.rst b/ports/espressif/README.rst index 49f372359b..b8b0a097aa 100644 --- a/ports/espressif/README.rst +++ b/ports/espressif/README.rst @@ -9,7 +9,7 @@ Support Status: .. csv-table:: :header: SoC, Status - ESP, "beta" + ESP32, "beta" ESP32-C3, "beta" ESP32-S2, "stable" ESP32-S3, "beta" diff --git a/ports/espressif/common-hal/_bleio/Adapter.c b/ports/espressif/common-hal/_bleio/Adapter.c index 24452993cb..b03bf7c439 100644 --- a/ports/espressif/common-hal/_bleio/Adapter.c +++ b/ports/espressif/common-hal/_bleio/Adapter.c @@ -95,7 +95,6 @@ void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enable } if (enabled) { - esp_nimble_hci_and_controller_init(); nimble_port_init(); // ble_hs_cfg.reset_cb = blecent_on_reset; ble_hs_cfg.sync_cb = _on_sync; diff --git a/ports/espressif/common-hal/alarm/pin/PinAlarm.c b/ports/espressif/common-hal/alarm/pin/PinAlarm.c index 6db184a4dd..7d35b66d0c 100644 --- a/ports/espressif/common-hal/alarm/pin/PinAlarm.c +++ b/ports/espressif/common-hal/alarm/pin/PinAlarm.c @@ -36,8 +36,8 @@ #include "hal/gpio_ll.h" #include "esp_debug_helpers.h" -#include "components/driver/include/driver/rtc_io.h" -#include "components/freertos/include/freertos/FreeRTOS.h" +#include "driver/rtc_io.h" +#include "freertos/FreeRTOS.h" void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { if (edge) { diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index fb2e098cb4..6af0ace1d2 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -30,8 +30,9 @@ #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" -#include "components/driver/include/driver/adc_common.h" -#include "components/esp_adc_cal/include/esp_adc_cal.h" +#include "driver/adc.h" +#include "driver/gpio.h" +#include "esp_adc_cal.h" #include "shared-bindings/microcontroller/Pin.h" @@ -54,7 +55,7 @@ void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { - if (pin->adc_index == 0 || pin->adc_channel == ADC_CHANNEL_MAX) { + if (pin->adc_index == 0 || pin->adc_channel == NO_ADC_CHANNEL) { raise_ValueError_invalid_pin(); } common_hal_mcu_pin_claim(pin); diff --git a/ports/espressif/common-hal/audiobusio/__init__.c b/ports/espressif/common-hal/audiobusio/__init__.c index e58aeefe88..ff86fded7f 100644 --- a/ports/espressif/common-hal/audiobusio/__init__.c +++ b/ports/espressif/common-hal/audiobusio/__init__.c @@ -37,9 +37,9 @@ #define I2S_QUEUE_SIZE (3) -static i2s_t *i2s_instance[I2S_NUM_MAX]; -static QueueHandle_t i2s_queues[I2S_NUM_MAX]; -static TaskHandle_t i2s_tasks[I2S_NUM_MAX]; +static i2s_t *i2s_instance[I2S_NUM_AUTO]; +static QueueHandle_t i2s_queues[I2S_NUM_AUTO]; +static TaskHandle_t i2s_tasks[I2S_NUM_AUTO]; void port_i2s_allocate_i2s0(void) { if (!i2s_instance[0]) { @@ -64,7 +64,7 @@ static int8_t port_i2s_allocate(void) { } void port_i2s_reset_instance(int i) { - assert(i >= 0 && i < I2S_NUM_MAX); + assert(i >= 0 && i < I2S_NUM_AUTO); if (i2s_tasks[i]) { vTaskDelete(i2s_tasks[i]); } @@ -75,7 +75,7 @@ void port_i2s_reset_instance(int i) { } void i2s_reset(void) { - for (int i = 0; i < I2S_NUM_MAX; i++) { + for (int i = 0; i < I2S_NUM_AUTO; i++) { port_i2s_reset_instance(i); } } @@ -83,7 +83,7 @@ void i2s_reset(void) { #define I2S_WRITE_DELAY pdMS_TO_TICKS(1) static void i2s_fill_buffer(i2s_t *self) { - if (self->instance < 0 || self->instance >= I2S_NUM_MAX) { + if (self->instance < 0 || self->instance >= I2S_NUM_AUTO) { return; } #define STACK_BUFFER_SIZE (4096) diff --git a/ports/espressif/common-hal/busio/SPI.c b/ports/espressif/common-hal/busio/SPI.c index 0b6b395c51..96a2226553 100644 --- a/ports/espressif/common-hal/busio/SPI.c +++ b/ports/espressif/common-hal/busio/SPI.c @@ -30,7 +30,7 @@ #include "shared-bindings/busio/SPI.h" #include "shared-bindings/microcontroller/Pin.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #define SPI_MAX_DMA_BITS (SPI_MAX_DMA_LEN * 8) #define MAX_SPI_TRANSACTIONS 10 diff --git a/ports/espressif/common-hal/countio/Counter.c b/ports/espressif/common-hal/countio/Counter.c index cc4c067266..1cf6d8e707 100644 --- a/ports/espressif/common-hal/countio/Counter.c +++ b/ports/espressif/common-hal/countio/Counter.c @@ -31,6 +31,8 @@ #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" +#include "driver/gpio.h" + void common_hal_countio_counter_construct(countio_counter_obj_t *self, const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { claim_pin(pin); diff --git a/ports/espressif/common-hal/dualbank/__init__.c b/ports/espressif/common-hal/dualbank/__init__.c index 9e3fb38627..b3151f268d 100644 --- a/ports/espressif/common-hal/dualbank/__init__.c +++ b/ports/espressif/common-hal/dualbank/__init__.c @@ -31,6 +31,7 @@ #include "esp_log.h" #include "esp_ota_ops.h" +#include "esp_app_format.h" static const esp_partition_t *update_partition = NULL; static esp_ota_handle_t update_handle = 0; @@ -59,10 +60,10 @@ void common_hal_dualbank_flash(const void *buf, const size_t len, const size_t o update_partition = esp_ota_get_next_update_partition(NULL); assert(update_partition != NULL); - ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08x)", + ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08lu)", running->type, running->subtype, running->address); - ESP_LOGI(TAG, "Writing partition type %d subtype %d (offset 0x%08x)\n", + ESP_LOGI(TAG, "Writing partition type %d subtype %d (offset 0x%08lu)\n", update_partition->type, update_partition->subtype, update_partition->address); } diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index 7acf912077..bbf60f9dc3 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -35,7 +35,7 @@ #define TAG "espidf" #ifdef CONFIG_SPIRAM -#include "esp32/spiram.h" +#include "esp_psram.h" #include "esp_heap_caps.h" #include "esp_heap_caps_init.h" #include "soc/soc.h" @@ -51,7 +51,7 @@ size_t reserved_psram = DEFAULT_RESERVED_PSRAM; static size_t psram_size_usable(void) { #ifdef CONFIG_SPIRAM /* PSRAM chip may be larger than the size we can map into address space */ - size_t s = MIN(esp_spiram_get_size(), SOC_EXTRAM_DATA_SIZE); + size_t s = MIN(esp_psram_get_size(), SOC_EXTRAM_DATA_SIZE); return s - esp_himem_reserved_area_size(); #else return 0; @@ -60,7 +60,7 @@ static size_t psram_size_usable(void) { bool common_hal_espidf_set_reserved_psram(size_t amount) { #ifdef CONFIG_SPIRAM - if (!esp_spiram_is_initialized()) { + if (!esp_psram_is_initialized()) { return false; } if (!ok_to_reserve_psram) { @@ -112,7 +112,7 @@ size_t common_hal_espidf_get_total_psram(void) { intptr_t common_hal_espidf_get_psram_start(void) { #ifdef CONFIG_SPIRAM - if (esp_spiram_is_initialized()) { + if (esp_psram_is_initialized()) { #ifdef CONFIG_IDF_TARGET_ESP32 return SOC_EXTRAM_DATA_LOW; #else @@ -125,7 +125,7 @@ intptr_t common_hal_espidf_get_psram_start(void) { intptr_t common_hal_espidf_get_psram_end(void) { #ifdef CONFIG_SPIRAM - if (esp_spiram_is_initialized()) { + if (esp_psram_is_initialized()) { return common_hal_espidf_get_psram_start() + psram_size_usable(); } #endif diff --git a/ports/espressif/common-hal/espulp/ULP.c b/ports/espressif/common-hal/espulp/ULP.c index 3350f6d45c..e8400d77e7 100644 --- a/ports/espressif/common-hal/espulp/ULP.c +++ b/ports/espressif/common-hal/espulp/ULP.c @@ -28,7 +28,6 @@ #include "bindings/espulp/ULP.h" #include "py/runtime.h" - #include "shared-bindings/microcontroller/Pin.h" #if defined(CONFIG_IDF_TARGET_ESP32) @@ -56,7 +55,7 @@ void espulp_reset(void) { } void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t length, uint32_t pin_mask) { - if (length > ULP_COPROC_RESERVE_MEM) { + if (length > CONFIG_ULP_COPROC_RESERVE_MEM) { mp_raise_ValueError(translate("Program too long")); } @@ -111,18 +110,8 @@ void common_hal_espulp_ulp_halt(espulp_ulp_obj_t *self) { #ifdef CONFIG_IDF_TARGET_ESP32 mp_raise_NotImplementedError(NULL); #else - // To-do idf v5.0: use following functions - // ulp_riscv_timer_stop(); - // ulp_riscv_halt(); - - // stop the ulp timer so that it doesn't restart the cpu - CLEAR_PERI_REG_MASK(RTC_CNTL_ULP_CP_TIMER_REG, RTC_CNTL_ULP_CP_SLP_TIMER_EN); - - // suspends the ulp operation - SET_PERI_REG_MASK(RTC_CNTL_COCPU_CTRL_REG, RTC_CNTL_COCPU_DONE); - - // resets the processor - SET_PERI_REG_MASK(RTC_CNTL_COCPU_CTRL_REG, RTC_CNTL_COCPU_SHUT_RESET_EN); + ulp_riscv_timer_stop(); + ulp_riscv_halt(); #endif // Release pins we were using. diff --git a/ports/espressif/common-hal/espulp/ULPAlarm.c b/ports/espressif/common-hal/espulp/ULPAlarm.c index 3717d2ab71..f6c3de66b7 100644 --- a/ports/espressif/common-hal/espulp/ULPAlarm.c +++ b/ports/espressif/common-hal/espulp/ULPAlarm.c @@ -29,7 +29,7 @@ #include "common-hal/alarm/__init__.h" #include "supervisor/port.h" -#include "driver/rtc_cntl.h" +#include "esp_private/rtc_ctrl.h" #include "soc/rtc_cntl_reg.h" #include "esp_sleep.h" @@ -117,7 +117,9 @@ void espulp_ulpalarm_prepare_for_deep_sleep(void) { // enable ulp wakeup esp_sleep_enable_ulp_wakeup(); + #if defined(SOC_PM_SUPPORT_RTC_SLOW_MEM_PD) && SOC_PM_SUPPORT_RTC_SLOW_MEM_PD esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON); + #endif } bool espulp_ulpalarm_woke_this_cycle(void) { diff --git a/ports/espressif/common-hal/frequencyio/FrequencyIn.c b/ports/espressif/common-hal/frequencyio/FrequencyIn.c index d35614ea19..1a82b90f45 100644 --- a/ports/espressif/common-hal/frequencyio/FrequencyIn.c +++ b/ports/espressif/common-hal/frequencyio/FrequencyIn.c @@ -28,6 +28,10 @@ #include "py/runtime.h" +#include "driver/gpio.h" +#include "driver/timer.h" +#include "soc/timer_group_struct.h" + static void IRAM_ATTR pcnt_overflow_handler(void *self_in) { frequencyio_frequencyin_obj_t *self = self_in; // reset counter @@ -56,28 +60,16 @@ static void IRAM_ATTR timer_interrupt_handler(void *self_in) { // reset interrupt timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0); - #if defined(CONFIG_IDF_TARGET_ESP32) - if (self->timer.idx) { - device->int_clr_timers.t1 = 1; - } else { - device->int_clr_timers.t0 = 1; - } - #else if (self->timer.idx) { device->int_clr_timers.t1_int_clr = 1; } else { device->int_clr_timers.t0_int_clr = 1; } - #endif - #if defined(CONFIG_IDF_TARGET_ESP32) - device->hw_timer[self->timer.idx].config.alarm_en = 1; - #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C2) - device->hw_timer[self->timer.idx].config.tx_alarm_en = 1; - #elif defined(CONFIG_IDF_TARGET_ESP32S3) + #if defined(CONFIG_IDF_TARGET_ESP32S3) device->hw_timer[self->timer.idx].config.tn_alarm_en = 1; #else - #error No known CONFIG_IDF_TARGET_xxx found + device->hw_timer[self->timer.idx].config.tx_alarm_en = 1; #endif } diff --git a/ports/espressif/common-hal/hashlib/Hash.c b/ports/espressif/common-hal/hashlib/Hash.c index 8090128acb..5aed82817a 100644 --- a/ports/espressif/common-hal/hashlib/Hash.c +++ b/ports/espressif/common-hal/hashlib/Hash.c @@ -30,7 +30,7 @@ void common_hal_hashlib_hash_update(hashlib_hash_obj_t *self, const uint8_t *data, size_t datalen) { if (self->hash_type == MBEDTLS_SSL_HASH_SHA1) { - mbedtls_sha1_update_ret(&self->sha1, data, datalen); + mbedtls_sha1_update(&self->sha1, data, datalen); return; } } @@ -44,7 +44,7 @@ void common_hal_hashlib_hash_digest(hashlib_hash_obj_t *self, uint8_t *data, siz // the digest a second time. mbedtls_sha1_context copy; mbedtls_sha1_clone(©, &self->sha1); - mbedtls_sha1_finish_ret(&self->sha1, data); + mbedtls_sha1_finish(&self->sha1, data); mbedtls_sha1_clone(&self->sha1, ©); } } diff --git a/ports/espressif/common-hal/hashlib/__init__.c b/ports/espressif/common-hal/hashlib/__init__.c index 1e6b2a4802..7dd147be5f 100644 --- a/ports/espressif/common-hal/hashlib/__init__.c +++ b/ports/espressif/common-hal/hashlib/__init__.c @@ -33,7 +33,7 @@ bool common_hal_hashlib_new(hashlib_hash_obj_t *self, const char *algorithm) { if (strcmp(algorithm, "sha1") == 0) { self->hash_type = MBEDTLS_SSL_HASH_SHA1; mbedtls_sha1_init(&self->sha1); - mbedtls_sha1_starts_ret(&self->sha1); + mbedtls_sha1_starts(&self->sha1); return true; } return false; diff --git a/ports/espressif/common-hal/mdns/RemoteService.h b/ports/espressif/common-hal/mdns/RemoteService.h index ca59f5ece6..b577938024 100644 --- a/ports/espressif/common-hal/mdns/RemoteService.h +++ b/ports/espressif/common-hal/mdns/RemoteService.h @@ -26,7 +26,7 @@ #pragma once -#include "components/mdns/include/mdns.h" +#include "mdns.h" typedef struct { mp_obj_base_t base; diff --git a/ports/espressif/common-hal/mdns/Server.c b/ports/espressif/common-hal/mdns/Server.c index 9205f76087..0246a39587 100644 --- a/ports/espressif/common-hal/mdns/Server.c +++ b/ports/espressif/common-hal/mdns/Server.c @@ -31,7 +31,7 @@ #include "shared-bindings/mdns/RemoteService.h" #include "shared-bindings/wifi/__init__.h" -#include "components/mdns/include/mdns.h" +#include "mdns.h" // Track whether the underlying IDF mdns has been started so that we only // create a single inited MDNS object to CircuitPython. (After deinit, another @@ -125,22 +125,13 @@ size_t mdns_server_find(mdns_server_obj_t *self, const char *service_type, const if (search == NULL) { return 0; } + uint8_t num_results; mdns_result_t *results; - while (!mdns_query_async_get_results(search, 1, &results)) { + while (!mdns_query_async_get_results(search, 1, &results, &num_results)) { RUN_BACKGROUND_TASKS; } mdns_query_async_delete(search); - // Count how many results we got. - // TODO: Remove this loop when moving off 4.4. Newer APIs will give us num_results - // back directly. mdns_result_t *next = results; - uint8_t num_results = 0; - while (next != NULL) { - num_results++; - next = next->next; - } - - next = results; // Don't error if we're out of memory. Instead, truncate the tuple. uint8_t added = 0; while (next != NULL && added < out_len) { @@ -166,27 +157,19 @@ mp_obj_t common_hal_mdns_server_find(mdns_server_obj_t *self, const char *servic if (search == NULL) { mp_raise_RuntimeError(translate("Unable to start mDNS query")); } + uint8_t num_results; mdns_result_t *results; - while (!mdns_query_async_get_results(search, 1, &results)) { + while (!mdns_query_async_get_results(search, 1, &results, &num_results)) { RUN_BACKGROUND_TASKS; } mdns_query_async_delete(search); - // Count how many results we got. - // TODO: Remove this loop when moving off 4.4. Newer APIs will give us num_results - // back directly. - mdns_result_t *next = results; - uint8_t num_results = 0; - while (next != NULL) { - num_results++; - next = next->next; - } mp_obj_tuple_t *tuple = MP_OBJ_TO_PTR(mp_obj_new_tuple(num_results, NULL)); // The empty tuple object is shared and stored in flash so return early if // we got it. Without this we'll crash when trying to set len below. if (num_results == 0) { return MP_OBJ_FROM_PTR(tuple); } - next = results; + mdns_result_t *next = results; // Don't error if we're out of memory. Instead, truncate the tuple. uint8_t added = 0; while (next != NULL) { diff --git a/ports/espressif/common-hal/memorymap/AddressRange.c b/ports/espressif/common-hal/memorymap/AddressRange.c index b05283b700..9e87e5384b 100644 --- a/ports/espressif/common-hal/memorymap/AddressRange.c +++ b/ports/espressif/common-hal/memorymap/AddressRange.c @@ -29,7 +29,6 @@ #include "shared-bindings/memorymap/AddressRange.h" #include "py/runtime.h" - #include "soc/soc.h" size_t allow_ranges[][2] = { @@ -39,7 +38,6 @@ size_t allow_ranges[][2] = { {SOC_RTC_DRAM_LOW, SOC_RTC_DRAM_HIGH}, // RTC peripheral registers {0x60008000, 0x60009000} - }; void common_hal_memorymap_addressrange_construct(memorymap_addressrange_obj_t *self, uint8_t *start_address, size_t length) { diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 75d67d6662..eeda6862db 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -38,7 +38,63 @@ STATIC uint64_t _skip_reset_once_pin_mask; STATIC uint64_t _preserved_pin_mask; STATIC uint64_t _in_use_pin_mask; -// Bit mask of all pins that should never EVER be reset or used by user code. +#define GPIO_SEL_0 (BIT(0)) /*!< Pin 0 selected */ +#define GPIO_SEL_1 (BIT(1)) /*!< Pin 1 selected */ +#define GPIO_SEL_2 (BIT(2)) /*!< Pin 2 selected */ +#define GPIO_SEL_3 (BIT(3)) /*!< Pin 3 selected */ +#define GPIO_SEL_4 (BIT(4)) /*!< Pin 4 selected */ +#define GPIO_SEL_5 (BIT(5)) /*!< Pin 5 selected */ +#define GPIO_SEL_6 (BIT(6)) /*!< Pin 6 selected */ +#define GPIO_SEL_7 (BIT(7)) /*!< Pin 7 selected */ +#define GPIO_SEL_8 (BIT(8)) /*!< Pin 8 selected */ +#define GPIO_SEL_9 (BIT(9)) /*!< Pin 9 selected */ +#define GPIO_SEL_10 (BIT(10)) /*!< Pin 10 selected */ +#define GPIO_SEL_11 (BIT(11)) /*!< Pin 11 selected */ +#define GPIO_SEL_12 (BIT(12)) /*!< Pin 12 selected */ +#define GPIO_SEL_13 (BIT(13)) /*!< Pin 13 selected */ +#define GPIO_SEL_14 (BIT(14)) /*!< Pin 14 selected */ +#define GPIO_SEL_15 (BIT(15)) /*!< Pin 15 selected */ +#define GPIO_SEL_16 (BIT(16)) /*!< Pin 16 selected */ +#define GPIO_SEL_17 (BIT(17)) /*!< Pin 17 selected */ +#define GPIO_SEL_18 (BIT(18)) /*!< Pin 18 selected */ +#define GPIO_SEL_19 (BIT(19)) /*!< Pin 19 selected */ +#define GPIO_SEL_20 (BIT(20)) /*!< Pin 20 selected */ +#define GPIO_SEL_21 (BIT(21)) /*!< Pin 21 selected */ +#if defined(CONFIG_IDF_TARGET_ESP32) +#define GPIO_SEL_22 (BIT(22)) /*!< Pin 22 selected */ +#define GPIO_SEL_23 (BIT(23)) /*!< Pin 23 selected */ + +#define GPIO_SEL_25 (BIT(25)) /*!< Pin 25 selected */ +#endif +#define GPIO_SEL_26 (BIT(26)) /*!< Pin 26 selected */ +#define GPIO_SEL_27 (BIT(27)) /*!< Pin 27 selected */ +#define GPIO_SEL_28 (BIT(28)) /*!< Pin 28 selected */ +#define GPIO_SEL_29 (BIT(29)) /*!< Pin 29 selected */ +#define GPIO_SEL_30 (BIT(30)) /*!< Pin 30 selected */ +#define GPIO_SEL_31 (BIT(31)) /*!< Pin 31 selected */ +#define GPIO_SEL_32 ((uint64_t)PIN_BIT(32)) /*!< Pin 32 selected */ +#define GPIO_SEL_33 ((uint64_t)PIN_BIT(33)) /*!< Pin 33 selected */ +#define GPIO_SEL_34 ((uint64_t)PIN_BIT(34)) /*!< Pin 34 selected */ +#define GPIO_SEL_35 ((uint64_t)PIN_BIT(35)) /*!< Pin 35 selected */ +#define GPIO_SEL_36 ((uint64_t)PIN_BIT(36)) /*!< Pin 36 selected */ +#define GPIO_SEL_37 ((uint64_t)PIN_BIT(37)) /*!< Pin 37 selected */ +#define GPIO_SEL_38 ((uint64_t)PIN_BIT(38)) /*!< Pin 38 selected */ +#define GPIO_SEL_39 ((uint64_t)PIN_BIT(39)) /*!< Pin 39 selected */ +#if SOC_GPIO_PIN_COUNT > 40 +#define GPIO_SEL_40 ((uint64_t)PIN_BIT(40)) /*!< Pin 40 selected */ +#define GPIO_SEL_41 ((uint64_t)PIN_BIT(41)) /*!< Pin 41 selected */ +#define GPIO_SEL_42 ((uint64_t)PIN_BIT(42)) /*!< Pin 42 selected */ +#define GPIO_SEL_43 ((uint64_t)PIN_BIT(43)) /*!< Pin 43 selected */ +#define GPIO_SEL_44 ((uint64_t)PIN_BIT(44)) /*!< Pin 44 selected */ +#define GPIO_SEL_45 ((uint64_t)PIN_BIT(45)) /*!< Pin 45 selected */ +#define GPIO_SEL_46 ((uint64_t)PIN_BIT(46)) /*!< Pin 46 selected */ +#if defined(CONFIG_IDF_TARGET_ESP32S3) +#define GPIO_SEL_47 ((uint64_t)PIN_BIT(47)) /*!< Pin 47 selected */ +#define GPIO_SEL_48 ((uint64_t)PIN_BIT(48)) /*!< Pin 48 selected */ +#endif +#endif + +// Bit mask of all pins that should never EVER be reset. // Typically these are SPI flash and PSRAM control pins, and communication pins. // "Reset forbidden" is stronger than "never reset" below, which may only be temporary. static const uint64_t pin_mask_reset_forbidden = diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index 5b7463c9ff..8e8196ea0e 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -41,21 +41,23 @@ #include "soc/efuse_reg.h" #if !defined(CONFIG_IDF_TARGET_ESP32) -#include "driver/temp_sensor.h" +#include "driver/temperature_sensor.h" #endif float common_hal_mcu_processor_get_temperature(void) { - float tsens_out; + float tsens_value; #if defined(CONFIG_IDF_TARGET_ESP32) return NAN; #else - temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT(); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. - temp_sensor_set_config(temp_sensor); - temp_sensor_start(); - temp_sensor_read_celsius(&tsens_out); - temp_sensor_stop(); + temperature_sensor_handle_t temp_sensor = NULL; + temperature_sensor_config_t temp_sensor_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(-10, 80); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. + temperature_sensor_install(&temp_sensor_config, &temp_sensor); + temperature_sensor_enable(temp_sensor); + temperature_sensor_get_celsius(temp_sensor, &tsens_value); + temperature_sensor_disable(temp_sensor); + temperature_sensor_uninstall(temp_sensor); #endif - return tsens_out; + return tsens_value; } float common_hal_mcu_processor_get_voltage(void) { diff --git a/ports/espressif/common-hal/neopixel_write/__init__.c b/ports/espressif/common-hal/neopixel_write/__init__.c index 148b47aeb0..6d91cc7766 100644 --- a/ports/espressif/common-hal/neopixel_write/__init__.c +++ b/ports/espressif/common-hal/neopixel_write/__init__.c @@ -44,7 +44,6 @@ #include "py/runtime.h" #include "shared-bindings/neopixel_write/__init__.h" #include "supervisor/port.h" -#include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" // Use closer to WS2812-style timings instead of WS2812B, to accommodate more varieties. diff --git a/ports/espressif/common-hal/os/__init__.c b/ports/espressif/common-hal/os/__init__.c index 1dcd3e46e0..bc18c838ae 100644 --- a/ports/espressif/common-hal/os/__init__.c +++ b/ports/espressif/common-hal/os/__init__.c @@ -33,6 +33,7 @@ #include "shared-bindings/os/__init__.h" #include "esp_system.h" +#include "esp_random.h" STATIC const qstr os_uname_info_fields[] = { MP_QSTR_sysname, MP_QSTR_nodename, @@ -60,7 +61,7 @@ mp_obj_t common_hal_os_uname(void) { return (mp_obj_t)&os_uname_info_obj; } -bool common_hal_os_urandom(uint8_t *buffer, uint32_t length) { +bool common_hal_os_urandom(uint8_t *buffer, mp_uint_t length) { uint32_t i = 0; while (i < length) { uint32_t new_random = esp_random(); diff --git a/ports/espressif/common-hal/paralleldisplay/ParallelBus.c b/ports/espressif/common-hal/paralleldisplay/ParallelBus.c index c9ba3edd06..49008948b7 100644 --- a/ports/espressif/common-hal/paralleldisplay/ParallelBus.c +++ b/ports/espressif/common-hal/paralleldisplay/ParallelBus.c @@ -36,8 +36,8 @@ #include "common-hal/microcontroller/Pin.h" #include "py/runtime.h" -#include "i2s_lcd_driver.h" #include "driver/gpio.h" + /* * Current pin limitations for ESP32-S2 ParallelBus: * - data0 pin must be byte aligned @@ -166,11 +166,12 @@ bool common_hal_paralleldisplay_parallelbus_bus_free(mp_obj_t obj) { bool common_hal_paralleldisplay_parallelbus_begin_transaction(mp_obj_t obj) { paralleldisplay_parallelbus_obj_t *self = MP_OBJ_TO_PTR(obj); - bool r = i2s_lcd_acquire_nonblocking(self->handle, 1); - if (r) { + bool lock_acquired = false; + i2s_lcd_acquire_nonblocking(self->handle, 1, &lock_acquired); + if (lock_acquired) { gpio_set_level(self->config.pin_num_cs, false); } - return r; + return lock_acquired; } void common_hal_paralleldisplay_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, diff --git a/ports/espressif/common-hal/pulseio/PulseIn.h b/ports/espressif/common-hal/pulseio/PulseIn.h index 55714b04b2..92db65f772 100644 --- a/ports/espressif/common-hal/pulseio/PulseIn.h +++ b/ports/espressif/common-hal/pulseio/PulseIn.h @@ -30,7 +30,6 @@ #include "common-hal/microcontroller/Pin.h" #include "py/obj.h" -#include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" typedef struct { diff --git a/ports/espressif/common-hal/pulseio/PulseOut.h b/ports/espressif/common-hal/pulseio/PulseOut.h index 359280a86f..66b01df318 100644 --- a/ports/espressif/common-hal/pulseio/PulseOut.h +++ b/ports/espressif/common-hal/pulseio/PulseOut.h @@ -28,7 +28,6 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PULSEIO_PULSEOUT_H #include "common-hal/microcontroller/Pin.h" -#include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" #include "py/obj.h" diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index 519885a032..225560b34a 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -28,7 +28,8 @@ #include "common-hal/pwmio/PWMOut.h" #include "shared-bindings/pwmio/PWMOut.h" #include "py/runtime.h" -#include "components/driver/include/driver/ledc.h" +#include "driver/ledc.h" +#include "soc/soc.h" #define INDEX_EMPTY 0xFF @@ -40,7 +41,7 @@ STATIC bool never_reset_chan[LEDC_CHANNEL_MAX]; STATIC uint32_t calculate_duty_cycle(uint32_t frequency) { uint32_t duty_bits = 0; - uint32_t interval = LEDC_APB_CLK_HZ / frequency; + uint32_t interval = APB_CLK_FREQ / frequency; for (size_t i = 0; i < 32; i++) { if (!(interval >> i)) { duty_bits = i - 1; diff --git a/ports/espressif/common-hal/socketpool/Socket.c b/ports/espressif/common-hal/socketpool/Socket.c index 9d3c22aca8..f063873df9 100644 --- a/ports/espressif/common-hal/socketpool/Socket.c +++ b/ports/espressif/common-hal/socketpool/Socket.c @@ -402,7 +402,7 @@ void common_hal_socketpool_socket_connect(socketpool_socket_obj_t *self, #pragma GCC diagnostic ignored "-Wcast-align" dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result_i->ai_addr)->sin_addr.s_addr; #pragma GCC diagnostic pop - freeaddrinfo(result_i); + lwip_freeaddrinfo(result_i); dest_addr.sin_family = AF_INET; dest_addr.sin_port = htons(port); @@ -582,7 +582,7 @@ mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t *self, #pragma GCC diagnostic ignored "-Wcast-align" dest_addr.sin_addr.s_addr = ((struct sockaddr_in *)result_i->ai_addr)->sin_addr.s_addr; #pragma GCC diagnostic pop - freeaddrinfo(result_i); + lwip_freeaddrinfo(result_i); dest_addr.sin_family = AF_INET; dest_addr.sin_port = htons(port); diff --git a/ports/espressif/common-hal/socketpool/Socket.h b/ports/espressif/common-hal/socketpool/Socket.h index dfd1cbfc11..4c86c9b379 100644 --- a/ports/espressif/common-hal/socketpool/Socket.h +++ b/ports/espressif/common-hal/socketpool/Socket.h @@ -32,6 +32,7 @@ #include "common-hal/ssl/SSLContext.h" #include "components/esp-tls/esp_tls.h" +#include "components/lwip/lwip/src/include/lwip/sockets.h" typedef struct ssl_sslsocket_obj ssl_sslsocket_obj_t; diff --git a/ports/espressif/common-hal/socketpool/SocketPool.c b/ports/espressif/common-hal/socketpool/SocketPool.c index 780e90c42c..9137ac3c8f 100644 --- a/ports/espressif/common-hal/socketpool/SocketPool.c +++ b/ports/espressif/common-hal/socketpool/SocketPool.c @@ -60,7 +60,7 @@ mp_obj_t common_hal_socketpool_socketpool_gethostbyname(socketpool_socketpool_ob .ai_socktype = SOCK_STREAM, }; struct addrinfo *res; - int err = getaddrinfo(host, NULL, &hints, &res); + int err = lwip_getaddrinfo(host, NULL, &hints, &res); if (err != 0 || res == NULL) { return mp_const_none; } @@ -72,7 +72,7 @@ mp_obj_t common_hal_socketpool_socketpool_gethostbyname(socketpool_socketpool_ob char ip_str[IP4ADDR_STRLEN_MAX]; inet_ntoa_r(*addr, ip_str, IP4ADDR_STRLEN_MAX); mp_obj_t ip_obj = mp_obj_new_str(ip_str, strlen(ip_str)); - freeaddrinfo(res); + lwip_freeaddrinfo(res); return ip_obj; } diff --git a/ports/espressif/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c index 1923a9c2a9..c583cecaa7 100644 --- a/ports/espressif/common-hal/ssl/SSLContext.c +++ b/ports/espressif/common-hal/ssl/SSLContext.c @@ -32,6 +32,7 @@ #include "components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h" #include "py/runtime.h" +#include "lwip/sockets.h" void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t *self) { diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index 2446ce3005..9413fc7def 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -34,6 +34,7 @@ #include "py/mperrno.h" #include "py/runtime.h" #include "supervisor/shared/tick.h" +#include "lwip/sockets.h" ssl_sslsocket_obj_t *common_hal_ssl_sslsocket_accept(ssl_sslsocket_obj_t *self, uint8_t *ip, uint32_t *port) { @@ -60,7 +61,7 @@ void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, if (result < 0) { int esp_tls_code; int flags; - esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags); + esp_err_t err = esp_tls_get_and_clear_last_error(self->tls_error_handle, &esp_tls_code, &flags); if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); @@ -154,7 +155,7 @@ mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t *self, const uint8_t if (sent < 0) { int esp_tls_code; int flags; - esp_err_t err = esp_tls_get_and_clear_last_error(self->tls->error_handle, &esp_tls_code, &flags); + esp_err_t err = esp_tls_get_and_clear_last_error(self->tls_error_handle, &esp_tls_code, &flags); if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); diff --git a/ports/espressif/common-hal/ssl/SSLSocket.h b/ports/espressif/common-hal/ssl/SSLSocket.h index 6b65a56223..a7977db746 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.h +++ b/ports/espressif/common-hal/ssl/SSLSocket.h @@ -38,6 +38,7 @@ typedef struct ssl_sslsocket_obj { mp_obj_base_t base; socketpool_socket_obj_t *sock; esp_tls_t *tls; + esp_tls_error_handle_t tls_error_handle; ssl_sslcontext_obj_t *ssl_context; esp_tls_cfg_t ssl_config; } ssl_sslsocket_obj_t; diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c index 159c99458f..78c04ba533 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.c +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -62,7 +62,12 @@ void watchdog_reset(void) { static void wdt_config(watchdog_watchdogtimer_obj_t *self) { // enable panic hanler in WATCHDOGMODE_RESET mode // initialize Task Watchdog Timer (TWDT) - if (esp_task_wdt_init((uint32_t)self->timeout, (self->mode == WATCHDOGMODE_RESET)) != ESP_OK) { + esp_task_wdt_config_t twdt_config = { + .timeout_ms = (uint32_t)self->timeout, + .idle_core_mask = (1 << portNUM_PROCESSORS) - 1, // Bitmask of all cores + .trigger_panic = (self->mode == WATCHDOGMODE_RESET), + }; + if (esp_task_wdt_init(&twdt_config) != ESP_OK) { mp_raise_RuntimeError(translate("Initialization failed due to lack of memory")); } esp_task_wdt_add(NULL); diff --git a/ports/espressif/common-hal/wifi/Radio.c b/ports/espressif/common-hal/wifi/Radio.c index e6385ee1e5..b96c76adff 100644 --- a/ports/espressif/common-hal/wifi/Radio.c +++ b/ports/espressif/common-hal/wifi/Radio.c @@ -44,7 +44,7 @@ #include "components/lwip/include/apps/ping/ping_sock.h" #if CIRCUITPY_MDNS -#include "components/mdns/include/mdns.h" +#include "mdns.h" #endif #define MAC_ADDRESS_LENGTH 6 diff --git a/ports/espressif/common-hal/wifi/Radio.h b/ports/espressif/common-hal/wifi/Radio.h index 3c0828bf0b..ddab4b2a5b 100644 --- a/ports/espressif/common-hal/wifi/Radio.h +++ b/ports/espressif/common-hal/wifi/Radio.h @@ -34,6 +34,8 @@ #include "shared-bindings/wifi/ScannedNetworks.h" #include "shared-bindings/wifi/Network.h" +#include "esp_netif_types.h" + // Event bits for the Radio event group. #define WIFI_SCAN_DONE_BIT BIT0 #define WIFI_CONNECTED_BIT BIT1 diff --git a/ports/espressif/common-hal/wifi/__init__.c b/ports/espressif/common-hal/wifi/__init__.c index cfcfaf024b..1ffc768002 100644 --- a/ports/espressif/common-hal/wifi/__init__.c +++ b/ports/espressif/common-hal/wifi/__init__.c @@ -121,7 +121,7 @@ static void event_handler(void *arg, esp_event_base_t event_base, // Cases to handle later. // case WIFI_EVENT_STA_AUTHMODE_CHANGE: default: { - ESP_LOGW(TAG, "event %d 0x%02x", event_id, event_id); + ESP_LOGW(TAG, "event %ld 0x%02ld", event_id, event_id); break; } } diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index 69f9a4f566..f2ee41e622 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit 69f9a4f566d49afe97fd8b47444bd394af005e23 +Subproject commit f2ee41e622694ead7caa3dcac0d04c96c5a7b027 diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index 5fdb766add..c913025124 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -1,171 +1,4 @@ -CONFIG_IDF_TARGET_ARCH_RISCV=y -CONFIG_IDF_TARGET="esp32c3" -CONFIG_IDF_TARGET_ESP32C3=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0005 +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # -# SDK tool configuration -# -CONFIG_SDK_TOOLPREFIX="riscv32-esp-elf-" -# end of SDK tool configuration - -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 -# end of Bootloader config - -# -# Component config -# -# -# Bluetooth -# -CONFIG_BT_SOC_SUPPORT_5_0=y -# -# NimBLE Options -# -CONFIG_BT_NIMBLE_PINNED_TO_CORE=0 -# end of NimBLE Options - -# end of Bluetooth - -# -# ESP32C3-Specific -# -# CONFIG_ESP32C3_DEFAULT_CPU_FREQ_80 is not set -CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y -CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160 -# CONFIG_ESP32C3_REV_MIN_0 is not set -# CONFIG_ESP32C3_REV_MIN_1 is not set -# CONFIG_ESP32C3_REV_MIN_2 is not set -CONFIG_ESP32C3_REV_MIN_3=y -CONFIG_ESP32C3_REV_MIN=3 -CONFIG_ESP32C3_DEBUG_OCDAWARE=y -CONFIG_ESP32C3_BROWNOUT_DET=y -CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=y -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_2 is not set -CONFIG_ESP32C3_BROWNOUT_DET_LVL=7 -CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER=y -# CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32C3_TIME_SYSCALL_USE_SYSTIMER is not set -# CONFIG_ESP32C3_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32C3_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=1024 -# end of ESP32C3-Specific - -# -# Hardware Settings -# -# -# MAC Config -# -# CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES=4 -# end of MAC Config - -# -# Sleep Config -# -CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y -CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y -# end of Sleep Config - -# end of Hardware Settings - -# -# PHY -# -CONFIG_ESP_PHY_ENABLE_USB=y -# end of PHY - -# -# ESP System Settings -# -CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y -# -# Memory protection -# -CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y -CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 -CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=512 -# end of Memory protection - -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 - CONFIG_ESP_CONSOLE_SECONDARY_NONE=y -# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set -# end of ESP System Settings - - -# -# Wi-Fi -# -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set -# end of Wi-Fi - -# -# FreeRTOS -# -CONFIG_FREERTOS_UNICORE=y -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -# end of FreeRTOS - -# end of Component config - -# -# Deprecated options for backward compatibility -# -CONFIG_TOOLPREFIX="riscv32-esp-elf-" -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -CONFIG_NIMBLE_PINNED_TO_CORE=0 -CONFIG_ESP_SYSTEM_PD_FLASH=y -CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y -CONFIG_ESP32H2_MEMPROT_FEATURE=y -CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y -# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index bfd64ef90e..6bcded2a0d 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -1,167 +1,11 @@ -# -# Espressif IoT Development Framework (ESP-IDF) Project Configuration -# -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET="esp32s2" -CONFIG_IDF_TARGET_ESP32S2=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0002 -# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration - -CONFIG_SDK_TOOLPREFIX="xtensa-esp32s2-elf-" -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 -# end of Bootloader config - -# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_80 is not set -# -# ESP32S2-specific -# -# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ=240 -# end of ESP32S2-specific - -# CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB is not set -# -# Cache config +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_16B is not set -CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_32B=y -# CONFIG_ESP32S2_DATA_CACHE_0KB is not set -# CONFIG_ESP32S2_DATA_CACHE_8KB is not set CONFIG_ESP32S2_DATA_CACHE_16KB=y -# CONFIG_ESP32S2_DATA_CACHE_LINE_16B is not set -CONFIG_ESP32S2_DATA_CACHE_LINE_32B=y -# CONFIG_ESP32S2_INSTRUCTION_CACHE_WRAP is not set -# CONFIG_ESP32S2_DATA_CACHE_WRAP is not set -# end of Cache config -# CONFIG_ESP32S2_TRAX is not set -CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32S2_ULP_COPROC_ENABLED=y -CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=8176 -CONFIG_ESP32S2_ULP_COPROC_RISCV=y -CONFIG_ESP32S2_DEBUG_OCDAWARE=y -# CONFIG_ESP32S2_DEBUG_STUBS_ENABLE is not set -CONFIG_ESP32S2_BROWNOUT_DET=y -CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_7=y -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_1 is not set -CONFIG_ESP32S2_BROWNOUT_DET_LVL=7 -CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC_FRC1=y -# CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32S2_TIME_SYSCALL_USE_FRC1 is not set -# CONFIG_ESP32S2_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32S2_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32S2_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32S2_RTC_CLK_CAL_CYCLES=576 -# CONFIG_ESP32S2_NO_BLOBS is not set -# CONFIG_ESP32S2_KEEP_USB_ALIVE is not set CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y -# CONFIG_ESP32S2_USE_FIXED_STATIC_RAM_SIZE is not set -# -# MAC Config -# -# CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE is not set -CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO=y -CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES=2 -# end of MAC Config -CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y -# -# Sleep Config -# -# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set -# end of Sleep Config - -# -# PHY -# -# CONFIG_ESP_PHY_ENABLE_USB is not set -# end of PHY - -CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y -# -# Memory protection -# -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y -CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y -CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 -CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=4 -# end of Memory protection - -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 -# -# Wi-Fi -# -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set -# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set -# end of Wi-Fi - -CONFIG_FREERTOS_UNICORE=y -# -# FreeRTOS -# -CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y -CONFIG_FREERTOS_CORETIMER_0=y -# CONFIG_FREERTOS_CORETIMER_1 is not set -CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y -CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y -# end of FreeRTOS - -CONFIG_MBEDTLS_HARDWARE_GCM=y -# -# Deprecated options for backward compatibility -# -CONFIG_TOOLPREFIX="xtensa-esp32s2-elf-" -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -CONFIG_ESP_SYSTEM_PD_FLASH=y -# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y -CONFIG_ESP32H2_MEMPROT_FEATURE=y -CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y -# CONFIG_EXTERNAL_COEX_ENABLE is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of Deprecated options for backward compatibility +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_TYPE_RISCV=y +CONFIG_ULP_COPROC_RESERVE_MEM=8176 diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index f6fb80c752..30dea89201 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -1,221 +1,12 @@ -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET="esp32s3" -CONFIG_IDF_TARGET_ESP32S3=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # -# SDK tool configuration -# -CONFIG_SDK_TOOLPREFIX="xtensa-esp32s3-elf-" -# end of SDK tool configuration - -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 -# end of Bootloader config - -# -# Component config -# -# -# Bluetooth -# -CONFIG_BT_SOC_SUPPORT_5_0=y -# -# NimBLE Options -# -# CONFIG_BT_NIMBLE_PINNED_TO_CORE_0 is not set CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=y -CONFIG_BT_NIMBLE_PINNED_TO_CORE=1 -# end of NimBLE Options -# end of Bluetooth - -# -# ESP32S3-Specific -# -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_80 is not set -# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 -# -# Cache config -# -CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE=0x4000 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_4WAYS is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_8WAYS=y -CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS=8 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_16B is not set -CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_32B=y -CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE=32 -# CONFIG_ESP32S3_INSTRUCTION_CACHE_WRAP is not set -# CONFIG_ESP32S3_DATA_CACHE_16KB is not set -CONFIG_ESP32S3_DATA_CACHE_32KB=y -# CONFIG_ESP32S3_DATA_CACHE_64KB is not set -CONFIG_ESP32S3_DATA_CACHE_SIZE=0x8000 -# CONFIG_ESP32S3_DATA_CACHE_4WAYS is not set -CONFIG_ESP32S3_DATA_CACHE_8WAYS=y -CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS=8 -# CONFIG_ESP32S3_DATA_CACHE_LINE_16B is not set -CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y -# CONFIG_ESP32S3_DATA_CACHE_LINE_64B is not set -CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=32 -# CONFIG_ESP32S3_DATA_CACHE_WRAP is not set -# end of Cache config - -# CONFIG_ESP32S3_TRAX is not set -CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32S3_ULP_COPROC_ENABLED=y -CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=8176 -CONFIG_ESP32S3_ULP_COPROC_RISCV=y -CONFIG_ESP32S3_BROWNOUT_DET=y -CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_7=y -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_1 is not set -CONFIG_ESP32S3_BROWNOUT_DET_LVL=7 -CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_FRC1=y -# CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_FRC1 is not set -# CONFIG_ESP32S3_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES=1024 -CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000 -CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y -# CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE is not set -# end of ESP32S3-Specific - -# -# Hardware Settings -# -# -# MAC Config -# -# CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 -# end of MAC Config - -# -# Sleep Config -# -CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y -# end of Sleep Config - -# end of Hardware Settings - -# -# PHY -# -CONFIG_ESP_PHY_ENABLE_USB=y -# end of PHY - -# -# ESP System Settings -# -# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0 is not set CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x1 -# end of ESP System Settings -# -# Wi-Fi -# -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y -# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set -# end of Wi-Fi +CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y -# -# FreeRTOS -# -# CONFIG_FREERTOS_UNICORE is not set -# end of FreeRTOS - -# end of Component config - -# -# Deprecated options for backward compatibility -# -CONFIG_TOOLPREFIX="xtensa-esp32s3-elf-" -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -# CONFIG_NIMBLE_PINNED_TO_CORE_0 is not set -CONFIG_NIMBLE_PINNED_TO_CORE_1=y -CONFIG_NIMBLE_PINNED_TO_CORE=1 -CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y -# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of Deprecated options for backward compatibility - -# -# Camera configuration -# -CONFIG_OV7670_SUPPORT=y -# CONFIG_OV7725_SUPPORT is not set -# CONFIG_NT99141_SUPPORT is not set -CONFIG_OV2640_SUPPORT=y -CONFIG_OV3660_SUPPORT=y -CONFIG_OV5640_SUPPORT=y -# CONFIG_GC2145_SUPPORT is not set -# CONFIG_GC032A_SUPPORT is not set -# CONFIG_GC0308_SUPPORT is not set -# CONFIG_BF3005_SUPPORT is not set -# CONFIG_BF20A6_SUPPORT is not set -# CONFIG_SC101IOT_SUPPORT is not set -# CONFIG_SC030IOT_SUPPORT is not set -# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set -CONFIG_SCCB_HARDWARE_I2C_PORT1=y -CONFIG_SCCB_CLK_FREQ=100000 -CONFIG_CAMERA_CORE0=y -# CONFIG_CAMERA_CORE1 is not set -# CONFIG_CAMERA_NO_AFFINITY is not set -CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768 -# CONFIG_CAMERA_CONVERTER_ENABLED is not set -# end of Camera configuration -# end of Component config +CONFIG_ULP_COPROC_ENABLED=y +CONFIG_ULP_COPROC_TYPE_RISCV=y +CONFIG_ULP_COPROC_RESERVE_MEM=8176 diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index 1ccd6478fe..ca38be15f2 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -1,118 +1,15 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # -# Bootloader config -# -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -# end of Bootloader config -# -# Compiler options -# -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set -CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_COMPILER_OPTIMIZATION_NONE is not set -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=1 -# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set -# end of Compiler options +CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_DEBUG_OCDAWARE=y -# end of ESP32S3-Specific - -# -# Common ESP-related -# -# CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set -# end of Common ESP-related - -# -# ESP System Settings -# -# CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set -CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set -# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_ESP_CONSOLE_USB_CDC is not set -# CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set -# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set CONFIG_ESP_CONSOLE_NONE=y -# CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set -CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y -CONFIG_ESP_CONSOLE_MULTIPLE_UART=y -CONFIG_ESP_CONSOLE_UART_NUM=-1 -# end of ESP System Settings -# -# FreeRTOS -# -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set -# CONFIG_FREERTOS_ASSERT_DISABLE is not set -CONFIG_FREERTOS_DEBUG_OCDAWARE=y -# end of FreeRTOS +CONFIG_ESP_ERR_TO_NAME_LOOKUP=n -# -# Hardware Abstraction Layer (HAL) and Low Level (LL) -# -CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y -# CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILIENT is not set -CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=1 -# end of Hardware Abstraction Layer (HAL) and Low Level (LL) +CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y -# -# Log output -# CONFIG_LOG_DEFAULT_LEVEL_NONE=y -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set -# end of Log output - -# -# LWIP -# -CONFIG_LWIP_ESP_LWIP_ASSERT=y -# end of LWIP - -# end of Component config - -# -# Deprecated options for backward compatibility -# -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set -CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -CONFIG_OPTIMIZATION_ASSERTION_LEVEL=1 -# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set -# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set -CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y -# CONFIG_ESP32S2_PANIC_GDBSTUB is not set -# CONFIG_CONSOLE_UART_DEFAULT is not set -# CONFIG_CONSOLE_UART_CUSTOM is not set -CONFIG_ESP_CONSOLE_UART_NONE=y -CONFIG_CONSOLE_UART_NUM=-1 -# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index b27d846f2c..a7bcc25081 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -1,877 +1,56 @@ -CONFIG_IDF_CMAKE=y +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # -# SDK tool configuration -# -# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set -# end of SDK tool configuration +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y -# -# Build type -# -CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y -# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set -CONFIG_APP_BUILD_GENERATE_BINARIES=y -CONFIG_APP_BUILD_BOOTLOADER=y -CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y -# end of Build type - -# -# Application manager -# -CONFIG_APP_COMPILE_TIME_DATE=y -# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set -# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set -# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set -CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 -# end of Application manager - -# -# Bootloader config -# -# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -CONFIG_BOOTLOADER_LOG_LEVEL=3 -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y -# CONFIG_BOOTLOADER_FACTORY_RESET is not set -# CONFIG_BOOTLOADER_APP_TEST is not set -CONFIG_BOOTLOADER_WDT_ENABLE=y -# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set -CONFIG_BOOTLOADER_WDT_TIME_MS=9000 -# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set -CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 -# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set -CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y -# end of Bootloader config - -# -# Security features -# -CONFIG_SECURE_BOOT_SUPPORTS_RSA=y -CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y -# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set -# CONFIG_SECURE_BOOT is not set -# CONFIG_SECURE_FLASH_ENC_ENABLED is not set -# end of Security features - -# -# Boot ROM Behavior -# -CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y -# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set -# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set -# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set -# end of Boot ROM Behavior - -# -# Serial flasher config -# -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_OCT_FLASH is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y -# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set -CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y -CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set -# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y -# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="40m" -CONFIG_ESPTOOLPY_BEFORE_RESET=y -# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -# CONFIG_ESPTOOLPY_AFTER_NORESET is not set -CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y -# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 -# end of Serial flasher config - -# -# Partition Table -# -# CONFIG_PARTITION_TABLE_SINGLE_APP is not set -# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set -# CONFIG_PARTITION_TABLE_TWO_OTA is not set -CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_MD5=y -# end of Partition Table - -# -# Compiler options -# -CONFIG_COMPILER_HIDE_PATHS_MACROS=y -# CONFIG_COMPILER_CXX_EXCEPTIONS is not set -# CONFIG_COMPILER_CXX_RTTI is not set -CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y -# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set -# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set -# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set -# CONFIG_COMPILER_DUMP_RTL_FILES is not set -# end of Compiler options - -# -# Component config -# -# -# Application Level Tracing -# -# CONFIG_APPTRACE_DEST_JTAG is not set -CONFIG_APPTRACE_DEST_NONE=y -CONFIG_APPTRACE_LOCK_ENABLE=y -# end of Application Level Tracing - -# CONFIG_BLE_MESH is not set -# -# Driver configurations -# -# -# ADC configuration -# -# CONFIG_ADC_FORCE_XPD_FSM is not set -CONFIG_ADC_DISABLE_DAC=y -# end of ADC configuration - -# -# MCPWM configuration -# -# CONFIG_MCPWM_ISR_IN_IRAM is not set -# end of MCPWM configuration - -# -# SPI configuration -# -# CONFIG_SPI_MASTER_IN_IRAM is not set -CONFIG_SPI_MASTER_ISR_IN_IRAM=y -# CONFIG_SPI_SLAVE_IN_IRAM is not set -CONFIG_SPI_SLAVE_ISR_IN_IRAM=y -# end of SPI configuration - -# -# TWAI configuration -# -# CONFIG_TWAI_ISR_IN_IRAM is not set -# end of TWAI configuration - -# -# UART configuration -# -# CONFIG_UART_ISR_IN_IRAM is not set -# end of UART configuration - -# -# GDMA Configuration -# -# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set -# CONFIG_GDMA_ISR_IRAM_SAFE is not set -# end of GDMA Configuration - -# end of Driver configurations - -# -# eFuse Bit Manager -# -# CONFIG_EFUSE_CUSTOM_TABLE is not set -# CONFIG_EFUSE_VIRTUAL is not set -CONFIG_EFUSE_MAX_BLK_LEN=256 -# end of eFuse Bit Manager - -# -# ESP-TLS -# -CONFIG_ESP_TLS_USING_MBEDTLS=y -CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y -CONFIG_ESP_TLS_SERVER=y -# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_PSK_VERIFICATION is not set -# CONFIG_ESP_TLS_INSECURE is not set -# end of ESP-TLS - -# -# Ethernet -# -# CONFIG_ETH_USE_SPI_ETHERNET is not set -# CONFIG_ETH_USE_OPENETH is not set -# end of Ethernet - -# -# Event Loop Library -# -# CONFIG_ESP_EVENT_LOOP_PROFILING is not set -CONFIG_ESP_EVENT_POST_FROM_ISR=y -CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y -# end of Event Loop Library - -# -# Hardware Settings -# -# -# MAC Config -# -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y -# end of MAC Config - -# -# Sleep Config -# -CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y -# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set -# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set -# end of Sleep Config - -# -# RTC Clock Config -# -CONFIG_RTC_CLOCK_BBPLL_POWER_ON_WITH_USB=y -# end of RTC Clock Config - -# end of Hardware Settings - -# -# IPC (Inter-Processor Call) -# CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y -CONFIG_ESP_IPC_ISR_ENABLE=y -# end of IPC (Inter-Processor Call) - -# -# ESP NETIF Adapter -# -CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 -CONFIG_ESP_NETIF_TCPIP_LWIP=y -# CONFIG_ESP_NETIF_LOOPBACK is not set -# CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER is not set -# end of ESP NETIF Adapter - -# -# PHY -# -CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP_PHY_MAX_TX_POWER=20 -# end of PHY - -# -# Power Management -# -# CONFIG_PM_ENABLE is not set -CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y -CONFIG_PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP=y -# end of Power Management - -# -# ESP System Settings -# -# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set -CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y -CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y -CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 -CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 -CONFIG_ESP_INT_WDT=y -CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 -CONFIG_ESP_INT_WDT_CHECK_CPU1=y -# CONFIG_ESP_TASK_WDT is not set -# CONFIG_ESP_PANIC_HANDLER_IRAM is not set -# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set -CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y -# end of ESP System Settings -# -# High resolution timer (esp_timer) -# -# CONFIG_ESP_TIMER_PROFILING is not set -CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y -CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y -CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 -CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 -# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set -CONFIG_ESP_TIMER_IMPL_SYSTIMER=y -# end of High resolution timer (esp_timer) +CONFIG_ESP_TASK_WDT=n -# -# Wi-Fi -# -# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set -# CONFIG_ESP_WIFI_FTM_ENABLE is not set -# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set -# CONFIG_ESP_WIFI_GCMP_SUPPORT is not set -# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set -CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y -# end of Wi-Fi +CONFIG_ESP_TLS_SERVER=y -# -# Core dump -# -# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set -# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set -CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y -# end of Core dump - -# -# FreeRTOS -# -CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF -CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y -CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y -# CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set -CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y -CONFIG_FREERTOS_HZ=100 -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y -# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set -CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 -# CONFIG_FREERTOS_LEGACY_HOOKS is not set -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y -# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set -# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set -CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y -# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set -# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set -CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y -# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set -# end of FreeRTOS - -# -# Heap memory debugging -# -CONFIG_HEAP_POISONING_DISABLED=y -# CONFIG_HEAP_POISONING_LIGHT is not set -# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set -CONFIG_HEAP_TRACING_OFF=y -# CONFIG_HEAP_TRACING_STANDALONE is not set -# CONFIG_HEAP_TRACING_TOHOST is not set -# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set -# end of Heap memory debugging - -# -# Log output -# -# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -CONFIG_LOG_DEFAULT_LEVEL_INFO=y -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set -CONFIG_LOG_DEFAULT_LEVEL=3 -CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y -# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set -# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set -CONFIG_LOG_MAXIMUM_LEVEL=3 -CONFIG_LOG_COLORS=y -CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y -# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set -# end of Log output - -# -# LWIP -# -# CONFIG_LWIP_NETIF_API is not set -# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -# CONFIG_LWIP_L2_TO_L3_COPY is not set -# CONFIG_LWIP_IRAM_OPTIMIZATION is not set -CONFIG_LWIP_TIMERS_ONDEMAND=y -CONFIG_LWIP_MAX_SOCKETS=8 -# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set -# CONFIG_LWIP_SO_LINGER is not set -CONFIG_LWIP_SO_REUSE=y -CONFIG_LWIP_SO_REUSE_RXTOALL=y -CONFIG_LWIP_SO_RCVBUF=y -# CONFIG_LWIP_NETBUF_RECVINFO is not set -CONFIG_LWIP_IP4_FRAG=y -CONFIG_LWIP_IP6_FRAG=y -# CONFIG_LWIP_IP4_REASSEMBLY is not set -# CONFIG_LWIP_IP6_REASSEMBLY is not set -# CONFIG_LWIP_IP_FORWARD is not set -# CONFIG_LWIP_STATS is not set -# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set -CONFIG_LWIP_ESP_GRATUITOUS_ARP=y -CONFIG_LWIP_GARP_TMR_INTERVAL=60 -CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 -CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y -# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set -CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y -# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set -CONFIG_LWIP_DHCP_OPTIONS_LEN=68 -# -# DHCP server -# -CONFIG_LWIP_DHCPS=y -CONFIG_LWIP_DHCPS_LEASE_UNIT=60 -CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 -# end of DHCP server - -# CONFIG_LWIP_AUTOIP is not set -CONFIG_LWIP_IPV6=y -# CONFIG_LWIP_IPV6_AUTOCONFIG is not set -CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 -# CONFIG_LWIP_IPV6_FORWARD is not set -# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set -CONFIG_LWIP_NETIF_LOOPBACK=y -CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 -# -# TCP -# CONFIG_LWIP_MAX_ACTIVE_TCP=4 CONFIG_LWIP_MAX_LISTENING_TCP=4 -CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y -CONFIG_LWIP_TCP_MAXRTX=12 -CONFIG_LWIP_TCP_SYNMAXRTX=6 -CONFIG_LWIP_TCP_MSS=1440 -CONFIG_LWIP_TCP_TMR_INTERVAL=250 -CONFIG_LWIP_TCP_MSL=60000 -CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 -CONFIG_LWIP_TCP_WND_DEFAULT=2880 -CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 -CONFIG_LWIP_TCP_QUEUE_OOSEQ=y -# CONFIG_LWIP_TCP_SACK_OUT is not set -# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_LWIP_TCP_OVERSIZE_MSS=y -# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set +CONFIG_LWIP_MAX_SOCKETS=8 +CONFIG_LWIP_SO_RCVBUF=y + CONFIG_LWIP_TCP_RTO_TIME=3000 -# end of TCP -# -# UDP -# -CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 -# end of UDP +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 +CONFIG_LWIP_TCP_SYNMAXRTX=6 +CONFIG_LWIP_TCP_WND_DEFAULT=2880 -# -# Checksums -# -# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set -# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set -CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y -# end of Checksums - -CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_LWIP_PPP_SUPPORT is not set -CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 -CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 -# CONFIG_LWIP_SLIP_SUPPORT is not set -# -# ICMP -# -CONFIG_LWIP_ICMP=y -# CONFIG_LWIP_MULTICAST_PING is not set -# CONFIG_LWIP_BROADCAST_PING is not set -# end of ICMP - -# -# LWIP RAW API -# -CONFIG_LWIP_MAX_RAW_PCBS=16 -# end of LWIP RAW API - -# -# SNTP -# -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set -CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 -# end of SNTP - -# -# Hooks -# -# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set -CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y -# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set -CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y -# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set -# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set -CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y -# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set -# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set -CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set -# end of Hooks - -# CONFIG_LWIP_DEBUG is not set -# end of LWIP - -# -# mbedTLS -# -CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y -# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set -# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set -CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y -CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 -CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 -# CONFIG_MBEDTLS_DEBUG is not set -# -# mbedTLS v2.28.x related -# -# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set -CONFIG_MBEDTLS_ECDH_LEGACY_CONTEXT=y -# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set -# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set -CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y -# -# DTLS-based configurations -# -# CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID is not set -# CONFIG_MBEDTLS_SSL_DTLS_SRTP is not set -# end of DTLS-based configurations - -# end of mbedTLS v2.28.x related - -# -# Certificate Bundle -# -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL is not set -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y +CONFIG_MBEDTLS_CMAC_C=y + CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle CONFIG_MBEDTLS_ECP_RESTARTABLE=y -CONFIG_MBEDTLS_CMAC_C=y -CONFIG_MBEDTLS_HARDWARE_AES=y -CONFIG_MBEDTLS_AES_USE_INTERRUPT=y -CONFIG_MBEDTLS_HARDWARE_MPI=y -CONFIG_MBEDTLS_HARDWARE_SHA=y -CONFIG_MBEDTLS_ROM_MD5=y -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set -CONFIG_MBEDTLS_HAVE_TIME=y -# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set -CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y -CONFIG_MBEDTLS_SHA512_C=y -CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y -# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set -# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set -# CONFIG_MBEDTLS_TLS_DISABLED is not set -CONFIG_MBEDTLS_TLS_SERVER=y -CONFIG_MBEDTLS_TLS_CLIENT=y -CONFIG_MBEDTLS_TLS_ENABLED=y -# -# TLS Key Exchange Methods -# -CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y + CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y -# end of TLS Key Exchange Methods +CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_SSL_RENEGOTIATION=y -# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not set -CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y -# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 CONFIG_MBEDTLS_SSL_PROTO_DTLS=y -CONFIG_MBEDTLS_SSL_ALPN=y -CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y -CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y -CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y -CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y -# -# Symmetric Ciphers -# -CONFIG_MBEDTLS_AES_C=y -# CONFIG_MBEDTLS_CAMELLIA_C is not set -# CONFIG_MBEDTLS_DES_C is not set -CONFIG_MBEDTLS_RC4_DISABLED=y -# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set -# CONFIG_MBEDTLS_RC4_ENABLED is not set -# CONFIG_MBEDTLS_BLOWFISH_C is not set -# CONFIG_MBEDTLS_XTEA_C is not set -CONFIG_MBEDTLS_CCM_C=y -CONFIG_MBEDTLS_GCM_C=y -# CONFIG_MBEDTLS_NIST_KW_C is not set -# end of Symmetric Ciphers -# CONFIG_MBEDTLS_RIPEMD160_C is not set -# -# Certificates -# -CONFIG_MBEDTLS_PEM_PARSE_C=y -CONFIG_MBEDTLS_PEM_WRITE_C=y -CONFIG_MBEDTLS_X509_CRL_PARSE_C=y -CONFIG_MBEDTLS_X509_CSR_PARSE_C=y -# end of Certificates +CONFIG_PARTITION_TABLE_CUSTOM=y -CONFIG_MBEDTLS_ECP_C=y -CONFIG_MBEDTLS_ECDH_C=y -CONFIG_MBEDTLS_ECDSA_C=y -# CONFIG_MBEDTLS_ECJPAKE_C is not set -CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y -CONFIG_MBEDTLS_ECP_NIST_OPTIM=y -# CONFIG_MBEDTLS_POLY1305_C is not set -# CONFIG_MBEDTLS_CHACHA20_C is not set -# CONFIG_MBEDTLS_HKDF_C is not set -# CONFIG_MBEDTLS_THREADING_C is not set -# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set -# CONFIG_MBEDTLS_SECURITY_RISKS is not set -# end of mbedTLS - -# -# mDNS -# -CONFIG_MDNS_MAX_SERVICES=10 -CONFIG_MDNS_TASK_PRIORITY=1 -CONFIG_MDNS_TASK_STACK_SIZE=4096 -# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_MDNS_TASK_AFFINITY_CPU0=y -# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set -CONFIG_MDNS_TASK_AFFINITY=0x0 -CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 -# CONFIG_MDNS_STRICT_MODE is not set -CONFIG_MDNS_TIMER_PERIOD_MS=100 -# CONFIG_MDNS_NETWORKING_SOCKET is not set -CONFIG_MDNS_MULTIPLE_INSTANCE=y -# end of mDNS - -# -# Newlib -# -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set -CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y -# CONFIG_NEWLIB_NANO_FORMAT is not set -# end of Newlib - -# -# OpenThread -# -# CONFIG_OPENTHREAD_ENABLED is not set -# end of OpenThread - -# -# PThreads -# -CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y -# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set -# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set -CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of PThreads - -# -# SPI Flash driver -# -# CONFIG_SPI_FLASH_VERIFY_WRITE is not set -# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set -CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y -# CONFIG_SPI_FLASH_ROM_IMPL is not set -CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set -# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set -# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set -# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set -# CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 -# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set -# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set -# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set -# -# Auto-detect flash chips -# -CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP=y -# end of Auto-detect flash chips +CONFIG_SPI_FLASH_YIELD_DURING_ERASE=n -CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y -# end of SPI Flash driver +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=16 +CONFIG_ESP32_WIFI_NVS_ENABLED=n -# -# Virtual file system -# -CONFIG_VFS_SUPPORT_IO=y -CONFIG_VFS_SUPPORT_DIR=y -CONFIG_VFS_SUPPORT_SELECT=y -CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_VFS_SUPPORT_TERMIOS=y -# -# Host File System I/O (Semihosting) -# -CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# end of Host File System I/O (Semihosting) - -# end of Virtual file system - -# -# Supplicant -# -CONFIG_WPA_MBEDTLS_CRYPTO=y -# CONFIG_WPA_WAPI_PSK is not set -# CONFIG_WPA_SUITE_B_192 is not set -# CONFIG_WPA_DEBUG_PRINT is not set -# CONFIG_WPA_TESTING_OPTIONS is not set -# CONFIG_WPA_WPS_STRICT is not set -# CONFIG_WPA_11KV_SUPPORT is not set -# end of Supplicant - -# end of Component config - -# -# Compatibility options -# -# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set -# end of Compatibility options - -# -# Deprecated options for backward compatibility -# -# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set -CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y -# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set -CONFIG_LOG_BOOTLOADER_LEVEL=3 -# CONFIG_APP_ROLLBACK_ENABLE is not set -# CONFIG_FLASH_ENCRYPTION_ENABLED is not set -CONFIG_FLASHMODE_QIO=y -# CONFIG_FLASHMODE_QOUT is not set -# CONFIG_FLASHMODE_DIO is not set -# CONFIG_FLASHMODE_DOUT is not set -# CONFIG_MONITOR_BAUD_9600B is not set -# CONFIG_MONITOR_BAUD_57600B is not set -CONFIG_MONITOR_BAUD_115200B=y -# CONFIG_MONITOR_BAUD_230400B is not set -# CONFIG_MONITOR_BAUD_921600B is not set -# CONFIG_MONITOR_BAUD_2MB is not set -# CONFIG_MONITOR_BAUD_OTHER is not set -CONFIG_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_MONITOR_BAUD=115200 -# CONFIG_CXX_EXCEPTIONS is not set -CONFIG_STACK_CHECK_NONE=y -# CONFIG_STACK_CHECK_NORM is not set -# CONFIG_STACK_CHECK_STRONG is not set -# CONFIG_STACK_CHECK_ALL is not set -# CONFIG_WARN_WRITE_STRINGS is not set -# CONFIG_DISABLE_GCC8_WARNINGS is not set -CONFIG_ADC2_DISABLE_DAC=y -# CONFIG_EVENT_LOOP_PROFILING is not set -CONFIG_POST_EVENTS_FROM_ISR=y -CONFIG_POST_EVENTS_FROM_IRAM_ISR=y -CONFIG_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y -CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_MAIN_TASK_STACK_SIZE=8192 -CONFIG_INT_WDT=y -CONFIG_INT_WDT_TIMEOUT_MS=300 -CONFIG_INT_WDT_CHECK_CPU1=y -# CONFIG_TASK_WDT is not set -CONFIG_TIMER_TASK_STACK_SIZE=3584 -# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set -CONFIG_TIMER_TASK_PRIORITY=1 -CONFIG_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_TIMER_QUEUE_LENGTH=10 -# CONFIG_L2_TO_L3_COPY is not set -# CONFIG_USE_ONLY_LWIP_SELECT is not set -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1440 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=2880 -CONFIG_TCP_WND_DEFAULT=2880 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_TCP_OVERSIZE_MSS=y -# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_TCP_OVERSIZE_DISABLE is not set -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_PPP_SUPPORT is not set -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set -CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_SUPPORT_TERMIOS=y -CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# end of Deprecated options for backward compatibility +CONFIG_ADC_SUPPRESS_DEPRECATE_WARN=y +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y diff --git a/ports/espressif/esp-iot-solution b/ports/espressif/esp-iot-solution new file mode 160000 index 0000000000..d07eb2733c --- /dev/null +++ b/ports/espressif/esp-iot-solution @@ -0,0 +1 @@ +Subproject commit d07eb2733ca5d3379578f3952de04b4a4d188f36 diff --git a/ports/espressif/esp-protocols b/ports/espressif/esp-protocols new file mode 160000 index 0000000000..457f8335bb --- /dev/null +++ b/ports/espressif/esp-protocols @@ -0,0 +1 @@ +Subproject commit 457f8335bb876b8af80a65b096e5381f49f29878 diff --git a/ports/espressif/esp32-camera b/ports/espressif/esp32-camera index 2758089a06..75035312ed 160000 --- a/ports/espressif/esp32-camera +++ b/ports/espressif/esp32-camera @@ -1 +1 @@ -Subproject commit 2758089a06ccae79d8fcab6c93e2ca3761646f9f +Subproject commit 75035312ed9427557acfee1cd32af2b8e1f13f72 diff --git a/ports/espressif/esp32c3_fix.h b/ports/espressif/esp32c3_fix.h deleted file mode 100644 index cbd36ef2fb..0000000000 --- a/ports/espressif/esp32c3_fix.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2021 microDev - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -// See https://github.com/espressif/esp-idf/issues/6906 - -#ifndef MICROPY_INCLUDED_ESPRESSIF_ESP32C3_FIX_H -#define MICROPY_INCLUDED_ESPRESSIF_ESP32C3_FIX_H - -#ifdef __riscv - -#undef __INT32_TYPE__ -#define __INT32_TYPE__ int - -#undef __UINT32_TYPE__ -#define __UINT32_TYPE__ unsigned int - -#endif // __riscv - -#endif // MICROPY_INCLUDED_ESPRESSIF_ESP32C3_FIX_H diff --git a/ports/espressif/i2s_lcd_driver.h b/ports/espressif/i2s_lcd_driver.h index 27c4e66b06..e69de29bb2 100644 --- a/ports/espressif/i2s_lcd_driver.h +++ b/ports/espressif/i2s_lcd_driver.h @@ -1,135 +0,0 @@ -/* *INDENT-OFF* */ -// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -#ifndef __I2S_LCD_DRIVER_H__ -#define __I2S_LCD_DRIVER_H__ - -#include "driver/i2s.h" - -#ifdef __cplusplus -extern "C" -{ -#endif - -#define LCD_CMD_LEV (0) -#define LCD_DATA_LEV (1) - -typedef void *i2s_lcd_handle_t; /** Handle of i2s lcd driver */ - -/** - * @brief Configuration of i2s lcd mode - * - */ -typedef struct { - int8_t data_width; /*!< Parallel data width, 16bit or 8bit available */ - int8_t pin_data_num[16]; /*!< Parallel data output IO*/ - int8_t pin_num_cs; /*!< CS io num */ - int8_t pin_num_wr; /*!< Write clk io*/ - int8_t pin_num_rs; /*!< RS io num */ - int clk_freq; /*!< I2s clock frequency */ - i2s_port_t i2s_port; /*!< I2S port number */ - bool swap_data; /*!< Swap the 2 bytes of RGB565 color */ - uint32_t buffer_size; /*!< DMA buffer size */ -} i2s_lcd_config_t; - -/** - * @brief Initialize i2s lcd driver. - * - * @param config configuration of i2s - * - * @return A handle to the created i2s lcd driver, or NULL in case of error. - */ -i2s_lcd_handle_t i2s_lcd_driver_init(const i2s_lcd_config_t *config); - -/** - * @brief Deinit i2s lcd driver. - * - * @param handle i2s lcd driver handle to deinitilize - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_driver_deinit(i2s_lcd_handle_t handle); - -/** - * @brief Write a data to LCD - * - * @param handle i2s lcd driver handle - * @param data Data to write - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_write_data(i2s_lcd_handle_t handle, uint16_t data); - -/** - * @brief Write a command to LCD - * - * @param handle Handle of i2s lcd driver - * @param cmd command to write - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_write_cmd(i2s_lcd_handle_t handle, uint16_t cmd); - -/** - * @brief Write block data to LCD - * - * @param handle Handle of i2s lcd driver - * @param data Pointer of data - * @param length length of data - * - * @return - * - ESP_OK on success - * - ESP_ERR_INVALID_ARG handle is invalid - */ -esp_err_t i2s_lcd_write(i2s_lcd_handle_t handle, const uint8_t *data, uint32_t length); - -/** - * @brief acquire a lock - * - * @param handle Handle of i2s lcd driver - * - * @return Always return ESP_OK - */ -esp_err_t i2s_lcd_acquire(i2s_lcd_handle_t handle); - -/** - * @brief acquire a lock, but only wait a certain period of time - * - * @param handle Handle of i2s lcd driver - * - * @return true if the lock was acquired, false otherwise - */ -bool i2s_lcd_acquire_nonblocking(i2s_lcd_handle_t handle, TickType_t ticks_to_wait); - -/** - * @brief release a lock - * - * @param handle Handle of i2s lcd driver - * - * @return Always return ESP_OK - */ -esp_err_t i2s_lcd_release(i2s_lcd_handle_t handle); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/ports/espressif/i2s_lcd_esp32s2_driver.c b/ports/espressif/i2s_lcd_esp32s2_driver.c deleted file mode 100644 index 1bf8cd00f3..0000000000 --- a/ports/espressif/i2s_lcd_esp32s2_driver.c +++ /dev/null @@ -1,489 +0,0 @@ -/* *INDENT-OFF* */ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "sdkconfig.h" -#if CONFIG_IDF_TARGET_ESP32S2 - -#include -#include -#include "freertos/FreeRTOS.h" -#include "freertos/task.h" -#include "freertos/semphr.h" -#include "esp_log.h" -#include "driver/gpio.h" -#include "driver/i2s.h" -#include "esp_heap_caps.h" -#include "esp32s2/rom/lldesc.h" -#include "soc/system_reg.h" -#include "i2s_lcd_driver.h" - - -static const char *TAG = "ESP32S2_I2S_LCD"; - -#define I2S_CHECK(a, str, ret) if (!(a)) { \ - ESP_LOGE(TAG, "%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \ - return ret; \ -} - -#define LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE (4000) // 4-byte aligned -#define LCD_DATA_MAX_WIDTH (24) /*!< Maximum width of LCD data bus */ - -typedef struct { - uint32_t dma_buffer_size; - uint32_t dma_half_buffer_size; - uint32_t dma_node_buffer_size; - uint32_t dma_node_cnt; - uint32_t dma_half_node_cnt; - lldesc_t *dma; - uint8_t *dma_buffer; - QueueHandle_t event_queue; - uint8_t width; - bool swap_data; -} lcd_obj_t; - -typedef struct { - lcd_obj_t lcd; - intr_handle_t lcd_cam_intr_handle; - i2s_dev_t *i2s_dev; -} lcd_cam_obj_t; - -typedef struct { - int rs_io_num; - lcd_cam_obj_t *lcd_cam_obj; - SemaphoreHandle_t mutex; -} i2s_lcd_driver_t; - -static void IRAM_ATTR i2s_isr(void *arg) { - BaseType_t HPTaskAwoken = pdFALSE; - lcd_cam_obj_t *lcd_cam_obj = (lcd_cam_obj_t *)arg; - i2s_dev_t *i2s_dev = lcd_cam_obj->i2s_dev; - - typeof(i2s_dev->int_st) status = i2s_dev->int_st; - i2s_dev->int_clr.val = status.val; - if (status.val == 0) { - return; - } - - if (status.out_eof) { - xQueueSendFromISR(lcd_cam_obj->lcd.event_queue, (void *)&status.val, &HPTaskAwoken); - } - - if (HPTaskAwoken == pdTRUE) { - portYIELD_FROM_ISR(); - } -} - - -static void lcd_dma_set_int(lcd_cam_obj_t *lcd_cam_obj) { - // Generate a data DMA linked list - for (int x = 0; x < lcd_cam_obj->lcd.dma_node_cnt; x++) { - lcd_cam_obj->lcd.dma[x].size = lcd_cam_obj->lcd.dma_node_buffer_size; - lcd_cam_obj->lcd.dma[x].length = lcd_cam_obj->lcd.dma_node_buffer_size; - lcd_cam_obj->lcd.dma[x].buf = (lcd_cam_obj->lcd.dma_buffer + lcd_cam_obj->lcd.dma_node_buffer_size * x); - lcd_cam_obj->lcd.dma[x].eof = !((x + 1) % lcd_cam_obj->lcd.dma_half_node_cnt); - lcd_cam_obj->lcd.dma[x].empty = (uint32_t)&lcd_cam_obj->lcd.dma[(x + 1) % lcd_cam_obj->lcd.dma_node_cnt]; - } - lcd_cam_obj->lcd.dma[lcd_cam_obj->lcd.dma_half_node_cnt - 1].empty = (uint32_t)NULL; - lcd_cam_obj->lcd.dma[lcd_cam_obj->lcd.dma_node_cnt - 1].empty = (uint32_t)NULL; -} - -static void lcd_dma_set_left(lcd_cam_obj_t *lcd_cam_obj, int pos, size_t len) { - int end_pos = 0, size = 0; - // Processing data length is an integer multiple of lcd_cam_obj->lcd.dma_node_buffer_size - if (len % lcd_cam_obj->lcd.dma_node_buffer_size) { - end_pos = (pos % 2) * lcd_cam_obj->lcd.dma_half_node_cnt + len / lcd_cam_obj->lcd.dma_node_buffer_size; - size = len % lcd_cam_obj->lcd.dma_node_buffer_size; - } else { - end_pos = (pos % 2) * lcd_cam_obj->lcd.dma_half_node_cnt + len / lcd_cam_obj->lcd.dma_node_buffer_size - 1; - size = lcd_cam_obj->lcd.dma_node_buffer_size; - } - // Process the tail node to make it a DMA tail - lcd_cam_obj->lcd.dma[end_pos].size = size; - lcd_cam_obj->lcd.dma[end_pos].length = size; - lcd_cam_obj->lcd.dma[end_pos].eof = 1; - lcd_cam_obj->lcd.dma[end_pos].empty = (uint32_t)NULL; -} - -static void lcd_i2s_start(i2s_dev_t *i2s_dev, uint32_t addr, size_t len) { - while (!i2s_dev->state.tx_idle) { - ; - } - i2s_dev->conf.tx_reset = 1; - i2s_dev->conf.tx_reset = 0; - i2s_dev->conf.tx_fifo_reset = 1; - i2s_dev->conf.tx_fifo_reset = 0; - i2s_dev->out_link.addr = addr; - i2s_dev->out_link.start = 1; - ets_delay_us(1); - i2s_dev->conf.tx_start = 1; -} - -static void i2s_write_data(lcd_cam_obj_t *lcd_cam_obj, uint8_t *data, size_t len) { - int event = 0; - int x = 0, y = 0, left = 0, cnt = 0; - if (len <= 0) { - ESP_LOGE(TAG, "wrong len!"); - return; - } - lcd_dma_set_int(lcd_cam_obj); - cnt = len / lcd_cam_obj->lcd.dma_half_buffer_size; - // Start signal - xQueueSend(lcd_cam_obj->lcd.event_queue, &event, 0); - // Process a complete piece of data, ping-pong operation - for (x = 0; x < cnt; x++) { - uint8_t *out = (uint8_t *)lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt].buf; - uint8_t *in = data; - if (lcd_cam_obj->lcd.swap_data) { - for (y = 0; y < lcd_cam_obj->lcd.dma_half_buffer_size; y += 2) { - out[y + 1] = in[y + 0]; - out[y + 0] = in[y + 1]; - } - } else { - memcpy(out, in, lcd_cam_obj->lcd.dma_half_buffer_size); - } - data += lcd_cam_obj->lcd.dma_half_buffer_size; - xQueueReceive(lcd_cam_obj->lcd.event_queue, (void *)&event, portMAX_DELAY); - lcd_i2s_start(lcd_cam_obj->i2s_dev, ((uint32_t)&lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt]) & 0xfffff, lcd_cam_obj->lcd.dma_half_buffer_size); - } - left = len % lcd_cam_obj->lcd.dma_half_buffer_size; - // Process remaining incomplete segment data - if (left) { - uint8_t *out = (uint8_t *)lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt].buf; - uint8_t *in = data; - cnt = left - left % 2; - if (cnt) { - if (lcd_cam_obj->lcd.swap_data) { - for (y = 0; y < cnt; y += 2) { - out[y + 1] = in[y + 0]; - out[y + 0] = in[y + 1]; - } - } else { - memcpy(out, in, cnt); - } - } - - if (left % 2) { - out[cnt] = in[cnt]; - } - lcd_dma_set_left(lcd_cam_obj, x, left); - xQueueReceive(lcd_cam_obj->lcd.event_queue, (void *)&event, portMAX_DELAY); - lcd_i2s_start(lcd_cam_obj->i2s_dev, ((uint32_t)&lcd_cam_obj->lcd.dma[(x % 2) * lcd_cam_obj->lcd.dma_half_node_cnt]) & 0xfffff, left); - } - xQueueReceive(lcd_cam_obj->lcd.event_queue, (void *)&event, portMAX_DELAY); -} - - -static esp_err_t i2s_lcd_reg_config(i2s_dev_t *i2s_dev, uint16_t data_width, uint32_t clk_freq) { - // Configure the clock - i2s_dev->clkm_conf.clkm_div_num = 2; // 160MHz / 2 = 80MHz - i2s_dev->clkm_conf.clkm_div_b = 0; - i2s_dev->clkm_conf.clkm_div_a = 0; - i2s_dev->clkm_conf.clk_sel = 2; // PLL_160M_CLK - i2s_dev->clkm_conf.clk_en = 1; - - i2s_dev->conf.val = 0; - i2s_dev->fifo_conf.val = 0; - i2s_dev->fifo_conf.dscr_en = 1; - - i2s_dev->lc_conf.ahbm_fifo_rst = 1; - i2s_dev->lc_conf.ahbm_fifo_rst = 0; - i2s_dev->lc_conf.ahbm_rst = 1; - i2s_dev->lc_conf.ahbm_rst = 0; - i2s_dev->lc_conf.check_owner = 0; - - i2s_dev->timing.val = 0; - - i2s_dev->int_ena.val = 0; - i2s_dev->int_clr.val = ~0; - - i2s_dev->conf2.lcd_en = 1; - - // Configure sampling rate - // The datasheet states that Fws = Fbck / (W*2), but empirically storing - // 1 in the register gives the highest value of 20MHz, storing 2 gives - // 10MHz, (and storing 0 causes a freeze instead of acting as though 64 was - // specified). - int div_num = (20000000 + clk_freq - 1) / clk_freq; - if (div_num == 0) { - div_num = 1; - } - if (div_num > 63) { - div_num = 63; - } - i2s_dev->sample_rate_conf.tx_bck_div_num = div_num; - i2s_dev->sample_rate_conf.tx_bits_mod = data_width; - // Configuration data format - - i2s_dev->conf.tx_right_first = 1; - i2s_dev->conf.tx_msb_right = 1; - i2s_dev->conf.tx_dma_equal = 1; - - i2s_dev->conf1.tx_pcm_bypass = 1; - i2s_dev->conf1.tx_stop_en = 1; - - i2s_dev->conf2.lcd_en = 1; - - i2s_dev->conf_chan.tx_chan_mod = 1; - - i2s_dev->fifo_conf.tx_fifo_mod_force_en = 1; - i2s_dev->fifo_conf.tx_data_num = 32; - i2s_dev->fifo_conf.tx_fifo_mod = 2; - i2s_dev->fifo_conf.tx_24msb_en = 0; - - i2s_dev->lc_conf.out_rst = 1; - i2s_dev->lc_conf.out_rst = 0; - - i2s_dev->int_ena.out_eof = 1; - - - return ESP_OK; -} - -static esp_err_t lcd_set_pin(const i2s_lcd_config_t *config) { - PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[config->pin_num_wr], PIN_FUNC_GPIO); - gpio_set_direction(config->pin_num_wr, GPIO_MODE_OUTPUT); - gpio_set_pull_mode(config->pin_num_wr, GPIO_FLOATING); - gpio_matrix_out(config->pin_num_wr, I2S0O_WS_OUT_IDX, true, false); - - for (int i = 0; i < config->data_width; i++) { - PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[config->pin_data_num[i]], PIN_FUNC_GPIO); - gpio_set_direction(config->pin_data_num[i], GPIO_MODE_OUTPUT); - gpio_set_pull_mode(config->pin_data_num[i], GPIO_FLOATING); - // High bit aligned, OUT23 is always the highest bit - gpio_matrix_out(config->pin_data_num[i], I2S0O_DATA_OUT0_IDX + (LCD_DATA_MAX_WIDTH - config->data_width) + i, false, false); - } - - return ESP_OK; -} - -static esp_err_t lcd_dma_config(lcd_cam_obj_t *lcd_cam_obj, uint32_t max_dma_buffer_size) { - int cnt = 0; - if (LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE % 2 != 0) { - ESP_LOGE(TAG, "ESP32 only supports 2-byte aligned data length"); - return ESP_FAIL; - } - if (max_dma_buffer_size >= LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE * 2) { - lcd_cam_obj->lcd.dma_node_buffer_size = LCD_CAM_DMA_NODE_BUFFER_MAX_SIZE; - for (cnt = 0; cnt < max_dma_buffer_size - 8; cnt++) { // Find a buffer size that can divide dma_size - if ((max_dma_buffer_size - cnt) % (lcd_cam_obj->lcd.dma_node_buffer_size * 2) == 0) { - break; - } - } - lcd_cam_obj->lcd.dma_buffer_size = max_dma_buffer_size - cnt; - } else { - lcd_cam_obj->lcd.dma_node_buffer_size = max_dma_buffer_size / 2; - lcd_cam_obj->lcd.dma_buffer_size = lcd_cam_obj->lcd.dma_node_buffer_size * 2; - } - - lcd_cam_obj->lcd.dma_half_buffer_size = lcd_cam_obj->lcd.dma_buffer_size / 2; - lcd_cam_obj->lcd.dma_node_cnt = (lcd_cam_obj->lcd.dma_buffer_size) / lcd_cam_obj->lcd.dma_node_buffer_size; // Number of DMA nodes - lcd_cam_obj->lcd.dma_half_node_cnt = lcd_cam_obj->lcd.dma_node_cnt / 2; - - ESP_LOGI(TAG, "lcd_buffer_size: %d, lcd_dma_size: %d, lcd_dma_node_cnt: %d", lcd_cam_obj->lcd.dma_buffer_size, lcd_cam_obj->lcd.dma_node_buffer_size, lcd_cam_obj->lcd.dma_node_cnt); - - lcd_cam_obj->lcd.dma = (lldesc_t *)heap_caps_malloc(lcd_cam_obj->lcd.dma_node_cnt * sizeof(lldesc_t), MALLOC_CAP_DMA | MALLOC_CAP_8BIT); - lcd_cam_obj->lcd.dma_buffer = (uint8_t *)heap_caps_malloc(lcd_cam_obj->lcd.dma_buffer_size * sizeof(uint8_t), MALLOC_CAP_DMA | MALLOC_CAP_8BIT); - return ESP_OK; -} - -static esp_err_t lcd_cam_deinit(i2s_lcd_driver_t *drv) { - if (!drv->lcd_cam_obj) { - return ESP_FAIL; - } - - if (drv->lcd_cam_obj->lcd.event_queue) { - vQueueDelete(drv->lcd_cam_obj->lcd.event_queue); - } - if (drv->lcd_cam_obj->lcd.dma) { - heap_caps_free(drv->lcd_cam_obj->lcd.dma); - } - if (drv->lcd_cam_obj->lcd.dma_buffer) { - heap_caps_free(drv->lcd_cam_obj->lcd.dma_buffer); - } - - if (drv->lcd_cam_obj->lcd_cam_intr_handle) { - esp_intr_free(drv->lcd_cam_obj->lcd_cam_intr_handle); - } - - heap_caps_free(drv->lcd_cam_obj); - drv->lcd_cam_obj = NULL; - return ESP_OK; -} - -static esp_err_t lcd_cam_init(i2s_lcd_driver_t *drv, const i2s_lcd_config_t *config) { - esp_err_t ret = ESP_OK; - - lcd_cam_obj_t *lcd_cam_obj = (lcd_cam_obj_t *)heap_caps_calloc(1, sizeof(lcd_cam_obj_t), MALLOC_CAP_DMA); - if (lcd_cam_obj == NULL) { - ESP_LOGE(TAG, "lcd_cam object malloc error"); - return ESP_ERR_NO_MEM; - } - drv->lcd_cam_obj = lcd_cam_obj; - - if (I2S_NUM_0 == config->i2s_port) { - lcd_cam_obj->i2s_dev = &I2S0; - periph_module_enable(PERIPH_I2S0_MODULE); - } else { - ESP_LOGE(TAG, "Designated I2S peripheral not found"); - } - - ret |= i2s_lcd_reg_config(lcd_cam_obj->i2s_dev, config->data_width, config->clk_freq); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "lcd_cam config fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - ret |= lcd_set_pin(config); - ret |= lcd_dma_config(lcd_cam_obj, config->buffer_size); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "lcd config fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - lcd_cam_obj->lcd.event_queue = xQueueCreate(1, sizeof(int)); - lcd_cam_obj->lcd.width = config->data_width; - lcd_cam_obj->lcd.swap_data = config->swap_data; - - if (lcd_cam_obj->lcd.event_queue == NULL) { - ESP_LOGE(TAG, "lcd config fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - ret |= esp_intr_alloc(ETS_I2S0_INTR_SOURCE, ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_IRAM, i2s_isr, lcd_cam_obj, &lcd_cam_obj->lcd_cam_intr_handle); - - if (ret != ESP_OK) { - ESP_LOGE(TAG, "lcd_cam intr alloc fail!"); - lcd_cam_deinit(drv); - return ESP_FAIL; - } - - ESP_LOGI(TAG, "lcd init ok"); - - return ESP_OK; -} - - -/**< Public functions */ - -i2s_lcd_handle_t i2s_lcd_driver_init(const i2s_lcd_config_t *config) { - I2S_CHECK(NULL != config, "config pointer invalid", NULL); - I2S_CHECK(GPIO_IS_VALID_GPIO(config->pin_num_wr), "GPIO WR invalid", NULL); - I2S_CHECK(GPIO_IS_VALID_GPIO(config->pin_num_rs), "GPIO RS invalid", NULL); - I2S_CHECK(config->data_width > 0 && config->data_width <= 16, "Bit width out of range", NULL); - I2S_CHECK(0 == (config->data_width % 8), "Bit width must be a multiple of 8", NULL); - uint64_t pin_mask = 0; - for (size_t i = 0; i < config->data_width; i++) { - uint64_t mask = 1ULL << config->pin_data_num[i]; - I2S_CHECK(!(pin_mask & mask), "Data bus GPIO has a duplicate", NULL); - I2S_CHECK(GPIO_IS_VALID_GPIO(config->pin_data_num[i]), "Data bus gpio invalid", NULL); - pin_mask |= mask; - } - - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)heap_caps_malloc(sizeof(i2s_lcd_driver_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); - I2S_CHECK(NULL != i2s_lcd_drv, "Error malloc handle of i2s lcd driver", NULL); - - esp_err_t ret = lcd_cam_init(i2s_lcd_drv, config); - if (ESP_OK != ret) { - ESP_LOGE(TAG, "%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, "i2s lcd driver initialize failed"); - heap_caps_free(i2s_lcd_drv); - return NULL; - } - - i2s_lcd_drv->mutex = xSemaphoreCreateMutex(); - if (i2s_lcd_drv->mutex == NULL) { - ESP_LOGE(TAG, "%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, "lcd create mutex failed"); - lcd_cam_deinit(i2s_lcd_drv); - heap_caps_free(i2s_lcd_drv); - return NULL; - } - - if (config->pin_num_cs >= 0) { - gpio_pad_select_gpio(config->pin_num_cs); - gpio_set_direction(config->pin_num_cs, GPIO_MODE_OUTPUT); - gpio_set_level(config->pin_num_cs, 0); - } - - gpio_pad_select_gpio(config->pin_num_rs); - gpio_set_direction(config->pin_num_rs, GPIO_MODE_OUTPUT); - i2s_lcd_drv->rs_io_num = config->pin_num_rs; - return (i2s_lcd_handle_t)i2s_lcd_drv; -} - -esp_err_t i2s_lcd_driver_deinit(i2s_lcd_handle_t handle) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - lcd_cam_deinit(i2s_lcd_drv); - vSemaphoreDelete(i2s_lcd_drv->mutex); - heap_caps_free(handle); - return ESP_OK; -} - -esp_err_t i2s_lcd_write_data(i2s_lcd_handle_t handle, uint16_t data) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - i2s_write_data(i2s_lcd_drv->lcd_cam_obj, (uint8_t *)&data, 2); - return ESP_OK; -} - -esp_err_t i2s_lcd_write_cmd(i2s_lcd_handle_t handle, uint16_t cmd) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - gpio_set_level(i2s_lcd_drv->rs_io_num, LCD_CMD_LEV); - i2s_write_data(i2s_lcd_drv->lcd_cam_obj, (uint8_t *)&cmd, 2); - gpio_set_level(i2s_lcd_drv->rs_io_num, LCD_DATA_LEV); - return ESP_OK; -} - -esp_err_t i2s_lcd_write(i2s_lcd_handle_t handle, const uint8_t *data, uint32_t length) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - i2s_write_data(i2s_lcd_drv->lcd_cam_obj, (uint8_t *)data, length); - - return ESP_OK; -} - -esp_err_t i2s_lcd_acquire(i2s_lcd_handle_t handle) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - BaseType_t ret = xSemaphoreTake(i2s_lcd_drv->mutex, portMAX_DELAY); - I2S_CHECK(pdTRUE == ret, "Take semaphore failed", ESP_FAIL); - return ESP_OK; -} - -bool i2s_lcd_acquire_nonblocking(i2s_lcd_handle_t handle, TickType_t ticks_to_wait) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - return xSemaphoreTake(i2s_lcd_drv->mutex, ticks_to_wait); -} - -esp_err_t i2s_lcd_release(i2s_lcd_handle_t handle) { - i2s_lcd_driver_t *i2s_lcd_drv = (i2s_lcd_driver_t *)handle; - I2S_CHECK(NULL != i2s_lcd_drv, "handle pointer invalid", ESP_ERR_INVALID_ARG); - i2s_dev_t *i2s_dev = &I2S0; -// at this point, the DMA is done but there could still be data in the FIFO. so we need -// to wait for I2S_TX_IDLE so that it's safe e.g., for calling code to deassert CS - while (!i2s_dev->state.tx_idle) { - ; - } - BaseType_t ret = xSemaphoreGive(i2s_lcd_drv->mutex); - I2S_CHECK(pdTRUE == ret, "Give semaphore failed", ESP_FAIL); - return ESP_OK; -} - -#endif // CONFIG_IDF_TARGET_ESP32S2 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 01cb22d39a..d3b55b5b42 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -45,6 +45,8 @@ CIRCUITPY_WIFI ?= 1 ifeq ($(IDF_TARGET),esp32) # Modules CIRCUITPY_BLEIO = 0 +CIRCUITPY_ESPULP = 0 +CIRCUITPY_MEMORYMAP = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX = 0 # Features diff --git a/ports/espressif/peripherals/i2c.c b/ports/espressif/peripherals/i2c.c index 7a85349f96..1f8565ca01 100644 --- a/ports/espressif/peripherals/i2c.c +++ b/ports/espressif/peripherals/i2c.c @@ -35,7 +35,7 @@ typedef enum { static i2c_status_t i2c_status[I2C_NUM_MAX]; void i2c_reset(void) { - for (i2c_port_t num = 0; num < I2C_NUM_MAX; num++) { + for (i2c_port_t num = 0; num < (int)I2C_NUM_MAX; num++) { if (i2c_status[num] == STATUS_IN_USE) { i2c_driver_delete(num); i2c_status[num] = STATUS_FREE; @@ -70,7 +70,7 @@ void peripherals_i2c_deinit(i2c_port_t num) { i2c_port_t peripherals_i2c_get_free_num(void) { i2c_port_t i2c_num = I2C_NUM_MAX; - for (i2c_port_t num = 0; num < I2C_NUM_MAX; num++) { + for (i2c_port_t num = 0; num < (int)I2C_NUM_MAX; num++) { if (i2c_status[num] == STATUS_FREE) { i2c_num = num; break; diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index 043bc8becc..911e5f271b 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -50,7 +50,7 @@ extern const mp_obj_type_t mcu_pin_type; #define NO_PIN (GPIO_NUM_NC) #define NO_ADC 0 -#define NO_ADC_CHANNEL ADC_CHANNEL_MAX +#define NO_ADC_CHANNEL SOC_ADC_MAX_CHANNEL_NUM #define NO_TOUCH_CHANNEL TOUCH_PAD_MAX diff --git a/ports/espressif/peripherals/rmt.h b/ports/espressif/peripherals/rmt.h index 24a4383789..08a446636e 100644 --- a/ports/espressif/peripherals/rmt.h +++ b/ports/espressif/peripherals/rmt.h @@ -27,9 +27,11 @@ #ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H #define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_RMT_H -#include "py/mphal.h" -#include "components/driver/include/driver/rmt.h" #include + +#include "py/mphal.h" +#include "driver/rmt.h" + #define TRANSMIT_MODE true #define RECEIVE_MODE false diff --git a/ports/espressif/peripherals/timer.h b/ports/espressif/peripherals/timer.h index c968b0f400..82dcc7838a 100644 --- a/ports/espressif/peripherals/timer.h +++ b/ports/espressif/peripherals/timer.h @@ -28,6 +28,7 @@ #define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_TIMER_HANDLER_H #include "driver/timer.h" +#include "soc/timer_group_struct.h" typedef struct { timg_dev_t *hw; diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 0224fe0073..2d2089a587 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -86,21 +86,20 @@ #include "esp_camera.h" #endif -#ifndef CONFIG_IDF_TARGET_ESP32 -#include "soc/cache_memory.h" -#endif - #include "soc/efuse_reg.h" #include "soc/rtc_cntl_reg.h" - -#include "esp_debug_helpers.h" +#include "soc/spi_pins.h" #include "bootloader_flash_config.h" + +#include "esp_debug_helpers.h" #include "esp_efuse.h" #include "esp_ipc.h" #include "esp_rom_efuse.h" +#include "esp_timer.h" #ifdef CONFIG_IDF_TARGET_ESP32 +#include "hal/efuse_hal.h" #include "esp32/rom/efuse.h" #endif @@ -187,7 +186,7 @@ static void _never_reset_spi_ram_flash(void) { if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5) { never_reset_pin_number(D2WD_PSRAM_CLK_IO); never_reset_pin_number(D2WD_PSRAM_CS_IO); - } else if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 && esp_efuse_get_chip_ver() >= 3) { + } else if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4 && efuse_hal_get_major_chip_version() >= 3) { // This chip is ESP32-PICO-V3 and doesn't have PSRAM. } else if ((pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD2) || (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32PICOD4)) { never_reset_pin_number(PICO_PSRAM_CLK_IO); diff --git a/ports/espressif/supervisor/usb.c b/ports/espressif/supervisor/usb.c index 61e6b5f09d..ad4c950333 100644 --- a/ports/espressif/supervisor/usb.c +++ b/ports/espressif/supervisor/usb.c @@ -35,8 +35,8 @@ #include "hal/usb_hal.h" #include "soc/usb_periph.h" -#include "components/driver/include/driver/gpio.h" -#include "components/driver/include/driver/periph_ctrl.h" +#include "driver/gpio.h" +#include "esp_private/periph_ctrl.h" #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "components/esp_rom/include/esp32c3/rom/gpio.h" From 931ed7c6e5ee8f791dd1e22e3bfb672921057cff Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Fri, 6 Jan 2023 13:53:44 +0530 Subject: [PATCH 063/129] conditionally include `esp_psram` and fix sdkconfig --- ports/espressif/Makefile | 5 ++++- .../mpconfigboard.mk | 2 ++ .../adafruit_feather_esp32_v2/sdkconfig | 1 - .../adafruit_feather_esp32s2/mpconfigboard.mk | 2 ++ .../boards/adafruit_feather_esp32s2/sdkconfig | 2 -- .../mpconfigboard.mk | 2 ++ .../mpconfigboard.mk | 2 ++ .../adafruit_feather_esp32s2_tft/sdkconfig | 1 - .../sdkconfig | 5 +++++ .../mpconfigboard.mk | 3 +++ .../sdkconfig | 2 -- .../sdkconfig | 2 -- .../mpconfigboard.mk | 3 +++ .../adafruit_feather_esp32s3_tft/sdkconfig | 2 -- .../adafruit_feather_huzzah32/sdkconfig | 1 - .../boards/adafruit_funhouse/mpconfigboard.mk | 2 ++ .../boards/adafruit_funhouse/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../adafruit_magtag_2.9_grayscale/sdkconfig | 1 - .../adafruit_metro_esp32s2/mpconfigboard.mk | 2 ++ .../boards/adafruit_metro_esp32s2/sdkconfig | 1 - .../adafruit_qtpy_esp32_pico/mpconfigboard.mk | 2 ++ .../boards/adafruit_qtpy_esp32_pico/sdkconfig | 1 - .../adafruit_qtpy_esp32s2/mpconfigboard.mk | 2 ++ .../boards/adafruit_qtpy_esp32s2/sdkconfig | 1 - .../adafruit_qtpy_esp32s3_nopsram/sdkconfig | 2 -- .../mpconfigboard.mk | 2 ++ .../ai_thinker_esp_12k_nodemcu/sdkconfig | 1 - .../boards/artisense_rd00/mpconfigboard.mk | 2 ++ .../espressif/boards/artisense_rd00/sdkconfig | 1 - .../atmegazero_esp32s2/mpconfigboard.mk | 2 ++ .../boards/atmegazero_esp32s2/sdkconfig | 1 - .../boards/bpi_bit_s2/mpconfigboard.mk | 2 ++ ports/espressif/boards/bpi_bit_s2/sdkconfig | 1 - .../boards/bpi_leaf_s3/mpconfigboard.mk | 2 ++ ports/espressif/boards/bpi_leaf_s3/sdkconfig | 2 -- .../boards/bpi_picow_s3/mpconfigboard.mk | 2 ++ ports/espressif/boards/bpi_picow_s3/sdkconfig | 2 -- .../boards/crcibernetica-ideaboard/sdkconfig | 1 - .../crumpspace_crumps2/mpconfigboard.mk | 2 ++ .../boards/crumpspace_crumps2/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../cytron_maker_feather_aiot_s3/sdkconfig | 1 - .../boards/doit_esp32_devkit_v1/sdkconfig | 1 - .../boards/electroniccats_bastwifi/sdkconfig | 1 - .../espressif_esp32_eye/mpconfigboard.mk | 2 ++ .../boards/espressif_esp32_eye/sdkconfig | 2 -- .../mpconfigboard.mk | 2 ++ .../sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../sdkconfig | 1 - .../espressif_esp32s3_box/mpconfigboard.mk | 2 ++ .../boards/espressif_esp32s3_box/sdkconfig | 22 +++++++++++++++++-- .../mpconfigboard.mk | 2 ++ .../espressif_esp32s3_box_lite/sdkconfig | 22 +++++++++++++++++-- .../espressif_esp32s3_devkitc_1_n8/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../sdkconfig | 2 -- .../mpconfigboard.mk | 2 ++ .../sdkconfig | 1 - .../espressif_esp32s3_devkitm_1_n8/sdkconfig | 1 - .../espressif_esp32s3_eye/mpconfigboard.mk | 2 ++ .../boards/espressif_esp32s3_eye/sdkconfig | 1 - .../espressif_esp32s3_usb_otg_n8/sdkconfig | 1 - .../espressif_hmi_devkit_1/mpconfigboard.mk | 2 ++ .../boards/espressif_hmi_devkit_1/sdkconfig | 1 - .../espressif_kaluga_1.3/mpconfigboard.mk | 2 ++ .../boards/espressif_kaluga_1.3/sdkconfig | 1 - .../espressif_kaluga_1/mpconfigboard.mk | 2 ++ .../boards/espressif_kaluga_1/sdkconfig | 1 - .../boards/espressif_saola_1_wroom/sdkconfig | 1 - .../espressif_saola_1_wrover/mpconfigboard.mk | 2 ++ .../boards/espressif_saola_1_wrover/sdkconfig | 1 - .../boards/franzininho_wifi_wroom/sdkconfig | 1 - .../franzininho_wifi_wrover/mpconfigboard.mk | 2 ++ .../boards/franzininho_wifi_wrover/sdkconfig | 1 - .../boards/gravitech_cucumber_m/sdkconfig | 1 - .../boards/gravitech_cucumber_ms/sdkconfig | 1 - .../gravitech_cucumber_r/mpconfigboard.mk | 2 ++ .../boards/gravitech_cucumber_r/sdkconfig | 1 - .../gravitech_cucumber_rs/mpconfigboard.mk | 2 ++ .../boards/gravitech_cucumber_rs/sdkconfig | 1 - .../hardkernel_odroid_go/mpconfigboard.mk | 2 ++ .../boards/hardkernel_odroid_go/sdkconfig | 1 - .../boards/hexky_s2/mpconfigboard.mk | 2 ++ ports/espressif/boards/hexky_s2/sdkconfig | 1 - .../boards/hiibot_iots2/mpconfigboard.mk | 2 ++ ports/espressif/boards/hiibot_iots2/sdkconfig | 2 -- .../lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig | 1 - .../boards/lilygo_ttgo_t8_s2/mpconfigboard.mk | 2 ++ .../boards/lilygo_ttgo_t8_s2/sdkconfig | 1 - .../lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk | 2 ++ .../boards/lilygo_ttgo_t8_s2_st7789/sdkconfig | 1 - .../boards/lolin_s2_mini/mpconfigboard.mk | 2 ++ .../espressif/boards/lolin_s2_mini/sdkconfig | 1 - .../boards/lolin_s2_pico/mpconfigboard.mk | 2 ++ .../espressif/boards/lolin_s2_pico/sdkconfig | 1 - .../boards/lolin_s3/mpconfigboard.mk | 3 +++ ports/espressif/boards/lolin_s3/sdkconfig | 2 -- .../boards/m5stack_atom_echo/sdkconfig | 1 - .../boards/m5stack_atom_lite/sdkconfig | 1 - .../boards/m5stack_atom_matrix/sdkconfig | 1 - .../espressif/boards/m5stack_atom_u/sdkconfig | 1 - .../boards/m5stack_core_basic/sdkconfig | 1 - .../boards/m5stack_core_fire/mpconfigboard.mk | 2 ++ .../boards/m5stack_core_fire/sdkconfig | 1 - ports/espressif/boards/maker_badge/sdkconfig | 2 -- .../boards/microdev_micro_s2/mpconfigboard.mk | 2 ++ .../boards/microdev_micro_s2/sdkconfig | 1 - .../boards/mixgo_ce_serial/sdkconfig | 1 - .../espressif/boards/mixgo_ce_udisk/sdkconfig | 1 - .../boards/morpheans_morphesp-240/sdkconfig | 1 - .../muselab_nanoesp32_s2_wroom/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../muselab_nanoesp32_s2_wrover/sdkconfig | 2 -- .../odt_pixelwing_esp32_s2/mpconfigboard.mk | 2 ++ .../boards/odt_pixelwing_esp32_s2/sdkconfig | 1 - .../smartbeedesigns_bee_motion_s3/sdkconfig | 1 - .../boards/smartbeedesigns_bee_s3/sdkconfig | 1 - .../targett_module_clip_wroom/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../targett_module_clip_wrover/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../unexpectedmaker_feathers2/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../unexpectedmaker_feathers2_neo/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../unexpectedmaker_feathers3/sdkconfig | 1 - .../unexpectedmaker_pros3/mpconfigboard.mk | 2 ++ .../boards/unexpectedmaker_pros3/sdkconfig | 1 - .../unexpectedmaker_tinypico/mpconfigboard.mk | 2 ++ .../boards/unexpectedmaker_tinypico/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../unexpectedmaker_tinypico_nano/sdkconfig | 1 - .../unexpectedmaker_tinys2/mpconfigboard.mk | 2 ++ .../boards/unexpectedmaker_tinys2/sdkconfig | 1 - .../unexpectedmaker_tinys3/mpconfigboard.mk | 2 ++ .../boards/unexpectedmaker_tinys3/sdkconfig | 1 - .../mpconfigboard.mk | 2 ++ .../waveshare_esp32_s2_pico_lcd/sdkconfig | 1 - .../waveshare_esp32s2_pico/mpconfigboard.mk | 2 ++ ports/espressif/mpconfigport.mk | 3 +++ 144 files changed, 171 insertions(+), 99 deletions(-) create mode 100644 ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 6397a95e44..4cf27b47e3 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -395,7 +395,7 @@ ifeq ($(IDF_TARGET),esp32) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a endif -ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_psram esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ifneq ($(CIRCUITPY_BLEIO),0) ESP_IDF_COMPONENTS_LINK += bt BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ @@ -404,6 +404,9 @@ endif ifneq ($(CIRCUITPY_ESPULP),0) ESP_IDF_COMPONENTS_LINK += ulp endif +ifneq ($(CIRCUITPY_ESP_PSRAM_SIZE),0) + ESP_IDF_COMPONENTS_LINK += esp_psram +endif ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0) ESP_IDF_COMPONENTS_LINK += esp_lcd endif diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk index 38d689d08a..554d64d1a1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig index c09d8c409a..0a81b10c16 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y # SPI RAM config # # CONFIG_SPIRAM_TYPE_AUTO is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk index 3ba91e62fd..ed6ae99976 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig index 37fd534249..05ba1165ce 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S2-specific # -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -# # SPI RAM config # # CONFIG_SPIRAM_TYPE_AUTO is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk index 920b748e3d..cbe6bb2442 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk @@ -9,3 +9,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk index 4b559ff1ee..691480c790 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk @@ -9,3 +9,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig new file mode 100644 index 0000000000..3525371bc7 --- /dev/null +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig @@ -0,0 +1,5 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 6d78999532..4f7eaab71e 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -9,4 +9,7 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig index 9a05ab0205..c57eb874f5 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S3-Specific # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig index 9d924272ec..1a7d20d834 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig @@ -1,5 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - # # LWIP # diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk index d801afd493..fdb5d8b5c0 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk @@ -10,4 +10,7 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig index 9a05ab0205..c57eb874f5 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S3-Specific # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig b/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig index 6c0168c829..645ab76c47 100644 --- a/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins ### # diff --git a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk index 808154b78c..f2276ad9b6 100644 --- a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_ESPCAMERA = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/adafruit_funhouse/sdkconfig +++ b/ports/espressif/boards/adafruit_funhouse/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk index d941039078..06b5a1c68d 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk @@ -18,3 +18,5 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk index 8f139315c8..5e77442d13 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig index 9ad9e6c3bb..7fc45aa53c 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk index de41053146..8d001428cc 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig index bec9e436b7..ac74f0f06c 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig @@ -21,7 +21,6 @@ CONFIG_SPIRAM_CACHE_WORKAROUND=y # # SPI RAM config # -CONFIG_ESP32_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_AUTO is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk index f1bd7652fe..2285f8d594 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk @@ -9,3 +9,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig index 9d924272ec..1a7d20d834 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig @@ -1,5 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - # # LWIP # diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk index 4ec2175eca..aef03973c0 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig index 49ee336ed4..2f49953401 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/artisense_rd00/mpconfigboard.mk b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk index 1011143972..8602034d4a 100644 --- a/ports/espressif/boards/artisense_rd00/mpconfigboard.mk +++ b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig index cd57f0d118..9e0661d58c 100644 --- a/ports/espressif/boards/artisense_rd00/sdkconfig +++ b/ports/espressif/boards/artisense_rd00/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk index 53593be38b..b39623ae94 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig index b528b9f343..bbff53d4ea 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig +++ b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk b/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk index 2c793ba5fb..6f9f3eeab7 100644 --- a/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_SIZE=4MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/bpi_bit_s2/sdkconfig b/ports/espressif/boards/bpi_bit_s2/sdkconfig index 91758051d3..eae059c787 100644 --- a/ports/espressif/boards/bpi_bit_s2/sdkconfig +++ b/ports/espressif/boards/bpi_bit_s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk index e2cd188059..42a5901d97 100644 --- a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_SIZE=8MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/bpi_leaf_s3/sdkconfig b/ports/espressif/boards/bpi_leaf_s3/sdkconfig index e9c767ea85..c7a8bab198 100644 --- a/ports/espressif/boards/bpi_leaf_s3/sdkconfig +++ b/ports/espressif/boards/bpi_leaf_s3/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S3-Specific # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk b/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk index 6d77a94b08..36aa247870 100644 --- a/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk @@ -18,3 +18,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 8MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/bpi_picow_s3/sdkconfig b/ports/espressif/boards/bpi_picow_s3/sdkconfig index 04ab118924..9d42f33f56 100644 --- a/ports/espressif/boards/bpi_picow_s3/sdkconfig +++ b/ports/espressif/boards/bpi_picow_s3/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S3-Specific # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig index 6c0168c829..645ab76c47 100644 --- a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig +++ b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins ### # diff --git a/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk index aca5950f9d..871f68c452 100644 --- a/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk +++ b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_BITBANG_APA102 = 1 # Include these Python libraries in firmware. # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig index 94158d85c5..af05b7fbf2 100644 --- a/ports/espressif/boards/crumpspace_crumps2/sdkconfig +++ b/ports/espressif/boards/crumpspace_crumps2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk b/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk index 53e9750463..a37170ba67 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 8MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig index f508f4a67c..e7c5b643b2 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig b/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig index 6c0168c829..645ab76c47 100644 --- a/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig +++ b/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins ### # diff --git a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig +++ b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk index e29ca687c6..c59c277d45 100644 --- a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 0MB diff --git a/ports/espressif/boards/espressif_esp32_eye/sdkconfig b/ports/espressif/boards/espressif_esp32_eye/sdkconfig index 26db1e8087..0e53c6bbd1 100644 --- a/ports/espressif/boards/espressif_esp32_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_eye/sdkconfig @@ -7,8 +7,6 @@ # # ESP32-specific # -CONFIG_ESP32_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_TYPE_AUTO=y diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk index aef3ce0dc7..874a1341a4 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig index 926a7813ba..8c82c9c70d 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk index 883df304f4..ce2b45ccd3 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig index 926a7813ba..8c82c9c70d 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk index 5a2a4794bd..fbacf3fa3a 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -9,4 +9,6 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index 6884299abe..99432b359a 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -1,11 +1,29 @@ CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +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 is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y # # LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk index a4bd29fa52..4da1ab8ed3 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk @@ -9,4 +9,6 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig index 6884299abe..99432b359a 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig @@ -1,11 +1,29 @@ CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +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 is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y # # LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig index a0a61d8392..1a7d20d834 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk index 7d5afe9a9f..cd531b902f 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig index 3e366f0172..3a99cc3c44 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S3-Specific # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk index 95fa2d0324..08ad0aee90 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig index f508f4a67c..e7c5b643b2 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig index a0a61d8392..1a7d20d834 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk index 4711f28aaf..3d57e485ae 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig index 1a24832767..18eca34cb2 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig index a0a61d8392..1a7d20d834 100644 --- a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk index 60ff9fd5a1..8ce04357bf 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig +++ b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk index 23578067ac..975189924d 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk index 23578067ac..975189924d 100644 --- a/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/espressif_kaluga_1/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk index 5156a5b6ce..a31c4d7498 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk index 2a09bc99eb..d9c04b8b6c 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig index 7b07033d7b..af73f6d885 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig index b31dd447e1..cbdd787aa7 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk index d3e40f2df6..aa06644643 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig index fe0857c4fb..41e00d746a 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk index e0b3f35d44..f7b0cb2390 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig index 23b3eea78d..45f96a6600 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk index ead48189fa..76817b1cee 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk +++ b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 4MB diff --git a/ports/espressif/boards/hardkernel_odroid_go/sdkconfig b/ports/espressif/boards/hardkernel_odroid_go/sdkconfig index f4fea0c732..45da77ed9f 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/sdkconfig +++ b/ports/espressif/boards/hardkernel_odroid_go/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y # SPI RAM config # # CONFIG_SPIRAM_TYPE_AUTO is not set diff --git a/ports/espressif/boards/hexky_s2/mpconfigboard.mk b/ports/espressif/boards/hexky_s2/mpconfigboard.mk index 043dec5824..d6809e5c01 100644 --- a/ports/espressif/boards/hexky_s2/mpconfigboard.mk +++ b/ports/espressif/boards/hexky_s2/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/hexky_s2/sdkconfig b/ports/espressif/boards/hexky_s2/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/hexky_s2/sdkconfig +++ b/ports/espressif/boards/hexky_s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk b/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk index a60d894665..411275a1ba 100644 --- a/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk +++ b/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk @@ -9,3 +9,5 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB #CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/hiibot_iots2/sdkconfig b/ports/espressif/boards/hiibot_iots2/sdkconfig index 5ef7020a72..1120f8099f 100644 --- a/ports/espressif/boards/hiibot_iots2/sdkconfig +++ b/ports/espressif/boards/hiibot_iots2/sdkconfig @@ -1,5 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # diff --git a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk index e7d70c671a..2bfc8fb2c8 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig index 8c401a6ff3..9e7a21dee3 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk index 865dbe2661..e9e333d497 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig index 8c401a6ff3..9e7a21dee3 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk index 24f88d9abf..a3bbcaf2a5 100644 --- a/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk @@ -12,3 +12,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 4MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig index deb0dadcb9..a6ec1f0078 100644 --- a/ports/espressif/boards/lolin_s2_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s2_mini/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk index bf946a483f..5b027e6732 100644 --- a/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk @@ -12,3 +12,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 4MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/lolin_s2_pico/sdkconfig b/ports/espressif/boards/lolin_s2_pico/sdkconfig index 5ce352a98d..b090e8f7e2 100644 --- a/ports/espressif/boards/lolin_s2_pico/sdkconfig +++ b/ports/espressif/boards/lolin_s2_pico/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/lolin_s3/mpconfigboard.mk b/ports/espressif/boards/lolin_s3/mpconfigboard.mk index 56b42a419c..a377fb0b56 100644 --- a/ports/espressif/boards/lolin_s3/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3/mpconfigboard.mk @@ -9,4 +9,7 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/lolin_s3/sdkconfig b/ports/espressif/boards/lolin_s3/sdkconfig index 23d005edd9..975a05bfc2 100644 --- a/ports/espressif/boards/lolin_s3/sdkconfig +++ b/ports/espressif/boards/lolin_s3/sdkconfig @@ -4,8 +4,6 @@ # # ESP32S3-Specific # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/boards/m5stack_atom_echo/sdkconfig b/ports/espressif/boards/m5stack_atom_echo/sdkconfig index 3879222bab..c86eaa11fe 100644 --- a/ports/espressif/boards/m5stack_atom_echo/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_echo/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # diff --git a/ports/espressif/boards/m5stack_atom_lite/sdkconfig b/ports/espressif/boards/m5stack_atom_lite/sdkconfig index 8a9fb07019..50e85a6afe 100644 --- a/ports/espressif/boards/m5stack_atom_lite/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_lite/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # diff --git a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig index 474a760b56..55e5bd3a94 100644 --- a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # diff --git a/ports/espressif/boards/m5stack_atom_u/sdkconfig b/ports/espressif/boards/m5stack_atom_u/sdkconfig index 90c99459a8..9d47d05b4f 100644 --- a/ports/espressif/boards/m5stack_atom_u/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_u/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # diff --git a/ports/espressif/boards/m5stack_core_basic/sdkconfig b/ports/espressif/boards/m5stack_core_basic/sdkconfig index a4cedd8e81..44896d5883 100644 --- a/ports/espressif/boards/m5stack_core_basic/sdkconfig +++ b/ports/espressif/boards/m5stack_core_basic/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n CONFIG_ESP32_REV_MIN_3=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk index 82e462012c..50e57c1c3c 100644 --- a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk @@ -7,3 +7,5 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESPCAMERA = 0 + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/m5stack_core_fire/sdkconfig b/ports/espressif/boards/m5stack_core_fire/sdkconfig index d77fe64525..f228750600 100644 --- a/ports/espressif/boards/m5stack_core_fire/sdkconfig +++ b/ports/espressif/boards/m5stack_core_fire/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_ESP32_REV_MIN_3=y # diff --git a/ports/espressif/boards/maker_badge/sdkconfig b/ports/espressif/boards/maker_badge/sdkconfig index 68689ed79e..8af8e2c9d2 100644 --- a/ports/espressif/boards/maker_badge/sdkconfig +++ b/ports/espressif/boards/maker_badge/sdkconfig @@ -1,5 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=n - # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Maker_badge" diff --git a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk index e5a7f05462..226d901a3a 100644 --- a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index 4b617fee71..5d4c11ef15 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/mixgo_ce_serial/sdkconfig b/ports/espressif/boards/mixgo_ce_serial/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/mixgo_ce_serial/sdkconfig +++ b/ports/espressif/boards/mixgo_ce_serial/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/mixgo_ce_udisk/sdkconfig b/ports/espressif/boards/mixgo_ce_udisk/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/mixgo_ce_udisk/sdkconfig +++ b/ports/espressif/boards/mixgo_ce_udisk/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig index 6de15d1556..55199905be 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig +++ b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk index f008241e19..2071da3fed 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig index 9b513fcf5a..ec22fcdb44 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig @@ -1,5 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk index 44546fc09f..26722a30ea 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig index 17c1995cd3..9268947220 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig index 84cf45aa83..8457338560 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig index b7bb11fdd5..6eda3c0adb 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig index 5b9c86dcc3..3525371bc7 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig @@ -1,4 +1,3 @@ -# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk index 6ef620ac50..2fd0d3e909 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig index f19afafa3d..1dd865e63c 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk index 1d48ea1076..2d6c60b5e2 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_BITBANG_APA102 = 1 # Include these Python libraries in firmware. # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig index 8d785a6004..bb19189a5c 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk index 2b78e51635..e72ee2f6cd 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_BITBANG_NEOPIXEL = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig index 4a5990b91d..c336cdb290 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk index 1d48ea1076..2d6c60b5e2 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_BITBANG_APA102 = 1 # Include these Python libraries in firmware. # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index 8d785a6004..bb19189a5c 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk index 666185b6fd..cb8a4124f3 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 16MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig index ec989c08fc..0c8ea2c5ec 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config diff --git a/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk index bf6e7a5105..26e59a8edd 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 16MB # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig index eeb103fb7d..1a228e03d0 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk index e26981465b..61d34359dd 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig index 2d4d0d4ecc..6f14e60fc1 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig @@ -6,7 +6,6 @@ # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y # CONFIG_SPIRAM_SIZE is not set -CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_SPIRAM_SPEED_80M=y CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk index f3d9ea4c92..68879b1cd3 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig index 2d4d0d4ecc..6f14e60fc1 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig @@ -6,7 +6,6 @@ # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y # CONFIG_SPIRAM_SIZE is not set -CONFIG_ESP32_SPIRAM_SUPPORT=y CONFIG_SPIRAM_SPEED_80M=y CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk index 39a9c38b36..eec4bc1bbf 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_STAGE = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig index 8539cb7519..d3c9bace86 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk index 716a45b5ca..a66db4d19d 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_STAGE = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig index 0ac438450d..15249009ea 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk index e65760ec68..a6b9c35b52 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk @@ -9,3 +9,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig index 836fd46764..cf10a34d5b 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk index 2db911fb26..7e4fdbb3c2 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index d3b55b5b42..6f2b730e36 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -7,6 +7,9 @@ INTERNAL_LIBM = 1 # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ +# Default to no-psram +CIRCUITPY_ESP_PSRAM_SIZE ?= 0 + # Enable more features CIRCUITPY_FULL_BUILD ?= 1 From 7b9c87e43239425f572b823d60c2d19adb1cd2d7 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:48:42 +0530 Subject: [PATCH 064/129] update espressif ble sdkconfig --- .../esp-idf-config/sdkconfig-ble.defaults | 164 +----------------- 1 file changed, 8 insertions(+), 156 deletions(-) diff --git a/ports/espressif/esp-idf-config/sdkconfig-ble.defaults b/ports/espressif/esp-idf-config/sdkconfig-ble.defaults index 8180786fbf..a2ff691212 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-ble.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-ble.defaults @@ -1,164 +1,16 @@ -# -# Component config -# -# -# Bluetooth +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # CONFIG_BT_ENABLED=y -# -# Bluetooth controller -# -CONFIG_BT_CTRL_MODE_EFF=1 -CONFIG_BT_CTRL_BLE_MAX_ACT=10 -CONFIG_BT_CTRL_BLE_MAX_ACT_EFF=10 -CONFIG_BT_CTRL_BLE_STATIC_ACL_TX_BUF_NB=0 -CONFIG_BT_CTRL_PINNED_TO_CORE=0 -CONFIG_BT_CTRL_HCI_MODE_VHCI=y -# CONFIG_BT_CTRL_HCI_MODE_UART_H4 is not set -CONFIG_BT_CTRL_HCI_TL=1 -CONFIG_BT_CTRL_ADV_DUP_FILT_MAX=30 -# CONFIG_BT_CTRL_HW_CCA is not set -CONFIG_BT_CTRL_HW_CCA_VAL=20 -CONFIG_BT_CTRL_HW_CCA_EFF=0 -CONFIG_BT_CTRL_CE_LENGTH_TYPE_ORIG=y -# CONFIG_BT_CTRL_CE_LENGTH_TYPE_CE is not set -# CONFIG_BT_CTRL_CE_LENGTH_TYPE_SD is not set -CONFIG_BT_CTRL_CE_LENGTH_TYPE_EFF=0 -CONFIG_BT_CTRL_TX_ANTENNA_INDEX_0=y -# CONFIG_BT_CTRL_TX_ANTENNA_INDEX_1 is not set -CONFIG_BT_CTRL_TX_ANTENNA_INDEX_EFF=0 -CONFIG_BT_CTRL_RX_ANTENNA_INDEX_0=y -# CONFIG_BT_CTRL_RX_ANTENNA_INDEX_1 is not set -CONFIG_BT_CTRL_RX_ANTENNA_INDEX_EFF=0 -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N27 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N24 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N21 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N18 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N15 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N12 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N9 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N3 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_N0 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P3=y -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P6 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P9 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P12 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P15 is not set -# CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_P18 is not set -CONFIG_BT_CTRL_DFT_TX_POWER_LEVEL_EFF=10 -CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y -CONFIG_BT_CTRL_BLE_ADV_REPORT_FLOW_CTRL_NUM=100 -CONFIG_BT_CTRL_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 -# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set -# CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EN is not set -CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_DIS=y -CONFIG_BT_CTRL_COEX_PHY_CODED_TX_RX_TLIM_EFF=0 -# -# MODEM SLEEP Options -# -# CONFIG_BT_CTRL_MODEM_SLEEP is not set -# end of MODEM SLEEP Options - -CONFIG_BT_CTRL_SLEEP_MODE_EFF=0 -CONFIG_BT_CTRL_SLEEP_CLOCK_EFF=0 -CONFIG_BT_CTRL_HCI_TL_EFF=1 -# CONFIG_BT_CTRL_AGC_RECORRECT_EN is not set -# end of Bluetooth controller - -# CONFIG_BT_BLUEDROID_ENABLED is not set CONFIG_BT_NIMBLE_ENABLED=y -# CONFIG_BT_CONTROLLER_ONLY is not set -# -# NimBLE Options -# -CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y -# CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_DEFAULT is not set -# CONFIG_BT_NIMBLE_LOG_LEVEL_NONE is not set -# CONFIG_BT_NIMBLE_LOG_LEVEL_ERROR is not set -# CONFIG_BT_NIMBLE_LOG_LEVEL_WARNING is not set -CONFIG_BT_NIMBLE_LOG_LEVEL_INFO=y -# CONFIG_BT_NIMBLE_LOG_LEVEL_DEBUG is not set -CONFIG_BT_NIMBLE_LOG_LEVEL=1 -CONFIG_BT_NIMBLE_MAX_CONNECTIONS=3 -CONFIG_BT_NIMBLE_MAX_BONDS=3 -CONFIG_BT_NIMBLE_MAX_CCCDS=8 -CONFIG_BT_NIMBLE_L2CAP_COC_MAX_NUM=0 -CONFIG_BT_NIMBLE_TASK_STACK_SIZE=4096 -CONFIG_BT_NIMBLE_ROLE_CENTRAL=y -CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_BT_NIMBLE_ROLE_BROADCASTER=y -CONFIG_BT_NIMBLE_ROLE_OBSERVER=y + +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y + CONFIG_BT_NIMBLE_NVS_PERSIST=y -CONFIG_BT_NIMBLE_SM_LEGACY=y -CONFIG_BT_NIMBLE_SM_SC=y -# CONFIG_BT_NIMBLE_DEBUG is not set -# CONFIG_BT_NIMBLE_SM_SC_DEBUG_KEYS is not set -CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME="nimble" -CONFIG_BT_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31 -CONFIG_BT_NIMBLE_ATT_PREFERRED_MTU=256 -CONFIG_BT_NIMBLE_SVC_GAP_APPEARANCE=0 + CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 -CONFIG_BT_NIMBLE_ACL_BUF_SIZE=255 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 -CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 -CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 -CONFIG_BT_NIMBLE_MSYS1_BLOCK_COUNT=12 -# CONFIG_BT_NIMBLE_HS_FLOW_CTRL is not set -CONFIG_BT_NIMBLE_RPA_TIMEOUT=900 -# CONFIG_BT_NIMBLE_MESH is not set -CONFIG_BT_NIMBLE_CRYPTO_STACK_MBEDTLS=y -CONFIG_BT_NIMBLE_HS_STOP_TIMEOUT_MS=2000 -# CONFIG_BT_NIMBLE_HOST_BASED_PRIVACY is not set -CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=y -CONFIG_BT_NIMBLE_MAX_CONN_REATTEMPT=3 + CONFIG_BT_NIMBLE_EXT_ADV=y -CONFIG_BT_NIMBLE_MAX_EXT_ADV_INSTANCES=1 -CONFIG_BT_NIMBLE_MAX_EXT_ADV_DATA_LEN=1650 -CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV=y -CONFIG_BT_NIMBLE_MAX_PERIODIC_SYNCS=1 -# CONFIG_BT_NIMBLE_BLUFI_ENABLE is not set -CONFIG_BT_NIMBLE_USE_ESP_TIMER=y -# end of NimBLE Options -# end of Bluetooth - -# end of Component config - -# -# Deprecated options for backward compatibility -# -# CONFIG_BLUEDROID_ENABLED is not set -CONFIG_NIMBLE_ENABLED=y -CONFIG_NIMBLE_MEM_ALLOC_MODE_INTERNAL=y -# CONFIG_NIMBLE_MEM_ALLOC_MODE_DEFAULT is not set -CONFIG_NIMBLE_MAX_CONNECTIONS=3 -CONFIG_NIMBLE_MAX_BONDS=3 -CONFIG_NIMBLE_MAX_CCCDS=8 -CONFIG_NIMBLE_L2CAP_COC_MAX_NUM=0 -CONFIG_NIMBLE_TASK_STACK_SIZE=4096 -CONFIG_NIMBLE_ROLE_CENTRAL=y -CONFIG_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_NIMBLE_ROLE_BROADCASTER=y -CONFIG_NIMBLE_ROLE_OBSERVER=y -CONFIG_NIMBLE_NVS_PERSIST=y -CONFIG_NIMBLE_SM_LEGACY=y -CONFIG_NIMBLE_SM_SC=y -# CONFIG_NIMBLE_DEBUG is not set -# CONFIG_NIMBLE_SM_SC_DEBUG_KEYS is not set -CONFIG_NIMBLE_SVC_GAP_DEVICE_NAME="nimble" -CONFIG_NIMBLE_GAP_DEVICE_NAME_MAX_LEN=31 -CONFIG_NIMBLE_ATT_PREFERRED_MTU=256 -CONFIG_NIMBLE_SVC_GAP_APPEARANCE=0 -CONFIG_NIMBLE_ACL_BUF_COUNT=20 -CONFIG_NIMBLE_ACL_BUF_SIZE=255 -CONFIG_NIMBLE_HCI_EVT_BUF_SIZE=70 -CONFIG_NIMBLE_HCI_EVT_HI_BUF_COUNT=30 -CONFIG_NIMBLE_HCI_EVT_LO_BUF_COUNT=8 -CONFIG_NIMBLE_MSYS1_BLOCK_COUNT=12 -# CONFIG_NIMBLE_HS_FLOW_CTRL is not set -CONFIG_NIMBLE_RPA_TIMEOUT=900 -# CONFIG_NIMBLE_MESH is not set -CONFIG_NIMBLE_CRYPTO_STACK_MBEDTLS=y -CONFIG_SW_COEXIST_ENABLE=y -# end of Deprecated options for backward compatibility +CONFIG_BT_CTRL_BLE_SCAN_DUPL=n From 242a720593285aad911ca504a07bbfd2500f16e3 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:50:12 +0530 Subject: [PATCH 065/129] fix psram crash --- ports/espressif/common-hal/espidf/__init__.c | 10 +--------- .../espressif/esp-idf-config/sdkconfig-debug.defaults | 2 +- ports/espressif/esp-idf-config/sdkconfig.defaults | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index bbf60f9dc3..a45964054d 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -44,7 +44,6 @@ #else #define esp_himem_reserved_area_size() (0) #endif -bool ok_to_reserve_psram = true; size_t reserved_psram = DEFAULT_RESERVED_PSRAM; #endif @@ -63,9 +62,6 @@ bool common_hal_espidf_set_reserved_psram(size_t amount) { if (!esp_psram_is_initialized()) { return false; } - if (!ok_to_reserve_psram) { - return false; - } if (amount > psram_size_usable()) { return false; } @@ -113,11 +109,7 @@ size_t common_hal_espidf_get_total_psram(void) { intptr_t common_hal_espidf_get_psram_start(void) { #ifdef CONFIG_SPIRAM if (esp_psram_is_initialized()) { - #ifdef CONFIG_IDF_TARGET_ESP32 return SOC_EXTRAM_DATA_LOW; - #else - return SOC_EXTRAM_DATA_HIGH - psram_size_usable(); - #endif } #endif return 0; @@ -126,7 +118,7 @@ intptr_t common_hal_espidf_get_psram_start(void) { intptr_t common_hal_espidf_get_psram_end(void) { #ifdef CONFIG_SPIRAM if (esp_psram_is_initialized()) { - return common_hal_espidf_get_psram_start() + psram_size_usable(); + return SOC_EXTRAM_DATA_LOW + psram_size_usable(); } #endif return 0; diff --git a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults index bef5ee5fe8..69f4d43289 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults @@ -61,7 +61,7 @@ CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y # Hardware Abstraction Layer (HAL) and Low Level (LL) # # CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_SILENT is not set # CONFIG_HAL_ASSERTION_ENABLE is not set CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 # end of Hardware Abstraction Layer (HAL) and Low Level (LL) diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index a7bcc25081..c3c32a1fa3 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -6,7 +6,7 @@ CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 -CONFIG_ESP_TASK_WDT=n +CONFIG_ESP_TASK_WDT_INIT=n CONFIG_ESP_TLS_SERVER=y From c38972b51ce6f1e2c9f3b57ddd0f1269a9b94824 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:38:58 +0530 Subject: [PATCH 066/129] update ulp implementation --- ports/espressif/Makefile | 2 +- ports/espressif/common-hal/espulp/ULP.c | 45 ++++++++++++++----- ports/espressif/common-hal/espulp/ULPAlarm.c | 16 ++++--- .../esp-idf-config/sdkconfig-esp32s2.defaults | 1 - .../esp-idf-config/sdkconfig-esp32s3.defaults | 1 - ports/espressif/mpconfigport.mk | 2 - 6 files changed, 44 insertions(+), 23 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 4cf27b47e3..3a92d0b9b6 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -104,7 +104,7 @@ INC += \ -isystem esp-idf/components/soc/include \ -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ -isystem esp-idf/components/spi_flash/include \ - -isystem esp-idf/components/ulp/include \ + -isystem esp-idf/components/ulp/ulp_fsm/include \ -isystem esp-idf/components/ulp/ulp_riscv/include \ -isystem esp-idf/components/ulp/ulp_common/include \ -isystem esp-idf/components/ulp/ulp_common/include/$(IDF_TARGET) \ diff --git a/ports/espressif/common-hal/espulp/ULP.c b/ports/espressif/common-hal/espulp/ULP.c index e8400d77e7..2af3142ff2 100644 --- a/ports/espressif/common-hal/espulp/ULP.c +++ b/ports/espressif/common-hal/espulp/ULP.c @@ -90,16 +90,18 @@ void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t ulp_set_wakeup_period(0, 20000); switch (self->arch) { + #ifdef CONFIG_ULP_COPROC_TYPE_FSM case FSM: ulp_load_binary(0, (const uint8_t *)program, length); ulp_run(0); break; + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV case RISCV: - #ifndef CONFIG_IDF_TARGET_ESP32 ulp_riscv_load_binary((const uint8_t *)program, length); ulp_riscv_run(); break; - #endif + #endif default: mp_raise_NotImplementedError(NULL); break; @@ -107,12 +109,23 @@ void common_hal_espulp_ulp_run(espulp_ulp_obj_t *self, uint32_t *program, size_t } void common_hal_espulp_ulp_halt(espulp_ulp_obj_t *self) { - #ifdef CONFIG_IDF_TARGET_ESP32 - mp_raise_NotImplementedError(NULL); - #else - ulp_riscv_timer_stop(); - ulp_riscv_halt(); - #endif + switch (self->arch) { + /* + #ifdef CONFIG_ULP_COPROC_TYPE_FSM + case FSM: + break; + #endif + */ + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV + case RISCV: + ulp_riscv_timer_stop(); + ulp_riscv_halt(); + break; + #endif + default: + mp_raise_NotImplementedError(NULL); + break; + } // Release pins we were using. for (uint8_t i = 0; i < 32; i++) { @@ -130,11 +143,19 @@ void common_hal_espulp_ulp_construct(espulp_ulp_obj_t *self, espulp_architecture mp_raise_ValueError_varg(translate("%q in use"), MP_QSTR_ULP); } - #ifdef CONFIG_IDF_TARGET_ESP32 - if (self->arch == RISCV) { - mp_raise_NotImplementedError(NULL); + switch (self->arch) { + #ifdef CONFIG_ULP_COPROC_TYPE_FSM + case FSM: + break; + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV + case RISCV: + break; + #endif + default: + mp_raise_NotImplementedError(NULL); + break; } - #endif self->arch = arch; self->inited = true; diff --git a/ports/espressif/common-hal/espulp/ULPAlarm.c b/ports/espressif/common-hal/espulp/ULPAlarm.c index f6c3de66b7..798d86ce29 100644 --- a/ports/espressif/common-hal/espulp/ULPAlarm.c +++ b/ports/espressif/common-hal/espulp/ULPAlarm.c @@ -81,20 +81,22 @@ void espulp_ulpalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, con // enable ulp interrupt switch (alarm->ulp->arch) { + #ifdef CONFIG_ULP_COPROC_TYPE_FSM case FSM: #ifdef CONFIG_IDF_TARGET_ESP32 - rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_RAW); + rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_RAW, 0); #else - rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_ST); + rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_ULP_CP_INT_ST, 0); #endif REG_SET_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_ULP_CP_INT_ENA); break; + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV case RISCV: - #ifndef CONFIG_IDF_TARGET_ESP32 - rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_COCPU_INT_ST); + rtc_isr_register(&ulp_interrupt, NULL, RTC_CNTL_COCPU_INT_ST, 0); REG_SET_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_COCPU_INT_ENA); break; - #endif + #endif default: mp_raise_NotImplementedError(NULL); break; @@ -110,8 +112,10 @@ void espulp_ulpalarm_prepare_for_deep_sleep(void) { // disable ulp interrupt rtc_isr_deregister(&ulp_interrupt, NULL); + #ifdef CONFIG_ULP_COPROC_TYPE_FSM REG_CLR_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_ULP_CP_INT_ENA); - #ifndef CONFIG_IDF_TARGET_ESP32 + #endif + #ifdef CONFIG_ULP_COPROC_TYPE_RISCV REG_CLR_BIT(RTC_CNTL_INT_ENA_REG, RTC_CNTL_COCPU_INT_ENA); #endif diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 6bcded2a0d..527ab89e58 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -7,5 +7,4 @@ CONFIG_ESP32S2_DATA_CACHE_16KB=y CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y CONFIG_ULP_COPROC_ENABLED=y -CONFIG_ULP_COPROC_TYPE_RISCV=y CONFIG_ULP_COPROC_RESERVE_MEM=8176 diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 30dea89201..747d2ba729 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -8,5 +8,4 @@ CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y CONFIG_ULP_COPROC_ENABLED=y -CONFIG_ULP_COPROC_TYPE_RISCV=y CONFIG_ULP_COPROC_RESERVE_MEM=8176 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 6f2b730e36..52399b1640 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -48,8 +48,6 @@ CIRCUITPY_WIFI ?= 1 ifeq ($(IDF_TARGET),esp32) # Modules CIRCUITPY_BLEIO = 0 -CIRCUITPY_ESPULP = 0 -CIRCUITPY_MEMORYMAP = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX = 0 # Features From 02da5ca22f6c1dea3a875ff14c841487015a315e Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:42:45 +0530 Subject: [PATCH 067/129] update espressif ci --- .github/actions/deps/external/action.yml | 6 +----- requirements-dev.txt | 3 ++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/actions/deps/external/action.yml b/.github/actions/deps/external/action.yml index a26579b53d..2d6f65eeff 100644 --- a/.github/actions/deps/external/action.yml +++ b/.github/actions/deps/external/action.yml @@ -37,11 +37,7 @@ runs: - name: Install IDF tools if: inputs.port == 'espressif' run: | - echo "Installing ESP-IDF tools" - $IDF_PATH/tools/idf_tools.py --non-interactive install required - $IDF_PATH/tools/idf_tools.py --non-interactive install cmake - echo "Installing Python environment and packages" - $IDF_PATH/tools/idf_tools.py --non-interactive install-python-env + $IDF_PATH/install.sh rm -rf $IDF_TOOLS_PATH/dist shell: bash - name: Set environment diff --git a/requirements-dev.txt b/requirements-dev.txt index 5efa084652..7d5766ec5a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -25,7 +25,8 @@ intelhex pyelftools # for mbedtls certificate store -cryptography +# version limit due to espressif +cryptography<36.1,>=2.1.4 # for web workflow minify minify_html From 8feb3bad29960d69fcba7e4a05cbab4b71f9456b Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 2 Mar 2023 17:15:57 +0530 Subject: [PATCH 068/129] refactor board config files --- .../boards/adafruit_feather_esp32s2/sdkconfig | 4 ++-- .../adafruit_feather_esp32s2_reverse_tft/sdkconfig | 5 ++--- .../boards/adafruit_feather_esp32s2_tft/sdkconfig | 4 ++-- .../sdkconfig | 4 ++-- .../mpconfigboard.mk | 1 + .../adafruit_feather_esp32s3_reverse_tft/sdkconfig | 11 ++--------- .../boards/adafruit_feather_esp32s3_tft/sdkconfig | 4 ++-- ports/espressif/boards/adafruit_funhouse/sdkconfig | 4 ++-- .../boards/adafruit_huzzah32_breakout/sdkconfig | 1 - .../boards/adafruit_magtag_2.9_grayscale/sdkconfig | 4 ++-- .../espressif/boards/adafruit_metro_esp32s2/sdkconfig | 4 ++-- .../espressif/boards/adafruit_qtpy_esp32s2/sdkconfig | 4 ++-- .../boards/ai_thinker_esp_12k_nodemcu/sdkconfig | 4 ++-- ports/espressif/boards/artisense_rd00/sdkconfig | 4 ++-- ports/espressif/boards/atmegazero_esp32s2/sdkconfig | 4 ++-- ports/espressif/boards/bpi_bit_s2/sdkconfig | 4 ++-- ports/espressif/boards/bpi_leaf_s3/sdkconfig | 4 ++-- ports/espressif/boards/bpi_picow_s3/sdkconfig | 4 ++-- .../boards/brainboardz_neuron/mpconfigboard.mk | 8 +++++--- ports/espressif/boards/brainboardz_neuron/sdkconfig | 5 ++--- ports/espressif/boards/crumpspace_crumps2/sdkconfig | 4 ++-- .../boards/cytron_maker_feather_aiot_s3/sdkconfig | 4 ++-- ports/espressif/boards/deneyap_mini_v2/sdkconfig | 4 ++-- .../boards/espressif_esp32_lyrat/mpconfigboard.mk | 2 ++ .../espressif/boards/espressif_esp32_lyrat/sdkconfig | 1 - .../boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig | 4 ++-- .../boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig | 4 ++-- .../espressif/boards/espressif_esp32s3_box/sdkconfig | 4 ++-- .../boards/espressif_esp32s3_box_lite/sdkconfig | 4 ++-- .../mpconfigboard.mk | 8 +++++--- .../espressif_esp32s3_devkitc_1_n32r8/sdkconfig | 5 ++--- .../boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig | 4 ++-- .../boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig | 4 ++-- .../espressif/boards/espressif_esp32s3_eye/sdkconfig | 4 ++-- .../espressif/boards/espressif_hmi_devkit_1/sdkconfig | 4 ++-- ports/espressif/boards/espressif_kaluga_1.3/sdkconfig | 4 ++-- ports/espressif/boards/espressif_kaluga_1/sdkconfig | 4 ++-- .../boards/espressif_saola_1_wrover/sdkconfig | 4 ++-- .../boards/franzininho_wifi_wrover/sdkconfig | 4 ++-- ports/espressif/boards/gravitech_cucumber_r/sdkconfig | 4 ++-- .../espressif/boards/gravitech_cucumber_rs/sdkconfig | 4 ++-- ports/espressif/boards/hexky_s2/sdkconfig | 4 ++-- ports/espressif/boards/hiibot_iots2/sdkconfig | 4 ++-- .../boards/lilygo_tembed_esp32s3/mpconfigboard.mk | 2 ++ .../espressif/boards/lilygo_tembed_esp32s3/sdkconfig | 5 ++--- ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig | 4 ++-- .../boards/lilygo_ttgo_t8_s2_st7789/sdkconfig | 4 ++-- ports/espressif/boards/lolin_s2_mini/sdkconfig | 4 ++-- ports/espressif/boards/lolin_s2_pico/sdkconfig | 4 ++-- ports/espressif/boards/lolin_s3/sdkconfig | 4 ++-- ports/espressif/boards/m5stack_stick_c/sdkconfig | 3 --- ports/espressif/boards/microdev_micro_s2/sdkconfig | 4 ++-- .../boards/muselab_nanoesp32_s2_wrover/sdkconfig | 4 ++-- .../espressif/boards/odt_pixelwing_esp32_s2/sdkconfig | 4 ++-- .../boards/targett_module_clip_wrover/sdkconfig | 4 ++-- .../boards/unexpectedmaker_feathers2/sdkconfig | 4 ++-- .../boards/unexpectedmaker_feathers2_neo/sdkconfig | 4 ++-- .../unexpectedmaker_feathers2_prerelease/sdkconfig | 4 ++-- .../boards/unexpectedmaker_feathers3/sdkconfig | 4 ++-- .../espressif/boards/unexpectedmaker_pros3/sdkconfig | 4 ++-- .../espressif/boards/unexpectedmaker_tinys2/sdkconfig | 4 ++-- .../espressif/boards/unexpectedmaker_tinys3/sdkconfig | 4 ++-- .../boards/waveshare_esp32_s2_pico_lcd/sdkconfig | 4 ++-- .../espressif/boards/waveshare_esp32s2_pico/sdkconfig | 4 ++-- 64 files changed, 127 insertions(+), 134 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig index 05ba1165ce..0d9f0ca518 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig @@ -14,8 +14,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig index f19afafa3d..d151cecdfb 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # # SPI RAM config # @@ -9,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig index c57eb874f5..5d5860b546 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig @@ -16,8 +16,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index d027443f56..1f9a938a4a 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -11,3 +11,4 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig index 9a05ab0205..abdca6408c 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig @@ -1,11 +1,4 @@ # -# Component config -# -# -# ESP32S3-Specific -# -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# # SPI RAM config # CONFIG_SPIRAM_MODE_QUAD=y @@ -18,8 +11,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig index c57eb874f5..5d5860b546 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig @@ -16,8 +16,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/adafruit_funhouse/sdkconfig +++ b/ports/espressif/boards/adafruit_funhouse/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig b/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig index 6c0168c829..645ab76c47 100644 --- a/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig +++ b/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_SPIRAM_SUPPORT=n # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins ### # diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig index 7fc45aa53c..1113345a50 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig index 2f49953401..eacb2e75aa 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig index 9e0661d58c..f776ea85a1 100644 --- a/ports/espressif/boards/artisense_rd00/sdkconfig +++ b/ports/espressif/boards/artisense_rd00/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig index bbff53d4ea..6fa27c4eb2 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig +++ b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/bpi_bit_s2/sdkconfig b/ports/espressif/boards/bpi_bit_s2/sdkconfig index eae059c787..7f9c6f5138 100644 --- a/ports/espressif/boards/bpi_bit_s2/sdkconfig +++ b/ports/espressif/boards/bpi_bit_s2/sdkconfig @@ -10,11 +10,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/bpi_leaf_s3/sdkconfig b/ports/espressif/boards/bpi_leaf_s3/sdkconfig index c7a8bab198..ee0414205d 100644 --- a/ports/espressif/boards/bpi_leaf_s3/sdkconfig +++ b/ports/espressif/boards/bpi_leaf_s3/sdkconfig @@ -16,8 +16,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/bpi_picow_s3/sdkconfig b/ports/espressif/boards/bpi_picow_s3/sdkconfig index 9d42f33f56..6a97d1351c 100644 --- a/ports/espressif/boards/bpi_picow_s3/sdkconfig +++ b/ports/espressif/boards/bpi_picow_s3/sdkconfig @@ -16,8 +16,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk index 1083b18264..05a5eb3367 100755 --- a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk +++ b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk @@ -6,6 +6,8 @@ USB_MANUFACTURER = "BrainBoardz" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE=dio -CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=8MB +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/brainboardz_neuron/sdkconfig b/ports/espressif/boards/brainboardz_neuron/sdkconfig index 39bd2cdb4e..16c84dd988 100755 --- a/ports/espressif/boards/brainboardz_neuron/sdkconfig +++ b/ports/espressif/boards/brainboardz_neuron/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # @@ -9,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig index af05b7fbf2..9fa2385f37 100644 --- a/ports/espressif/boards/crumpspace_crumps2/sdkconfig +++ b/ports/espressif/boards/crumpspace_crumps2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig index e7c5b643b2..d9cbd73072 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/deneyap_mini_v2/sdkconfig b/ports/espressif/boards/deneyap_mini_v2/sdkconfig index 613b744ef2..f202775431 100644 --- a/ports/espressif/boards/deneyap_mini_v2/sdkconfig +++ b/ports/espressif/boards/deneyap_mini_v2/sdkconfig @@ -9,11 +9,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk index e9fcd24e61..f618b436c4 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk @@ -7,4 +7,6 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 4MB + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig b/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig index 4b2981ba62..e0db0b9800 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y # SPI RAM config # CONFIG_SPIRAM_TYPE_AUTO=y diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig index 8c82c9c70d..705eeb1a61 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig @@ -10,11 +10,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig index 8c82c9c70d..705eeb1a61 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig @@ -10,11 +10,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index 99432b359a..5fd3cc3b49 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -6,11 +6,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig index 99432b359a..5fd3cc3b49 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig @@ -6,11 +6,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk index 78423955bb..2fa3a5d115 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk @@ -5,6 +5,8 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE=dout -CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=32MB +CIRCUITPY_ESP_FLASH_MODE = dout +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 32MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig index f915462e11..0b6abf41cf 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # @@ -9,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig index 3a99cc3c44..ad74ab5f04 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig @@ -16,8 +16,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig index e7c5b643b2..d9cbd73072 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig index 18eca34cb2..285e2879bb 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig +++ b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/espressif_kaluga_1/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig index 41e00d746a..a7be128ca5 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig index 45f96a6600..e176aa8613 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/hexky_s2/sdkconfig b/ports/espressif/boards/hexky_s2/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/hexky_s2/sdkconfig +++ b/ports/espressif/boards/hexky_s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/hiibot_iots2/sdkconfig b/ports/espressif/boards/hiibot_iots2/sdkconfig index 1120f8099f..05249a050c 100644 --- a/ports/espressif/boards/hiibot_iots2/sdkconfig +++ b/ports/espressif/boards/hiibot_iots2/sdkconfig @@ -11,8 +11,8 @@ CONFIG_SPIRAM_SIZE=8388608 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk b/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk index 2b8f67b560..8fb5099d61 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig b/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig index f508f4a67c..d9cbd73072 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig @@ -1,4 +1,3 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # @@ -9,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM Clock and CS IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig index 9e7a21dee3..924d863dad 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig index 9e7a21dee3..924d863dad 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig index a6ec1f0078..0db55cbb67 100644 --- a/ports/espressif/boards/lolin_s2_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s2_mini/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/lolin_s2_pico/sdkconfig b/ports/espressif/boards/lolin_s2_pico/sdkconfig index b090e8f7e2..8c5ca132d3 100644 --- a/ports/espressif/boards/lolin_s2_pico/sdkconfig +++ b/ports/espressif/boards/lolin_s2_pico/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/lolin_s3/sdkconfig b/ports/espressif/boards/lolin_s3/sdkconfig index 975a05bfc2..77612d5c27 100644 --- a/ports/espressif/boards/lolin_s3/sdkconfig +++ b/ports/espressif/boards/lolin_s3/sdkconfig @@ -16,8 +16,8 @@ CONFIG_SPIRAM_SIZE=8388608 # # PSRAM Clock and CS IO for ESP32S3 # -# CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# CONFIG_DEFAULT_PSRAM_CS_IO=26 +# CONFIG_SPIRAM_CLK_IO=30 +# CONFIG_SPIRAM_CS_IO=26 # end of PSRAM Clock and CS IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/m5stack_stick_c/sdkconfig b/ports/espressif/boards/m5stack_stick_c/sdkconfig index 7ec6f90c15..7f8426e4cb 100644 --- a/ports/espressif/boards/m5stack_stick_c/sdkconfig +++ b/ports/espressif/boards/m5stack_stick_c/sdkconfig @@ -1,6 +1,3 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index 5d4c11ef15..fbb7f22e95 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig index ec22fcdb44..ff7d57ac57 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig @@ -8,8 +8,8 @@ CONFIG_SPIRAM_SIZE=2097152 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 CONFIG_SPIRAM_SPEED_40M=y diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig index 9268947220..6ff95dec02 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig index 1dd865e63c..d151cecdfb 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig index bb19189a5c..28690986cc 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig index c336cdb290..9f3970ffd4 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index bb19189a5c..28690986cc 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig index 0c8ea2c5ec..33c772e712 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig @@ -11,8 +11,8 @@ CONFIG_SPIRAM_SIZE=8388608 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig index 1a228e03d0..39a822ffc3 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig @@ -11,8 +11,8 @@ CONFIG_SPIRAM_SIZE=8388608 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig index d3c9bace86..7732382bee 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y CONFIG_SPIRAM_SIZE=2097152 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig index 15249009ea..8eb0875155 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig @@ -13,8 +13,8 @@ CONFIG_SPIRAM_SIZE=8388608 # # PSRAM clock and cs IO for ESP32S3 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S3 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig index cf10a34d5b..c6ec24e77c 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig @@ -8,11 +8,11 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 # end of SPI RAM config -CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_SPIRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig index c81fbb4837..8172e82e3c 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig @@ -2,8 +2,8 @@ # SPI RAM config # CONFIG_ESP32S2_SPIRAM_SUPPORT=y -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 +CONFIG_SPIRAM_CLK_IO=30 +CONFIG_SPIRAM_CS_IO=26 CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_MODE_QUAD=y CONFIG_SPIRAM_SIZE=8388608 From 3d2cfa162a63949dae34c4dbc4f7dbf224e5f05b Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Sun, 12 Mar 2023 01:22:22 +0530 Subject: [PATCH 069/129] enable `paralleldisplay` on `esp32` and `esp32s3` --- ports/espressif/bindings/espnow/Peer.h | 2 +- ports/espressif/common-hal/espnow/ESPNow.c | 4 ++-- ports/espressif/mpconfigport.mk | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ports/espressif/bindings/espnow/Peer.h b/ports/espressif/bindings/espnow/Peer.h index e4cb828472..8afab8e493 100644 --- a/ports/espressif/bindings/espnow/Peer.h +++ b/ports/espressif/bindings/espnow/Peer.h @@ -34,4 +34,4 @@ typedef struct { esp_now_peer_info_t peer_info; } espnow_peer_obj_t; -const mp_obj_type_t espnow_peer_type; +extern const mp_obj_type_t espnow_peer_type; diff --git a/ports/espressif/common-hal/espnow/ESPNow.c b/ports/espressif/common-hal/espnow/ESPNow.c index ff07497a30..814499b1c0 100644 --- a/ports/espressif/common-hal/espnow/ESPNow.c +++ b/ports/espressif/common-hal/espnow/ESPNow.c @@ -88,7 +88,7 @@ static void send_cb(const uint8_t *mac, esp_now_send_status_t status) { // Callback triggered when an ESP-NOW packet is received. // Write the peer MAC address and the message into the recv_buffer as an ESPNow packet. // If the buffer is full, drop the message and increment the dropped count. -static void recv_cb(const uint8_t *mac, const uint8_t *msg, int msg_len) { +static void recv_cb(const esp_now_recv_info_t *esp_now_info, const uint8_t *msg, int msg_len) { espnow_obj_t *self = MP_STATE_PORT(espnow_singleton); ringbuf_t *buf = self->recv_buffer; @@ -117,7 +117,7 @@ static void recv_cb(const uint8_t *mac, const uint8_t *msg, int msg_len) { header.time_ms = mp_hal_ticks_ms(); ringbuf_put_n(buf, (uint8_t *)&header, sizeof(header)); - ringbuf_put_n(buf, mac, ESP_NOW_ETH_ALEN); + ringbuf_put_n(buf, esp_now_info->src_addr, ESP_NOW_ETH_ALEN); ringbuf_put_n(buf, msg, msg_len); self->read_success++; diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 52399b1640..c8bfb6f7e7 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -48,7 +48,6 @@ CIRCUITPY_WIFI ?= 1 ifeq ($(IDF_TARGET),esp32) # Modules CIRCUITPY_BLEIO = 0 -CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX = 0 # Features CIRCUITPY_USB = 0 From ba22633fb080ed6bdf9e93ebf037a2511e5523d9 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Sun, 12 Mar 2023 01:23:47 +0530 Subject: [PATCH 070/129] temporarily disable `rgbmatrix` on `espressif` --- ports/espressif/mpconfigport.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index c8bfb6f7e7..21fc50c874 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -37,7 +37,8 @@ CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_MEMORYMAP ?= 1 CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 -CIRCUITPY_RGBMATRIX ?= 1 +# Disabled temporarily +CIRCUITPY_RGBMATRIX ?= 0 CIRCUITPY_ROTARYIO ?= 1 CIRCUITPY_SYNTHIO_MAX_CHANNELS ?= 12 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 From 7a7f1e6efa4c6e0ca12478d16d5bab46ced5b731 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+microdev1@users.noreply.github.com> Date: Tue, 21 Mar 2023 07:15:31 +0530 Subject: [PATCH 071/129] fix arch switch statement in ulp Co-authored-by: Casey Webb --- ports/espressif/common-hal/espulp/ULP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/espulp/ULP.c b/ports/espressif/common-hal/espulp/ULP.c index 2af3142ff2..9db001a506 100644 --- a/ports/espressif/common-hal/espulp/ULP.c +++ b/ports/espressif/common-hal/espulp/ULP.c @@ -143,7 +143,7 @@ void common_hal_espulp_ulp_construct(espulp_ulp_obj_t *self, espulp_architecture mp_raise_ValueError_varg(translate("%q in use"), MP_QSTR_ULP); } - switch (self->arch) { + switch (arch) { #ifdef CONFIG_ULP_COPROC_TYPE_FSM case FSM: break; From e90c07ed878a01eae639bd1a99242b2a736c3a2c Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 11 Aug 2023 17:38:59 -0700 Subject: [PATCH 072/129] More esp fixing --- ports/espressif/CMakeLists.txt | 2 +- ports/espressif/boards/adafruit_esp32s3_camera/board.c | 6 +++--- .../boards/adafruit_esp32s3_camera/mpconfigboard.mk | 1 + ports/espressif/common-hal/espulp/ULP.c | 4 ++-- ports/espressif/i2s_lcd_driver.h | 0 5 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 ports/espressif/i2s_lcd_driver.h diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index f129b8b4bf..588539f9f9 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -6,7 +6,7 @@ set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf) # The component list here determines what options we get in menuconfig and what the ninja file can build. set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp_lcd) -set(EXTRA_COMPONENT_DIRS esp-protocols/components/mdns) +set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns") list(APPEND EXTRA_COMPONENT_DIRS "esp32-camera") diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/board.c b/ports/espressif/boards/adafruit_esp32s3_camera/board.c index 65042bcea5..83396b81a2 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/board.c +++ b/ports/espressif/boards/adafruit_esp32s3_camera/board.c @@ -87,7 +87,7 @@ static void io_expander_backlight_init(void) { i2c_master_write_byte(cmd, AW9523_REG_SOFTRESET, true); i2c_master_write_byte(cmd, 0, true); i2c_master_stop(cmd); - i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); cmd = i2c_cmd_link_create(); @@ -97,7 +97,7 @@ static void io_expander_backlight_init(void) { i2c_master_write_byte(cmd, AW9523_DEFAULT_CONFIG >> 8, true); i2c_master_write_byte(cmd, AW9523_DEFAULT_CONFIG & 0xff, true); i2c_master_stop(cmd); - i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); cmd = i2c_cmd_link_create(); @@ -107,7 +107,7 @@ static void io_expander_backlight_init(void) { i2c_master_write_byte(cmd, AW9523_DEFAULT_OUTPUT >> 8, true); i2c_master_write_byte(cmd, AW9523_DEFAULT_OUTPUT & 0xff, true); i2c_master_stop(cmd); - i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_PERIOD_MS); i2c_cmd_link_delete(cmd); i2c_driver_delete(i2c_num); diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index 6b94c979dc..d6538cb8f0 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -8,6 +8,7 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB FLASH_SDKCONFIG = esp-idf-config/sdkconfig-4MB-1ota.defaults CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/espressif/common-hal/espulp/ULP.c b/ports/espressif/common-hal/espulp/ULP.c index 9db001a506..d8bb0be597 100644 --- a/ports/espressif/common-hal/espulp/ULP.c +++ b/ports/espressif/common-hal/espulp/ULP.c @@ -35,11 +35,11 @@ #define ULP_COPROC_RESERVE_MEM (CONFIG_ESP32_ULP_COPROC_RESERVE_MEM) #elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/ulp.h" -#include "esp32s2/ulp_riscv.h" +#include "ulp_riscv.h" #define ULP_COPROC_RESERVE_MEM (CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM) #elif defined(CONFIG_IDF_TARGET_ESP32S3) #include "esp32s3/ulp.h" -#include "esp32s3/ulp_riscv.h" +#include "ulp_riscv.h" #define ULP_COPROC_RESERVE_MEM (CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM) #endif diff --git a/ports/espressif/i2s_lcd_driver.h b/ports/espressif/i2s_lcd_driver.h deleted file mode 100644 index e69de29bb2..0000000000 From feabf7b6ceff37cef7b7fed265d36972c0b30d6f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 16 Aug 2023 10:57:25 -0700 Subject: [PATCH 073/129] Use kconfiglib in sdkconfig update script --- ports/espressif/tools/update_sdkconfig.py | 192 ++++++++++++++++------ 1 file changed, 146 insertions(+), 46 deletions(-) diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 9639e06435..f1f8612fba 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -4,6 +4,8 @@ import pathlib import click import copy +import kconfiglib +import os OPT_SETTINGS = [ "CONFIG_ESP_ERR_TO_NAME_LOOKUP", @@ -21,17 +23,14 @@ OPT_SETTINGS = [ "CONFIG_OPTIMIZATION_ASSERTION_LEVEL", "CONFIG_OPTIMIZATION_ASSERTIONS_", "CONFIG_HAL_DEFAULT_ASSERTION_LEVEL", + "CONFIG_BOOTLOADER_LOG_LEVEL", + "LOG_DEFAULT_LEVEL", ] TARGET_SETTINGS = [ "CONFIG_IDF_TARGET", "CONFIG_IDF_FIRMWARE_CHIP_ID", "CONFIG_BOOTLOADER_OFFSET_IN_FLASH", - "CONFIG_ESP32_", - "CONFIG_ESP32C3_", - "CONFIG_ESP32S2_", - "CONFIG_ESP32S3_", - "CONFIG_ESP32H2_", "CONFIG_ESP_SLEEP_POWER_DOWN_FLASH", "CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE", "CONFIG_ESP_SYSTEM_MEMPROT_", @@ -57,7 +56,6 @@ TARGET_SETTINGS = [ ] BOARD_SETTINGS = [ - "PSRAM clock and cs IO for ESP32S3", "CONFIG_SPIRAM", "CONFIG_DEFAULT_PSRAM_", "_SPIRAM_SUPPORT", @@ -102,6 +100,33 @@ def add_group(lines, last_group, current_group): return last_group +def sym_default(sym): + # Skip symbols that cannot be changed. Only check + # non-choice symbols, as selects don't affect choice + # symbols. + if not sym.choice and sym.visibility <= kconfiglib.expr_value(sym.rev_dep): + return True + + # Skip symbols whose value matches their default + if sym.str_value == sym._str_default(): + return True + + # Skip symbols that would be selected by default in a + # choice, unless the choice is optional or the symbol type + # isn't bool (it might be possible to set the choice mode + # to n or the symbol to m in those cases). + if ( + sym.choice + and not sym.choice.is_optional + and sym.choice._selection_from_defaults() is sym + and sym.orig_type is kconfiglib.BOOL + and sym.tri_value == 2 + ): + return True + + return False + + @click.command() @click.option("--debug") @click.option("--board") @@ -122,7 +147,20 @@ def update(debug, board, update_all): elif line.startswith("CIRCUITPY_ESP_FLASH_SIZE"): flash = line.split("=")[1].strip() + os.environ["IDF_TARGET"] = target + os.environ[ + "COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE" + ] = f"build-{board}/esp-idf/kconfigs_projbuild.in" + os.environ["COMPONENT_KCONFIGS_SOURCE_FILE"] = f"build-{board}/esp-idf/kconfigs.in" + + kconfig_path = pathlib.Path(f"build-{board}/esp-idf/kconfigs.in") + + kconfig_path = pathlib.Path(f"esp-idf/Kconfig") + kconfig = kconfiglib.Kconfig(kconfig_path) + input_config = pathlib.Path(f"build-{board}/esp-idf/sdkconfig") + kconfig.load_config(input_config) + default_config = pathlib.Path("esp-idf-config/sdkconfig.defaults") if debug: opt_config = pathlib.Path("esp-idf-config/sdkconfig-debug.defaults") @@ -133,11 +171,9 @@ def update(debug, board, update_all): ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") board_config = pathlib.Path(f"boards/{board}/sdkconfig") - defaults = default_config.read_text().split("\n") - defaults.extend(opt_config.read_text().split("\n")) - defaults.extend(flash_config.read_text().split("\n")) - defaults.extend(target_config.read_text().split("\n")) - defaults.extend(ble_config.read_text().split("\n")) + cp_kconfig_defaults = kconfiglib.Kconfig(kconfig_path) + for default_file in (default_config, opt_config, flash_config, target_config, ble_config): + cp_kconfig_defaults.load_config(default_file, replace=False) board_settings = [] last_board_group = None @@ -151,43 +187,107 @@ def update(debug, board, update_all): last_ble_group = None default_settings = [] last_default_group = None + current_group = [] - for line in input_config.read_text().split("\n"): - # Normalize the deprecated section labels. - if line == "# End of deprecated options": - line = "# end of Deprecated options for backward compatibility" - if ( - line.startswith("# ") - and "CONFIG_" not in line - and "DO NOT EDIT" not in line - and "Project Configuration" not in line - and len(line) > 3 - ): - if line.startswith("# end of"): - current_group.pop() + + for sym in kconfig.unique_defined_syms: + sym._visited = False + + # This merges the normal `write_config`, `write_min_config` and CP settings to split into + # different files. + pending_nodes = [kconfig.top_node] + i = 0 + while pending_nodes: + node = pending_nodes.pop() + if node is None: + current_group.pop() + continue + + if node.item is kconfiglib.MENU: + if node.prompt: + print(" " * len(current_group), i, node.prompt[0]) + i += 1 + if node.next: + pending_nodes.append(node.next) + + # if i > 300: + # break + + # We have a configuration item. + item = node.item + if isinstance(item, kconfiglib.Symbol): + if item._visited: + continue + item._visited = True + + config_string = item.config_string.strip() + if not config_string: + continue + + if node.list: + pending_nodes.append(node.list) + + matches_cp_default = cp_kconfig_defaults.syms[item.name].str_value == item.str_value + matches_esp_default = sym_default(item) + + if not matches_esp_default: + print(" " * len(current_group), i, config_string.strip()) + + target_reference = False + for referenced in item.referenced: + if referenced.name.startswith("IDF_TARGET"): + # print(item.name, "references", referenced.name) + target_reference = True + break + + if (not update_all and not matches_cp_default) or ( + update_all + and matches_group(config_string, BOARD_SETTINGS) + and not matches_esp_default + ): + print(" " * (len(current_group) + 1), "board") + last_board_group = add_group(board_settings, last_board_group, current_group) + board_settings.append(config_string) + elif update_all and not matches_esp_default: + if matches_group(config_string, OPT_SETTINGS): + print(" " * (len(current_group) + 1), "opt") + last_opt_group = add_group(opt_settings, last_opt_group, current_group) + opt_settings.append(config_string) + elif matches_group(config_string, FLASH_SETTINGS): + print(" " * (len(current_group) + 1), "flash") + last_flash_group = add_group(flash_settings, last_flash_group, current_group) + flash_settings.append(config_string) + elif target_reference or matches_group(config_string, TARGET_SETTINGS): + print(" " * (len(current_group) + 1), "target") + last_target_group = add_group( + target_settings, last_target_group, current_group + ) + target_settings.append(config_string) + elif matches_group(config_string, BLE_SETTINGS): + print(" " * (len(current_group) + 1), "ble") + last_ble_group = add_group(ble_settings, last_ble_group, current_group) + ble_settings.append(config_string) + else: + print(" " * (len(current_group) + 1), "all") + last_default_group = add_group( + default_settings, last_default_group, current_group + ) + default_settings.append(config_string) + + elif kconfiglib.expr_value(node.dep): + if item is kconfiglib.COMMENT: + print("comment", repr(item)) + elif item is kconfiglib.MENU: + # This menu isn't visible so skip to the next node. + if kconfiglib.expr_value(node.visibility) and node.list: + current_group.append(node.prompt[0]) + pending_nodes.append(None) + pending_nodes.append(node.list) + elif isinstance(item, kconfiglib.Choice): + # Choices are made up of individual symbols that we need to check. + pending_nodes.append(node.list) else: - current_group.append(line[2:]) - elif (not update_all and line not in defaults) or ( - update_all and matches_group(line, BOARD_SETTINGS) - ): - last_board_group = add_group(board_settings, last_board_group, current_group) - board_settings.append(line) - elif update_all: - if matches_group(line, OPT_SETTINGS): - last_opt_group = add_group(opt_settings, last_opt_group, current_group) - opt_settings.append(line) - elif matches_group(line, FLASH_SETTINGS): - last_flash_group = add_group(flash_settings, last_flash_group, current_group) - flash_settings.append(line) - elif matches_group(line, TARGET_SETTINGS): - last_target_group = add_group(target_settings, last_target_group, current_group) - target_settings.append(line) - elif matches_group(line, BLE_SETTINGS): - last_ble_group = add_group(ble_settings, last_ble_group, current_group) - ble_settings.append(line) - elif "CONFIG_" in line: - last_default_group = add_group(default_settings, last_default_group, current_group) - default_settings.append(line) + print("unknown", repr(item)) add_group(board_settings, last_board_group, current_group) add_group(opt_settings, last_opt_group, current_group) From 6043874969a3e12c2997be8d3d3e2aac8fbaffd2 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 24 Aug 2023 15:06:16 -0700 Subject: [PATCH 074/129] Split out ram dependent configs --- ports/espressif/tools/update_sdkconfig.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index f1f8612fba..1f91becd2b 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -234,15 +234,18 @@ def update(debug, board, update_all): print(" " * len(current_group), i, config_string.strip()) target_reference = False + board_reference = False for referenced in item.referenced: if referenced.name.startswith("IDF_TARGET"): # print(item.name, "references", referenced.name) target_reference = True break + if referenced.name == "SPIRAM": + board_reference = True if (not update_all and not matches_cp_default) or ( update_all - and matches_group(config_string, BOARD_SETTINGS) + and (matches_group(config_string, BOARD_SETTINGS) or board_reference) and not matches_esp_default ): print(" " * (len(current_group) + 1), "board") From 73e04e84a28bed61649a2c249ea658d33292095a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 29 Aug 2023 16:00:27 -0700 Subject: [PATCH 075/129] Split out flash and psram settings from sdkconfig --- ports/espressif/CMakeLists.txt | 6 +- ports/espressif/Makefile | 46 +- .../adafruit_esp32s3_camera/mpconfigboard.mk | 2 + .../boards/adafruit_esp32s3_camera/sdkconfig | 59 +- .../mpconfigboard.mk | 2 + .../adafruit_feather_esp32_v2/sdkconfig | 36 - .../mpconfigboard.mk | 7 +- .../sdkconfig | 33 +- .../mpconfigboard.mk | 4 +- .../adafruit_feather_esp32s3_tft/sdkconfig | 40 +- .../adafruit_matrixportal_s3/mpconfigboard.mk | 6 +- .../boards/adafruit_matrixportal_s3/sdkconfig | 42 +- .../adafruit_metro_esp32s2/mpconfigboard.mk | 4 +- .../adafruit_metro_esp32s3/mpconfigboard.mk | 8 +- .../boards/adafruit_metro_esp32s3/sdkconfig | 45 +- .../esp-idf-config/sdkconfig-ble.defaults | 33 +- .../esp-idf-config/sdkconfig-esp32.defaults | 1108 +---------------- .../esp-idf-config/sdkconfig-esp32s3.defaults | 44 +- ...s => sdkconfig-flash-16MB-no-uf2.defaults} | 0 ...defaults => sdkconfig-flash-16MB.defaults} | 11 +- ...dkconfig-flash-2MB-no-ota-no-uf2.defaults} | 0 ...defaults => sdkconfig-flash-32MB.defaults} | 0 .../sdkconfig-flash-40m.defaults | 10 + ...ults => sdkconfig-flash-4MB-1ota.defaults} | 0 ...ts => sdkconfig-flash-4MB-no-uf2.defaults} | 0 ....defaults => sdkconfig-flash-4MB.defaults} | 11 +- .../sdkconfig-flash-80m.defaults | 10 + ...ts => sdkconfig-flash-8MB-no-uf2.defaults} | 0 ....defaults => sdkconfig-flash-8MB.defaults} | 9 +- .../sdkconfig-flash-dio.defaults | 6 + .../sdkconfig-flash-qio.defaults | 6 + .../esp-idf-config/sdkconfig-opt.defaults | 38 +- .../sdkconfig-psram-2MB.defaults | 4 + .../sdkconfig-psram-40m.defaults | 2 + .../sdkconfig-psram-80m.defaults | 3 + .../sdkconfig-psram-8MB.defaults | 0 .../sdkconfig-psram-opi.defaults | 2 + .../sdkconfig-psram-qio.defaults | 1 + .../esp-idf-config/sdkconfig-psram.defaults | 27 + .../esp-idf-config/sdkconfig.defaults | 149 ++- ports/espressif/tools/update_sdkconfig.py | 154 ++- 41 files changed, 547 insertions(+), 1421 deletions(-) rename ports/espressif/esp-idf-config/{sdkconfig-16MB-no-uf2.defaults => sdkconfig-flash-16MB-no-uf2.defaults} (100%) rename ports/espressif/esp-idf-config/{sdkconfig-16MB.defaults => sdkconfig-flash-16MB.defaults} (66%) rename ports/espressif/esp-idf-config/{sdkconfig-2MB-no-ota-no-uf2.defaults => sdkconfig-flash-2MB-no-ota-no-uf2.defaults} (100%) rename ports/espressif/esp-idf-config/{sdkconfig-32MB.defaults => sdkconfig-flash-32MB.defaults} (100%) create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults rename ports/espressif/esp-idf-config/{sdkconfig-4MB-1ota.defaults => sdkconfig-flash-4MB-1ota.defaults} (100%) rename ports/espressif/esp-idf-config/{sdkconfig-4MB-no-uf2.defaults => sdkconfig-flash-4MB-no-uf2.defaults} (100%) rename ports/espressif/esp-idf-config/{sdkconfig-4MB.defaults => sdkconfig-flash-4MB.defaults} (66%) create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults rename ports/espressif/esp-idf-config/{sdkconfig-8MB-no-uf2.defaults => sdkconfig-flash-8MB-no-uf2.defaults} (100%) rename ports/espressif/esp-idf-config/{sdkconfig-8MB.defaults => sdkconfig-flash-8MB.defaults} (66%) create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram.defaults diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index 588539f9f9..de163638da 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -5,10 +5,8 @@ cmake_minimum_required(VERSION 3.16) set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf) # The component list here determines what options we get in menuconfig and what the ninja file can build. -set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp_lcd) -set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns") - -list(APPEND EXTRA_COMPONENT_DIRS "esp32-camera") +set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp32-camera esp_lcd) +set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns" "esp32-camera") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(circuitpython) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 3a92d0b9b6..5c61e55fbe 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -340,16 +340,26 @@ $(BUILD)/esp-idf: TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults + ifeq ($(CIRCUITPY_ESP_FLASH_SIZE), 2MB) - FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-ota-no-uf2.defaults else UF2_BOOTLOADER ?= $(CIRCUITPY_USB) ifeq ($(UF2_BOOTLOADER), 1) - FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE).defaults else - FLASH_SDKCONFIG ?= esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults + FLASH_SIZE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_SIZE)-no-uf2.defaults endif endif +FLASH_MODE_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_MODE).defaults +FLASH_SPEED_SDKCONFIG ?= esp-idf-config/sdkconfig-flash-$(CIRCUITPY_ESP_FLASH_FREQ).defaults + +ifneq ($(CIRCUITPY_ESP_PSRAM_SIZE), 0) + PSRAM_SDKCONFIG = esp-idf-config/sdkconfig-psram.defaults + PSRAM_SIZE_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_SIZE).defaults + PSRAM_MODE_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_MODE).defaults + PSRAM_SPEED_SDKCONFIG = esp-idf-config/sdkconfig-psram-$(CIRCUITPY_ESP_PSRAM_FREQ).defaults +endif ifeq ($(DEBUG), 1) DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults @@ -357,7 +367,7 @@ else DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults endif -SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig +SDKCONFIGS := esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SIZE_SDKCONFIG);$(FLASH_MODE_SDKCONFIG);$(FLASH_SPEED_SDKCONFIG);$(PSRAM_SDKCONFIG);$(PSRAM_SIZE_SDKCONFIG);$(PSRAM_MODE_SDKCONFIG);$(PSRAM_SPEED_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig ifneq ($(CIRCUITPY_BLEIO),0) SDKCONFIGS := esp-idf-config/sdkconfig-ble.defaults;$(SDKCONFIGS) endif @@ -365,7 +375,7 @@ endif .PHONY: do-sdkconfig do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h QSTR_GLOBAL_REQUIREMENTS += $(BUILD)/esp-idf/config/sdkconfig.h -$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig CMakeLists.txt | $(BUILD)/esp-idf +$(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig boards/$(BOARD)/mpconfigboard.mk CMakeLists.txt | $(BUILD)/esp-idf IDF_PATH=$(IDF_PATH) cmake -S . -B $(BUILD)/esp-idf -DSDKCONFIG=$(BUILD)/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="$(SDKCONFIGS)" -DCMAKE_TOOLCHAIN_FILE=$(IDF_PATH)/tools/cmake/toolchain-$(IDF_TARGET).cmake -DIDF_TARGET=$(IDF_TARGET) -GNinja # build a lib @@ -385,10 +395,11 @@ $(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sd # run menuconfig and then remove standard settings menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf menuconfig - # Newer versions of the idf will have save-defconfig that will only include non-default values. - # We should use that when available. For now, we sort out everything. python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) +update-all-sdkconfigs: $(BUILD)/esp-idf/config/sdkconfig.h + python tools/update_sdkconfig.py --update_all --board=$(BOARD) --debug=$(DEBUG) + BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) ifeq ($(IDF_TARGET),esp32) @@ -449,7 +460,26 @@ IDF_CMAKE_TARGETS = \ PARTITION_TABLE_OFFSET = 0x8000 FIRMWARE_OFFSET = 0x10000 -FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) +# Map the flash's run mode to flashing mode (only dual is supported by the early bootloaders). +# https://github.com/espressif/esp-idf/blob/82cceabc6e6a0a2d8c40e2249bc59917cc5e577a/components/esptool_py/Kconfig.projbuild#L74-L87 +ifeq ($(CIRCUITPY_ESP_FLASH_MODE),dout) + ESPTOOLPY_FLASHMODE = "dout" +endif +ifeq ($(CIRCUITPY_ESP_FLASH_MODE),opi) + ESPTOOLPY_FLASHMODE = "dout" +endif +# Most modes can flash with dio +ESPTOOLPY_FLASHMODE ?= "dio" + +# Cap the flash speed to 80m. +# https://github.com/espressif/esp-idf/blob/82cceabc6e6a0a2d8c40e2249bc59917cc5e577a/components/esptool_py/Kconfig.projbuild#L74-L87 +ifeq ($(CIRCUITPY_ESP_FLASH_FREQ),120m) + ESPTOOLPY_FLASHFREQ = "80m" +else + ESPTOOLPY_FLASHFREQ = $(CIRCUITPY_ESP_FLASH_FREQ) +endif + +FLASH_FLAGS = --flash_mode $(ESPTOOLPY_FLASHMODE) --flash_freq $(ESPTOOLPY_FLASHFREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset --baud 921600 diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index d6538cb8f0..02f776f15d 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -9,6 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m FLASH_SDKCONFIG = esp-idf-config/sdkconfig-4MB-1ota.defaults CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig index cf6a6def7c..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig +++ b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig @@ -1,62 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# # 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=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=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_80M is not set -CONFIG_SPIRAM_SPEED_80M=y -# 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 -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP -# CONFIG_OV7670_SUPPORT is not set -# CONFIG_NT99141_SUPPORT is not set -CONFIG_OV3360_SUPPORT=n -# CONFIG_OV2640_SUPPORT is not set -CONFIG_OV5640_SUPPORT=y -# CONFIG_GC2145_SUPPORT is not set -# CONFIG_GC032A_SUPPORT is not set -# CONFIG_GC0308_SUPPORT is not set -# CONFIG_BF3005_SUPPORT is not set -# CONFIG_BF20A6_SUPPORT is not set -# CONFIG_SC101IOT_SUPPORT is not set -# CONFIG_SC030IOT_SUPPORT is not set # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk index 554d64d1a1..73b5b00959 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig index 0a81b10c16..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/sdkconfig @@ -1,36 +0,0 @@ -# SPI RAM config -# -# 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_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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=8 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index 1f9a938a4a..a4e5dbf1e9 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -7,8 +7,11 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig index abdca6408c..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/sdkconfig @@ -1,36 +1,9 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -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=2097152 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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 # @@ -38,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk index fdb5d8b5c0..a94670910b 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/mpconfigboard.mk @@ -7,10 +7,12 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig index 5d5860b546..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_tft/sdkconfig @@ -1,41 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # -# -# ESP32S3-Specific -# -# SPI RAM config -# -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -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=2097152 -# -# PSRAM Clock and CS IO for ESP32S3 -# -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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 # @@ -43,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk b/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk index 865fc06d96..3488f22d61 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_matrixportal_s3/mpconfigboard.mk @@ -6,7 +6,11 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig b/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig index 2b65102e5a..db95a623aa 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig +++ b/ports/espressif/boards/adafruit_matrixportal_s3/sdkconfig @@ -1,39 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # # -# ESP32S3-Specific +# LWIP # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -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=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 - CONFIG_LWIP_LOCAL_HOSTNAME="matrixportal-s3" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk index 5e77442d13..96bd76ec27 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk index 039c689eaf..2fd5a40f25 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk @@ -5,6 +5,10 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m +CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig index 2d72ed5391..4b1cfa3641 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig @@ -1,46 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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=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 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 # CONFIG_LWIP_LOCAL_HOSTNAME="Metro-ESP32S3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-ble.defaults b/ports/espressif/esp-idf-config/sdkconfig-ble.defaults index a2ff691212..c260c38016 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-ble.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-ble.defaults @@ -1,16 +1,37 @@ -# This file was generated using idf.py save-defconfig. It can be edited manually. -# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth # CONFIG_BT_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y - +# +# NimBLE Options +# CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y - CONFIG_BT_NIMBLE_NVS_PERSIST=y - +# +# Memory Settings +# CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +# end of Memory Settings CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options -CONFIG_BT_CTRL_BLE_SCAN_DUPL=n +# +# Controller Options +# +# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set +# end of Controller Options + +# end of Bluetooth + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index 54e800cd62..0aa6343a06 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -1,1143 +1,55 @@ # -# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# Espressif IoT Development Framework Configuration # -CONFIG_IDF_TARGET_ARCH_XTENSA=y -CONFIG_IDF_TARGET="esp32" -CONFIG_IDF_TARGET_ESP32=y -CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000 - -# -# SDK tool configuration -# -CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-" -# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set -# end of SDK tool configuration - -# -# Build type -# -CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y -# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set -CONFIG_APP_BUILD_GENERATE_BINARIES=y -CONFIG_APP_BUILD_BOOTLOADER=y -CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y -# end of Build type - -# -# Application manager -# -CONFIG_APP_COMPILE_TIME_DATE=y -# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set -# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set -# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set -CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 -# end of Application manager - -# -# Bootloader config -# -CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set -CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -CONFIG_BOOTLOADER_LOG_LEVEL=0 -# CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y -# CONFIG_BOOTLOADER_FACTORY_RESET is not set -# CONFIG_BOOTLOADER_APP_TEST is not set -CONFIG_BOOTLOADER_WDT_ENABLE=y -# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set -CONFIG_BOOTLOADER_WDT_TIME_MS=9000 -# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set -# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set -CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 -# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set -CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y -# end of Bootloader config - -# -# Security features -# -# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set -# CONFIG_SECURE_BOOT is not set -# CONFIG_SECURE_FLASH_ENC_ENABLED is not set -# end of Security features - -# -# Serial flasher config -# -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set -# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y -# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set -CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y -CONFIG_ESPTOOLPY_FLASHMODE="dio" -# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y -# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set -# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="40m" -# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y -CONFIG_ESPTOOLPY_BEFORE_RESET=y -# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -# CONFIG_ESPTOOLPY_AFTER_NORESET is not set -CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y -# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 -# end of Serial flasher config - -# -# Compiler options -# -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set -CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_COMPILER_OPTIMIZATION_NONE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 -# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set -CONFIG_COMPILER_HIDE_PATHS_MACROS=y -# CONFIG_COMPILER_CXX_EXCEPTIONS is not set -# CONFIG_COMPILER_CXX_RTTI is not set -CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y -# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set -# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set -# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set -# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set -# CONFIG_COMPILER_DUMP_RTL_FILES is not set -# end of Compiler options - # # Component config # - # -# Application Level Tracing +# Driver Configurations # -# CONFIG_APPTRACE_DEST_JTAG is not set -CONFIG_APPTRACE_DEST_NONE=y -CONFIG_APPTRACE_LOCK_ENABLE=y -# end of Application Level Tracing - # -# Bluetooth +# TWAI Configuration # -# CONFIG_BT_ENABLED is not set -# end of Bluetooth - -# -# Driver configurations -# - -# -# ADC configuration -# -# CONFIG_ADC_FORCE_XPD_FSM is not set -CONFIG_ADC_DISABLE_DAC=y -# end of ADC configuration - -# -# MCPWM configuration -# -# CONFIG_MCPWM_ISR_IN_IRAM is not set -# end of MCPWM configuration - -# -# SPI configuration -# -# CONFIG_SPI_MASTER_IN_IRAM is not set -CONFIG_SPI_MASTER_ISR_IN_IRAM=y -# CONFIG_SPI_SLAVE_IN_IRAM is not set -CONFIG_SPI_SLAVE_ISR_IN_IRAM=y -# end of SPI configuration - -# -# TWAI configuration -# -# CONFIG_TWAI_ISR_IN_IRAM is not set # CONFIG_TWAI_ERRATA_FIX_BUS_OFF_REC is not set # CONFIG_TWAI_ERRATA_FIX_TX_INTR_LOST is not set # CONFIG_TWAI_ERRATA_FIX_RX_FRAME_INVALID is not set # CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set -# end of TWAI configuration +# end of TWAI Configuration -# -# UART configuration -# -CONFIG_UART_ISR_IN_IRAM=y -# end of UART configuration - -# -# RTCIO configuration -# -# CONFIG_RTCIO_SUPPORT_RTC_GPIO_DESC is not set -# end of RTCIO configuration - -# -# GPIO Configuration -# -# CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL is not set -# end of GPIO Configuration - -# -# GDMA Configuration -# -# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set -# CONFIG_GDMA_ISR_IRAM_SAFE is not set -# end of GDMA Configuration -# end of Driver configurations - -# -# eFuse Bit Manager -# -# CONFIG_EFUSE_CUSTOM_TABLE is not set -# CONFIG_EFUSE_VIRTUAL is not set -# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set -CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y -# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set -CONFIG_EFUSE_MAX_BLK_LEN=192 -# end of eFuse Bit Manager - -# -# ESP-TLS -# -CONFIG_ESP_TLS_USING_MBEDTLS=y -# CONFIG_ESP_TLS_USE_SECURE_ELEMENT is not set -# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set -CONFIG_ESP_TLS_SERVER=y -# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set -# CONFIG_ESP_TLS_SERVER_MIN_AUTH_MODE_OPTIONAL is not set -# CONFIG_ESP_TLS_PSK_VERIFICATION is not set -# CONFIG_ESP_TLS_INSECURE is not set -# end of ESP-TLS - -# -# ESP32-specific -# -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_REV_MIN_0=y -# CONFIG_ESP32_REV_MIN_1 is not set -# CONFIG_ESP32_REV_MIN_2 is not set -# CONFIG_ESP32_REV_MIN_3 is not set -CONFIG_ESP32_REV_MIN=0 -CONFIG_ESP32_DPORT_WORKAROUND=y -# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set -# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240 -# CONFIG_ESP32_SPIRAM_SUPPORT is not set - -# -# SPIRAM cache workaround debugging -# -CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_MEMW=y -# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST is not set -# CONFIG_SPIRAM_CACHE_WORKAROUND_STRATEGY_NOPS is not set -# end of SPIRAM cache workaround debugging - -# -# SPIRAM workaround libraries placement -# -CONFIG_SPIRAM_CACHE_LIBJMP_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBMATH_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBNUMPARSER_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBIO_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBTIME_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBCHAR_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBMEM_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBSTR_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBRAND_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBENV_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBFILE_IN_IRAM=y -CONFIG_SPIRAM_CACHE_LIBMISC_IN_IRAM=y -# end of SPIRAM workaround libraries placement - -CONFIG_SPIRAM_BANKSWITCH_ENABLE=n - -# -# PSRAM clock and cs IO for ESP32-DOWD -# -CONFIG_D0WD_PSRAM_CLK_IO=17 -CONFIG_D0WD_PSRAM_CS_IO=16 -# end of PSRAM clock and cs IO for ESP32-DOWD - -# -# PSRAM clock and cs IO for ESP32-D2WD -# -CONFIG_D2WD_PSRAM_CLK_IO=9 -CONFIG_D2WD_PSRAM_CS_IO=10 -# end of PSRAM clock and cs IO for ESP32-D2WD - -# -# PSRAM clock and cs IO for ESP32-PICO -# -CONFIG_PICO_PSRAM_CS_IO=10 -# end of PSRAM clock and cs IO for ESP32-PICO - -# CONFIG_SPIRAM_CUSTOM_SPIWP_SD3_PIN is not set -CONFIG_SPIRAM_SPIWP_SD3_PIN=7 -# CONFIG_SPIRAM_2T_MODE is not set -# end of SPI RAM config - -# CONFIG_ESP32_TRAX is not set -CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0 -CONFIG_ESP32_ULP_COPROC_ENABLED=y -CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=4080 -CONFIG_ESP32_DEBUG_OCDAWARE=y -CONFIG_ESP32_BROWNOUT_DET=y -CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set -CONFIG_ESP32_BROWNOUT_DET_LVL=0 -CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y -# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set -# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set -# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set -CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y -# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set -# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set -# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set -CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024 -CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000 -CONFIG_ESP32_XTAL_FREQ_40=y -# CONFIG_ESP32_XTAL_FREQ_26 is not set -# CONFIG_ESP32_XTAL_FREQ_AUTO is not set -CONFIG_ESP32_XTAL_FREQ=40 -# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set -# CONFIG_ESP32_NO_BLOBS is not set -# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -# CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set -# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set -CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5 -# end of ESP32-specific - -# -# ADC-Calibration -# -CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y -CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y -CONFIG_ADC_CAL_LUT_ENABLE=y -# end of ADC-Calibration - -# -# Common ESP-related -# -CONFIG_ESP_ERR_TO_NAME_LOOKUP=y -# end of Common ESP-related - -# -# Ethernet -# -# CONFIG_ETH_USE_ESP32_EMAC is not set -# CONFIG_ETH_USE_SPI_ETHERNET is not set -# CONFIG_ETH_USE_OPENETH is not set -# end of Ethernet - -# -# Event Loop Library -# -# CONFIG_ESP_EVENT_LOOP_PROFILING is not set -CONFIG_ESP_EVENT_POST_FROM_ISR=y -CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y -# end of Event Loop Library - -# -# GDB Stub -# -# end of GDB Stub - -# -# Hardware Settings -# - -# -# MAC Config -# -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y -CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y -# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set -CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y -CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4 -# end of MAC Config - -# -# Sleep Config -# -CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y -# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set -# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set -# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set -# end of Sleep Config - -# -# RTC Clock Config -# -# end of RTC Clock Config -# end of Hardware Settings +# end of Driver Configurations # # IPC (Inter-Processor Call) # CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y -CONFIG_ESP_IPC_ISR_ENABLE=y # end of IPC (Inter-Processor Call) -# -# ESP NETIF Adapter -# -CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 -CONFIG_ESP_NETIF_TCPIP_LWIP=y -# CONFIG_ESP_NETIF_LOOPBACK is not set -# CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER is not set -# end of ESP NETIF Adapter - -# -# PHY -# -CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP_PHY_MAX_TX_POWER=20 -CONFIG_ESP_PHY_REDUCE_TX_POWER=y -# end of PHY - -# -# Power Management -# -# CONFIG_PM_ENABLE is not set -# end of Power Management - -# -# ESP System Settings -# -CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set -# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set - -# -# Memory protection -# -# end of Memory protection - -CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y -# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1 is not set -# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 -CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 -# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set -CONFIG_ESP_CONSOLE_NONE=y -CONFIG_ESP_CONSOLE_MULTIPLE_UART=y -CONFIG_ESP_CONSOLE_UART_NUM=-1 -CONFIG_ESP_INT_WDT=y -CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 -CONFIG_ESP_INT_WDT_CHECK_CPU1=y -# CONFIG_ESP_TASK_WDT is not set -# CONFIG_ESP_PANIC_HANDLER_IRAM is not set -# CONFIG_ESP_DEBUG_STUBS_ENABLE is not set -# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y -# end of ESP System Settings - -# -# High resolution timer (esp_timer) -# -# CONFIG_ESP_TIMER_PROFILING is not set -CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y -CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y -CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 -CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 -# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set -# CONFIG_ESP_TIMER_IMPL_FRC2 is not set -CONFIG_ESP_TIMER_IMPL_TG0_LAC=y -# end of High resolution timer (esp_timer) - # # Wi-Fi # -CONFIG_ESP32_WIFI_ENABLED=y -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32 CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y -# CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER is not set -CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=0 -CONFIG_ESP32_WIFI_STATIC_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=32 -# CONFIG_ESP32_WIFI_CSI_ENABLED is not set -CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y -CONFIG_ESP32_WIFI_TX_BA_WIN=6 -CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y -CONFIG_ESP32_WIFI_RX_BA_WIN=6 -# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set -CONFIG_ESP32_WIFI_NVS_ENABLED=y -CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y -# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set -CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 -CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 -CONFIG_ESP32_WIFI_IRAM_OPT=y -CONFIG_ESP32_WIFI_RX_IRAM_OPT=y -CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y -# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set +CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set -# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set -CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi -# -# Core dump -# -# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set -# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set -CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y -# end of Core dump - -# -# FreeRTOS -# -# CONFIG_FREERTOS_UNICORE is not set -CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF -CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y -CONFIG_FREERTOS_CORETIMER_0=y -# CONFIG_FREERTOS_CORETIMER_1 is not set -CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y -CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set -# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set -CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y -# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set -CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y -CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set -# CONFIG_FREERTOS_ASSERT_DISABLE is not set -CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 -CONFIG_FREERTOS_ISR_STACKSIZE=1536 -# CONFIG_FREERTOS_LEGACY_HOOKS is not set -CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 -CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y -# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set -CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 -CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 -CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 -# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set -# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set -CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y -# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set -# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set -CONFIG_FREERTOS_DEBUG_OCDAWARE=y -# CONFIG_FREERTOS_FPU_IN_ISR is not set -CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y -# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set -# end of FreeRTOS - -# -# Hardware Abstraction Layer (HAL) and Low Level (LL) -# -CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y -# CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILIENT is not set -# CONFIG_HAL_ASSERTION_ENABLE is not set -CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 -# end of Hardware Abstraction Layer (HAL) and Low Level (LL) - -# -# Heap memory debugging -# -CONFIG_HEAP_POISONING_DISABLED=y -# CONFIG_HEAP_POISONING_LIGHT is not set -# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set -CONFIG_HEAP_TRACING_OFF=y -# CONFIG_HEAP_TRACING_STANDALONE is not set -# CONFIG_HEAP_TRACING_TOHOST is not set -# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set -# end of Heap memory debugging - - -# -# LWIP -# -# CONFIG_LWIP_NETIF_API is not set -# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -# CONFIG_LWIP_L2_TO_L3_COPY is not set -# CONFIG_LWIP_IRAM_OPTIMIZATION is not set -CONFIG_LWIP_TIMERS_ONDEMAND=y -CONFIG_LWIP_MAX_SOCKETS=8 -# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set -# CONFIG_LWIP_SO_LINGER is not set -CONFIG_LWIP_SO_REUSE=y -CONFIG_LWIP_SO_REUSE_RXTOALL=y -CONFIG_LWIP_SO_RCVBUF=y -# CONFIG_LWIP_NETBUF_RECVINFO is not set -CONFIG_LWIP_IP4_FRAG=y -CONFIG_LWIP_IP6_FRAG=y -# CONFIG_LWIP_IP4_REASSEMBLY is not set -# CONFIG_LWIP_IP6_REASSEMBLY is not set -# CONFIG_LWIP_IP_FORWARD is not set -# CONFIG_LWIP_STATS is not set -# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set -CONFIG_LWIP_ESP_GRATUITOUS_ARP=y -CONFIG_LWIP_GARP_TMR_INTERVAL=60 -CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 -CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y -# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set -CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y -# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set -CONFIG_LWIP_DHCP_OPTIONS_LEN=68 - -# -# DHCP server -# -CONFIG_LWIP_DHCPS=y -CONFIG_LWIP_DHCPS_LEASE_UNIT=60 -CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 -# end of DHCP server - -# CONFIG_LWIP_AUTOIP is not set -CONFIG_LWIP_IPV6=y -# CONFIG_LWIP_IPV6_AUTOCONFIG is not set -CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 -# CONFIG_LWIP_IPV6_FORWARD is not set -# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set -CONFIG_LWIP_NETIF_LOOPBACK=y -CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 - -# -# TCP -# -CONFIG_LWIP_MAX_ACTIVE_TCP=4 -CONFIG_LWIP_MAX_LISTENING_TCP=4 -CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y -CONFIG_LWIP_TCP_MAXRTX=12 -CONFIG_LWIP_TCP_SYNMAXRTX=6 -CONFIG_LWIP_TCP_MSS=1440 -CONFIG_LWIP_TCP_TMR_INTERVAL=250 -CONFIG_LWIP_TCP_MSL=60000 -CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 -CONFIG_LWIP_TCP_WND_DEFAULT=2880 -CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 -CONFIG_LWIP_TCP_QUEUE_OOSEQ=y -# CONFIG_LWIP_TCP_SACK_OUT is not set -# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_LWIP_TCP_OVERSIZE_MSS=y -# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set -CONFIG_LWIP_TCP_RTO_TIME=3000 -# end of TCP - -# -# UDP -# -CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 -# end of UDP - -# -# Checksums -# -# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set -# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set -CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y -# end of Checksums - -CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_LWIP_PPP_SUPPORT is not set -CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 -CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 -# CONFIG_LWIP_SLIP_SUPPORT is not set - -# -# ICMP -# -CONFIG_LWIP_ICMP=y -# CONFIG_LWIP_MULTICAST_PING is not set -# CONFIG_LWIP_BROADCAST_PING is not set -# end of ICMP - -# -# LWIP RAW API -# -CONFIG_LWIP_MAX_RAW_PCBS=16 -# end of LWIP RAW API - -# -# SNTP -# -CONFIG_LWIP_SNTP_MAX_SERVERS=1 -# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set -CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 -# end of SNTP - -CONFIG_LWIP_ESP_LWIP_ASSERT=y - -# -# Hooks -# -# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set -CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y -# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set -CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y -# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set -# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set -CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y -# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set -# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set -CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set -# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set -# end of Hooks - -# CONFIG_LWIP_DEBUG is not set -# end of LWIP - -# -# mbedTLS -# -CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y -# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set -# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set -CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y -CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 -CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 -# CONFIG_MBEDTLS_DEBUG is not set - -# -# mbedTLS v2.28.x related -# -# CONFIG_MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH is not set -CONFIG_MBEDTLS_ECDH_LEGACY_CONTEXT=y -# CONFIG_MBEDTLS_X509_TRUSTED_CERT_CALLBACK is not set -# CONFIG_MBEDTLS_SSL_CONTEXT_SERIALIZATION is not set -CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=y - -# -# DTLS-based configurations -# -# CONFIG_MBEDTLS_SSL_DTLS_CONNECTION_ID is not set -# CONFIG_MBEDTLS_SSL_DTLS_SRTP is not set -# end of DTLS-based configurations -# end of mbedTLS v2.28.x related - -# -# Certificate Bundle -# -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL is not set -# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y -CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" -# end of Certificate Bundle - -CONFIG_MBEDTLS_ECP_RESTARTABLE=y -CONFIG_MBEDTLS_CMAC_C=y -CONFIG_MBEDTLS_HARDWARE_AES=y -CONFIG_MBEDTLS_HARDWARE_MPI=y -CONFIG_MBEDTLS_HARDWARE_SHA=y -CONFIG_MBEDTLS_ROM_MD5=y -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set -# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set -CONFIG_MBEDTLS_HAVE_TIME=y -# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set -CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y -CONFIG_MBEDTLS_SHA512_C=y -CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y -# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set -# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set -# CONFIG_MBEDTLS_TLS_DISABLED is not set -CONFIG_MBEDTLS_TLS_SERVER=y -CONFIG_MBEDTLS_TLS_CLIENT=y -CONFIG_MBEDTLS_TLS_ENABLED=y - -# -# TLS Key Exchange Methods -# -CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y -# end of TLS Key Exchange Methods - -CONFIG_MBEDTLS_SSL_RENEGOTIATION=y -# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1 is not set -# CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not set -CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y -# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set -CONFIG_MBEDTLS_SSL_PROTO_DTLS=y -CONFIG_MBEDTLS_SSL_ALPN=y -CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y -CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y -CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y -CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y - -# -# Symmetric Ciphers -# -CONFIG_MBEDTLS_AES_C=y -# CONFIG_MBEDTLS_CAMELLIA_C is not set -# CONFIG_MBEDTLS_DES_C is not set -CONFIG_MBEDTLS_RC4_DISABLED=y -# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set -# CONFIG_MBEDTLS_RC4_ENABLED is not set -# CONFIG_MBEDTLS_BLOWFISH_C is not set -# CONFIG_MBEDTLS_XTEA_C is not set -CONFIG_MBEDTLS_CCM_C=y -CONFIG_MBEDTLS_GCM_C=y -# CONFIG_MBEDTLS_NIST_KW_C is not set -# end of Symmetric Ciphers - -# CONFIG_MBEDTLS_RIPEMD160_C is not set - -# -# Certificates -# -CONFIG_MBEDTLS_PEM_PARSE_C=y -CONFIG_MBEDTLS_PEM_WRITE_C=y -CONFIG_MBEDTLS_X509_CRL_PARSE_C=y -CONFIG_MBEDTLS_X509_CSR_PARSE_C=y -# end of Certificates - -CONFIG_MBEDTLS_ECP_C=y -CONFIG_MBEDTLS_ECDH_C=y -CONFIG_MBEDTLS_ECDSA_C=y -# CONFIG_MBEDTLS_ECJPAKE_C is not set -CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y -CONFIG_MBEDTLS_ECP_NIST_OPTIM=y -# CONFIG_MBEDTLS_POLY1305_C is not set -# CONFIG_MBEDTLS_CHACHA20_C is not set -# CONFIG_MBEDTLS_HKDF_C is not set -# CONFIG_MBEDTLS_THREADING_C is not set -# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set -# CONFIG_MBEDTLS_SECURITY_RISKS is not set -# end of mbedTLS - -# -# mDNS -# -CONFIG_MDNS_MAX_SERVICES=10 -CONFIG_MDNS_TASK_PRIORITY=1 -CONFIG_MDNS_TASK_STACK_SIZE=4096 -# CONFIG_MDNS_TASK_AFFINITY_NO_AFFINITY is not set -CONFIG_MDNS_TASK_AFFINITY_CPU0=y -# CONFIG_MDNS_TASK_AFFINITY_CPU1 is not set -CONFIG_MDNS_TASK_AFFINITY=0x0 -CONFIG_MDNS_SERVICE_ADD_TIMEOUT_MS=2000 -# CONFIG_MDNS_STRICT_MODE is not set -CONFIG_MDNS_TIMER_PERIOD_MS=100 -# CONFIG_MDNS_NETWORKING_SOCKET is not set -CONFIG_MDNS_MULTIPLE_INSTANCE=y -# end of mDNS - -# -# Newlib -# -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set -# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set -# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set -CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y -# CONFIG_NEWLIB_NANO_FORMAT is not set -# end of Newlib - -# -# NVS -# -# end of NVS - -# -# OpenThread -# -# CONFIG_OPENTHREAD_ENABLED is not set -# end of OpenThread - -# -# PThreads -# -CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y -# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set -# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set -CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" -# end of PThreads - # # SPI Flash driver # -# CONFIG_SPI_FLASH_VERIFY_WRITE is not set -# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set -CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y -CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set -# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set -# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set -# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set -# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set -# CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set -CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 -# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set -# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set -# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set - # # Auto-detect flash chips # -CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y -CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y # end of Auto-detect flash chips -CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y # end of SPI Flash driver # -# Virtual file system +# Ultra Low Power (ULP) Co-processor # -CONFIG_VFS_SUPPORT_IO=y -CONFIG_VFS_SUPPORT_DIR=y -CONFIG_VFS_SUPPORT_SELECT=y -CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_VFS_SUPPORT_TERMIOS=y +CONFIG_ULP_COPROC_RESERVE_MEM=4080 +# end of Ultra Low Power (ULP) Co-processor -# -# Host File System I/O (Semihosting) -# -CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# end of Host File System I/O (Semihosting) -# end of Virtual file system - -# -# Supplicant -# -CONFIG_WPA_MBEDTLS_CRYPTO=y -# CONFIG_WPA_WAPI_PSK is not set -# CONFIG_WPA_SUITE_B_192 is not set -# CONFIG_WPA_DEBUG_PRINT is not set -# CONFIG_WPA_TESTING_OPTIONS is not set -# CONFIG_WPA_WPS_STRICT is not set -# CONFIG_WPA_11KV_SUPPORT is not set -# CONFIG_WPA_MBO_SUPPORT is not set -# CONFIG_WPA_DPP_SUPPORT is not set -# end of Supplicant # end of Component config -# -# Compatibility options -# -# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set -# end of Compatibility options - -# Deprecated options for backward compatibility -CONFIG_TOOLPREFIX="xtensa-esp32-elf-" -CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y -# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set -# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set -CONFIG_LOG_BOOTLOADER_LEVEL=0 -# CONFIG_APP_ROLLBACK_ENABLE is not set -# CONFIG_FLASH_ENCRYPTION_ENABLED is not set -# CONFIG_FLASHMODE_QIO is not set -# CONFIG_FLASHMODE_QOUT is not set -CONFIG_FLASHMODE_DIO=y -# CONFIG_FLASHMODE_DOUT is not set -# CONFIG_MONITOR_BAUD_9600B is not set -# CONFIG_MONITOR_BAUD_57600B is not set -CONFIG_MONITOR_BAUD_115200B=y -# CONFIG_MONITOR_BAUD_230400B is not set -# CONFIG_MONITOR_BAUD_921600B is not set -# CONFIG_MONITOR_BAUD_2MB is not set -# CONFIG_MONITOR_BAUD_OTHER is not set -CONFIG_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_MONITOR_BAUD=115200 -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y -# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 -# CONFIG_CXX_EXCEPTIONS is not set -CONFIG_STACK_CHECK_NONE=y -# CONFIG_STACK_CHECK_NORM is not set -# CONFIG_STACK_CHECK_STRONG is not set -# CONFIG_STACK_CHECK_ALL is not set -# CONFIG_WARN_WRITE_STRINGS is not set -# CONFIG_DISABLE_GCC8_WARNINGS is not set -# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set -CONFIG_ESP32_APPTRACE_DEST_NONE=y -CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y -CONFIG_ADC2_DISABLE_DAC=y -CONFIG_TRACEMEM_RESERVE_DRAM=0x0 -# CONFIG_ULP_COPROC_ENABLED is not set -CONFIG_ULP_COPROC_RESERVE_MEM=0 -CONFIG_BROWNOUT_DET=y -CONFIG_BROWNOUT_DET_LVL_SEL_0=y -# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set -# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set -CONFIG_BROWNOUT_DET_LVL=0 -CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y -# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set -# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set -# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set -# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set -# CONFIG_NO_BLOBS is not set -# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set -# CONFIG_EVENT_LOOP_PROFILING is not set -CONFIG_POST_EVENTS_FROM_ISR=y -CONFIG_POST_EVENTS_FROM_IRAM_ISR=y -# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set -CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y -CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4 -# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set -CONFIG_IPC_TASK_STACK_SIZE=1536 -CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y -# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set -CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP32_PHY_MAX_TX_POWER=20 -CONFIG_ESP32_REDUCE_PHY_TX_POWER=y -CONFIG_ESP32S2_PANIC_PRINT_HALT=y -# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP32S2_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP32S2_PANIC_GDBSTUB is not set -CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 -# CONFIG_CONSOLE_UART_DEFAULT is not set -# CONFIG_CONSOLE_UART_CUSTOM is not set -CONFIG_ESP_CONSOLE_UART_NONE=y -CONFIG_CONSOLE_UART_NUM=-1 -CONFIG_INT_WDT=y -CONFIG_INT_WDT_TIMEOUT_MS=300 -CONFIG_INT_WDT_CHECK_CPU1=y -# CONFIG_TASK_WDT is not set -# CONFIG_ESP32_DEBUG_STUBS_ENABLE is not set -CONFIG_TIMER_TASK_STACK_SIZE=3584 -# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set -# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set -CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y -# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set -CONFIG_TIMER_TASK_PRIORITY=1 -CONFIG_TIMER_TASK_STACK_DEPTH=2048 -CONFIG_TIMER_QUEUE_LENGTH=10 -# CONFIG_L2_TO_L3_COPY is not set -# CONFIG_USE_ONLY_LWIP_SELECT is not set -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1440 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=2880 -CONFIG_TCP_WND_DEFAULT=2880 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set -CONFIG_TCP_OVERSIZE_MSS=y -# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set -# CONFIG_TCP_OVERSIZE_DISABLE is not set -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=3072 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set -# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -# CONFIG_PPP_SUPPORT is not set -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set -# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set -CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set -# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set -CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_SUPPORT_TERMIOS=y -CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -# End of deprecated options +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 747d2ba729..310a95b86b 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -1,11 +1,47 @@ -# This file was generated using idf.py save-defconfig. It can be edited manually. -# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth +# +# +# NimBLE Options # CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=y +# end of NimBLE Options +# end of Bluetooth + +# +# ESP System Settings +# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y +# end of ESP System Settings -CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +# end of IPC (Inter-Processor Call) -CONFIG_ULP_COPROC_ENABLED=y +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +# end of Wi-Fi + +# +# Ultra Low Power (ULP) Co-processor +# CONFIG_ULP_COPROC_RESERVE_MEM=8176 +# end of Ultra Low Power (ULP) Co-processor + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-16MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-16MB-no-uf2.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-16MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-16MB-no-uf2.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-16MB.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-16MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-16MB.defaults index fac8ba1cad..cc5d54fec4 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-16MB.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="16MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-2MB-no-ota-no-uf2.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-2MB-no-ota-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-2MB-no-ota-no-uf2.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-32MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-32MB.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-32MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-32MB.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults new file mode 100644 index 0000000000..2900c10879 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults @@ -0,0 +1,10 @@ +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_48M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-1ota.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-4MB-1ota.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-4MB-1ota.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-4MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-4MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-4MB.defaults index 69f15ebe7b..811c9ea37d 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="4MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults new file mode 100644 index 0000000000..949113b7cf --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults @@ -0,0 +1,10 @@ +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_48M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-8MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults similarity index 100% rename from ports/espressif/esp-idf-config/sdkconfig-8MB-no-uf2.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults diff --git a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB.defaults similarity index 66% rename from ports/espressif/esp-idf-config/sdkconfig-8MB.defaults rename to ports/espressif/esp-idf-config/sdkconfig-flash-8MB.defaults index 1ecb1b4c16..c64775aa1c 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,8 +9,10 @@ # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="8MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config # @@ -16,3 +21,5 @@ CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults new file mode 100644 index 0000000000..12ef8ad896 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-dio.defaults @@ -0,0 +1,6 @@ +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults new file mode 100644 index 0000000000..647dd84dda --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-qio.defaults @@ -0,0 +1,6 @@ +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index ca38be15f2..46efd79e45 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -1,15 +1,41 @@ -# This file was generated using idf.py save-defconfig. It can be edited manually. -# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +# Espressif IoT Development Framework Configuration +# +# +# Bootloader config # CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y +# end of Bootloader config -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# +# Compiler options +# CONFIG_COMPILER_OPTIMIZATION_SIZE=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# end of Compiler options -CONFIG_ESP_CONSOLE_NONE=y - -CONFIG_ESP_ERR_TO_NAME_LOOKUP=n +# +# Component config +# +# +# Common ESP-related +# +# CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set +# end of Common ESP-related +# +# ESP System Settings +# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y +CONFIG_ESP_CONSOLE_NONE=y +# end of ESP System Settings +# +# Log output +# CONFIG_LOG_DEFAULT_LEVEL_NONE=y +# end of Log output + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults new file mode 100644 index 0000000000..296f7112cb --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults @@ -0,0 +1,4 @@ +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 diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults new file mode 100644 index 0000000000..344bca55ee --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults @@ -0,0 +1,2 @@ +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_80M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults new file mode 100644 index 0000000000..7a2e500409 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-80m.defaults @@ -0,0 +1,3 @@ +# CONFIG_SPIRAM_SPEED_120M is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults new file mode 100644 index 0000000000..05133e84c4 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-opi.defaults @@ -0,0 +1,2 @@ +# CONFIG_SPIRAM_MODE_QUAD is not set +CONFIG_SPIRAM_MODE_OCT=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults new file mode 100644 index 0000000000..d93069e02b --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults @@ -0,0 +1 @@ +CONFIG_SPIRAM_MODE_QUAD=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults new file mode 100644 index 0000000000..0da8eaf53d --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults @@ -0,0 +1,27 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# ESP PSRAM +# +CONFIG_SPIRAM=y +# +# SPI RAM config +# +CONFIG_SPIRAM_USE_MEMMAP=y +# end of SPI RAM config + +# end of ESP PSRAM + +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 +# end of Wi-Fi + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index c3c32a1fa3..3b52c2a565 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -1,56 +1,137 @@ -# This file was generated using idf.py save-defconfig. It can be edited manually. -# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +# Espressif IoT Development Framework Configuration +# +# +# Partition Table +# +CONFIG_PARTITION_TABLE_CUSTOM=y +# end of Partition Table + +# +# Component config +# +# +# Driver Configurations +# +# +# Legacy ADC Configuration +# +CONFIG_ADC_SUPPRESS_DEPRECATE_WARN=y +# end of Legacy ADC Configuration + +# +# GPTimer Configuration +# +CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y +# end of GPTimer Configuration + +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + +# end of Driver Configurations + +# +# ESP-TLS +# +CONFIG_ESP_TLS_SERVER=y +# end of ESP-TLS + +# +# ESP System Settings # CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +# +# Memory +# +CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y +# end of Memory -CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 +# CONFIG_ESP_TASK_WDT_INIT is not set +# end of ESP System Settings -CONFIG_ESP_TASK_WDT_INIT=n - -CONFIG_ESP_TLS_SERVER=y - -CONFIG_LWIP_MAX_ACTIVE_TCP=4 -CONFIG_LWIP_MAX_LISTENING_TCP=4 +# +# LWIP +# CONFIG_LWIP_MAX_SOCKETS=8 CONFIG_LWIP_SO_RCVBUF=y - -CONFIG_LWIP_TCP_RTO_TIME=3000 - -CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 +# +# TCP +# +CONFIG_LWIP_MAX_ACTIVE_TCP=4 +CONFIG_LWIP_MAX_LISTENING_TCP=4 CONFIG_LWIP_TCP_SYNMAXRTX=6 +CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 CONFIG_LWIP_TCP_WND_DEFAULT=2880 +CONFIG_LWIP_TCP_RTO_TIME=3000 +# end of TCP +# end of LWIP + +# +# mbedTLS +# +CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 +# +# Certificate Bundle +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y -CONFIG_MBEDTLS_CMAC_C=y - CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle -CONFIG_MBEDTLS_ECP_RESTARTABLE=y - -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y +# +# TLS Key Exchange Methods +# CONFIG_MBEDTLS_PSK_MODES=y +CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y +# end of TLS Key Exchange Methods -CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 CONFIG_MBEDTLS_SSL_PROTO_DTLS=y +# end of mbedTLS -CONFIG_PARTITION_TABLE_CUSTOM=y - +# +# SPI Flash driver +# +# CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 -CONFIG_SPI_FLASH_YIELD_DURING_ERASE=n +# end of SPI Flash driver -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=16 -CONFIG_ESP32_WIFI_NVS_ENABLED=n +# +# Ultra Low Power (ULP) Co-processor +# +CONFIG_ULP_COPROC_ENABLED=y +# end of Ultra Low Power (ULP) Co-processor -CONFIG_ADC_SUPPRESS_DEPRECATE_WARN=y -CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y -CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y -CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# +# Camera configuration +# +# CONFIG_OV7670_SUPPORT is not set +# CONFIG_NT99141_SUPPORT is not set +# CONFIG_OV2640_SUPPORT is not set +# CONFIG_GC2145_SUPPORT is not set +# CONFIG_GC032A_SUPPORT is not set +# CONFIG_GC0308_SUPPORT is not set +# CONFIG_BF3005_SUPPORT is not set +# CONFIG_BF20A6_SUPPORT is not set +# CONFIG_SC030IOT_SUPPORT is not set +# end of Camera configuration + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 1f91becd2b..24f580944f 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -53,21 +53,42 @@ TARGET_SETTINGS = [ "CONFIG_NIMBLE_PINNED_TO_CORE", "CONFIG_BT_NIMBLE_PINNED_TO_CORE", "CONFIG_BT_CTRL_PINNED_TO_CORE", + "CONFIG_SPIRAM_SPEED_2", + "CONFIG_SPIRAM_BANKSWITCH_ENABLE", # For ESP32 ] BOARD_SETTINGS = [ - "CONFIG_SPIRAM", - "CONFIG_DEFAULT_PSRAM_", - "_SPIRAM_SUPPORT", "CONFIG_LWIP_LOCAL_HOSTNAME", ] -FLASH_SETTINGS = [ +FLASH_SIZE_SETTINGS = [ "CONFIG_ESPTOOLPY_FLASHSIZE", "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME", "CONFIG_PARTITION_TABLE_FILENAME", ] +FLASH_MODE_SETTINGS = [ + "CONFIG_ESPTOOLPY_FLASHMODE_", + "CONFIG_ESPTOOLPY_OCT_FLASH", + "CONFIG_ESPTOOLPY_FLASH_SAMBLE_MODE_", +] + +FLASH_FREQ_SETTINGS = [ + "CONFIG_ESPTOOLPY_FLASHFREQ_", +] + +PSRAM_SETTINGS = ["CONFIG_SPIRAM"] + +PSRAM_SIZE_SETTINGS = ["CONFIG_SPIRAM_TYPE_"] + +PSRAM_MODE_SETTINGS = ["CONFIG_SPIRAM_MODE_"] + +PSRAM_FREQ_SETTINGS = ["CONFIG_SPIRAM_SPEED_"] + +# Some settings are target dependent but we want to always include them anyway +# because the files they are in will be used across targets. +ALWAYS_INCLUDE = FLASH_MODE_SETTINGS + FLASH_FREQ_SETTINGS + PSRAM_FREQ_SETTINGS + BLE_SETTINGS = ["CONFIG_BT_", "CONFIG_BLUEDROID_", "CONFIG_NIMBLE_", "CONFIG_SW_COEXIST_ENABLE"] # boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -141,11 +162,27 @@ def update(debug, board, update_all): was likely modified by menuconfig.""" board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") + psram_size = "0" for line in board_make.read_text().split("\n"): - if line.startswith("IDF_TARGET"): - target = line.split("=")[1].strip() - elif line.startswith("CIRCUITPY_ESP_FLASH_SIZE"): - flash = line.split("=")[1].strip() + if "=" not in line or line.startswith("#"): + continue + key, value = line.split("=", maxsplit=1) + key = key.strip() + value = value.strip() + if key == "IDF_TARGET": + target = value + elif key == "CIRCUITPY_ESP_FLASH_SIZE": + flash_size = value + elif key == "CIRCUITPY_ESP_FLASH_MODE": + flash_mode = value + elif key == "CIRCUITPY_ESP_FLASH_FREQ": + flash_freq = value + elif key == "CIRCUITPY_ESP_PSRAM_SIZE": + psram_size = value + elif key == "CIRCUITPY_ESP_PSRAM_MODE": + psram_mode = value + elif key == "CIRCUITPY_ESP_PSRAM_FREQ": + psram_freq = value os.environ["IDF_TARGET"] = target os.environ[ @@ -161,24 +198,47 @@ def update(debug, board, update_all): input_config = pathlib.Path(f"build-{board}/esp-idf/sdkconfig") kconfig.load_config(input_config) + sdkconfigs = [] default_config = pathlib.Path("esp-idf-config/sdkconfig.defaults") + sdkconfigs.append(default_config) if debug: opt_config = pathlib.Path("esp-idf-config/sdkconfig-debug.defaults") else: opt_config = pathlib.Path("esp-idf-config/sdkconfig-opt.defaults") - flash_config = pathlib.Path(f"esp-idf-config/sdkconfig-{flash}.defaults") + sdkconfigs.append(opt_config) + flash_size_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_size}.defaults") + flash_mode_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_mode}.defaults") + flash_freq_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_freq}.defaults") + sdkconfigs.extend((flash_size_config, flash_mode_config, flash_freq_config)) + + if psram_size != "0": + psram_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram.defaults") + psram_size_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram-{psram_size}.defaults") + psram_mode_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram-{psram_mode}.defaults") + psram_freq_config = pathlib.Path(f"esp-idf-config/sdkconfig-psram-{psram_freq}.defaults") + sdkconfigs.extend((psram_config, psram_size_config, psram_mode_config, psram_freq_config)) target_config = pathlib.Path(f"esp-idf-config/sdkconfig-{target}.defaults") + sdkconfigs.append(target_config) ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") + sdkconfigs.append(ble_config) board_config = pathlib.Path(f"boards/{board}/sdkconfig") + sdkconfigs.append(board_config) cp_kconfig_defaults = kconfiglib.Kconfig(kconfig_path) - for default_file in (default_config, opt_config, flash_config, target_config, ble_config): + for default_file in sdkconfigs: cp_kconfig_defaults.load_config(default_file, replace=False) board_settings = [] last_board_group = None - flash_settings = [] - last_flash_group = None + flash_size_settings = [] + last_flash_size_group = None + flash_mode_settings = [] + flash_freq_settings = [] + psram_settings = [] + last_psram_group = None + psram_size_settings = [] + psram_mode_settings = [] + psram_freq_settings = [] opt_settings = [] last_opt_group = None target_settings = [] @@ -222,7 +282,11 @@ def update(debug, board, update_all): config_string = item.config_string.strip() if not config_string: - continue + if matches_group("CONFIG_" + item.name, ALWAYS_INCLUDE): + config_string = f"# CONFIG_{item.name} is not set" + print(config_string) + else: + continue if node.list: pending_nodes.append(node.list) @@ -234,33 +298,65 @@ def update(debug, board, update_all): print(" " * len(current_group), i, config_string.strip()) target_reference = False - board_reference = False + psram_reference = False for referenced in item.referenced: if referenced.name.startswith("IDF_TARGET"): # print(item.name, "references", referenced.name) target_reference = True break if referenced.name == "SPIRAM": - board_reference = True + psram_reference = True if (not update_all and not matches_cp_default) or ( update_all - and (matches_group(config_string, BOARD_SETTINGS) or board_reference) + and matches_group(config_string, BOARD_SETTINGS) and not matches_esp_default ): print(" " * (len(current_group) + 1), "board") last_board_group = add_group(board_settings, last_board_group, current_group) board_settings.append(config_string) - elif update_all and not matches_esp_default: - if matches_group(config_string, OPT_SETTINGS): + elif update_all: + target_setting = target_reference or matches_group(config_string, TARGET_SETTINGS) + if matches_group(config_string, FLASH_SIZE_SETTINGS): + print(" " * (len(current_group) + 1), "flash size") + last_flash_size_group = add_group( + flash_size_settings, last_flash_size_group, current_group + ) + flash_size_settings.append(config_string) + elif matches_group(config_string, FLASH_MODE_SETTINGS): + print(" " * (len(current_group) + 1), "flash mode") + flash_mode_settings.append(config_string) + elif matches_group(config_string, FLASH_FREQ_SETTINGS): + print(" " * (len(current_group) + 1), "flash freq") + flash_freq_settings.append(config_string) + elif matches_group(config_string, PSRAM_SIZE_SETTINGS): + print(" " * (len(current_group) + 1), "psram size") + psram_size_settings.append(config_string) + elif matches_group(config_string, PSRAM_MODE_SETTINGS): + print(" " * (len(current_group) + 1), "psram mode") + psram_mode_settings.append(config_string) + elif matches_group(config_string, PSRAM_FREQ_SETTINGS) and not target_setting: + # The ESP32S2 has two frequencies that aren't on the S3 or ESP32. So, put those + # in target settings. + print(" " * (len(current_group) + 1), "psram freq") + psram_freq_settings.append(config_string) + elif matches_esp_default: + # Always document the above settings. Settings below should + # be non-default. + pass + elif ( + (matches_group(config_string, PSRAM_SETTINGS) or psram_reference) + and not target_reference + and not target_setting + ): + print(" " * (len(current_group) + 1), "psram shared") + last_psram_group = add_group(psram_settings, last_psram_group, current_group) + psram_settings.append(config_string) + elif matches_group(config_string, OPT_SETTINGS): print(" " * (len(current_group) + 1), "opt") last_opt_group = add_group(opt_settings, last_opt_group, current_group) opt_settings.append(config_string) - elif matches_group(config_string, FLASH_SETTINGS): - print(" " * (len(current_group) + 1), "flash") - last_flash_group = add_group(flash_settings, last_flash_group, current_group) - flash_settings.append(config_string) - elif target_reference or matches_group(config_string, TARGET_SETTINGS): + elif target_setting: print(" " * (len(current_group) + 1), "target") last_target_group = add_group( target_settings, last_target_group, current_group @@ -294,14 +390,22 @@ def update(debug, board, update_all): add_group(board_settings, last_board_group, current_group) add_group(opt_settings, last_opt_group, current_group) - add_group(flash_settings, last_flash_group, current_group) + add_group(flash_size_settings, last_flash_size_group, current_group) + add_group(psram_settings, last_psram_group, current_group) add_group(target_settings, last_target_group, current_group) add_group(ble_settings, last_ble_group, current_group) add_group(default_settings, last_default_group, current_group) board_config.write_text("\n".join(board_settings)) if update_all: - flash_config.write_text("\n".join(flash_settings)) + flash_size_config.write_text("\n".join(flash_size_settings)) + flash_mode_config.write_text("\n".join(flash_mode_settings)) + flash_freq_config.write_text("\n".join(flash_freq_settings)) + if psram_size != "0": + psram_config.write_text("\n".join(psram_settings)) + psram_size_config.write_text("\n".join(psram_size_settings)) + psram_mode_config.write_text("\n".join(psram_mode_settings)) + psram_freq_config.write_text("\n".join(psram_freq_settings)) opt_config.write_text("\n".join(opt_settings)) default_config.write_text("\n".join(default_settings)) target_config.write_text("\n".join(target_settings)) From 1ab083fab73dc4987542fd90abb18f67d7eb47d7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 8 Sep 2023 12:10:49 -0700 Subject: [PATCH 076/129] Support target specific kconfig source --- ports/espressif/CMakeLists.txt | 4 +- .../adafruit_esp32s3_camera/mpconfigboard.mk | 2 +- .../adafruit_feather_esp32s2/mpconfigboard.mk | 2 + ports/espressif/{esp32-camera => esp-camera} | 0 .../esp-idf-config/sdkconfig-esp32.defaults | 25 ++++++ .../sdkconfig-psram-2MB.defaults | 4 +- ports/espressif/tools/update_sdkconfig.py | 84 +++++++++++++++---- 7 files changed, 98 insertions(+), 23 deletions(-) rename ports/espressif/{esp32-camera => esp-camera} (100%) diff --git a/ports/espressif/CMakeLists.txt b/ports/espressif/CMakeLists.txt index de163638da..995f8eb76a 100644 --- a/ports/espressif/CMakeLists.txt +++ b/ports/espressif/CMakeLists.txt @@ -5,8 +5,8 @@ cmake_minimum_required(VERSION 3.16) set(ENV{IDF_PATH} ${CMAKE_SOURCE_DIR}/esp-idf) # The component list here determines what options we get in menuconfig and what the ninja file can build. -set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp32-camera esp_lcd) -set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns" "esp32-camera") +set(COMPONENTS bt driver esp-tls esp_adc_cal esp_event esp_netif esp_psram esp_wifi esptool_py freertos log lwip main mbedtls mdns soc ulp usb wpa_supplicant esp-camera esp_lcd) +set(EXTRA_COMPONENT_DIRS "esp-protocols/components/mdns" "esp-camera") include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(circuitpython) diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index 02f776f15d..57087cf0e0 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -6,7 +6,7 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk index ed6ae99976..a5ee61ed55 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/esp32-camera b/ports/espressif/esp-camera similarity index 100% rename from ports/espressif/esp32-camera rename to ports/espressif/esp-camera diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index 0aa6343a06..980619b7a6 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -16,8 +16,32 @@ # CONFIG_TWAI_ERRATA_FIX_RX_FIFO_CORRUPT is not set # end of TWAI Configuration +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + # end of Driver Configurations +# +# ESP System Settings +# +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +# end of ESP System Settings + # # IPC (Inter-Processor Call) # @@ -47,6 +71,7 @@ CONFIG_SPI_FLASH_SUPPORT_TH_CHIP=y # # Ultra Low Power (ULP) Co-processor # +CONFIG_ULP_COPROC_ENABLED=y CONFIG_ULP_COPROC_RESERVE_MEM=4080 # end of Ultra Low Power (ULP) Co-processor diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults index 296f7112cb..154e9517e5 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-2MB.defaults @@ -1,4 +1,4 @@ -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 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 diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 24f580944f..f8e4b5a4f3 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -248,6 +248,9 @@ def update(debug, board, update_all): default_settings = [] last_default_group = None + target_kconfig_snippets = set() + target_symbols = set() + current_group = [] for sym in kconfig.unique_defined_syms: @@ -282,11 +285,11 @@ def update(debug, board, update_all): config_string = item.config_string.strip() if not config_string: - if matches_group("CONFIG_" + item.name, ALWAYS_INCLUDE): + cp_sym = cp_kconfig_defaults.syms[item.name] + if cp_sym.str_value == "n": config_string = f"# CONFIG_{item.name} is not set" - print(config_string) else: - continue + config_string = "" if node.list: pending_nodes.append(node.list) @@ -294,14 +297,51 @@ def update(debug, board, update_all): matches_cp_default = cp_kconfig_defaults.syms[item.name].str_value == item.str_value matches_esp_default = sym_default(item) - if not matches_esp_default: + print_debug = not matches_esp_default + if print_debug: print(" " * len(current_group), i, config_string.strip()) - target_reference = False + # Some files are `rsource`d into another kconfig with $IDF_TARGET as + # part of the path. kconfiglib doesn't show this as a reference so + # we have to look ourselves. + target_reference = target in item.name_and_loc + if target_reference: + loc = item.name_and_loc.split("defined at ")[1].split(":")[0].replace(target, "*") + if loc not in target_kconfig_snippets: + differing_keys = set() + shared_keys = {} + first = True + for path in pathlib.Path(".").glob(loc): + kc = kconfiglib.Kconfig(path) + all_file_syms = set() + for sym in kc.unique_defined_syms: + all_file_syms.add(sym) + if sym.name in differing_keys: + continue + if first: + shared_keys[sym.name] = sym.str_value + elif ( + sym.name not in shared_keys + or shared_keys[sym.name] != sym.str_value + ): + differing_keys.add(sym.name) + if sym.name in shared_keys: + del shared_keys[sym.name] + # Any settings missing from a file are *not* shared. + shared_syms = set(shared_keys.keys()) + for missing in shared_syms - all_file_syms: + differing_keys.add(missing) + del shared_keys[missing] + first = False + target_kconfig_snippets.add(loc) + target_symbols = target_symbols.union(differing_keys) psram_reference = False for referenced in item.referenced: if referenced.name.startswith("IDF_TARGET"): - # print(item.name, "references", referenced.name) + target_reference = True + break + if referenced.name in target_symbols: + # Implicit target symbols target_reference = True break if referenced.name == "SPIRAM": @@ -335,20 +375,22 @@ def update(debug, board, update_all): elif matches_group(config_string, PSRAM_MODE_SETTINGS): print(" " * (len(current_group) + 1), "psram mode") psram_mode_settings.append(config_string) - elif matches_group(config_string, PSRAM_FREQ_SETTINGS) and not target_setting: - # The ESP32S2 has two frequencies that aren't on the S3 or ESP32. So, put those - # in target settings. + elif ( + matches_group(config_string, PSRAM_FREQ_SETTINGS) + and "26M" not in config_string + and "20M" not in config_string + ): + # The ESP32S2 has two frequencies (20M and 26M) that aren't on the S3 or ESP32. + # So, put those in target settings. print(" " * (len(current_group) + 1), "psram freq") psram_freq_settings.append(config_string) elif matches_esp_default: + if print_debug: + print(" " * (len(current_group) + 1), "default") # Always document the above settings. Settings below should # be non-default. pass - elif ( - (matches_group(config_string, PSRAM_SETTINGS) or psram_reference) - and not target_reference - and not target_setting - ): + elif matches_group(config_string, PSRAM_SETTINGS) or psram_reference: print(" " * (len(current_group) + 1), "psram shared") last_psram_group = add_group(psram_settings, last_psram_group, current_group) psram_settings.append(config_string) @@ -373,12 +415,11 @@ def update(debug, board, update_all): ) default_settings.append(config_string) - elif kconfiglib.expr_value(node.dep): + else: if item is kconfiglib.COMMENT: print("comment", repr(item)) elif item is kconfiglib.MENU: - # This menu isn't visible so skip to the next node. - if kconfiglib.expr_value(node.visibility) and node.list: + if node.list: current_group.append(node.prompt[0]) pending_nodes.append(None) pending_nodes.append(node.list) @@ -398,10 +439,16 @@ def update(debug, board, update_all): board_config.write_text("\n".join(board_settings)) if update_all: + # Add empty strings to get trailing newlines + flash_mode_settings.append("") + flash_freq_settings.append("") flash_size_config.write_text("\n".join(flash_size_settings)) flash_mode_config.write_text("\n".join(flash_mode_settings)) flash_freq_config.write_text("\n".join(flash_freq_settings)) if psram_size != "0": + psram_size_settings.append("") + psram_mode_settings.append("") + psram_freq_settings.append("") psram_config.write_text("\n".join(psram_settings)) psram_size_config.write_text("\n".join(psram_size_settings)) psram_mode_config.write_text("\n".join(psram_mode_settings)) @@ -409,7 +456,8 @@ def update(debug, board, update_all): opt_config.write_text("\n".join(opt_settings)) default_config.write_text("\n".join(default_settings)) target_config.write_text("\n".join(target_settings)) - ble_config.write_text("\n".join(ble_settings)) + if ble_settings: + ble_config.write_text("\n".join(ble_settings)) if __name__ == "__main__": From 4b29862d30a3050d2bda23cb175e6910168ab8ff Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 8 Sep 2023 16:18:32 -0700 Subject: [PATCH 077/129] Clean up more s2 sdkconfig --- ports/espressif/Makefile | 3 + .../boards/01space_lcd042_esp32c3/sdkconfig | 11 +++- .../boards/adafruit_feather_esp32s2/sdkconfig | 45 --------------- .../mpconfigboard.mk | 2 + .../sdkconfig | 36 ------------ .../mpconfigboard.mk | 2 + .../adafruit_feather_esp32s2_tft/sdkconfig | 36 ------------ .../boards/adafruit_funhouse/mpconfigboard.mk | 2 + .../boards/adafruit_funhouse/sdkconfig | 36 ------------ .../mpconfigboard.mk | 2 + .../adafruit_magtag_2.9_grayscale/sdkconfig | 36 ------------ .../adafruit_metro_esp32s2/mpconfigboard.mk | 4 +- .../boards/adafruit_metro_esp32s2/sdkconfig | 36 ------------ .../adafruit_qtpy_esp32s2/mpconfigboard.mk | 2 + .../boards/adafruit_qtpy_esp32s2/sdkconfig | 36 ------------ .../boards/artisense_rd00/mpconfigboard.mk | 2 + .../espressif/boards/artisense_rd00/sdkconfig | 33 ++--------- .../atmegazero_esp32s2/mpconfigboard.mk | 2 + .../boards/atmegazero_esp32s2/sdkconfig | 33 ++--------- .../boards/bpi_bit_s2/mpconfigboard.mk | 2 + ports/espressif/boards/bpi_bit_s2/sdkconfig | 33 ++--------- .../crumpspace_crumps2/mpconfigboard.mk | 2 + .../boards/crumpspace_crumps2/sdkconfig | 33 ++--------- ports/espressif/boards/deneyap_mini/sdkconfig | 11 ++++ .../boards/deneyap_mini_v2/mpconfigboard.mk | 6 +- .../boards/deneyap_mini_v2/sdkconfig | 34 ++--------- .../boards/electroniccats_bastwifi/sdkconfig | 5 -- .../espressif_esp32s2_devkitc_1_n4/sdkconfig | 10 ++++ .../mpconfigboard.mk | 2 + .../sdkconfig | 33 ++--------- .../mpconfigboard.mk | 2 + .../sdkconfig | 33 ++--------- .../espressif_hmi_devkit_1/mpconfigboard.mk | 2 + .../boards/espressif_hmi_devkit_1/sdkconfig | 36 ------------ .../espressif_kaluga_1.3/mpconfigboard.mk | 2 + .../boards/espressif_kaluga_1.3/sdkconfig | 36 ------------ .../espressif_kaluga_1/mpconfigboard.mk | 2 + .../boards/espressif_kaluga_1/sdkconfig | 36 ------------ .../boards/espressif_saola_1_wroom/sdkconfig | 5 -- .../espressif_saola_1_wrover/mpconfigboard.mk | 2 + .../boards/espressif_saola_1_wrover/sdkconfig | 36 ------------ .../boards/franzininho_wifi_wroom/sdkconfig | 5 -- .../franzininho_wifi_wrover/mpconfigboard.mk | 2 + .../boards/franzininho_wifi_wrover/sdkconfig | 36 ------------ .../boards/gravitech_cucumber_m/sdkconfig | 10 ++++ .../boards/gravitech_cucumber_ms/sdkconfig | 10 ++++ .../gravitech_cucumber_r/mpconfigboard.mk | 2 + .../boards/gravitech_cucumber_r/sdkconfig | 33 ++--------- .../gravitech_cucumber_rs/mpconfigboard.mk | 2 + .../boards/gravitech_cucumber_rs/sdkconfig | 33 ++--------- .../boards/hexky_s2/mpconfigboard.mk | 2 + ports/espressif/boards/hexky_s2/sdkconfig | 36 ------------ .../boards/hiibot_iots2/mpconfigboard.mk | 2 + ports/espressif/boards/hiibot_iots2/sdkconfig | 35 ++---------- .../esp-idf-config/sdkconfig-esp32c3.defaults | 56 ++++++++++++++++++- .../esp-idf-config/sdkconfig-esp32s2.defaults | 52 ++++++++++++++++- .../esp-idf-config/sdkconfig-esp32s3.defaults | 50 +++++++++++++++++ .../sdkconfig-psram-40m.defaults | 2 +- .../sdkconfig-psram-8MB.defaults | 4 ++ .../esp-idf-config/sdkconfig-psram.defaults | 17 ++++-- .../esp-idf-config/sdkconfig.defaults | 31 ---------- ports/espressif/tools/update_sdkconfig.py | 6 +- 62 files changed, 334 insertions(+), 814 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 5c61e55fbe..acdddebc30 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -400,6 +400,9 @@ menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h update-all-sdkconfigs: $(BUILD)/esp-idf/config/sdkconfig.h python tools/update_sdkconfig.py --update_all --board=$(BOARD) --debug=$(DEBUG) +update-board-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h + python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) + BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) ifeq ($(IDF_TARGET),esp32) diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig b/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig index 24f7d625ea..3a08db70d5 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig +++ b/ports/espressif/boards/01space_lcd042_esp32c3/sdkconfig @@ -1,6 +1,15 @@ -# chip is ESP32-C3 FH4 +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="01Space-LCD042-ESP32C3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig index 0d9f0ca518..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig @@ -1,45 +0,0 @@ -# -# Component config -# -# -# ESP32S2-specific -# -# SPI RAM config -# -# 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 ESP32S2 -# -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# end of SPI RAM config - -# end of ESP32S2-specific - -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP - -# end of Component config diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk index cbe6bb2442..be2d2fb4e8 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_reverse_tft/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk index 691480c790..1a4d00e34b 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk index f2276ad9b6..ce85924ef7 100644 --- a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_ESPCAMERA = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_funhouse/sdkconfig +++ b/ports/espressif/boards/adafruit_funhouse/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk index 06b5a1c68d..de31f60d76 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk @@ -20,3 +20,5 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk index 96bd76ec27..1bf5fd818b 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.mk @@ -10,5 +10,5 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_PSRAM_SIZE = 2MB -CIRCUITPY_ESP_FLASH_MODE = qio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig index 1113345a50..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="Metro-ESP32S2" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk index 2285f8d594..1460667b9e 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/artisense_rd00/mpconfigboard.mk b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk index 8602034d4a..307169412f 100644 --- a/ports/espressif/boards/artisense_rd00/mpconfigboard.mk +++ b/ports/espressif/boards/artisense_rd00/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig index f776ea85a1..36749a928b 100644 --- a/ports/espressif/boards/artisense_rd00/sdkconfig +++ b/ports/espressif/boards/artisense_rd00/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="RD00-ESP32S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk index b39623ae94..aea0315c7a 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig index 6fa27c4eb2..0748a66c5c 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig +++ b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="ATMegaZero-Esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk b/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk index 6f9f3eeab7..ca2d074434 100644 --- a/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_bit_s2/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_ESP_FLASH_SIZE=4MB FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/bpi_bit_s2/sdkconfig b/ports/espressif/boards/bpi_bit_s2/sdkconfig index 7f9c6f5138..c9b6f75868 100644 --- a/ports/espressif/boards/bpi_bit_s2/sdkconfig +++ b/ports/espressif/boards/bpi_bit_s2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 is not set -CONFIG_SPIRAM_SPEED_40M=y -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 # CONFIG_LWIP_LOCAL_HOSTNAME="BPI-BIT-S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk index 871f68c452..a57c81fdf2 100644 --- a/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk +++ b/ports/espressif/boards/crumpspace_crumps2/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_BITBANG_APA102 = 1 # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig index 9fa2385f37..e1f568a2d8 100644 --- a/ports/espressif/boards/crumpspace_crumps2/sdkconfig +++ b/ports/espressif/boards/crumpspace_crumps2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="CrumpS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_mini/sdkconfig b/ports/espressif/boards/deneyap_mini/sdkconfig index 7dfaf3052c..3bcde1ab9e 100644 --- a/ports/espressif/boards/deneyap_mini/sdkconfig +++ b/ports/espressif/boards/deneyap_mini/sdkconfig @@ -1,4 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapMini" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk b/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk index fa9c6b40ea..08d5f8a7dd 100644 --- a/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_mini_v2/mpconfigboard.mk @@ -6,6 +6,10 @@ USB_MANUFACTURER = "Turkish Technology Team Foundation" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/deneyap_mini_v2/sdkconfig b/ports/espressif/boards/deneyap_mini_v2/sdkconfig index f202775431..be30fb4463 100644 --- a/ports/espressif/boards/deneyap_mini_v2/sdkconfig +++ b/ports/espressif/boards/deneyap_mini_v2/sdkconfig @@ -1,37 +1,15 @@ -CONFIG_ESP32S2_SPIRAM_SUPPORT=y # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapMini_v2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig +++ b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig index 1aad0eadd1..57f0da698a 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk index 874a1341a4..83a41e8f3f 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig index 705eeb1a61..57f0da698a 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 is not set -CONFIG_SPIRAM_SPEED_40M=y -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 # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk index ce2b45ccd3..d274e3e6dd 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=8MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig index 705eeb1a61..57f0da698a 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 is not set -CONFIG_SPIRAM_SPEED_40M=y -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 # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk index 8ce04357bf..7203fe0db2 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig +++ b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk index 975189924d..c442581bdd 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk index 975189924d..c442581bdd 100644 --- a/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_kaluga_1/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_kaluga_1/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk index a31c4d7498..b1614e6582 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk index d9c04b8b6c..a14512cb74 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig index af73f6d885..ec6db5c72e 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_m" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig index cbdd787aa7..f3cc39cc67 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_ms" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk index aa06644643..88729e7a44 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig index a7be128ca5..e817a86205 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_r" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk index f7b0cb2390..9ef503886d 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk +++ b/ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig index e176aa8613..873eb7207a 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="cucumber_rs" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/hexky_s2/mpconfigboard.mk b/ports/espressif/boards/hexky_s2/mpconfigboard.mk index d6809e5c01..fa7ae64a24 100644 --- a/ports/espressif/boards/hexky_s2/mpconfigboard.mk +++ b/ports/espressif/boards/hexky_s2/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 4MB FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/hexky_s2/sdkconfig b/ports/espressif/boards/hexky_s2/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/hexky_s2/sdkconfig +++ b/ports/espressif/boards/hexky_s2/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk b/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk index 411275a1ba..84a49c256f 100644 --- a/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk +++ b/ports/espressif/boards/hiibot_iots2/mpconfigboard.mk @@ -11,3 +11,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 8MB #CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/hiibot_iots2/sdkconfig b/ports/espressif/boards/hiibot_iots2/sdkconfig index 05249a050c..b2b83eb6e6 100644 --- a/ports/espressif/boards/hiibot_iots2/sdkconfig +++ b/ports/espressif/boards/hiibot_iots2/sdkconfig @@ -1,38 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32=y -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# CONFIG_SPIRAM_SIZE=2097152 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="HiiBot_IoTs2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index c913025124..1f328c0179 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -1,4 +1,54 @@ -# This file was generated using idf.py save-defconfig. It can be edited manually. -# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # -CONFIG_ESP_CONSOLE_SECONDARY_NONE=y +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth +# +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +# +# NimBLE Options +# +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +# end of Memory Settings + +CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options + +# +# Controller Options +# +# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set +# end of Controller Options + +# end of Bluetooth + +# +# Driver Configurations +# +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + +# end of Driver Configurations + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 527ab89e58..9afec598c4 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -1,10 +1,58 @@ -# This file was generated using idf.py save-defconfig. It can be edited manually. -# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Driver Configurations +# +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + +# end of Driver Configurations + +# +# ESP System Settings +# +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +# +# Cache config # CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y CONFIG_ESP32S2_DATA_CACHE_16KB=y +# end of Cache config +# +# Memory +# CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y +# end of Memory +# end of ESP System Settings + +# +# Ultra Low Power (ULP) Co-processor +# CONFIG_ULP_COPROC_ENABLED=y CONFIG_ULP_COPROC_RESERVE_MEM=8176 +# end of Ultra Low Power (ULP) Co-processor + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 310a95b86b..437aec9119 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -7,17 +7,65 @@ # # Bluetooth # +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y # # NimBLE Options # +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y CONFIG_BT_NIMBLE_PINNED_TO_CORE_1=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 +CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +# end of Memory Settings + +CONFIG_BT_NIMBLE_EXT_ADV=y # end of NimBLE Options +# +# Controller Options +# +# CONFIG_BT_CTRL_BLE_SCAN_DUPL is not set +# end of Controller Options + # end of Bluetooth +# +# Driver Configurations +# +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + +# end of Driver Configurations + # # ESP System Settings # +CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y +# +# Memory +# +CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y +# end of Memory + CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y # end of ESP System Settings @@ -32,6 +80,7 @@ CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 # 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=16 # CONFIG_ESP32_WIFI_NVS_ENABLED is not set # end of Wi-Fi @@ -39,6 +88,7 @@ CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 # # Ultra Low Power (ULP) Co-processor # +CONFIG_ULP_COPROC_ENABLED=y CONFIG_ULP_COPROC_RESERVE_MEM=8176 # end of Ultra Low Power (ULP) Co-processor diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults index 344bca55ee..5dba8c6d55 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-40m.defaults @@ -1,2 +1,2 @@ -CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults index e69de29bb2..b842862762 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-8MB.defaults @@ -0,0 +1,4 @@ +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults index 0da8eaf53d..d00b1f3d2a 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults @@ -4,6 +4,17 @@ # # 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 # @@ -16,12 +27,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # end of ESP PSRAM -# -# Wi-Fi -# -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -# end of Wi-Fi - # end of Component config # end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 3b52c2a565..f06c874efc 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -25,24 +25,6 @@ CONFIG_ADC_SUPPRESS_DEPRECATE_WARN=y CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y # end of GPTimer Configuration -# -# PCNT Configuration -# -CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y -# end of PCNT Configuration - -# -# RMT Configuration -# -CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y -# end of RMT Configuration - -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # @@ -54,13 +36,6 @@ CONFIG_ESP_TLS_SERVER=y # # ESP System Settings # -CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y -# -# Memory -# -CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM=y -# end of Memory - CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 # CONFIG_ESP_TASK_WDT_INIT is not set # end of ESP System Settings @@ -112,12 +87,6 @@ CONFIG_MBEDTLS_SSL_PROTO_DTLS=y CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 # end of SPI Flash driver -# -# Ultra Low Power (ULP) Co-processor -# -CONFIG_ULP_COPROC_ENABLED=y -# end of Ultra Low Power (ULP) Co-processor - # # Camera configuration # diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index f8e4b5a4f3..7dc568f951 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -222,7 +222,8 @@ def update(debug, board, update_all): ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") sdkconfigs.append(ble_config) board_config = pathlib.Path(f"boards/{board}/sdkconfig") - sdkconfigs.append(board_config) + # Don't include the board file in cp defaults. The board may have custom + # overrides. cp_kconfig_defaults = kconfiglib.Kconfig(kconfig_path) for default_file in sdkconfigs: @@ -297,9 +298,10 @@ def update(debug, board, update_all): matches_cp_default = cp_kconfig_defaults.syms[item.name].str_value == item.str_value matches_esp_default = sym_default(item) - print_debug = not matches_esp_default + print_debug = not matches_esp_default or (not update_all and not matches_cp_default) if print_debug: print(" " * len(current_group), i, config_string.strip()) + print("default", cp_kconfig_defaults.syms[item.name].str_value, item.str_value) # Some files are `rsource`d into another kconfig with $IDF_TARGET as # part of the path. kconfiglib doesn't show this as a reference so From 2a45d95f9d8e6baf9654e3eaf0db0618b7c5bcd3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 8 Sep 2023 16:28:03 -0700 Subject: [PATCH 078/129] Use correct flash defaults --- .../boards/adafruit_feather_esp32s3_nopsram/sdkconfig | 10 ++++++++++ ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig | 10 ++++++++++ .../boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig | 10 ++++++++++ .../espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig | 10 ++++++++++ ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig | 10 ++++++++++ ports/espressif/boards/beetle-esp32-c3/sdkconfig | 10 ++++++++++ .../boards/espressif_esp32c3_devkitm_1_n4/sdkconfig | 10 ++++++++++ .../boards/espressif_esp32s3_devkitc_1_n8/sdkconfig | 10 ++++++++++ .../boards/espressif_esp32s3_devkitm_1_n8/sdkconfig | 10 ++++++++++ .../boards/espressif_esp32s3_usb_otg_n8/sdkconfig | 10 ++++++++++ ports/espressif/tools/update_sdkconfig.py | 10 +++++++++- 11 files changed, 109 insertions(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig index 1a7d20d834..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig index b47420753c..aa82df2b81 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Adafruit-QTPy-ESP32C3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig index 1a7d20d834..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig index 60d8719596..411bc17724 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="AIThinker-ESP32C3S-2M" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig b/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig index 88467d9c9e..435604eb4b 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="AIThinker-ESP32C3S" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/beetle-esp32-c3/sdkconfig b/ports/espressif/boards/beetle-esp32-c3/sdkconfig index 69da6d30fd..2b4299082a 100644 --- a/ports/espressif/boards/beetle-esp32-c3/sdkconfig +++ b/ports/espressif/boards/beetle-esp32-c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="beetle-esp32-c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig index 0e24f8dc77..c4def86e69 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="ESP32-C3-DevKitM-1" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig index 1a7d20d834..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig index 1a7d20d834..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitm_1_n8/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig index 1a7d20d834..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_usb_otg_n8/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 7dc568f951..ef8d3c0b87 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -206,7 +206,15 @@ def update(debug, board, update_all): else: opt_config = pathlib.Path("esp-idf-config/sdkconfig-opt.defaults") sdkconfigs.append(opt_config) - flash_size_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_size}.defaults") + size_options = "" + if flash_size == "2MB": + size_options = "-no-ota-no-uf2" + elif target in ("esp32", "esp32c3"): + # These boards don't have native USB. + size_options = "-no-uf2" + flash_size_config = pathlib.Path( + f"esp-idf-config/sdkconfig-flash-{flash_size}{size_options}.defaults" + ) flash_mode_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_mode}.defaults") flash_freq_config = pathlib.Path(f"esp-idf-config/sdkconfig-flash-{flash_freq}.defaults") sdkconfigs.extend((flash_size_config, flash_mode_config, flash_freq_config)) From 5937f4c0c0cf478418a985ea882b081bab242f6a Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 11 Sep 2023 15:27:16 -0700 Subject: [PATCH 079/129] Hopefully finish updating kconfig --- .../adafruit_feather_huzzah32/sdkconfig | 19 ------ .../adafruit_huzzah32_breakout/sdkconfig | 19 ------ .../mpconfigboard.mk | 4 ++ .../sdkconfig | 42 ++----------- .../boards/crcibernetica-ideaboard/sdkconfig | 19 ------ .../boards/deneyap_kart/mpconfigboard.mk | 4 ++ ports/espressif/boards/deneyap_kart/sdkconfig | 19 ------ .../boards/deneyap_kart_1a/mpconfigboard.mk | 4 ++ .../boards/deneyap_kart_1a/sdkconfig | 19 ------ .../deneyap_kart_1a_v2/mpconfigboard.mk | 5 ++ .../boards/deneyap_kart_1a_v2/sdkconfig | 42 ++----------- .../espressif/boards/deneyap_kart_g/sdkconfig | 10 ++++ .../boards/doit_esp32_devkit_v1/sdkconfig | 19 ------ .../espressif/boards/es3ink/mpconfigboard.mk | 4 ++ ports/espressif/boards/es3ink/sdkconfig | 29 +++++---- .../boards/lilygo_ttgo_t-01c3/sdkconfig | 10 ++++ .../boards/lilygo_ttgo_t-oi-plus/sdkconfig | 10 ++++ .../lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig | 5 -- .../lilygo_ttgo_tdisplay_esp32_16m/sdkconfig | 10 ++++ .../lilygo_twatch_2020_v3/mpconfigboard.mk | 4 ++ .../boards/lilygo_twatch_2020_v3/sdkconfig | 27 +++------ .../espressif/boards/lolin_c3_mini/sdkconfig | 10 ++++ .../espressif/boards/lolin_c3_pico/sdkconfig | 10 ++++ .../boards/lolin_s3_mini/mpconfigboard.mk | 4 ++ .../espressif/boards/lolin_s3_mini/sdkconfig | 43 ++------------ .../boards/luatos_core_esp32c3/sdkconfig | 10 ++++ .../luatos_core_esp32c3_ch343/sdkconfig | 10 ++++ .../boards/m5stack_atom_echo/sdkconfig | 28 +++------ .../boards/m5stack_atom_lite/sdkconfig | 29 +++------ .../boards/m5stack_atom_matrix/sdkconfig | 28 +++------ .../espressif/boards/m5stack_atom_u/sdkconfig | 28 +++------ .../boards/m5stack_atoms3_lite/sdkconfig | 12 +++- .../boards/m5stack_core2/mpconfigboard.mk | 4 ++ .../espressif/boards/m5stack_core2/sdkconfig | 59 +++++++++++-------- .../boards/m5stack_core_basic/sdkconfig | 50 +++++++++------- .../boards/m5stack_stamp_c3/sdkconfig | 10 ++++ .../boards/m5stack_stick_c/sdkconfig | 26 +++----- .../boards/m5stack_stick_c_plus/sdkconfig | 29 +++------ .../m5stack_timer_camera_x/mpconfigboard.mk | 4 ++ .../boards/m5stack_timer_camera_x/sdkconfig | 54 ++++++++++------- ports/espressif/boards/maker_badge/sdkconfig | 11 ++++ .../boards/microdev_micro_c3/sdkconfig | 10 ++++ .../boards/mixgo_ce_serial/sdkconfig | 5 -- .../espressif/boards/mixgo_ce_udisk/sdkconfig | 5 -- .../boards/morpheans_morphesp-240/sdkconfig | 10 ++++ .../muselab_nanoesp32_s2_wroom/sdkconfig | 5 -- .../boards/seeed_xiao_esp32c3/sdkconfig | 10 ++++ .../smartbeedesigns_bee_data_logger/sdkconfig | 11 +++- .../smartbeedesigns_bee_motion_s3/sdkconfig | 10 ++++ .../boards/smartbeedesigns_bee_s3/sdkconfig | 10 ++++ .../targett_module_clip_wroom/sdkconfig | 5 -- .../unexpectedmaker_nanos3/mpconfigboard.mk | 4 ++ .../boards/unexpectedmaker_nanos3/sdkconfig | 36 ++--------- .../boards/yd_esp32_s3_n16r8/mpconfigboard.mk | 4 ++ .../boards/yd_esp32_s3_n16r8/sdkconfig | 29 +++++---- .../boards/yd_esp32_s3_n8r8/mpconfigboard.mk | 4 ++ .../boards/yd_esp32_s3_n8r8/sdkconfig | 29 +++++---- ports/espressif/mpconfigport.mk | 1 - ports/espressif/tools/update_sdkconfig.py | 3 +- 59 files changed, 443 insertions(+), 531 deletions(-) diff --git a/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig b/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig index 645ab76c47..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_huzzah32/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 diff --git a/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig b/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig index 645ab76c47..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig +++ b/ports/espressif/boards/adafruit_huzzah32_breakout/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 50b1394a25..60ed676f44 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -10,4 +10,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig index 9a05ab0205..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig @@ -1,43 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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=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=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 # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig index 645ab76c47..e69de29bb2 100644 --- a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig +++ b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 diff --git a/ports/espressif/boards/deneyap_kart/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart/mpconfigboard.mk index ea8c9a8522..c0667ee4fe 100644 --- a/ports/espressif/boards/deneyap_kart/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/deneyap_kart/sdkconfig b/ports/espressif/boards/deneyap_kart/sdkconfig index 7ec0461dcf..e69de29bb2 100644 --- a/ports/espressif/boards/deneyap_kart/sdkconfig +++ b/ports/espressif/boards/deneyap_kart/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# -# 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 -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk index 976083217e..423ee1e3e5 100644 --- a/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_1a/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/deneyap_kart_1a/sdkconfig b/ports/espressif/boards/deneyap_kart_1a/sdkconfig index 7ec0461dcf..e69de29bb2 100644 --- a/ports/espressif/boards/deneyap_kart_1a/sdkconfig +++ b/ports/espressif/boards/deneyap_kart_1a/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=y -# -# 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 -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk index 5fa5d4822f..fc1cf53139 100644 --- a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk @@ -9,4 +9,9 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig b/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig index 2cdb172e06..2d5e06f985 100644 --- a/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig +++ b/ports/espressif/boards/deneyap_kart_1a_v2/sdkconfig @@ -1,43 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 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_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 # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKart1A_v2" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/deneyap_kart_g/sdkconfig b/ports/espressif/boards/deneyap_kart_g/sdkconfig index a988de5fea..f239c31405 100644 --- a/ports/espressif/boards/deneyap_kart_g/sdkconfig +++ b/ports/espressif/boards/deneyap_kart_g/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="DeneyapKartG" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig b/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig index 645ab76c47..e69de29bb2 100644 --- a/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig +++ b/ports/espressif/boards/doit_esp32_devkit_v1/sdkconfig @@ -1,19 +0,0 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 diff --git a/ports/espressif/boards/es3ink/mpconfigboard.mk b/ports/espressif/boards/es3ink/mpconfigboard.mk index bd55e68379..bb102bf202 100644 --- a/ports/espressif/boards/es3ink/mpconfigboard.mk +++ b/ports/espressif/boards/es3ink/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE=dio 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 diff --git a/ports/espressif/boards/es3ink/sdkconfig b/ports/espressif/boards/es3ink/sdkconfig index 89d29d8ea9..b023c59d03 100644 --- a/ports/espressif/boards/es3ink/sdkconfig +++ b/ports/espressif/boards/es3ink/sdkconfig @@ -1,16 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 - -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# CONFIG_LWIP_LOCAL_HOSTNAME="es3ink" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig index 9d906d3c3b..54105bd51b 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t-01c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="LILYGO TTGO T-01C3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig index 7c85db8776..fc0f5c6edd 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="LILYGO TTGO T-OI PLUS" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_esp32_s2_wroom/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig b/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig index 55052e98ca..61beea449b 100644 --- a/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_tdisplay_esp32_16m/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-TDISPLAY" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk b/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk index 9d6c8dc25b..f881eddc13 100644 --- a/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_twatch_2020_v3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = dio 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 diff --git a/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig b/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig index 89647ab5a1..d1e302072a 100644 --- a/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig +++ b/ports/espressif/boards/lilygo_twatch_2020_v3/sdkconfig @@ -1,31 +1,22 @@ -# SPI RAM config # -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # ESP System Settings # -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=1 CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -# CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set # end of ESP System Settings + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_c3_mini/sdkconfig b/ports/espressif/boards/lolin_c3_mini/sdkconfig index 833f8368fa..932a4a2cbd 100644 --- a/ports/espressif/boards/lolin_c3_mini/sdkconfig +++ b/ports/espressif/boards/lolin_c3_mini/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="lolin-c3-mini" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_c3_pico/sdkconfig b/ports/espressif/boards/lolin_c3_pico/sdkconfig index b801dac1e2..00134fd0f2 100644 --- a/ports/espressif/boards/lolin_c3_pico/sdkconfig +++ b/ports/espressif/boards/lolin_c3_pico/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="lolin-c3-pico" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk index 2a02d7f231..4c54787bbb 100644 --- a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk @@ -9,6 +9,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m + # OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/lolin_s3_mini/sdkconfig b/ports/espressif/boards/lolin_s3_mini/sdkconfig index c9fa5f3e51..36be9c760e 100644 --- a/ports/espressif/boards/lolin_s3_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s3_mini/sdkconfig @@ -1,44 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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=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=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_40M=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 -# CONFIG_SPIRAM_MODE_OCT=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -46,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="LOLIN-S3-MINI" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/luatos_core_esp32c3/sdkconfig b/ports/espressif/boards/luatos_core_esp32c3/sdkconfig index ccc70917b5..7d94db0b5b 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/sdkconfig +++ b/ports/espressif/boards/luatos_core_esp32c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="luatos-core-esp32c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig b/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig index ccc70917b5..7d94db0b5b 100644 --- a/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="luatos-core-esp32c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_echo/sdkconfig b/ports/espressif/boards/m5stack_atom_echo/sdkconfig index c86eaa11fe..861e4ebad3 100644 --- a/ports/espressif/boards/m5stack_atom_echo/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_echo/sdkconfig @@ -1,25 +1,15 @@ - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomEcho" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_lite/sdkconfig b/ports/espressif/boards/m5stack_atom_lite/sdkconfig index 50e85a6afe..eaaf716a15 100644 --- a/ports/espressif/boards/m5stack_atom_lite/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_lite/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomLite" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig index 55e5bd3a94..730f17de0e 100644 --- a/ports/espressif/boards/m5stack_atom_matrix/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_matrix/sdkconfig @@ -1,25 +1,15 @@ - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomMatrix" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atom_u/sdkconfig b/ports/espressif/boards/m5stack_atom_u/sdkconfig index 9d47d05b4f..06d0f01693 100644 --- a/ports/espressif/boards/m5stack_atom_u/sdkconfig +++ b/ports/espressif/boards/m5stack_atom_u/sdkconfig @@ -1,25 +1,15 @@ - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomU" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig b/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig index 9d924272ec..f5ef797681 100644 --- a/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig +++ b/ports/espressif/boards/m5stack_atoms3_lite/sdkconfig @@ -1,7 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core2/mpconfigboard.mk b/ports/espressif/boards/m5stack_core2/mpconfigboard.mk index 74ed5bcb83..c8954579ee 100644 --- a/ports/espressif/boards/m5stack_core2/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_core2/mpconfigboard.mk @@ -7,6 +7,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + M5STACK_CORE2_5V_OUTPUT_ENABLE_DEFAULT = 1 CFLAGS += -DM5STACK_CORE2_5V_OUTPUT_ENABLE_DEFAULT=$(M5STACK_CORE2_5V_OUTPUT_ENABLE_DEFAULT) diff --git a/ports/espressif/boards/m5stack_core2/sdkconfig b/ports/espressif/boards/m5stack_core2/sdkconfig index 47a0a18a5e..b8a37f0d84 100644 --- a/ports/espressif/boards/m5stack_core2/sdkconfig +++ b/ports/espressif/boards/m5stack_core2/sdkconfig @@ -1,6 +1,36 @@ -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 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision + +# +# Sleep Config +# +CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y +# end of Sleep Config + +# end of Hardware Settings # # LWIP @@ -8,27 +38,6 @@ CONFIG_ESP32_REV_MIN_3=y CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCore2" # end of LWIP -# -# 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=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config +# end of Component config -# 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 +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core_basic/sdkconfig b/ports/espressif/boards/m5stack_core_basic/sdkconfig index 44896d5883..5b7ecf8709 100644 --- a/ports/espressif/boards/m5stack_core_basic/sdkconfig +++ b/ports/espressif/boards/m5stack_core_basic/sdkconfig @@ -1,27 +1,37 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y -CONFIG_ESP32_REV_MIN_3=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 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision + +# end of Hardware Settings -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreBasic" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_stamp_c3/sdkconfig b/ports/espressif/boards/m5stack_stamp_c3/sdkconfig index 34260aa7f2..87330ec13b 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/sdkconfig +++ b/ports/espressif/boards/m5stack_stamp_c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="m5stack-stamp-c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_stick_c/sdkconfig b/ports/espressif/boards/m5stack_stick_c/sdkconfig index 7f8426e4cb..2e72fdb216 100644 --- a/ports/espressif/boards/m5stack_stick_c/sdkconfig +++ b/ports/espressif/boards/m5stack_stick_c/sdkconfig @@ -1,23 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskStickC" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig b/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig index a37e88cedf..54f50db25c 100644 --- a/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig +++ b/ports/espressif/boards/m5stack_stick_c_plus/sdkconfig @@ -1,26 +1,15 @@ -CONFIG_ESP32_SPIRAM_SUPPORT=n - -# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskStickCPlus" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk index 6339db806b..7f48c05863 100644 --- a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig b/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig index 06cce7a595..a600e00b31 100644 --- a/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig +++ b/ports/espressif/boards/m5stack_timer_camera_x/sdkconfig @@ -1,27 +1,37 @@ -# ESP32-D0WDQ6-V3 (revision 3) -CONFIG_ESP32_SPIRAM_SUPPORT=y -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=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 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision -# PSRAM -CONFIG_D0WD_PSRAM_CLK_IO=17 -CONFIG_D0WD_PSRAM_CS_IO=16 +# end of Hardware Settings -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - -# Hostname +# +# LWIP +# CONFIG_LWIP_LOCAL_HOSTNAME="M5StackTimerX" +# end of LWIP -# Camera -CONFIG_OV3660_SUPPORT=y -CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y -CONFIG_CAMERA_CORE0=y -CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/maker_badge/sdkconfig b/ports/espressif/boards/maker_badge/sdkconfig index 8af8e2c9d2..d62227df74 100644 --- a/ports/espressif/boards/maker_badge/sdkconfig +++ b/ports/espressif/boards/maker_badge/sdkconfig @@ -1,4 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="Maker_badge" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/microdev_micro_c3/sdkconfig b/ports/espressif/boards/microdev_micro_c3/sdkconfig index f6f038a77c..9b13279bd3 100644 --- a/ports/espressif/boards/microdev_micro_c3/sdkconfig +++ b/ports/espressif/boards/microdev_micro_c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microC3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/mixgo_ce_serial/sdkconfig b/ports/espressif/boards/mixgo_ce_serial/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/mixgo_ce_serial/sdkconfig +++ b/ports/espressif/boards/mixgo_ce_serial/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/mixgo_ce_udisk/sdkconfig b/ports/espressif/boards/mixgo_ce_udisk/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/mixgo_ce_udisk/sdkconfig +++ b/ports/espressif/boards/mixgo_ce_udisk/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig index 55199905be..b0a838eacc 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig +++ b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MORPHESP-240" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig b/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig index b2c9bc0fe6..a593f1d173 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig +++ b/ports/espressif/boards/seeed_xiao_esp32c3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="seeed-xiao-esp32c3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig index 4008263f8d..deb1b88d7c 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_data_logger/sdkconfig @@ -1,6 +1,15 @@ -# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="smartbeedesigns_bee_data_logger" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig index 8457338560..fe95b60d4c 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_motion_s3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="smartbeedesigns_bee_motion_s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig b/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig index 6eda3c0adb..2c7a057567 100644 --- a/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig +++ b/ports/espressif/boards/smartbeedesigns_bee_s3/sdkconfig @@ -1,5 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="smartbeedesigns_bee_s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig index 3525371bc7..e69de29bb2 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk index c61654bfc3..9fd196d4bf 100644 --- a/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_nanos3/mpconfigboard.mk @@ -9,6 +9,10 @@ CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + # CIRCUITPY_BITBANG_NEOPIXEL = 1 # Include these Python libraries in firmware. diff --git a/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig b/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig index c1dee83717..815f002d38 100644 --- a/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_nanos3/sdkconfig @@ -1,39 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# 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 -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMNanoS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk b/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk index 2120ba97cb..be875cd895 100644 --- a/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk +++ b/ports/espressif/boards/yd_esp32_s3_n16r8/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio 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 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig b/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig index 5aff7f49b1..f5ef797681 100644 --- a/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig +++ b/ports/espressif/boards/yd_esp32_s3_n16r8/sdkconfig @@ -1,16 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 - -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk b/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk index 766e71dc2d..6ff5cada7c 100644 --- a/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk +++ b/ports/espressif/boards/yd_esp32_s3_n8r8/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig b/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig index 5aff7f49b1..f5ef797681 100644 --- a/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig +++ b/ports/espressif/boards/yd_esp32_s3_n8r8/sdkconfig @@ -1,16 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y - -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_SPEED_80M=y - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -CONFIG_DEFAULT_PSRAM_CS_IO=26 - -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 21fc50c874..2c358637cc 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -48,7 +48,6 @@ CIRCUITPY_WIFI ?= 1 # Conditionally turn off modules/features ifeq ($(IDF_TARGET),esp32) # Modules -CIRCUITPY_BLEIO = 0 CIRCUITPY_RGBMATRIX = 0 # Features CIRCUITPY_USB = 0 diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index ef8d3c0b87..898c8979eb 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -298,7 +298,7 @@ def update(debug, board, update_all): if cp_sym.str_value == "n": config_string = f"# CONFIG_{item.name} is not set" else: - config_string = "" + continue if node.list: pending_nodes.append(node.list) @@ -309,7 +309,6 @@ def update(debug, board, update_all): print_debug = not matches_esp_default or (not update_all and not matches_cp_default) if print_debug: print(" " * len(current_group), i, config_string.strip()) - print("default", cp_kconfig_defaults.syms[item.name].str_value, item.str_value) # Some files are `rsource`d into another kconfig with $IDF_TARGET as # part of the path. kconfiglib doesn't show this as a reference so From cb6b4d0d4a820bd4066ace2d89a8d516a0480b51 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 11 Sep 2023 15:57:09 -0700 Subject: [PATCH 080/129] Fix esp-camera. 32 was dropped so the path doesn't have esp32 in it. --- ports/espressif/Makefile | 6 +++--- ports/espressif/common-hal/espcamera/Camera.c | 2 +- ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index acdddebc30..69b2ff1a38 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -275,8 +275,8 @@ SRC_CAMERA := \ $(wildcard common-hal/espcamera/*.c) \ $(wildcard bindings/espcamera/*.c) SRC_C += $(SRC_CAMERA) -CFLAGS += -isystem esp32-camera/driver/include -CFLAGS += -isystem esp32-camera/conversions/include +CFLAGS += -isystem esp-camera/driver/include +CFLAGS += -isystem esp-camera/conversions/include endif ifneq ($(CIRCUITPY_ESPIDF),0) @@ -436,7 +436,7 @@ ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal endif ifneq ($(CIRCUITPY_ESPCAMERA),0) -ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp32-camera/libesp32-camera.a +ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp-camera/libesp-camera.a #$(error $(ESP_IDF_COMPONENTS_EXPANDED)) endif diff --git a/ports/espressif/common-hal/espcamera/Camera.c b/ports/espressif/common-hal/espcamera/Camera.c index 7db8a4b4c1..cdf7ab63c8 100644 --- a/ports/espressif/common-hal/espcamera/Camera.c +++ b/ports/espressif/common-hal/espcamera/Camera.c @@ -35,7 +35,7 @@ #include "shared-bindings/util.h" #include "common-hal/microcontroller/Pin.h" -#include "esp32-camera/driver/private_include/cam_hal.h" +#include "esp-camera/driver/private_include/cam_hal.h" #if !CONFIG_SPIRAM #error espcamera only works on boards configured with spiram, disable it in mpconfigboard.mk diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults index d93069e02b..ad262b4918 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-qio.defaults @@ -1 +1,2 @@ CONFIG_SPIRAM_MODE_QUAD=y +# CONFIG_SPIRAM_MODE_OCT is not set From 0a9ae1f6bafd18e3e736ae7352feab93059e4c87 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 11 Sep 2023 15:58:07 -0700 Subject: [PATCH 081/129] Code size optimizations --- .../esp-idf-config/sdkconfig-opt.defaults | 1 + .../esp-idf-config/sdkconfig.defaults | 26 +++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index 46efd79e45..ebf294736a 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -12,6 +12,7 @@ CONFIG_BOOTLOADER_LOG_LEVEL_NONE=y # CONFIG_COMPILER_OPTIMIZATION_SIZE=y CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y # end of Compiler options # diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index f06c874efc..279c23c2c5 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -27,17 +27,12 @@ CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y # end of Driver Configurations -# -# ESP-TLS -# -CONFIG_ESP_TLS_SERVER=y -# end of ESP-TLS - # # ESP System Settings # CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 # CONFIG_ESP_TASK_WDT_INIT is not set +# CONFIG_ESP_DEBUG_OCDAWARE is not set # end of ESP System Settings # @@ -70,14 +65,29 @@ CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle +CONFIG_MBEDTLS_TLS_CLIENT_ONLY=y # # TLS Key Exchange Methods # -CONFIG_MBEDTLS_PSK_MODES=y -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y +# CONFIG_MBEDTLS_KEY_EXCHANGE_RSA is not set # end of TLS Key Exchange Methods CONFIG_MBEDTLS_SSL_PROTO_DTLS=y +# +# Certificates +# +# CONFIG_MBEDTLS_PEM_WRITE_C is not set +# end of Certificates + +# CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED is not set +# CONFIG_MBEDTLS_ECP_NIST_OPTIM is not set # end of mbedTLS # From 18fd0045f69183538f1fb29e09aef55a936bb963 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 11 Sep 2023 16:53:14 -0700 Subject: [PATCH 082/129] More kconfig updates --- .../sdkconfig | 5 -- .../mpconfigboard.mk | 8 +- .../sdkconfig | 40 ++-------- .../adafruit_qtpy_esp32_pico/mpconfigboard.mk | 4 +- .../boards/adafruit_qtpy_esp32_pico/sdkconfig | 44 ----------- .../mpconfigboard.mk | 4 +- .../ai_thinker_esp_12k_nodemcu/sdkconfig | 36 --------- .../boards/bpi_leaf_s3/mpconfigboard.mk | 8 +- ports/espressif/boards/bpi_leaf_s3/sdkconfig | 40 ++-------- .../boards/bpi_picow_s3/mpconfigboard.mk | 8 +- ports/espressif/boards/bpi_picow_s3/sdkconfig | 40 ++-------- .../brainboardz_neuron/mpconfigboard.mk | 4 +- .../boards/brainboardz_neuron/sdkconfig | 30 ++------ .../mpconfigboard.mk | 8 +- .../cytron_maker_feather_aiot_s3/sdkconfig | 30 ++------ .../espressif_esp32_eye/mpconfigboard.mk | 6 +- .../boards/espressif_esp32_eye/sdkconfig | 54 +++---------- .../espressif_esp32_lyrat/mpconfigboard.mk | 4 +- .../boards/espressif_esp32_lyrat/sdkconfig | 36 --------- .../espressif_esp32s3_box/mpconfigboard.mk | 4 +- .../boards/espressif_esp32s3_box/sdkconfig | 33 ++------ .../mpconfigboard.mk | 4 +- .../espressif_esp32s3_box_lite/sdkconfig | 33 ++------ .../mpconfigboard.mk | 6 +- .../sdkconfig | 73 ++---------------- .../mpconfigboard.mk | 4 +- .../sdkconfig | 40 ++-------- .../mpconfigboard.mk | 4 +- .../sdkconfig | 30 ++------ .../espressif_esp32s3_eye/mpconfigboard.mk | 4 +- .../boards/espressif_esp32s3_eye/sdkconfig | 30 ++------ .../hardkernel_odroid_go/mpconfigboard.mk | 4 +- .../boards/hardkernel_odroid_go/sdkconfig | 36 --------- .../lilygo_tembed_esp32s3/mpconfigboard.mk | 4 +- .../boards/lilygo_tembed_esp32s3/sdkconfig | 30 ++------ .../boards/lilygo_ttgo_t8_s2/mpconfigboard.mk | 4 +- .../boards/lilygo_ttgo_t8_s2/sdkconfig | 33 ++------ .../lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk | 4 +- .../boards/lilygo_ttgo_t8_s2_st7789/sdkconfig | 33 ++------ .../boards/lolin_s2_mini/mpconfigboard.mk | 7 +- .../espressif/boards/lolin_s2_mini/sdkconfig | 33 ++------ .../boards/lolin_s2_pico/mpconfigboard.mk | 7 +- .../espressif/boards/lolin_s2_pico/sdkconfig | 33 ++------ .../boards/lolin_s3/mpconfigboard.mk | 8 +- ports/espressif/boards/lolin_s3/sdkconfig | 41 ++-------- .../boards/m5stack_core_fire/mpconfigboard.mk | 7 +- .../boards/m5stack_core_fire/sdkconfig | 76 +++++++------------ .../boards/microdev_micro_s2/mpconfigboard.mk | 4 +- .../boards/microdev_micro_s2/sdkconfig | 33 ++------ .../mpconfigboard.mk | 4 +- .../muselab_nanoesp32_s2_wrover/sdkconfig | 25 ------ .../odt_pixelwing_esp32_s2/mpconfigboard.mk | 4 +- .../boards/odt_pixelwing_esp32_s2/sdkconfig | 33 ++------ .../mpconfigboard.mk | 1 + .../mpconfigboard.mk | 4 +- .../targett_module_clip_wrover/sdkconfig | 36 --------- .../mpconfigboard.mk | 8 +- .../unexpectedmaker_feathers2/sdkconfig | 33 ++------ .../mpconfigboard.mk | 8 +- .../unexpectedmaker_feathers2_neo/sdkconfig | 33 ++------ .../mpconfigboard.mk | 8 +- .../sdkconfig | 33 ++------ .../mpconfigboard.mk | 8 +- .../unexpectedmaker_feathers3/sdkconfig | 35 ++------- .../unexpectedmaker_pros3/mpconfigboard.mk | 8 +- .../boards/unexpectedmaker_pros3/sdkconfig | 35 ++------- .../unexpectedmaker_tinypico/mpconfigboard.mk | 4 +- .../boards/unexpectedmaker_tinypico/sdkconfig | 19 ----- .../mpconfigboard.mk | 4 +- .../unexpectedmaker_tinypico_nano/sdkconfig | 19 ----- .../unexpectedmaker_tinys2/mpconfigboard.mk | 8 +- .../boards/unexpectedmaker_tinys2/sdkconfig | 33 ++------ .../unexpectedmaker_tinys3/mpconfigboard.mk | 8 +- .../boards/unexpectedmaker_tinys3/sdkconfig | 37 ++------- .../mpconfigboard.mk | 4 +- .../waveshare_esp32_s2_pico_lcd/sdkconfig | 33 ++------ .../waveshare_esp32s2_pico/mpconfigboard.mk | 4 +- .../boards/waveshare_esp32s2_pico/sdkconfig | 21 ++--- .../sdkconfig-flash-dout.defaults | 6 ++ .../sdkconfig-flash-opi.defaults | 6 ++ .../sdkconfig-psram-120m.defaults | 3 + .../sdkconfig-psram-4MB.defaults | 4 + .../tools/update_all_board_sdkconfig.py | 20 +++++ 83 files changed, 391 insertions(+), 1229 deletions(-) delete mode 100644 ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults create mode 100644 ports/espressif/tools/update_all_board_sdkconfig.py diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig deleted file mode 100644 index 3525371bc7..0000000000 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig +++ /dev/null @@ -1,5 +0,0 @@ -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk index 4f7eaab71e..e45e4bc707 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -5,11 +5,13 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig index 5d5860b546..f5ef797681 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/sdkconfig @@ -1,41 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # -# -# ESP32S3-Specific -# -# SPI RAM config -# -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -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=2097152 -# -# PSRAM Clock and CS IO for ESP32S3 -# -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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 # @@ -43,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk index 8d001428cc..829acb46f9 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk @@ -3,8 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00320003 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig index ac74f0f06c..e69de29bb2 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/sdkconfig @@ -1,44 +0,0 @@ -# -# SPI RAM config -# -# 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_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set - -### # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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=32 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk index aef03973c0..fdb03078d4 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Ai-Thinker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig index eacb2e75aa..e69de29bb2 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk index 42a5901d97..705577187e 100644 --- a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.mk @@ -5,11 +5,13 @@ USB_MANUFACTURER = "BananaPi" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE=8MB CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/bpi_leaf_s3/sdkconfig b/ports/espressif/boards/bpi_leaf_s3/sdkconfig index ee0414205d..6b3f2584c7 100644 --- a/ports/espressif/boards/bpi_leaf_s3/sdkconfig +++ b/ports/espressif/boards/bpi_leaf_s3/sdkconfig @@ -1,41 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # -# -# ESP32S3-Specific -# -# 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_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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 # @@ -43,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="BPI-Leaf-S3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk b/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk index 36aa247870..02969c05c2 100644 --- a/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk +++ b/ports/espressif/boards/bpi_picow_s3/mpconfigboard.mk @@ -12,11 +12,13 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/bpi_picow_s3/sdkconfig b/ports/espressif/boards/bpi_picow_s3/sdkconfig index 6a97d1351c..914b077264 100644 --- a/ports/espressif/boards/bpi_picow_s3/sdkconfig +++ b/ports/espressif/boards/bpi_picow_s3/sdkconfig @@ -1,41 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # -# -# ESP32S3-Specific -# -# 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_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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 # @@ -43,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="BPI-PicoW-S3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk index 05a5eb3367..c7ee91cb3e 100755 --- a/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk +++ b/ports/espressif/boards/brainboardz_neuron/mpconfigboard.mk @@ -6,8 +6,10 @@ USB_MANUFACTURER = "BrainBoardz" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/brainboardz_neuron/sdkconfig b/ports/espressif/boards/brainboardz_neuron/sdkconfig index 16c84dd988..e553af1776 100755 --- a/ports/espressif/boards/brainboardz_neuron/sdkconfig +++ b/ports/espressif/boards/brainboardz_neuron/sdkconfig @@ -1,33 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="BrainBoardzNeuron" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk b/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk index a37170ba67..98ed6a50fc 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/mpconfigboard.mk @@ -5,11 +5,13 @@ USB_MANUFACTURER = "Cytron" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig index d9cbd73072..f5ef797681 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/sdkconfig @@ -1,33 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk index c59c277d45..65198b8936 100644 --- a/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_eye/mpconfigboard.mk @@ -3,8 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00320001 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB -CIRCUITPY_ESP_PSRAM_SIZE = 0MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/espressif_esp32_eye/sdkconfig b/ports/espressif/boards/espressif_esp32_eye/sdkconfig index 0e53c6bbd1..0ff3ef839f 100644 --- a/ports/espressif/boards/espressif_esp32_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_eye/sdkconfig @@ -1,69 +1,35 @@ -# Automatically generated file. DO NOT EDIT. -# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +# Espressif IoT Development Framework Configuration # # # Component config # # -# ESP32-specific +# 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=-1 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y -# CONFIG_SPIRAM_BANKSWITCH_ENABLE is not set -# end of SPI RAM config +# Sleep Config +# +CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y +# end of Sleep Config -# end of ESP32-specific - -# -# NVS -# -# CONFIG_NVS_ASSERT_ERROR_CHECK is not set -# end of NVS +# end of Hardware Settings # # Camera configuration # CONFIG_OV7670_SUPPORT=y -CONFIG_OV7725_SUPPORT=y CONFIG_NT99141_SUPPORT=y CONFIG_OV2640_SUPPORT=y -CONFIG_OV3660_SUPPORT=y -CONFIG_OV5640_SUPPORT=y CONFIG_GC2145_SUPPORT=y CONFIG_GC032A_SUPPORT=y CONFIG_GC0308_SUPPORT=y CONFIG_BF3005_SUPPORT=y CONFIG_BF20A6_SUPPORT=y -# CONFIG_SC101IOT_SUPPORT is not set CONFIG_SC030IOT_SUPPORT=y -# CONFIG_SCCB_HARDWARE_I2C_PORT0 is not set -CONFIG_SCCB_HARDWARE_I2C_PORT1=y -CONFIG_SCCB_CLK_FREQ=100000 -# CONFIG_GC_SENSOR_WINDOWING_MODE is not set CONFIG_GC_SENSOR_SUBSAMPLE_MODE=y -CONFIG_CAMERA_CORE0=y -# CONFIG_CAMERA_CORE1 is not set -# CONFIG_CAMERA_NO_AFFINITY is not set -CONFIG_CAMERA_DMA_BUFFER_SIZE_MAX=32768 # end of Camera configuration # end of Component config -# -CONFIG_ESP_CONSOLE_UART_TX_GPIO=1 -CONFIG_ESP_CONSOLE_UART_RX_GPIO=3 + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk index f618b436c4..57f3f8da81 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32_lyrat/mpconfigboard.mk @@ -3,10 +3,12 @@ CIRCUITPY_CREATION_ID = 0x0032A000 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig b/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig index e0db0b9800..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_lyrat/sdkconfig @@ -1,36 +0,0 @@ -# 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=4194304 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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=8 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=7 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk index fbacf3fa3a..5f357ec503 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -5,10 +5,12 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index 5fd3cc3b49..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -1,32 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Espressif IoT Development Framework Configuration +# +# +# Component config # -CONFIG_SPIRAM_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 - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk index 4da1ab8ed3..af4d8840a0 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/mpconfigboard.mk @@ -5,10 +5,12 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig index 5fd3cc3b49..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig @@ -1,32 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_MODE_OCT=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Espressif IoT Development Framework Configuration +# +# +# Component config # -CONFIG_SPIRAM_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 - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk index 2fa3a5d115..223c3af6bf 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 -CIRCUITPY_ESP_FLASH_MODE = dout -CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 32MB +CIRCUITPY_ESP_FLASH_MODE = opi +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig index 0b6abf41cf..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n32r8/sdkconfig @@ -1,76 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 - -# -# Serial flasher config -# -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -# CONFIG_ESPTOOLPY_NO_STUB is not set -CONFIG_ESPTOOLPY_OCT_FLASH=y -CONFIG_ESPTOOLPY_FLASHMODE_OPI=y -# CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR is not set -CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_DTR=y -CONFIG_ESPTOOLPY_FLASHMODE="dout" -CONFIG_ESPTOOLPY_FLASHFREQ_80M=y -# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set -# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set -CONFIG_ESPTOOLPY_FLASHFREQ="80m" -# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE_32MB=y -# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set -# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set -CONFIG_ESPTOOLPY_FLASHSIZE="32MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y -CONFIG_ESPTOOLPY_BEFORE_RESET=y -# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_RESET=y -# CONFIG_ESPTOOLPY_AFTER_NORESET is not set -CONFIG_ESPTOOLPY_AFTER="hard_reset" -# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y -# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set -# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 -# end of Serial flasher config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk index cd531b902f..bcc614c500 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig index ad74ab5f04..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig @@ -1,41 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # -# -# ESP32S3-Specific -# -# 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_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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 # @@ -43,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk index 08ad0aee90..b71b354839 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig index d9cbd73072..f5ef797681 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -1,33 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk index 3d57e485ae..0619284e83 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_eye/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig index 285e2879bb..71778c5e6e 100644 --- a/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_eye/sdkconfig @@ -1,33 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-eye" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk index 76817b1cee..83fc7650fd 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk +++ b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.mk @@ -3,8 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00320060 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/hardkernel_odroid_go/sdkconfig b/ports/espressif/boards/hardkernel_odroid_go/sdkconfig index 45da77ed9f..e69de29bb2 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/sdkconfig +++ b/ports/espressif/boards/hardkernel_odroid_go/sdkconfig @@ -1,36 +0,0 @@ -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM32=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=4194304 -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y - -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 -### nCONFIG_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=12 -### CONFIG_ESP_CONSOLE_UART_RX_GPIO=15 -### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set -### # end of ESP System Settings diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk b/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk index 8fb5099d61..bb7847cf27 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "LILYGO" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio 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 diff --git a/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig b/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig index d9cbd73072..f5ef797681 100644 --- a/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig +++ b/ports/espressif/boards/lilygo_tembed_esp32s3/sdkconfig @@ -1,33 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM Clock and CS IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_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 # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk index 2bfc8fb2c8..2af499b5c6 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "LILYGO" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig index 924d863dad..23f6593f1b 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk index e9e333d497..052c1e5417 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "LILYGO" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig index 924d863dad..23f6593f1b 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk index a3bbcaf2a5..a1b5333cf0 100644 --- a/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s2_mini/mpconfigboard.mk @@ -5,12 +5,13 @@ USB_MANUFACTURER = "Lolin" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig index 0db55cbb67..ac239ca333 100644 --- a/ports/espressif/boards/lolin_s2_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s2_mini/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="LS2Mini" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk b/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk index 5b027e6732..830c39e691 100644 --- a/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s2_pico/mpconfigboard.mk @@ -5,12 +5,13 @@ USB_MANUFACTURER = "Lolin" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/lolin_s2_pico/sdkconfig b/ports/espressif/boards/lolin_s2_pico/sdkconfig index 8c5ca132d3..c2238c6814 100644 --- a/ports/espressif/boards/lolin_s2_pico/sdkconfig +++ b/ports/espressif/boards/lolin_s2_pico/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="Lolin-S2Pico" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_s3/mpconfigboard.mk b/ports/espressif/boards/lolin_s3/mpconfigboard.mk index a377fb0b56..fce42cef8d 100644 --- a/ports/espressif/boards/lolin_s3/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3/mpconfigboard.mk @@ -5,11 +5,13 @@ USB_MANUFACTURER = "WEMOS" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio 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 OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/lolin_s3/sdkconfig b/ports/espressif/boards/lolin_s3/sdkconfig index 77612d5c27..b90e3fa57e 100644 --- a/ports/espressif/boards/lolin_s3/sdkconfig +++ b/ports/espressif/boards/lolin_s3/sdkconfig @@ -1,42 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # -# -# ESP32S3-Specific -# -# SPI RAM config -# -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set -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 -# -# PSRAM Clock and CS IO for ESP32S3 -# -# CONFIG_SPIRAM_CLK_IO=30 -# CONFIG_SPIRAM_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 -CONFIG_SPIRAM_MODE_OCT=y -# end of SPI RAM config - -# end of ESP32S3-Specific - # # LWIP # @@ -44,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="LOLIN-S3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk index 50e57c1c3c..591c596bbc 100644 --- a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk @@ -3,9 +3,12 @@ CIRCUITPY_CREATION_ID = 0x00320001 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB -CIRCUITPY_ESPCAMERA = 0 CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_core_fire/sdkconfig b/ports/espressif/boards/m5stack_core_fire/sdkconfig index f228750600..0e7b970938 100644 --- a/ports/espressif/boards/m5stack_core_fire/sdkconfig +++ b/ports/espressif/boards/m5stack_core_fire/sdkconfig @@ -1,57 +1,37 @@ -CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=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 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision -# -# 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 +# end of Hardware Settings -# -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreFire" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk index 226d901a3a..c090c69aac 100644 --- a/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_s2/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "MicroDev" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index fbb7f22e95..f6158eac3e 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="MicroDev-microS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk index 2071da3fed..1707d32706 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Muselab" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig index ff7d57ac57..e69de29bb2 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig @@ -1,25 +0,0 @@ -# -# SPI RAM config -# -CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -CONFIG_SPIRAM_SIZE=2097152 -# end of SPI RAM config - -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -CONFIG_SPIRAM_SPEED_40M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - -# -# LWIP -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk index 26722a30ea..f0a39b8a20 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Oak Dev Tech" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig index 6ff95dec02..3017a9532f 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="PixelWing-ESP32S2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk index e13c654aa6..2422ee60ef 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk +++ b/ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.mk @@ -8,4 +8,5 @@ IDF_TARGET = esp32s2 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk index 2fd0d3e909..a2e862fa02 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk +++ b/ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Targett" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m diff --git a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig index d151cecdfb..e69de29bb2 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig @@ -1,36 +0,0 @@ -# -# SPI RAM config -# -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 -# -# PSRAM clock and cs IO for ESP32S2 -# -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 -# -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -# end of LWIP diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk index 2d6c60b5e2..fda8f7bb22 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.mk @@ -5,13 +5,15 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_APA102 = 1 # Include these Python libraries in firmware. # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig index 28690986cc..a1e5e03b76 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk index e72ee2f6cd..4f3ea4afac 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.mk @@ -5,13 +5,15 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_NEOPIXEL = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig index 9f3970ffd4..cc781c9a3d 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2Neo" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk index 2d6c60b5e2..fda8f7bb22 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.mk @@ -5,13 +5,15 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 40m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_APA102 = 1 # Include these Python libraries in firmware. # FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index 28690986cc..a1e5e03b76 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk index cb8a4124f3..887ca5a122 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_feathers3/mpconfigboard.mk @@ -5,13 +5,15 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m #CIRCUITPY_BITBANG_NEOPIXEL = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig index 33c772e712..3ccd3175c6 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers3/sdkconfig @@ -1,38 +1,15 @@ - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# 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 -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMFeatherS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk index 26e59a8edd..be2a711c6c 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_pros3/mpconfigboard.mk @@ -5,13 +5,15 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # CIRCUITPY_BITBANG_NEOPIXEL = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig index 39a822ffc3..21b91a2199 100644 --- a/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_pros3/sdkconfig @@ -1,38 +1,15 @@ - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# 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 -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMProS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk index 61d34359dd..d600ce4d30 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.mk @@ -3,8 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00000001 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig index 6f14e60fc1..e69de29bb2 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinypico/sdkconfig @@ -1,19 +0,0 @@ -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -# CONFIG_SPIRAM_SIZE is not set -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk index 68879b1cd3..5f83793213 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.mk @@ -3,8 +3,10 @@ CIRCUITPY_CREATION_ID = 0x00000002 IDF_TARGET = esp32 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig index 6f14e60fc1..e69de29bb2 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/sdkconfig @@ -1,19 +0,0 @@ -# -# SPI RAM config -# -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -# CONFIG_SPIRAM_SIZE is not set -CONFIG_SPIRAM_SPEED_80M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_IGNORE_NOTFOUND=y -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 -# CONFIG_SPIRAM_ALLOW_NOINIT_SEG_EXTERNAL_MEMORY is not set -CONFIG_SPIRAM_CACHE_WORKAROUND=y diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk index eec4bc1bbf..6b61ef12b7 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 40m CIRCUITPY_BITBANG_NEOPIXEL = 1 @@ -15,5 +19,3 @@ CIRCUITPY_STAGE = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 2MB diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig index 7732382bee..647e33d8f5 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# 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 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M is not set -CONFIG_SPIRAM_SPEED_40M=y -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyS2" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk b/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk index a66db4d19d..bf3521ed53 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk +++ b/ports/espressif/boards/unexpectedmaker_tinys3/mpconfigboard.mk @@ -5,9 +5,13 @@ USB_MANUFACTURER = "UnexpectedMaker" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 8MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m # CIRCUITPY_BITBANG_NEOPIXEL = 1 @@ -15,5 +19,3 @@ CIRCUITPY_STAGE = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel - -CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig index 8eb0875155..d08f76926e 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys3/sdkconfig @@ -1,40 +1,15 @@ - # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_MODE_OCT is not set -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 - # -# PSRAM clock and cs IO for ESP32S3 +# Component config # -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_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_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 -# end of SPI RAM config - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="UMTinyS3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk index a6b9c35b52..64987d2c13 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/mpconfigboard.mk @@ -6,8 +6,10 @@ USB_MANUFACTURER = "Waveshare Electronics" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m -CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig index c6ec24e77c..7c86f9f8e3 100644 --- a/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s2_pico_lcd/sdkconfig @@ -1,36 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration # -# CONFIG_SPIRAM_TYPE_AUTO is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=8388608 -# end of SPI RAM config - -CONFIG_SPIRAM_CLK_IO=30 # -# PSRAM clock and cs IO for ESP32S2 +# Component config # -CONFIG_SPIRAM_CS_IO=26 -# end of PSRAM clock and cs IO for ESP32S2 - -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="waveshare" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk index 7e4fdbb3c2..e845f33327 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32s2_pico/mpconfigboard.mk @@ -5,8 +5,10 @@ USB_MANUFACTURER = "Waveshare Electronics" IDF_TARGET = esp32s2 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 120m diff --git a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig index 8172e82e3c..7c86f9f8e3 100644 --- a/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32s2_pico/sdkconfig @@ -1,20 +1,15 @@ # -# SPI RAM config +# Espressif IoT Development Framework Configuration +# +# +# Component config # -CONFIG_ESP32S2_SPIRAM_SUPPORT=y -CONFIG_SPIRAM_CLK_IO=30 -CONFIG_SPIRAM_CS_IO=26 -CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_MODE_QUAD=y -CONFIG_SPIRAM_SIZE=8388608 -CONFIG_SPIRAM_SPEED_120M=y -CONFIG_SPIRAM=y -CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MEMMAP=y -CONFIG_SPIRAM_MEMTEST=y - # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="waveshare" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults new file mode 100644 index 0000000000..e0f319ce39 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-dout.defaults @@ -0,0 +1,6 @@ +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set +CONFIG_ESPTOOLPY_FLASHMODE_DOUT=y +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults new file mode 100644 index 0000000000..90e1291cc8 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-opi.defaults @@ -0,0 +1,6 @@ +CONFIG_ESPTOOLPY_OCT_FLASH=y +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +# CONFIG_ESPTOOLPY_FLASHMODE_OPI is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults new file mode 100644 index 0000000000..4ff192db3a --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-120m.defaults @@ -0,0 +1,3 @@ +CONFIG_SPIRAM_SPEED_120M=y +# CONFIG_SPIRAM_SPEED_80M is not set +# CONFIG_SPIRAM_SPEED_40M is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults new file mode 100644 index 0000000000..86ef9bcf4b --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-psram-4MB.defaults @@ -0,0 +1,4 @@ +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM32=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set diff --git a/ports/espressif/tools/update_all_board_sdkconfig.py b/ports/espressif/tools/update_all_board_sdkconfig.py new file mode 100644 index 0000000000..60f7c7e045 --- /dev/null +++ b/ports/espressif/tools/update_all_board_sdkconfig.py @@ -0,0 +1,20 @@ +import pathlib +import sys +import shlex +import subprocess + + +def run(cmd): + proc = subprocess.run(shlex.split(cmd), capture_output=True) + return proc.returncode == 0 + + +failed_count = 0 +for board in sorted(list(pathlib.Path("boards/").glob("*/"))): + board = board.name + print(board) + if not run(f"make BOARD={board} clean update-board-sdkconfig"): + print(" Failed!") + failed_count += 1 + +print(f"{failed_count} boards failed") From 99726e255d55b9073fcf3d23ec94a41c2f162fa0 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 12 Sep 2023 12:18:21 -0700 Subject: [PATCH 083/129] Switch to newlib nano --- ports/espressif/Makefile | 13 +++++++++++-- .../boards/adafruit_esp32s3_camera/sdkconfig | 7 +++++++ .../esp-idf-config/sdkconfig-esp32.defaults | 6 ++++++ .../esp-idf-config/sdkconfig-esp32c3.defaults | 6 ++++++ .../esp-idf-config/sdkconfig-esp32s2.defaults | 6 ++++++ .../esp-idf-config/sdkconfig-esp32s3.defaults | 6 ++++++ .../sdkconfig-flash-4MB-no-uf2.defaults | 11 +++++++++-- .../sdkconfig-flash-8MB-no-uf2.defaults | 11 +++++++++-- ports/espressif/mpconfigport.mk | 1 + 9 files changed, 61 insertions(+), 6 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 69b2ff1a38..b400cd06b7 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -135,7 +135,7 @@ ifeq ($(DEBUG), 1) # You may want to enable these flags to make setting breakpoints easier. # CFLAGS += -fno-inline -fno-ipa-sra else - CFLAGS += -DNDEBUG -ggdb3 + CFLAGS += -DNDEBUG # RISC-V is larger than xtensa # Use -Os for RISC-V when it overflows ifeq ($(IDF_TARGET_ARCH),riscv) @@ -150,6 +150,11 @@ CFLAGS += $(OPTIMIZATION_FLAGS) CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_DEFS) $(CFLAGS_MOD) $(COPT) -Werror=missing-prototypes +# Most current ESPs have nano versions of newlib in ROM so we use them. +ifneq ($(IDF_TARGET),esp32c6) + CFLAGS += --specs=nano.specs +endif + ifeq ($(IDF_TARGET_ARCH),xtensa) CFLAGS += -mlongcalls else ifeq ($(IDF_TARGET_ARCH),riscv) @@ -412,8 +417,12 @@ endif ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ifneq ($(CIRCUITPY_BLEIO),0) ESP_IDF_COMPONENTS_LINK += bt + ifeq ($(IDF_TARGET),esp32) + BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a + else BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ - esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a + esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a + endif endif ifneq ($(CIRCUITPY_ESPULP),0) ESP_IDF_COMPONENTS_LINK += ulp diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig index f5ef797681..1bddb7a89f 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig +++ b/ports/espressif/boards/adafruit_esp32s3_camera/sdkconfig @@ -10,6 +10,13 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP +# +# Camera configuration +# +# CONFIG_OV7725_SUPPORT is not set +# CONFIG_OV3660_SUPPORT is not set +# end of Camera configuration + # end of Component config # end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index 980619b7a6..5ae4d4c6b5 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -56,6 +56,12 @@ CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # end of Wi-Fi +# +# Newlib +# +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib + # # SPI Flash driver # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index 1f328c0179..1a47619e52 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -49,6 +49,12 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y # end of Driver Configurations +# +# Newlib +# +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib + # end of Component config # end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 9afec598c4..6f3d004785 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -46,6 +46,12 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y # end of ESP System Settings +# +# Newlib +# +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib + # # Ultra Low Power (ULP) Co-processor # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 437aec9119..c13240cff0 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -85,6 +85,12 @@ CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 # CONFIG_ESP32_WIFI_NVS_ENABLED is not set # end of Wi-Fi +# +# Newlib +# +CONFIG_NEWLIB_NANO_FORMAT=y +# end of Newlib + # # Ultra Low Power (ULP) Co-processor # diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults index 2325a67296..d24998167e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-4MB-no-uf2.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="4MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB-no-uf2.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults index 2a2548ba04..eda2a71c62 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-8MB-no-uf2.defaults @@ -1,4 +1,7 @@ # +# Espressif IoT Development Framework Configuration +# +# # Serial flasher config # # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set @@ -6,13 +9,17 @@ # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set +# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="8MB" -CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y # end of Serial flasher config -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" # # Partition Table # +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB-no-uf2.csv" # end of Partition Table + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 2c358637cc..bb15fce92b 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -49,6 +49,7 @@ CIRCUITPY_WIFI ?= 1 ifeq ($(IDF_TARGET),esp32) # Modules CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_BLEIO = 0 # Features CIRCUITPY_USB = 0 From f357f4a3af11c813564538c3e816752eb0640226 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 12 Sep 2023 13:30:34 -0700 Subject: [PATCH 084/129] Size optimize 3 more boards --- .../adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk | 2 ++ ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk | 2 ++ ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk index a4e5dbf1e9..56dd344dbf 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_reverse_tft/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 + +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk index fc1cf53139..a8b3e35118 100644 --- a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk @@ -15,3 +15,5 @@ CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 + +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk index 4c54787bbb..2bd303adb3 100644 --- a/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_s3_mini/mpconfigboard.mk @@ -13,7 +13,7 @@ CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 40m -# OPTIMIZATION_FLAGS = -Os +OPTIMIZATION_FLAGS = -Os CIRCUITPY_ESPCAMERA = 0 # Include these Python libraries in firmware. From a3d37122a7f40a507c2bccbd3154b7ed40c8f5ec Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 13 Sep 2023 11:26:26 -0700 Subject: [PATCH 085/129] Fix PSRAM address --- ports/espressif/common-hal/espidf/__init__.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index a45964054d..7ab5ab9efb 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -108,9 +108,7 @@ size_t common_hal_espidf_get_total_psram(void) { intptr_t common_hal_espidf_get_psram_start(void) { #ifdef CONFIG_SPIRAM - if (esp_psram_is_initialized()) { - return SOC_EXTRAM_DATA_LOW; - } + return (intptr_t)esp_psram_get_address(); #endif return 0; } @@ -118,7 +116,7 @@ intptr_t common_hal_espidf_get_psram_start(void) { intptr_t common_hal_espidf_get_psram_end(void) { #ifdef CONFIG_SPIRAM if (esp_psram_is_initialized()) { - return SOC_EXTRAM_DATA_LOW + psram_size_usable(); + return common_hal_espidf_get_psram_start() + psram_size_usable(); } #endif return 0; From 952118f6c3b593c9ebfd573cba7ce68374abc97b Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 14 Sep 2023 11:19:38 -0700 Subject: [PATCH 086/129] Update new boards. Reduce memory use in S2 --- .gitmodules | 2 +- .../adafruit_esp32s3_camera/mpconfigboard.mk | 3 +- .../mpconfigboard.mk | 6 +- .../adafruit_qualia_s3_rgb666/sdkconfig | 48 +++++------- .../arduino_nano_esp32s3/mpconfigboard.mk | 10 ++- .../boards/arduino_nano_esp32s3/sdkconfig | 42 ++-------- .../mpconfigboard.mk | 10 ++- .../sdkconfig | 42 ++-------- .../boards/espressif_esp32_eye/sdkconfig | 11 --- .../mpconfigboard.mk | 6 +- .../mpconfigboard.mk | 4 + .../sdkconfig | 64 ++++----------- .../boards/m5stack_atoms3u/sdkconfig | 12 ++- .../espressif/boards/m5stack_core2/sdkconfig | 6 -- .../boards/m5stack_m5paper/mpconfigboard.mk | 5 ++ .../boards/m5stack_m5paper/sdkconfig | 77 +++++++------------ .../boards/makerfabs_tft7/mpconfigboard.mk | 4 + .../espressif/boards/makerfabs_tft7/sdkconfig | 53 +++++-------- .../waveshare_esp32_s3_pico/mpconfigboard.mk | 4 + .../boards/waveshare_esp32_s3_pico/sdkconfig | 42 ++-------- ports/espressif/common-hal/ssl/SSLSocket.c | 11 ++- ports/espressif/common-hal/ssl/SSLSocket.h | 1 - ports/espressif/common-hal/wifi/__init__.c | 14 +++- .../esp-idf-config/sdkconfig-esp32s2.defaults | 11 +++ .../esp-idf-config/sdkconfig-psram.defaults | 11 --- .../esp-idf-config/sdkconfig.defaults | 7 +- ports/espressif/supervisor/port.c | 2 +- ports/espressif/tools/update_sdkconfig.py | 7 +- 28 files changed, 200 insertions(+), 315 deletions(-) diff --git a/.gitmodules b/.gitmodules index 80fcc99133..16fdbcf5a1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -342,7 +342,7 @@ url = https://github.com/bablokb/circuitpython-pcf85063a [submodule "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"] path = ports/raspberrypi/lib/Pico-PIO-USB url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index 57087cf0e0..0b9deaaf10 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -5,9 +5,10 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m -CIRCUITPY_ESP_FLASH_SIZE = 4MB + CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk index 1bde6abfe4..3db489c5de 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk @@ -5,8 +5,12 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 +CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_FLASH_MODE = dio 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 diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig index 79d78825fc..e9dc0663bd 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig @@ -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 -# end of PSRAM Clock and CS IO for ESP32S3 +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_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 # CONFIG_LWIP_LOCAL_HOSTNAME="qualia" # 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 Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk index c9af3af25e..c342e5e2cb 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk +++ b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.mk @@ -6,9 +6,17 @@ USB_MANUFACTURER = "Arduino" 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_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 QSPI_FLASH_FILESYSTEM = 1 diff --git a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig index 2acf08a4a7..f5ef797681 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig +++ b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig @@ -1,43 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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 # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk index 925c4ab6e2..70b2abfede 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk @@ -6,9 +6,17 @@ USB_MANUFACTURER = "Arduino" 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_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 QSPI_FLASH_FILESYSTEM = 1 diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig index 26a26b5fe8..b2e5c546b8 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig @@ -1,43 +1,15 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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 # CONFIG_LWIP_LOCAL_HOSTNAME="nano-esp32" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32_eye/sdkconfig b/ports/espressif/boards/espressif_esp32_eye/sdkconfig index 0ff3ef839f..dc4ef1fc52 100644 --- a/ports/espressif/boards/espressif_esp32_eye/sdkconfig +++ b/ports/espressif/boards/espressif_esp32_eye/sdkconfig @@ -4,17 +4,6 @@ # # Component config # -# -# Hardware Settings -# -# -# Sleep Config -# -CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y -# end of Sleep Config - -# end of Hardware Settings - # # Camera configuration # diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk index 83a41e8f3f..51abedf36a 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n4r2/mpconfigboard.mk @@ -5,10 +5,10 @@ USB_MANUFACTURER = "Espressif" IDF_TARGET = esp32s2 -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 4MB +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio -CIRCUITPY_ESP_PSRAM_FREQ = 40m +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk index 1bd9c0ac8d..99daa4ab98 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/mpconfigboard.mk @@ -9,4 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = opi +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig index 40da78d506..0452053c1e 100644 --- a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8_hacktablet/sdkconfig @@ -1,48 +1,21 @@ # +# Espressif IoT Development Framework Configuration +# +# # Component config # # -# ESP32S3-Specific +# ESP System Settings # -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -#CONFIG_SPIRAM_MODE_QUAD=y -### NEW ### -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=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 -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 +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 # # LWIP @@ -50,13 +23,6 @@ CONFIG_SPIRAM_MEMTEST=y CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3-hacktablet" # 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 Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_atoms3u/sdkconfig b/ports/espressif/boards/m5stack_atoms3u/sdkconfig index 9d924272ec..f5ef797681 100644 --- a/ports/espressif/boards/m5stack_atoms3u/sdkconfig +++ b/ports/espressif/boards/m5stack_atoms3u/sdkconfig @@ -1,7 +1,15 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=n - +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/m5stack_core2/sdkconfig b/ports/espressif/boards/m5stack_core2/sdkconfig index b8a37f0d84..c8ac5f43ac 100644 --- a/ports/espressif/boards/m5stack_core2/sdkconfig +++ b/ports/espressif/boards/m5stack_core2/sdkconfig @@ -24,12 +24,6 @@ CONFIG_ESP32_REV_MIN_FULL=300 CONFIG_ESP_REV_MIN_FULL=300 # end of Chip revision -# -# Sleep Config -# -CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND=y -# end of Sleep Config - # end of Hardware Settings # diff --git a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk index d3e2bb2aac..bacf270a66 100644 --- a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk @@ -6,4 +6,9 @@ IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 8MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m + CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_m5paper/sdkconfig b/ports/espressif/boards/m5stack_m5paper/sdkconfig index afbee57d19..fbf94f2749 100644 --- a/ports/espressif/boards/m5stack_m5paper/sdkconfig +++ b/ports/espressif/boards/m5stack_m5paper/sdkconfig @@ -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 +CONFIG_ESP32_REV_MIN_FULL=300 +CONFIG_ESP_REV_MIN_FULL=300 +# end of Chip revision -# -# 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 +# end of Hardware Settings -# -# 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 # CONFIG_LWIP_LOCAL_HOSTNAME="M5Paper" # end of LWIP -# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins -### # -### # ESP System Settings -### # -### 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 +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk index e6efc34ef7..dbe7940c7e 100644 --- a/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk +++ b/ports/espressif/boards/makerfabs_tft7/mpconfigboard.mk @@ -9,4 +9,8 @@ CIRCUITPY_ESP_FLASH_MODE = dio 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 diff --git a/ports/espressif/boards/makerfabs_tft7/sdkconfig b/ports/espressif/boards/makerfabs_tft7/sdkconfig index 2514dd506b..e05ead7960 100644 --- a/ports/espressif/boards/makerfabs_tft7/sdkconfig +++ b/ports/espressif/boards/makerfabs_tft7/sdkconfig @@ -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 -CONFIG_SPIRAM_TYPE_AUTO=y -# end of SPI RAM config +# +# Component 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 # CONFIG_LWIP_LOCAL_HOSTNAME="matouch-tft" # 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 Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk index 116a998b74..76b6eb2206 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk @@ -8,3 +8,7 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP_PSRAM_SIZE = 2MB +CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig b/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig index 3e366f0172..f5ef797681 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/sdkconfig @@ -1,43 +1,9 @@ # +# Espressif IoT Development Framework Configuration +# +# # 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 # @@ -45,3 +11,5 @@ CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" # end of LWIP # end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index 9413fc7def..b94924000b 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -33,6 +33,7 @@ #include "shared/runtime/interrupt_char.h" #include "py/mperrno.h" #include "py/runtime.h" +#include "supervisor/port.h" #include "supervisor/shared/tick.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, 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); self->sock->connected = result >= 0; if (result < 0) { int esp_tls_code; 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) { 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) { int esp_tls_code; 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) { mp_raise_espidf_MemoryError(); diff --git a/ports/espressif/common-hal/ssl/SSLSocket.h b/ports/espressif/common-hal/ssl/SSLSocket.h index a7977db746..6b65a56223 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.h +++ b/ports/espressif/common-hal/ssl/SSLSocket.h @@ -38,7 +38,6 @@ typedef struct ssl_sslsocket_obj { mp_obj_base_t base; socketpool_socket_obj_t *sock; esp_tls_t *tls; - esp_tls_error_handle_t tls_error_handle; ssl_sslcontext_obj_t *ssl_context; esp_tls_cfg_t ssl_config; } ssl_sslsocket_obj_t; diff --git a/ports/espressif/common-hal/wifi/__init__.c b/ports/espressif/common-hal/wifi/__init__.c index 1ffc768002..769ed8ab04 100644 --- a/ports/espressif/common-hal/wifi/__init__.c +++ b/ports/espressif/common-hal/wifi/__init__.c @@ -32,6 +32,7 @@ #include "shared-bindings/wifi/Monitor.h" #include "shared-bindings/wifi/Radio.h" +#include "py/gc.h" #include "py/mpstate.h" #include "py/runtime.h" @@ -162,8 +163,8 @@ void common_hal_wifi_init(bool user_initiated) { if (!wifi_ever_inited) { ESP_ERROR_CHECK(esp_netif_init()); 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->ap_netif = esp_netif_create_default_wifi_ap(); @@ -201,9 +202,16 @@ void common_hal_wifi_init(bool user_initiated) { #endif esp_err_t result = esp_wifi_init(&config); 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) { - 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 common_hal_wifi_radio_start_station(self); diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 6f3d004785..09c5a69663 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -46,6 +46,17 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y # 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 # diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults index d00b1f3d2a..f1bc476a9f 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults @@ -4,17 +4,6 @@ # # 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 # diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 279c23c2c5..55a8e3cc06 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -57,6 +57,12 @@ CONFIG_LWIP_TCP_RTO_TIME=3000 # mbedTLS # 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 # @@ -65,7 +71,6 @@ CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="../../lib/certificates/data/roots.pem" # end of Certificate Bundle -CONFIG_MBEDTLS_TLS_CLIENT_ONLY=y # # TLS Key Exchange Methods # diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 2d2089a587..d605dc2b79 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -251,7 +251,7 @@ safe_mode_t port_init(void) { // Send the ROM output out of the UART. This includes early logs. #if DEBUG - ets_install_uart_printf(); + esp_rom_install_uart_printf(); #endif heap = NULL; diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 898c8979eb..42500412e0 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -163,6 +163,7 @@ def update(debug, board, update_all): board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") psram_size = "0" + uf2_bootloader = None for line in board_make.read_text().split("\n"): if "=" not in line or line.startswith("#"): continue @@ -171,6 +172,8 @@ def update(debug, board, update_all): value = value.strip() if key == "IDF_TARGET": target = value + if uf2_bootloader is None: + uf2_bootloader = target not in ("esp32", "esp32c3") elif key == "CIRCUITPY_ESP_FLASH_SIZE": flash_size = value elif key == "CIRCUITPY_ESP_FLASH_MODE": @@ -183,6 +186,8 @@ def update(debug, board, update_all): psram_mode = value elif key == "CIRCUITPY_ESP_PSRAM_FREQ": psram_freq = value + elif key == "UF2_BOOTLOADER": + uf2_bootloader = not (value == "0") os.environ["IDF_TARGET"] = target os.environ[ @@ -209,7 +214,7 @@ def update(debug, board, update_all): size_options = "" if flash_size == "2MB": size_options = "-no-ota-no-uf2" - elif target in ("esp32", "esp32c3"): + elif not uf2_bootloader: # These boards don't have native USB. size_options = "-no-uf2" flash_size_config = pathlib.Path( From 4b41fdb586f71df283126b012f589b2b746bca12 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 14 Sep 2023 14:20:37 -0500 Subject: [PATCH 087/129] Fast(ish) special purpose bitbang spi over i2c with the i2c bus operating at 400kHz this achieves a 4.8kHz SPI clock rate which could be worse. It accepts the same style of init sequence as displayio. tested by scoping the pins on the espressif lcd dev kit with a dummy init sequence: ```python dotclockframebuffer.ioexpander_send_init_sequence( bus=bus, i2c_address=expander_addr, gpio_address=1, gpio_data_len=1, gpio_data=0xff, cs_bit=1, mosi_bit=3, clk_bit=2, init_sequence=init_sequence) ``` --- py/circuitpy_defns.mk | 1 + .../dotclockframebuffer/__init__.c | 93 +++++++++++++++++++ .../dotclockframebuffer/__init__.h | 29 ++++++ shared-module/dotclockframebuffer/__init__.c | 75 +++++++++++++++ 4 files changed, 198 insertions(+) create mode 100644 shared-module/dotclockframebuffer/__init__.c diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 8be49dca0d..c819d46db8 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -603,6 +603,7 @@ SRC_SHARED_MODULE_ALL = \ displayio/TileGrid.c \ displayio/area.c \ displayio/__init__.c \ + dotclockframebuffer/__init__.c \ floppyio/__init__.c \ fontio/BuiltinFont.c \ fontio/__init__.c \ diff --git a/shared-bindings/dotclockframebuffer/__init__.c b/shared-bindings/dotclockframebuffer/__init__.c index a91964988a..07f9f826dd 100644 --- a/shared-bindings/dotclockframebuffer/__init__.c +++ b/shared-bindings/dotclockframebuffer/__init__.c @@ -34,11 +34,104 @@ #include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" //| """Native helpers for driving parallel displays""" +//| +//| Length = typing.Literal[1, 2] +//| +//| def ioexpander_send_init_sequence( +//| bus: busio.I2C, +//| i2c_address: int, +//| reg_addr: int, +//| gpio_data_len: Length, +//| gpio_address: int, +//| gpio_data: int, +//| cs_bit: int, +//| mosi_bit: int, +//| clk_bit: int, +//| init_sequence: ReadableBuffer, +//| ): +//| """Send a displayio-style initialization sequence over an I2C I/O expander +//| +//| This function is highly generic in order to support various I/O expanders. +//| What's assumed is that all the GPIO can be updated by writing to a single I2C register. +//| Normal output polarity is assumed (CS and CLK are active low, data is not inverted). +//| Only 8-bit I2C addresses are supported. +//| 8- and 16-bit I2C addresses and data registers are supported. +//| The Data/Command bit is sent as part of the serial data. +//| +//| Normally this function is used via a convenience library that is specific to the display & I/O expander in use. +//| +//| :param busio.I2C bus: The I2C bus where the I/O expander resides +//| :param busio.i2c_address: int: The I2C bus address of the I/O expander +//| :param int gpio_address: The address portion of the I2C transaction (1 byte) +//| :param int gpio_data_len: The size of the data portion of the I2C transaction, 1 or 2 bytes +//| :param int gpio_data: The output value for all GPIO bits other than cs, mosi, and clk (needed because GPIO expanders may be unable to read back the current output value) +//| :param int cs_bit: The bit number (from 0 to 7, or from 0 to 15) of the chip select bit in the GPIO register +//| :param int mosi_value: The bit number (from 0 to 7, or from 0 to 15) of the data out bit in the GPIO register +//| :param int clk_value: The bit number (from 0 to 7, or from 0 to 15) of the clock out bit in the GPIO register +//| """ +//| +STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_bus, ARG_i2c_address, ARG_gpio_address, ARG_gpio_data_len, ARG_gpio_data, ARG_cs_bit, ARG_mosi_bit, ARG_clk_bit, ARG_init_sequence, NUM_ARGS }; + + static const mp_arg_t allowed_args[] = { + { MP_QSTR_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_i2c_address, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_address, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_data_len, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_data, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_cs_bit, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_mosi_bit, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_clk_bit, MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_init_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, + }; + + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + MP_STATIC_ASSERT(MP_ARRAY_SIZE(allowed_args) == NUM_ARGS); + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t bus_obj = mp_arg_validate_type(args[ARG_bus].u_obj, &busio_i2c_type, MP_QSTR_bus); + mp_int_t i2c_address = args[ARG_i2c_address].u_int; + mp_int_t gpio_address = args[ARG_gpio_address].u_int; + mp_int_t gpio_data_len = args[ARG_gpio_data_len].u_int; + mp_int_t gpio_data = args[ARG_gpio_data].u_int; + mp_int_t cs_bit = args[ARG_cs_bit].u_int; + mp_int_t mosi_bit = args[ARG_mosi_bit].u_int; + mp_int_t clk_bit = args[ARG_clk_bit].u_int; + + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ); + + mp_arg_validate_int_range(i2c_address, 0, 127, MP_QSTR_i2c_address); + mp_arg_validate_int_range(gpio_data_len, 1, 2, MP_QSTR_gpio_dat_len); + + int max_bit = gpio_data_len * 8 - 1; + mp_arg_validate_int_range(cs_bit, 0, max_bit, MP_QSTR_cs_bit); + mp_arg_validate_int_range(mosi_bit, 0, max_bit, MP_QSTR_mosi_bit); + mp_arg_validate_int_range(clk_bit, 0, max_bit, MP_QSTR_clk_bit); + mp_arg_validate_int_range(gpio_data, 0, (1 << (max_bit * 8)) - 1, MP_QSTR_gpio_data); + + dotclockframebuffer_ioexpander_spi_bus b = { + .bus = bus_obj, + .i2c_device_address = i2c_address, + .i2c_write_size = 1 + gpio_data_len, + // ASSERT(LITTLE_ENDIAN, "don't have to differentiate 8- vs 16-bits here") + .addr_reg_shadow = { .u32 = gpio_address | (gpio_data << 8) }, + .cs_mask = 0x100 << cs_bit, + .mosi_mask = 0x100 << mosi_bit, + .clk_mask = 0x100 << clk_bit, + }; + + dotclockframebuffer_ioexpander_send_init_sequence(&b, bufinfo.buf, bufinfo.len); + return mp_const_none; +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ioexpander_send_init_sequence_obj, 0, ioexpander_send_init_sequence); STATIC const mp_rom_map_elem_t dotclockframebuffer_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_dotclockframebuffer) }, { MP_ROM_QSTR(MP_QSTR_DotClockFramebuffer), MP_ROM_PTR(&dotclockframebuffer_framebuffer_type) }, + { MP_ROM_QSTR(MP_QSTR_ioexpander_send_init_sequence), MP_ROM_PTR(&ioexpander_send_init_sequence_obj) }, }; STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_module_globals, dotclockframebuffer_module_globals_table); diff --git a/shared-bindings/dotclockframebuffer/__init__.h b/shared-bindings/dotclockframebuffer/__init__.h index f7b42875a1..e51b5b9a86 100644 --- a/shared-bindings/dotclockframebuffer/__init__.h +++ b/shared-bindings/dotclockframebuffer/__init__.h @@ -25,3 +25,32 @@ */ #pragma once + +#include "py/obj.h" +#include "shared-bindings/busio/I2C.h" + +typedef union { + struct { + uint8_t addr, data; + } a8d8; + struct { + uint16_t addr, data; // in little endian + } a16d16; + struct { + uint8_t addr; + uint16_t data; // in little endian + } __attribute__((packed)) a8d16; + uint32_t u32; +} dotclockframebuffer_ioexpander_addr_reg_t; + +typedef struct { + busio_i2c_obj_t *bus; + uint8_t i2c_device_address; + uint8_t i2c_write_size; + dotclockframebuffer_ioexpander_addr_reg_t addr_reg_shadow; + uint32_t cs_mask; + uint32_t mosi_mask; + uint32_t clk_mask; +} dotclockframebuffer_ioexpander_spi_bus; + +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, uint8_t *init_sequence, uint16_t init_sequence_len); diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c new file mode 100644 index 0000000000..55329a87f6 --- /dev/null +++ b/shared-module/dotclockframebuffer/__init__.c @@ -0,0 +1,75 @@ +#include "shared-bindings/dotclockframebuffer/__init__.h" + +#include +#include +#include + +#define DELAY (0x80) + +static void pin_change(dotclockframebuffer_ioexpander_spi_bus *bus, uint32_t set_bits, uint32_t clear_bits) { + uint32_t data = (bus->addr_reg_shadow.u32 & ~clear_bits) | set_bits; + // no way to signal failure to caller! + (void)common_hal_busio_i2c_write(bus->bus, bus->i2c_device_address, (uint8_t *)&data, bus->i2c_write_size); + bus->addr_reg_shadow.u32 = data; +} + +static void ioexpander_bus_send(dotclockframebuffer_ioexpander_spi_bus *bus, + bool is_command, + const uint8_t *data, uint32_t data_length) { + + int dc_mask = is_command ? 0 : 0x100; + for (uint32_t i = 0; i < data_length; i++) { + int bits = data[i] | dc_mask; + + for (uint32_t j = 0; j < 9; j++) { + // CPOL=CPHA=0: output fresh data on falling edge of clk or cs + if (bits & 0x100) { + pin_change(bus, /* set */ bus->mosi_mask, /* clear */ bus->clk_mask | bus->cs_mask); + } else { + pin_change(bus, /* set */ 0, /* clear */ bus->mosi_mask | bus->clk_mask | bus->cs_mask); + } + // Display latches bit on rising edge of CLK + pin_change(bus, /* set */ bus->clk_mask, /* clear */ 0); + + // next bit + bits <<= 1; + } + } +} + +// Send a circuitpython-style display initialization sequence over an i2c-attached bus expander +// This always assumes +// * 9-bit SPI (no DC pin) +// * CPOL=CPHA=0 +// * CS deasserted after each init sequence step, but not otherwise just like +// displayio fourwire bus without data_as_commands +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, uint8_t *init_sequence, uint16_t init_sequence_len) { + while (!common_hal_busio_i2c_try_lock(bus->bus)) { + RUN_BACKGROUND_TASKS; + } + for (uint32_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { + uint8_t *cmd = init_sequence + i; + uint8_t data_size = *(cmd + 1); + bool delay = (data_size & DELAY) != 0; + data_size &= ~DELAY; + uint8_t *data = cmd + 2; + + ioexpander_bus_send(bus, true, cmd, 1); + ioexpander_bus_send(bus, false, data, data_size); + + // deassert CS + pin_change(bus, /* set */ bus->cs_mask, /* clear */ 0); + + uint16_t delay_length_ms = 10; + if (delay) { + data_size++; + delay_length_ms = *(cmd + 1 + data_size); + if (delay_length_ms == 255) { + delay_length_ms = 500; + } + } + mp_hal_delay_ms(delay_length_ms); + i += 2 + data_size; + } + common_hal_busio_i2c_unlock(bus->bus); +} From ef9f75ead15b7c68c795b350dd77dd0a8796f920 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 14 Sep 2023 14:56:39 -0500 Subject: [PATCH 088/129] Correct idle status of SCK pin --- shared-module/dotclockframebuffer/__init__.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c index 55329a87f6..34ab84aa0f 100644 --- a/shared-module/dotclockframebuffer/__init__.c +++ b/shared-module/dotclockframebuffer/__init__.c @@ -47,6 +47,10 @@ void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexp while (!common_hal_busio_i2c_try_lock(bus->bus)) { RUN_BACKGROUND_TASKS; } + + // ensure deasserted CS and idle CLK + pin_change(bus, /* set */ bus->cs_mask, /* clear */ bus->clk_mask); + for (uint32_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { uint8_t *cmd = init_sequence + i; uint8_t data_size = *(cmd + 1); @@ -57,8 +61,10 @@ void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexp ioexpander_bus_send(bus, true, cmd, 1); ioexpander_bus_send(bus, false, data, data_size); + // idle CLK + pin_change(bus, 0, /* clear */ bus->clk_mask); // deassert CS - pin_change(bus, /* set */ bus->cs_mask, /* clear */ 0); + pin_change(bus, /* set */ bus->cs_mask, 0); uint16_t delay_length_ms = 10; if (delay) { From 4087960dfd694f6e907ca0d6452b1d1c0749d963 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 14 Sep 2023 15:04:07 -0700 Subject: [PATCH 089/129] Fix MDNS. C3 works --- .../espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk | 2 +- .../boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk | 4 ++++ ports/espressif/common-hal/wifi/__init__.c | 5 +++-- .../espressif/esp-idf-config/sdkconfig-esp32c3.defaults | 9 +++++++++ .../espressif/esp-idf-config/sdkconfig-esp32s3.defaults | 1 + supervisor/shared/web_workflow/web_workflow.c | 3 +-- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk index cd517e75b4..a67c8e38e4 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk @@ -3,6 +3,6 @@ CIRCUITPY_CREATION_ID = 0x00C30001 IDF_TARGET = esp32c3 -CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk index cec65ead85..2315d4e20f 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk @@ -9,5 +9,9 @@ CIRCUITPY_ESP_FLASH_MODE = dio 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 UF2_BOOTLOADER = 0 diff --git a/ports/espressif/common-hal/wifi/__init__.c b/ports/espressif/common-hal/wifi/__init__.c index 769ed8ab04..970eb8eb04 100644 --- a/ports/espressif/common-hal/wifi/__init__.c +++ b/ports/espressif/common-hal/wifi/__init__.c @@ -190,7 +190,8 @@ void common_hal_wifi_init(bool user_initiated) { &self->handler_instance_got_ip)); wifi_init_config_t config = WIFI_INIT_CONFIG_DEFAULT(); - #ifdef CONFIG_IDF_TARGET_ESP32 + #ifdef CONFIG_ESP32_WIFI_NVS_ENABLED + // Generally we don't use this because we store ssid and passwords ourselves in the filesystem. esp_err_t err = nvs_flash_init(); if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) { // NVS partition was truncated and needs to be erased @@ -210,7 +211,7 @@ void common_hal_wifi_init(bool user_initiated) { if (gc_alloc_possible()) { raise_esp_error(result); } - ESP_LOGE(TAG, "WiFi error code: %d", result); + ESP_LOGE(TAG, "WiFi error code: %x", result); return; } // set station mode to avoid the default SoftAP diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index 1a47619e52..a41a780e68 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -49,6 +49,15 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y # end of Driver Configurations +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +# end of Wi-Fi + # # Newlib # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index c13240cff0..2bfd87be1e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -23,6 +23,7 @@ CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 # end of Memory Settings CONFIG_BT_NIMBLE_EXT_ADV=y +# CONFIG_BT_NIMBLE_ENABLE_PERIODIC_ADV is not set # end of NimBLE Options # diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 2a8133a562..ecf83b8bcb 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -347,8 +347,7 @@ bool supervisor_start_web_workflow(bool reload) { #if CIRCUITPY_MDNS // Try to start MDNS if the user deinited it. if (mdns.base.type != &mdns_server_type || - common_hal_mdns_server_deinited(&mdns) || - reload) { // Always reconstruct on reload, since we don't know if the net changed. + common_hal_mdns_server_deinited(&mdns)) { mdns_server_construct(&mdns, true); mdns.base.type = &mdns_server_type; if (!common_hal_mdns_server_deinited(&mdns)) { From 970e61c8b4f19a87f7ef85d1c0b3cf9ee903c10e Mon Sep 17 00:00:00 2001 From: Wind-stormger Date: Thu, 14 Sep 2023 09:42:26 +0000 Subject: [PATCH 090/129] Update bpi_leaf_s3 --- ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h index fd6aae04ea..4deba7de0c 100644 --- a/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h +++ b/ports/espressif/boards/bpi_leaf_s3/mpconfigboard.h @@ -40,3 +40,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO44) #define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define DOUBLE_TAP_PIN (&pin_GPIO34) From a8b81ce9438f2ed448c7b6c4f9d7f3054c599948 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 15 Sep 2023 10:39:14 -0500 Subject: [PATCH 091/129] Enhance unexpected keyword argument detection Before, incorrect use when calling a core function would just say "extra keyword arguments given"; now, it will name the argument: ```python >>> Synthesizer(bad_kwarg="boo") TypeError: unexpected keyword argument 'bad_kwarg' ``` --- py/argcheck.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/py/argcheck.c b/py/argcheck.c index c3bde804d4..76c84e83b0 100644 --- a/py/argcheck.c +++ b/py/argcheck.c @@ -133,7 +133,28 @@ void mp_arg_parse_all(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n #if MICROPY_ERROR_REPORTING <= MICROPY_ERROR_REPORTING_TERSE mp_arg_error_terse_mismatch(); #else - // TODO better error message + #if CIRCUITPY_FULL_BUILD + mp_map_elem_t *elem = kws->table; + size_t alloc = kws->alloc; + for (size_t i = 0; i < alloc; i++) { + mp_obj_t key = elem[i].key; + if (key == MP_OBJ_NULL) { + continue; + } + bool seen = false; + for (size_t j = n_pos; j < n_allowed; j++) { + if (mp_obj_equal(MP_OBJ_NEW_QSTR(allowed[j].qst), key)) { + seen = true; + break; + } + } + if (!seen) { + mp_raise_msg_varg(&mp_type_TypeError, + MP_ERROR_TEXT("unexpected keyword argument '%q'"), mp_obj_str_get_qstr(key)); + } + } + #endif + // (for the !FULL_BUILD case, and as a fallthrough for the FULL_BUILD case, even though it SHOULD be unreachable in that case) mp_raise_TypeError(MP_ERROR_TEXT("extra keyword arguments given")); #endif } From c7b7e22195f84ffbac63614d84b76d5a1ba01256 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 15 Sep 2023 11:16:43 -0500 Subject: [PATCH 092/129] remove debug print --- shared-bindings/dotclockframebuffer/DotClockFramebuffer.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c index aac695e3ee..e214351414 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c @@ -166,8 +166,6 @@ STATIC mp_obj_t dotclockframebuffer_framebuffer_make_new(const mp_obj_type_t *ty validate_list_is_free_pins(MP_QSTR_green, green_pins, (mp_int_t)MP_ARRAY_SIZE(green_pins), args[ARG_green].u_obj, &num_green); validate_list_is_free_pins(MP_QSTR_blue, blue_pins, (mp_int_t)MP_ARRAY_SIZE(blue_pins), args[ARG_blue].u_obj, &num_blue); - mp_printf(&mp_plat_print, "#red=%d #green=%d #blue=%d\n", num_red, num_green, num_blue); - dotclockframebuffer_framebuffer_obj_t *self = &allocate_display_bus_or_raise()->dotclock; self->base.type = &dotclockframebuffer_framebuffer_type; From cff65bbbe29f94552e7c2acc455612d938e024da Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 15 Sep 2023 14:10:32 -0500 Subject: [PATCH 093/129] esp32 lcd ev: fix pin assignments --- .../boards/espressif_esp32s3_lcd_ev/pins.c | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c index 59da0cb910..1bb555fd1d 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -5,11 +5,11 @@ STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, 5, { - MP_ROM_PTR(&pin_GPIO10), - MP_ROM_PTR(&pin_GPIO11), - MP_ROM_PTR(&pin_GPIO12), - MP_ROM_PTR(&pin_GPIO13), - MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO1), + MP_ROM_PTR(&pin_GPIO2), + MP_ROM_PTR(&pin_GPIO42), + MP_ROM_PTR(&pin_GPIO41), + MP_ROM_PTR(&pin_GPIO40), } }; @@ -30,23 +30,22 @@ STATIC const mp_rom_obj_tuple_t tft_b_pins = { {&mp_type_tuple}, 5, { - MP_ROM_PTR(&pin_GPIO40), - MP_ROM_PTR(&pin_GPIO41), - MP_ROM_PTR(&pin_GPIO42), - MP_ROM_PTR(&pin_GPIO2), - MP_ROM_PTR(&pin_GPIO1), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO11), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO14), } }; STATIC const mp_rom_map_elem_t tft_table[] = { { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO46) }, - { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO46) }, { MP_ROM_QSTR(MP_QSTR_dclk), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_red), MP_ROM_PTR(&tft_r_pins) }, { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, - { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(9000000) }, }; MP_DEFINE_CONST_DICT(tft_dict, tft_table); @@ -54,11 +53,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, - { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO10) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MCLK), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_I2S_WS), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, @@ -66,14 +65,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, - { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO12) }, - // boot mode button can be used in SW as well { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 91b98dc9d59e258f23d046ea2f27cb5da48e0905 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 15 Sep 2023 14:45:53 -0500 Subject: [PATCH 094/129] fix constness --- shared-bindings/dotclockframebuffer/__init__.h | 2 +- shared-module/dotclockframebuffer/__init__.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-bindings/dotclockframebuffer/__init__.h b/shared-bindings/dotclockframebuffer/__init__.h index e51b5b9a86..de69021a1b 100644 --- a/shared-bindings/dotclockframebuffer/__init__.h +++ b/shared-bindings/dotclockframebuffer/__init__.h @@ -53,4 +53,4 @@ typedef struct { uint32_t clk_mask; } dotclockframebuffer_ioexpander_spi_bus; -void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, uint8_t *init_sequence, uint16_t init_sequence_len); +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const uint8_t *init_sequence, uint16_t init_sequence_len); diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c index 34ab84aa0f..674c824af5 100644 --- a/shared-module/dotclockframebuffer/__init__.c +++ b/shared-module/dotclockframebuffer/__init__.c @@ -43,7 +43,7 @@ static void ioexpander_bus_send(dotclockframebuffer_ioexpander_spi_bus *bus, // * CPOL=CPHA=0 // * CS deasserted after each init sequence step, but not otherwise just like // displayio fourwire bus without data_as_commands -void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, uint8_t *init_sequence, uint16_t init_sequence_len) { +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const uint8_t *init_sequence, uint16_t init_sequence_len) { while (!common_hal_busio_i2c_try_lock(bus->bus)) { RUN_BACKGROUND_TASKS; } @@ -52,11 +52,11 @@ void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexp pin_change(bus, /* set */ bus->cs_mask, /* clear */ bus->clk_mask); for (uint32_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { - uint8_t *cmd = init_sequence + i; + const uint8_t *cmd = init_sequence + i; uint8_t data_size = *(cmd + 1); bool delay = (data_size & DELAY) != 0; data_size &= ~DELAY; - uint8_t *data = cmd + 2; + const uint8_t *data = cmd + 2; ioexpander_bus_send(bus, true, cmd, 1); ioexpander_bus_send(bus, false, data, data_size); From 68af5543af50716a9ae61fa516ec756e9302e020 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 15 Sep 2023 14:46:28 -0500 Subject: [PATCH 095/129] set up display at reset (yayay!) --- .../boards/espressif_esp32s3_lcd_ev/board.c | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c index 0639737c35..ed06698583 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c @@ -26,9 +26,131 @@ #include "supervisor/board.h" #include "mpconfigboard.h" +#include "shared-bindings/board/__init__.h" +#include "shared-bindings/busio/I2C.h" +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" +#include "shared-bindings/dotclockframebuffer/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" #include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +static const uint8_t display_init_sequence[] = { + 0xf0, 5, 0x55, 0xaa, 0x52, 0x08, 0x00, + 0xf6, 2, 0x5a, 0x87, + 0xc1, 1, 0x3f, + 0xc2, 1, 0x0e, + 0xc6, 1, 0xf8, + 0xc9, 1, 0x10, + 0xcd, 1, 0x25, + 0xf8, 1, 0x8a, + 0xac, 1, 0x45, + 0xa0, 1, 0xdd, + 0xa7, 1, 0x47, + 0xfa, 4, 0x00, 0x00, 0x00, 0x04, + 0x86, 4, 0x99, 0xa3, 0xa3, 0x51, + 0xa3, 1, 0xee, + 0xfd, 3, 0x3c, 0x3c, 0x00, + 0x71, 1, 0x48, + 0x72, 1, 0x48, + 0x73, 2, 0x00, 0x44, + 0x97, 1, 0xee, + 0x83, 1, 0x93, + 0x9a, 1, 0x72, + 0x9b, 1, 0x5a, + 0x82, 2, 0x2c, 0x2c, + 0xb1, 1, 0x10, + 0x6d, 32, 0x00, 0x1f, 0x19, 0x1a, 0x10, 0x0e, 0x0c, 0x0a, 0x02, 0x07, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x08, 0x01, 0x09, 0x0b, 0x0d, 0x0f, 0x1a, 0x19, 0x1f, 0x00, + 0x64, 16, 0x38, 0x05, 0x01, 0xdb, 0x03, 0x03, 0x38, 0x04, 0x01, 0xdc, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x65, 16, 0x38, 0x03, 0x01, 0xdd, 0x03, 0x03, 0x38, 0x02, 0x01, 0xde, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x66, 16, 0x38, 0x01, 0x01, 0xdf, 0x03, 0x03, 0x38, 0x00, 0x01, 0xe0, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x67, 16, 0x30, 0x01, 0x01, 0xe1, 0x03, 0x03, 0x30, 0x02, 0x01, 0xe2, 0x03, 0x03, 0x7a, 0x7a, 0x7a, 0x7a, + 0x68, 13, 0x00, 0x08, 0x15, 0x08, 0x15, 0x7a, 0x7a, 0x08, 0x15, 0x08, 0x15, 0x7a, 0x7a, + 0x60, 8, 0x38, 0x08, 0x7a, 0x7a, 0x38, 0x09, 0x7a, 0x7a, + 0x63, 8, 0x31, 0xe4, 0x7a, 0x7a, 0x31, 0xe5, 0x7a, 0x7a, + 0x69, 7, 0x04, 0x22, 0x14, 0x22, 0x14, 0x22, 0x08, + 0x6b, 1, 0x07, + 0x7a, 2, 0x08, 0x13, + 0x7b, 2, 0x08, 0x13, + 0xd1, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd2, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd3, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd4, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd5, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0xd6, 52, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x18, 0x00, 0x21, 0x00, 0x2a, 0x00, 0x35, 0x00, 0x47, 0x00, 0x56, 0x00, 0x90, 0x00, 0xe5, 0x01, 0x68, 0x01, 0xd5, 0x01, 0xd7, 0x02, 0x36, 0x02, 0xa6, 0x02, 0xee, 0x03, 0x48, 0x03, 0xa0, 0x03, 0xba, 0x03, 0xc5, 0x03, 0xd0, 0x03, 0xe0, 0x03, 0xea, 0x03, 0xfa, 0x03, 0xff, + 0x3a, 1, 0x66, + 0x3a, 1, 0x66, + 0x11, 0x80, 120, + 0x29, 0x80, 20 +}; + +static const mcu_pin_obj_t *red_pins[] = { + &pin_GPIO1, &pin_GPIO2, &pin_GPIO42, &pin_GPIO41, &pin_GPIO40 +}; +static const mcu_pin_obj_t *green_pins[] = { + &pin_GPIO21, &pin_GPIO47, &pin_GPIO48, &pin_GPIO45, &pin_GPIO38, &pin_GPIO39 +}; +static const mcu_pin_obj_t *blue_pins[] = { + &pin_GPIO10, &pin_GPIO11, &pin_GPIO12, &pin_GPIO13, &pin_GPIO14 +}; void board_init(void) { + dotclockframebuffer_framebuffer_obj_t *framebuffer = &allocate_display_bus_or_raise()->dotclock; + framebuffer->base.type = &dotclockframebuffer_framebuffer_type; + + common_hal_dotclockframebuffer_framebuffer_construct( + framebuffer, + /* de */ &pin_GPIO17, + /* vsync */ &pin_GPIO3, + /* hsync */ &pin_GPIO46, + /* dclk */ &pin_GPIO9, + /* data */ red_pins, MP_ARRAY_SIZE(red_pins), green_pins, MP_ARRAY_SIZE(green_pins), blue_pins, MP_ARRAY_SIZE(blue_pins), + /* frequency */ 6500000, + /* width x height */ 480, 480, + /* horizontal: pulse, back & front porch, idle */ 13, 20, 40, false, + /* vertical: pulse, back & front porch, idle */ 15, 20, 40, false, + /* de_idle_high */ false, + /* pclk_active_high */ true, + /* pclk_idle_high */ false, + /* overscan_left */ 0 + ); + + framebufferio_framebufferdisplay_obj_t *disp = &allocate_display_or_raise()->framebuffer_display; + disp->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + disp, + framebuffer, + 0, + true + ); + + busio_i2c_obj_t *i2c = common_hal_board_create_i2c(0); + const int i2c_device_address = 32; + + common_hal_busio_i2c_try_lock(i2c); + + { + uint8_t buf[2] = {3, 0xf1}; // set GPIO direction + common_hal_busio_i2c_write(i2c, i2c_device_address, buf, sizeof(buf)); + } + + { + uint8_t buf[2] = {2, 0}; // set all output pins low initially + common_hal_busio_i2c_write(i2c, i2c_device_address, buf, sizeof(buf)); + } + + common_hal_busio_i2c_unlock(i2c); + + dotclockframebuffer_ioexpander_spi_bus spibus = { + .bus = i2c, + .i2c_device_address = i2c_device_address, + .i2c_write_size = 2, + .addr_reg_shadow = { .u32 = 1 }, // GPIO data at register 1 + .cs_mask = 0x100 << 1, // data payload is at byte 2 + .mosi_mask = 0x100 << 3, + .clk_mask = 0x100 << 2, + }; + + dotclockframebuffer_ioexpander_send_init_sequence(&spibus, display_init_sequence, sizeof(display_init_sequence)); + } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. From 2a78d16b54e56c661b2f7dc02a8dadd756b46c6a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 15 Sep 2023 14:49:29 -0500 Subject: [PATCH 096/129] add board.DISPLAY --- ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c index 1bb555fd1d..13fcc7b873 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -65,6 +65,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} + // boot mode button can be used in SW as well { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, From 0547ef61f9698b58334b6860cb2c0a52e62a26af Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 15 Sep 2023 14:43:37 -0700 Subject: [PATCH 097/129] Update dotclock for IDF 5.0 --- ports/espressif/bindings/espidf/__init__.h | 2 + .../adafruit_esp32s3_camera/mpconfigboard.mk | 2 + .../mpconfigboard.mk | 2 +- .../dotclockframebuffer/DotClockFramebuffer.c | 56 ++++--------------- ports/espressif/common-hal/espidf/__init__.c | 7 +++ ports/espressif/common-hal/espidf/__init__.h | 2 +- ports/espressif/esp-idf | 2 +- ports/espressif/supervisor/port.c | 1 + 8 files changed, 27 insertions(+), 47 deletions(-) diff --git a/ports/espressif/bindings/espidf/__init__.h b/ports/espressif/bindings/espidf/__init__.h index e091a5c477..5ace1b3ada 100644 --- a/ports/espressif/bindings/espidf/__init__.h +++ b/ports/espressif/bindings/espidf/__init__.h @@ -31,6 +31,8 @@ #include "py/mpconfig.h" #include "py/obj.h" +#include "common-hal/espidf/__init__.h" + extern const mp_obj_type_t mp_type_espidf_IDFError; extern const mp_obj_type_t mp_type_espidf_MemoryError; diff --git a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk index 0b9deaaf10..9ead7e4f21 100644 --- a/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_esp32s3_camera/mpconfigboard.mk @@ -23,3 +23,5 @@ CIRCUITPY_ONEWIREIO = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_ROTARYIO = 0 + +OPTIMIZATION_FLAGS = -Os diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk index 3db489c5de..65c872cf74 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk @@ -6,7 +6,7 @@ USB_MANUFACTURER = "Adafruit" IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_SIZE = 16MB -CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 8MB diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c index e9809da38c..61045d713d 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c @@ -36,54 +36,19 @@ #include "hal/lcd_ll.h" #include "soc/lcd_periph.h" -// extract from esp-idf esp_lcd_rgb_panel.c -typedef struct -{ - esp_lcd_panel_t base; // Base class of generic lcd panel - int panel_id; // LCD panel ID - lcd_hal_context_t hal; // Hal layer object - size_t data_width; // Number of data lines (e.g. for RGB565, the data width is 16) - size_t sram_trans_align; // Alignment for framebuffer that allocated in SRAM - size_t psram_trans_align; // Alignment for framebuffer that allocated in PSRAM - int disp_gpio_num; // Display control GPIO, which is used to perform action like "disp_off" - intr_handle_t intr; // LCD peripheral interrupt handle - esp_pm_lock_handle_t pm_lock; // Power management lock - size_t num_dma_nodes; // Number of DMA descriptors that used to carry the frame buffer - uint8_t *fb; // Frame buffer - size_t fb_size; // Size of frame buffer - int data_gpio_nums[SOC_LCD_RGB_DATA_WIDTH]; // GPIOs used for data lines, we keep these GPIOs for action like "invert_color" - size_t resolution_hz; // Peripheral clock resolution - esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width) - gdma_channel_handle_t dma_chan; // DMA channel handle - esp_lcd_rgb_panel_frame_trans_done_cb_t on_frame_trans_done; // Callback, invoked after frame trans done - void *user_ctx; // Reserved user's data of callback functions - int x_gap; // Extra gap in x coordinate, it's used when calculate the flush window - int y_gap; // Extra gap in y coordinate, it's used when calculate the flush window - struct - { - unsigned int disp_en_level : 1; // The level which can turn on the screen by `disp_gpio_num` - unsigned int stream_mode : 1; // If set, the LCD transfers data continuously, otherwise, it stops refreshing the LCD when transaction done - unsigned int fb_in_psram : 1; // Whether the frame buffer is in PSRAM - } flags; - dma_descriptor_t dma_nodes[]; // DMA descriptor pool of size `num_dma_nodes` -} esp_rgb_panel_t; - - #include "esp_log.h" #define TAG "LCD" #include "components/esp_rom/include/esp_rom_sys.h" - +#include "bindings/espidf/__init__.h" #include "py/objarray.h" #include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" #include "common-hal/dotclockframebuffer/DotClockFramebuffer.h" -#include "bindings/espidf/__init__.h" +#include "common-hal/espidf/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "py/runtime.h" #include "components/driver/include/driver/gpio.h" -#include "components/driver/include/driver/periph_ctrl.h" -#include "components/driver/include/esp_private/gdma.h" #include "components/esp_rom/include/esp_rom_gpio.h" #include "components/hal/esp32s3/include/hal/lcd_ll.h" #include "components/hal/include/hal/gpio_hal.h" @@ -170,6 +135,7 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr cfg->vsync_gpio_num = valid_pin(vsync, MP_QSTR_vsync); cfg->de_gpio_num = valid_pin(de, MP_QSTR_de); cfg->pclk_gpio_num = valid_pin(dclk, MP_QSTR_dclk); + cfg->clk_src = LCD_CLK_SRC_DEFAULT; cfg->data_gpio_nums[0] = valid_pin(blue[0], MP_QSTR_blue); cfg->data_gpio_nums[1] = valid_pin(blue[1], MP_QSTR_blue); @@ -193,22 +159,24 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr cfg->disp_gpio_num = GPIO_NUM_NC; cfg->flags.disp_active_low = 0; - cfg->flags.relax_on_idle = 0; + cfg->flags.refresh_on_demand = 0; cfg->flags.fb_in_psram = 1; // allocate frame buffer in PSRAM - ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(&self->panel_config, &self->panel_handle)); - ESP_ERROR_CHECK(esp_lcd_panel_reset(self->panel_handle)); - ESP_ERROR_CHECK(esp_lcd_panel_init(self->panel_handle)); + esp_err_t ret = esp_lcd_new_rgb_panel(&self->panel_config, &self->panel_handle); + cp_check_esp_error(ret); + cp_check_esp_error(esp_lcd_panel_reset(self->panel_handle)); + cp_check_esp_error(esp_lcd_panel_init(self->panel_handle)); uint16_t color = 0; - ESP_ERROR_CHECK(self->panel_handle->draw_bitmap(self->panel_handle, 0, 0, 1, 1, &color)); + cp_check_esp_error(self->panel_handle->draw_bitmap(self->panel_handle, 0, 0, 1, 1, &color)); - esp_rgb_panel_t *_rgb_panel = __containerof(self->panel_handle, esp_rgb_panel_t, base); + void *fb; + cp_check_esp_error(esp_lcd_rgb_panel_get_frame_buffer(self->panel_handle, 1, &fb)); self->frequency = frequency; self->row_stride = 2 * (width + overscan_left); self->refresh_rate = frequency / (width + hsync_front_porch + hsync_back_porch) / (height + vsync_front_porch + vsync_back_porch); - self->bufinfo.buf = (uint8_t *)_rgb_panel->fb + 2 * overscan_left; // first line starts ater overscan_left pixels + self->bufinfo.buf = (uint8_t *)fb + 2 * overscan_left; // first line starts after overscan_left pixels self->bufinfo.len = 2 * (cfg->timings.h_res * cfg->timings.v_res - overscan_left); // no overscan after last line self->bufinfo.typecode = 'H' | MP_OBJ_ARRAY_TYPECODE_FLAG_RW; diff --git a/ports/espressif/common-hal/espidf/__init__.c b/ports/espressif/common-hal/espidf/__init__.c index 7ab5ab9efb..e5f866b906 100644 --- a/ports/espressif/common-hal/espidf/__init__.c +++ b/ports/espressif/common-hal/espidf/__init__.c @@ -188,4 +188,11 @@ void raise_esp_error(esp_err_t err) { mp_raise_msg_varg(exception_type, translate("%s error 0x%x"), group, err); } +void cp_check_esp_error(esp_err_t err) { + if (err == ESP_OK) { + return; + } + raise_esp_error(err); +} + MP_REGISTER_MODULE(MP_QSTR_espidf, espidf_module); diff --git a/ports/espressif/common-hal/espidf/__init__.h b/ports/espressif/common-hal/espidf/__init__.h index 0d168b105c..337ad7ef99 100644 --- a/ports/espressif/common-hal/espidf/__init__.h +++ b/ports/espressif/common-hal/espidf/__init__.h @@ -26,4 +26,4 @@ #pragma once -#include "bindings/espidf/__init__.h" +void cp_check_esp_error(esp_err_t err); diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index f2ee41e622..dc6c0b46ab 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit f2ee41e622694ead7caa3dcac0d04c96c5a7b027 +Subproject commit dc6c0b46ab9edc9c5ee6667c07eb87200b4f7ca5 diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index d605dc2b79..a18ce77dfb 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -284,6 +284,7 @@ safe_mode_t port_init(void) { #endif #if ENABLE_JTAG + ESP_LOGI(TAG, "Marking JTAG pins never_reset") // JTAG #ifdef CONFIG_IDF_TARGET_ESP32C3 common_hal_never_reset_pin(&pin_GPIO4); From 4c682262e66e16d37d8f662dd75fdcb987b68a31 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Sep 2023 10:35:05 -0500 Subject: [PATCH 098/129] lcd_ev: fix compile error --- ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c index 13fcc7b873..56fcece8b6 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -1,5 +1,6 @@ #include "py/objtuple.h" #include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, @@ -65,7 +66,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(DEFAULT_I2C_BUS_SCL) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(DEFAULT_I2C_BUS_SDA) }, - { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) }, // boot mode button can be used in SW as well { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, From 75ba82cdb02e9f9eb2e5b2f57b78b33beb882be5 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Sep 2023 10:35:36 -0500 Subject: [PATCH 099/129] lcd_ev: add timings; rename TFT -> TFT_PINS --- .../boards/espressif_esp32s3_lcd_ev/pins.c | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c index 56fcece8b6..d66fc534a4 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -39,7 +39,7 @@ STATIC const mp_rom_obj_tuple_t tft_b_pins = { } }; -STATIC const mp_rom_map_elem_t tft_table[] = { +STATIC const mp_rom_map_elem_t tft_pins_table[] = { { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO3) }, { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO46) }, @@ -48,12 +48,31 @@ STATIC const mp_rom_map_elem_t tft_table[] = { { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, }; -MP_DEFINE_CONST_DICT(tft_dict, tft_table); +MP_DEFINE_CONST_DICT(tft_pins_dict, tft_pins_table); + +STATIC const mp_rom_map_elem_t tft_timings_table[] = { + { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(6500000) }, // nominal 16MHz, but display is unstable/tears at that frequency + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_INT(480) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_INT(480) }, + { MP_ROM_QSTR(MP_QSTR_hsync_pulse_width), MP_ROM_INT(13) }, + { MP_ROM_QSTR(MP_QSTR_hsync_front_porch), MP_ROM_INT(20) }, + { MP_ROM_QSTR(MP_QSTR_hsync_back_porch), MP_ROM_INT(40) }, + { MP_ROM_QSTR(MP_QSTR_hsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_vsync_pulse_width), MP_ROM_INT(15) }, + { MP_ROM_QSTR(MP_QSTR_vsync_front_porch), MP_ROM_INT(20) }, + { MP_ROM_QSTR(MP_QSTR_vsync_back_porch), MP_ROM_INT(40) }, + { MP_ROM_QSTR(MP_QSTR_vsync_idle_low), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_de_idle_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_active_high), MP_ROM_FALSE }, + { MP_ROM_QSTR(MP_QSTR_pclk_idle_high), MP_ROM_FALSE }, +}; +MP_DEFINE_CONST_DICT(tft_timings_dict, tft_timings_table); STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_pins_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_TIMINGS), MP_ROM_PTR(&tft_timings_dict) }, { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_I2S_MCLK), MP_ROM_PTR(&pin_GPIO5) }, From 67e15bb6a20bb7110a6ece010276a8bf03db492d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Sep 2023 10:35:49 -0500 Subject: [PATCH 100/129] makerfabs_tft7: rename properties to match docs --- ports/espressif/boards/makerfabs_tft7/pins.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/espressif/boards/makerfabs_tft7/pins.c b/ports/espressif/boards/makerfabs_tft7/pins.c index 1a170035c2..88738d3c99 100644 --- a/ports/espressif/boards/makerfabs_tft7/pins.c +++ b/ports/espressif/boards/makerfabs_tft7/pins.c @@ -38,7 +38,7 @@ STATIC const mp_rom_obj_tuple_t tft_b_pins = { } }; -STATIC const mp_rom_map_elem_t tft_table[] = { +STATIC const mp_rom_map_elem_t tft_pins_table[] = { { MP_ROM_QSTR(MP_QSTR_de), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_vsync), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_hsync), MP_ROM_PTR(&pin_GPIO39) }, @@ -47,7 +47,7 @@ STATIC const mp_rom_map_elem_t tft_table[] = { { MP_ROM_QSTR(MP_QSTR_green), MP_ROM_PTR(&tft_g_pins) }, { MP_ROM_QSTR(MP_QSTR_blue), MP_ROM_PTR(&tft_b_pins) }, }; -MP_DEFINE_CONST_DICT(tft_dict, tft_table); +MP_DEFINE_CONST_DICT(tft_pins_dict, tft_pins_table); STATIC const mp_rom_map_elem_t timings800_table[] = { { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_INT(6500000) }, // nominal 16MHz, but display is unstable/tears at that frequency @@ -70,8 +70,8 @@ MP_DEFINE_CONST_DICT(timings800_dict, timings800_table); STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, - { MP_ROM_QSTR(MP_QSTR_TIMINGS800), MP_ROM_PTR(&timings800_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_pins_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_TIMINGS_800x480), MP_ROM_PTR(&timings800_dict) }, { MP_ROM_QSTR(MP_QSTR_BACKLIGHT), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO20) }, From 5a60b8d573cfb2c40014d23614809d825198dc15 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Sep 2023 12:58:54 -0500 Subject: [PATCH 101/129] Only delay when explicitly called for --- shared-module/dotclockframebuffer/__init__.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c index 674c824af5..9bea7c2897 100644 --- a/shared-module/dotclockframebuffer/__init__.c +++ b/shared-module/dotclockframebuffer/__init__.c @@ -66,15 +66,14 @@ void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexp // deassert CS pin_change(bus, /* set */ bus->cs_mask, 0); - uint16_t delay_length_ms = 10; if (delay) { data_size++; - delay_length_ms = *(cmd + 1 + data_size); + uint16_t delay_length_ms = *(cmd + 1 + data_size); if (delay_length_ms == 255) { delay_length_ms = 500; } + mp_hal_delay_ms(delay_length_ms); } - mp_hal_delay_ms(delay_length_ms); i += 2 + data_size; } common_hal_busio_i2c_unlock(bus->bus); From faa6887050e71a3ed129d5cfd9d7889cb615ee1c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Sep 2023 12:59:43 -0500 Subject: [PATCH 102/129] Use faster bus & remove final delay this pushes the LCD initialization down to about 1.3s. --- .../boards/espressif_esp32s3_lcd_ev/board.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c index ed06698583..86d4d0960d 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c @@ -80,7 +80,7 @@ static const uint8_t display_init_sequence[] = { 0x3a, 1, 0x66, 0x3a, 1, 0x66, 0x11, 0x80, 120, - 0x29, 0x80, 20 + 0x29, 0x0 }; static const mcu_pin_obj_t *red_pins[] = { @@ -122,25 +122,27 @@ void board_init(void) { true ); - busio_i2c_obj_t *i2c = common_hal_board_create_i2c(0); + busio_i2c_obj_t i2c; + i2c.base.type = &busio_i2c_type; + common_hal_busio_i2c_construct(&i2c, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 255); const int i2c_device_address = 32; - common_hal_busio_i2c_try_lock(i2c); + common_hal_busio_i2c_try_lock(&i2c); { uint8_t buf[2] = {3, 0xf1}; // set GPIO direction - common_hal_busio_i2c_write(i2c, i2c_device_address, buf, sizeof(buf)); + common_hal_busio_i2c_write(&i2c, i2c_device_address, buf, sizeof(buf)); } { uint8_t buf[2] = {2, 0}; // set all output pins low initially - common_hal_busio_i2c_write(i2c, i2c_device_address, buf, sizeof(buf)); + common_hal_busio_i2c_write(&i2c, i2c_device_address, buf, sizeof(buf)); } - common_hal_busio_i2c_unlock(i2c); + common_hal_busio_i2c_unlock(&i2c); dotclockframebuffer_ioexpander_spi_bus spibus = { - .bus = i2c, + .bus = &i2c, .i2c_device_address = i2c_device_address, .i2c_write_size = 2, .addr_reg_shadow = { .u32 = 1 }, // GPIO data at register 1 @@ -151,6 +153,7 @@ void board_init(void) { dotclockframebuffer_ioexpander_send_init_sequence(&spibus, display_init_sequence, sizeof(display_init_sequence)); + common_hal_busio_i2c_deinit(&i2c); } // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. From c86b3ae19f58dc1420f6924272a24cb380eb6021 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 18 Sep 2023 11:18:04 -0700 Subject: [PATCH 103/129] Update to merged idf changes --- ports/espressif/esp-idf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index dc6c0b46ab..6f0c9319c5 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit dc6c0b46ab9edc9c5ee6667c07eb87200b4f7ca5 +Subproject commit 6f0c9319c5b09ce12ef81e6428d3b6f23a9487e5 From d4000023d8f18100d01af5250521c42f5657537f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 20 Sep 2023 11:45:45 -0700 Subject: [PATCH 104/129] Fix board def mistakes and cast --- ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk | 2 +- ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk | 2 +- ports/espressif/peripherals/i2c.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk index a8b3e35118..fb36bbf0db 100644 --- a/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_1a_v2/mpconfigboard.mk @@ -11,7 +11,7 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB -CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_MODE = opi CIRCUITPY_ESP_PSRAM_FREQ = 80m CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk index 7f48c05863..e17f5061d9 100644 --- a/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_timer_camera_x/mpconfigboard.mk @@ -8,5 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB -CIRCUITPY_ESP_PSRAM_MODE = qio +CIRCUITPY_ESP_PSRAM_MODE = opi CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/peripherals/i2c.c b/ports/espressif/peripherals/i2c.c index 1f8565ca01..d16f165d38 100644 --- a/ports/espressif/peripherals/i2c.c +++ b/ports/espressif/peripherals/i2c.c @@ -35,7 +35,7 @@ typedef enum { static i2c_status_t i2c_status[I2C_NUM_MAX]; void i2c_reset(void) { - for (i2c_port_t num = 0; num < (int)I2C_NUM_MAX; num++) { + for (i2c_port_t num = 0; num < (i2c_port_t)I2C_NUM_MAX; num++) { if (i2c_status[num] == STATUS_IN_USE) { i2c_driver_delete(num); i2c_status[num] = STATUS_FREE; From 65e514ee491e4cb8a055ec1ddca470c14a49c238 Mon Sep 17 00:00:00 2001 From: Reppad Date: Wed, 20 Sep 2023 22:36:10 +0200 Subject: [PATCH 105/129] Fix codespace --- .devcontainer/cortex-m/on-create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/cortex-m/on-create.sh b/.devcontainer/cortex-m/on-create.sh index 8c4bd0cfed..3db1ff3f38 100755 --- a/.devcontainer/cortex-m/on-create.sh +++ b/.devcontainer/cortex-m/on-create.sh @@ -34,7 +34,7 @@ rm -fr /workspaces/dosfstools-4.2 /workspaces/dosfstools-4.2.tar.gz # prepare source-code tree cd /workspaces/circuitpython/ echo -e "[on-create.sh] fetching submodules" -make fetch-submodules +make fetch-all-submodules echo -e "[on-create.sh] fetching tags" git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD From e22eefabd7fef719f8c2616d9e161527bbe550d1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 15 Sep 2023 16:19:34 -0700 Subject: [PATCH 106/129] First stab at 5.1 update --- .gitmodules | 1 + ports/espressif/Makefile | 29 +++++++++++++++---- ports/espressif/bindings/espnow/Peer.c | 6 ++-- ports/espressif/bindings/espnow/Peer.h | 1 + .../adafruit_qualia_s3_rgb666/mpconfigboard.h | 4 --- .../adafruit_qualia_s3_rgb666/sdkconfig | 13 --------- ports/espressif/common-hal/alarm/__init__.c | 6 ++-- ports/espressif/common-hal/busio/I2C.c | 2 +- ports/espressif/common-hal/busio/UART.c | 2 +- .../common-hal/digitalio/DigitalInOut.c | 2 +- .../dotclockframebuffer/DotClockFramebuffer.c | 2 +- .../common-hal/microcontroller/Pin.c | 2 +- ports/espressif/common-hal/pwmio/PWMOut.h | 2 +- ports/espressif/esp-camera | 2 +- ports/espressif/esp-idf | 2 +- ports/espressif/supervisor/port.c | 2 +- 16 files changed, 43 insertions(+), 35 deletions(-) diff --git a/.gitmodules b/.gitmodules index 16fdbcf5a1..a0ecce0c75 100644 --- a/.gitmodules +++ b/.gitmodules @@ -143,6 +143,7 @@ [submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf url = https://github.com/adafruit/esp-idf.git + branch = circuitpython-v5.1 [submodule "ports/espressif/esp-protocols"] path = ports/espressif/esp-protocols url = https://github.com/espressif/esp-protocols.git diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index b400cd06b7..c2ec9e43bc 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -32,6 +32,12 @@ IDF_TARGET_ARCH = xtensa CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- endif +ifeq ($(IDF_TARGET),esp32s3) +BT_IDF_TARGET = esp32c3 +else +BT_IDF_TARGET = $(IDF_TARGET) +endif + ####################################### # CFLAGS ####################################### @@ -52,19 +58,29 @@ INC += \ -isystem esp-idf/components/app_update/include \ -isystem esp-idf/components/bootloader_support/include \ -isystem esp-idf/components/bootloader_support/bootloader_flash/include \ - -isystem esp-idf/components/bt/include/$(IDF_TARGET)/include \ + -isystem esp-idf/components/bt/include/$(BT_IDF_TARGET)/include \ -isystem esp-idf/components/bt/host/nimble/esp-hci/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/controller/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/services/gap/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/include \ -isystem esp-idf/components/bt/host/nimble/nimble/nimble/host/util/include \ + -isystem esp-idf/components/bt/host/nimble/nimble/nimble/transport/include \ -isystem esp-idf/components/bt/host/nimble/nimble/porting/nimble/include \ -isystem esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include \ -isystem esp-idf/components/bt/host/nimble/port/include \ -isystem esp-idf/components/driver/include \ -isystem esp-idf/components/driver/deprecated \ + -isystem esp-idf/components/driver/gpio/include \ + -isystem esp-idf/components/driver/i2c/include \ + -isystem esp-idf/components/driver/i2s/include \ -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ + -isystem esp-idf/components/driver/ledc/include \ + -isystem esp-idf/components/driver/spi/include \ + -isystem esp-idf/components/driver/temperature_sensor/include \ + -isystem esp-idf/components/driver/touch_sensor/include \ + -isystem esp-idf/components/driver/touch_sensor/$(IDF_TARGET)/include \ + -isystem esp-idf/components/driver/twai/include \ -isystem esp-idf/components/efuse/include \ -isystem esp-idf/components/efuse/$(IDF_TARGET)/include \ -isystem esp-idf/components/$(IDF_TARGET)/include \ @@ -85,6 +101,7 @@ INC += \ -isystem esp-idf/components/esp_wifi/include \ -isystem esp-idf/components/freertos/esp_additions/include \ -isystem esp-idf/components/freertos/esp_additions/include/freertos \ + -isystem esp-idf/components/freertos/esp_additions/arch/$(IDF_TARGET_ARCH)/include \ -isystem esp-idf/components/freertos/FreeRTOS-Kernel/include \ -isystem esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos \ -isystem esp-idf/components/freertos/FreeRTOS-Kernel/portable/$(IDF_TARGET_ARCH)/include \ @@ -95,7 +112,9 @@ INC += \ -isystem esp-idf/components/log/include \ -isystem esp-idf/components/lwip/include \ -isystem esp-idf/components/lwip/lwip/src/include \ - -isystem esp-idf/components/lwip/port/esp32/include \ + -isystem esp-idf/components/lwip/port/include \ + -isystem esp-idf/components/lwip/port/esp32xx/include \ + -isystem esp-idf/components/lwip/port/freertos/include \ -isystem esp-idf/components/mbedtls/esp_crt_bundle/include \ -isystem esp-idf/components/mbedtls/mbedtls/include \ -isystem esp-idf/components/mbedtls/port/include \ @@ -408,13 +427,13 @@ update-all-sdkconfigs: $(BUILD)/esp-idf/config/sdkconfig.h update-board-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) -BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a -BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +BINARY_WIFI_BLOBS = libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a +BINARY_BLOBS = esp-idf/components/esp_coex/lib/$(IDF_TARGET)/libcoexist.a esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) ifeq ($(IDF_TARGET),esp32) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a endif -ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_coex esp_common esp_event esp_hw_support esp_mm esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ifneq ($(CIRCUITPY_BLEIO),0) ESP_IDF_COMPONENTS_LINK += bt ifeq ($(IDF_TARGET),esp32) diff --git a/ports/espressif/bindings/espnow/Peer.c b/ports/espressif/bindings/espnow/Peer.c index 4cceec1498..6515cb4eeb 100644 --- a/ports/espressif/bindings/espnow/Peer.c +++ b/ports/espressif/bindings/espnow/Peer.c @@ -79,11 +79,13 @@ STATIC mp_obj_t espnow_peer_make_new(const mp_obj_type_t *type, size_t n_args, s self->peer_info.ifidx = (wifi_interface_t)mp_arg_validate_int_range(args[ARG_interface].u_int, 0, 1, MP_QSTR_interface); self->peer_info.encrypt = args[ARG_encrypted].u_bool; + self->lmk_set = false; const mp_obj_t lmk = args[ARG_lmk].u_obj; if (lmk != mp_const_none) { + self->lmk_set = true; memcpy(self->peer_info.lmk, common_hal_espnow_get_bytes_len(lmk, ESP_NOW_KEY_LEN), ESP_NOW_KEY_LEN); - } else if (self->peer_info.encrypt && !self->peer_info.lmk) { + } else if (self->peer_info.encrypt) { mp_raise_ValueError_varg(translate("%q is %q"), MP_QSTR_lmk, MP_QSTR_None); } @@ -196,7 +198,7 @@ STATIC mp_obj_t espnow_peer_set_encrypted(const mp_obj_t self_in, const mp_obj_t self->peer_info.encrypt = mp_obj_is_true(value); - if (!self->peer_info.lmk) { + if (!self->lmk_set) { mp_raise_ValueError_varg(translate("%q is %q"), MP_QSTR_lmk, MP_QSTR_None); } diff --git a/ports/espressif/bindings/espnow/Peer.h b/ports/espressif/bindings/espnow/Peer.h index 8afab8e493..23a691b3bc 100644 --- a/ports/espressif/bindings/espnow/Peer.h +++ b/ports/espressif/bindings/espnow/Peer.h @@ -32,6 +32,7 @@ typedef struct { mp_obj_base_t base; esp_now_peer_info_t peer_info; + bool lmk_set; } espnow_peer_obj_t; extern const mp_obj_type_t espnow_peer_type; diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h index 9acfe8cf06..04527bb0a1 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h @@ -32,10 +32,6 @@ #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) -// UART pins attached to the USB-serial converter chip -#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) -#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) - #define MICROPY_HW_NEOPIXEL (&pin_GPIO4) // also DBLTAP #define DOUBLE_TAP_PIN (&pin_GPIO4) // also NEOPIXEL diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig index e9dc0663bd..912dd14b11 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig @@ -5,19 +5,6 @@ # Component 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 - # # LWIP # diff --git a/ports/espressif/common-hal/alarm/__init__.c b/ports/espressif/common-hal/alarm/__init__.c index 6fa205d01f..6590bcc8e4 100644 --- a/ports/espressif/common-hal/alarm/__init__.c +++ b/ports/espressif/common-hal/alarm/__init__.c @@ -51,8 +51,8 @@ #include "esp_sleep.h" #include "soc/rtc_cntl_reg.h" -#include "components/driver/include/driver/gpio.h" -#include "components/driver/include/driver/uart.h" +#include "components/driver/gpio/include/driver/gpio.h" +#include "components/driver/uart/include/driver/uart.h" // Singleton instance of SleepMemory. const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { @@ -213,6 +213,8 @@ void NORETURN common_hal_alarm_enter_deep_sleep(void) { // The ESP-IDF caches the deep sleep settings and applies them before sleep. // We don't need to worry about resetting them in the interim. esp_deep_sleep_start(); + + reset_into_safe_mode(SAFE_MODE_HARD_FAULT); } void common_hal_alarm_gc_collect(void) { diff --git a/ports/espressif/common-hal/busio/I2C.c b/ports/espressif/common-hal/busio/I2C.c index 92bd4fb157..b9775adfd7 100644 --- a/ports/espressif/common-hal/busio/I2C.c +++ b/ports/espressif/common-hal/busio/I2C.c @@ -28,7 +28,7 @@ #include "py/mperrno.h" #include "py/runtime.h" -#include "components/driver/include/driver/i2c.h" +#include "components/driver/i2c/include/driver/i2c.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" diff --git a/ports/espressif/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c index bee199fb17..797d00697d 100644 --- a/ports/espressif/common-hal/busio/UART.c +++ b/ports/espressif/common-hal/busio/UART.c @@ -28,7 +28,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/busio/UART.h" -#include "components/driver/include/driver/uart.h" +#include "components/driver/uart/include/driver/uart.h" #include "mpconfigport.h" #include "shared/readline/readline.h" diff --git a/ports/espressif/common-hal/digitalio/DigitalInOut.c b/ports/espressif/common-hal/digitalio/DigitalInOut.c index 61671dadb9..4b6c966da3 100644 --- a/ports/espressif/common-hal/digitalio/DigitalInOut.c +++ b/ports/espressif/common-hal/digitalio/DigitalInOut.c @@ -28,7 +28,7 @@ #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c index 61045d713d..d9e8d97da8 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c @@ -48,7 +48,7 @@ #include "common-hal/espidf/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "py/runtime.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/esp_rom/include/esp_rom_gpio.h" #include "components/hal/esp32s3/include/hal/lcd_ll.h" #include "components/hal/include/hal/gpio_hal.h" diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index eeda6862db..4c01d988a9 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -30,7 +30,7 @@ #include "py/mphal.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" STATIC uint64_t _never_reset_pin_mask; diff --git a/ports/espressif/common-hal/pwmio/PWMOut.h b/ports/espressif/common-hal/pwmio/PWMOut.h index cde579ce89..a7711ebf07 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.h +++ b/ports/espressif/common-hal/pwmio/PWMOut.h @@ -28,7 +28,7 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_PWMIO_PWMOUT_H #include "common-hal/microcontroller/Pin.h" -#include "components/driver/include/driver/ledc.h" +#include "components/driver/ledc/include/driver/ledc.h" typedef struct { mp_obj_base_t base; diff --git a/ports/espressif/esp-camera b/ports/espressif/esp-camera index 75035312ed..8f3f2cc8cf 160000 --- a/ports/espressif/esp-camera +++ b/ports/espressif/esp-camera @@ -1 +1 @@ -Subproject commit 75035312ed9427557acfee1cd32af2b8e1f13f72 +Subproject commit 8f3f2cc8cfb2e4371870b0c5a974d40468114a9e diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index 6f0c9319c5..fb07ab7f00 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit 6f0c9319c5b09ce12ef81e6428d3b6f23a9487e5 +Subproject commit fb07ab7f0007549d38081cfc6d83348780526a28 diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index a18ce77dfb..462cf9e361 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -284,7 +284,7 @@ safe_mode_t port_init(void) { #endif #if ENABLE_JTAG - ESP_LOGI(TAG, "Marking JTAG pins never_reset") + ESP_LOGI(TAG, "Marking JTAG pins never_reset"); // JTAG #ifdef CONFIG_IDF_TARGET_ESP32C3 common_hal_never_reset_pin(&pin_GPIO4); From 7bad82a2192b2b590054c912f8e9b010a5d3afcc Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 19 Sep 2023 16:27:00 -0700 Subject: [PATCH 107/129] C6 compiles, runs but wifi crashes --- .gitmodules | 2 +- ports/espressif/Makefile | 59 +++++++-- .../01space_lcd042_esp32c3/mpconfigboard.h | 2 - .../01space_lcd042_esp32c3/mpconfigboard.mk | 2 + .../adafruit_qtpy_esp32c3/mpconfigboard.h | 2 - .../adafruit_qtpy_esp32c3/mpconfigboard.mk | 2 + .../ai_thinker_esp32-c3s-2m/mpconfigboard.mk | 2 + .../ai_thinker_esp32-c3s/mpconfigboard.mk | 2 + .../boards/beetle-esp32-c3/mpconfigboard.h | 2 - .../boards/beetle-esp32-c3/mpconfigboard.mk | 2 + .../boards/deneyap_kart_g/mpconfigboard.h | 2 - .../boards/deneyap_kart_g/mpconfigboard.mk | 2 + .../espressif_esp32c6_devkitc_1_n8/board.c | 29 +++++ .../mpconfigboard.h | 35 +++++ .../mpconfigboard.mk | 8 ++ .../espressif_esp32c6_devkitc_1_n8/pins.c | 36 ++++++ .../espressif_esp32c6_devkitc_1_n8/sdkconfig | 15 +++ .../espressif_esp32c6_devkitm_1_n4/board.c | 29 +++++ .../mpconfigboard.h | 37 ++++++ .../mpconfigboard.mk | 8 ++ .../espressif_esp32c6_devkitm_1_n4/pins.c | 61 +++++++++ .../espressif_esp32c6_devkitm_1_n4/sdkconfig | 15 +++ .../boards/lolin_c3_mini/mpconfigboard.h | 2 - .../boards/lolin_c3_mini/mpconfigboard.mk | 2 + .../boards/lolin_c3_pico/mpconfigboard.h | 2 - .../boards/lolin_c3_pico/mpconfigboard.mk | 2 + .../luatos_core_esp32c3/mpconfigboard.h | 2 - .../luatos_core_esp32c3/mpconfigboard.mk | 2 + .../mpconfigboard.mk | 2 + .../boards/m5stack_stamp_c3/mpconfigboard.h | 2 - .../boards/m5stack_stamp_c3/mpconfigboard.mk | 2 + .../boards/microdev_micro_c3/mpconfigboard.h | 3 - .../boards/microdev_micro_c3/mpconfigboard.mk | 2 + .../boards/seeed_xiao_esp32c3/mpconfigboard.h | 2 - .../seeed_xiao_esp32c3/mpconfigboard.mk | 2 + .../common-hal/analogbufio/BufferedIn.c | 11 +- .../espressif/common-hal/analogio/AnalogIn.c | 122 +++++++++++++----- ports/espressif/common-hal/busio/UART.c | 2 +- ports/espressif/common-hal/canio/Listener.c | 25 +--- .../common-hal/frequencyio/FrequencyIn.c | 8 +- .../common-hal/microcontroller/Pin.c | 38 +++++- .../common-hal/microcontroller/Processor.c | 12 +- .../common-hal/microcontroller/__init__.c | 23 +++- .../esp-idf-config/sdkconfig-esp32c6.defaults | 66 ++++++++++ .../sdkconfig-flash-80m.defaults | 4 + .../esp-idf-config/sdkconfig.defaults | 8 ++ ports/espressif/mpconfigport.h | 14 +- ports/espressif/mpconfigport.mk | 22 +++- ports/espressif/mphalport.c | 10 +- ports/espressif/peripherals/esp32c6/pins.c | 59 +++++++++ ports/espressif/peripherals/esp32c6/pins.h | 94 ++++++++++++++ ports/espressif/peripherals/pins.h | 4 + ports/espressif/supervisor/port.c | 13 +- ports/espressif/tools/build_memory_info.py | 15 +++ ports/espressif/tools/update_sdkconfig.py | 2 +- py/circuitpy_mpconfig.mk | 3 + py/makeqstrdefs.py | 5 +- 57 files changed, 815 insertions(+), 126 deletions(-) create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c create mode 100644 ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig create mode 100644 ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults create mode 100644 ports/espressif/peripherals/esp32c6/pins.c create mode 100644 ports/espressif/peripherals/esp32c6/pins.h diff --git a/.gitmodules b/.gitmodules index a0ecce0c75..9693f68421 100644 --- a/.gitmodules +++ b/.gitmodules @@ -152,7 +152,7 @@ url = https://github.com/espressif/esp-iot-solution.git [submodule "ports/espressif/esp-camera"] path = ports/espressif/esp-camera - url = https://github.com/espressif/esp32-camera.git + url = https://github.com/adafruit/esp32-camera.git branch = circuitpython [submodule "frozen/Adafruit_CircuitPython_ST7789"] path = frozen/Adafruit_CircuitPython_ST7789 diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index c2ec9e43bc..4e2953b495 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -27,6 +27,9 @@ include ../../py/circuitpy_mkenv.mk ifeq ($(IDF_TARGET),esp32c3) IDF_TARGET_ARCH = riscv CROSS_COMPILE = riscv32-esp-elf- +else ifeq ($(IDF_TARGET),esp32c6) +IDF_TARGET_ARCH = riscv +CROSS_COMPILE = riscv32-esp-elf- else IDF_TARGET_ARCH = xtensa CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- @@ -84,7 +87,8 @@ INC += \ -isystem esp-idf/components/efuse/include \ -isystem esp-idf/components/efuse/$(IDF_TARGET)/include \ -isystem esp-idf/components/$(IDF_TARGET)/include \ - -isystem esp-idf/components/esp_adc/deprecated/include \ + -isystem esp-idf/components/esp_adc/include \ + -isystem esp-idf/components/esp_adc/$(IDF_TARGET)/include \ -isystem esp-idf/components/esp_app_format/include \ -isystem esp-idf/components/esp_common/include \ -isystem esp-idf/components/esp_event/include \ @@ -172,6 +176,7 @@ CFLAGS += $(INC) -Werror -Wall -std=gnu11 -Wl,--gc-sections $(BASE_CFLAGS) $(C_D # Most current ESPs have nano versions of newlib in ROM so we use them. ifneq ($(IDF_TARGET),esp32c6) CFLAGS += --specs=nano.specs + LDFLAGS += -T$(IDF_TARGET).rom.newlib-nano.ld endif ifeq ($(IDF_TARGET_ARCH),xtensa) @@ -192,7 +197,6 @@ LDFLAGS += \ -T$(IDF_TARGET).rom.ld \ -T$(IDF_TARGET).rom.api.ld \ -T$(IDF_TARGET).rom.libgcc.ld \ - -T$(IDF_TARGET).rom.newlib-nano.ld \ -Wl,-Bstatic \ -Wl,--no-warn-mismatch \ -Wl,--build-id=none \ @@ -208,6 +212,15 @@ LDFLAGS += \ -Tesp32c3.rom.newlib.ld \ -Tesp32c3.rom.version.ld \ -Tesp32c3.rom.eco3.ld +else ifeq ($(IDF_TARGET),esp32c6) +LDFLAGS += \ + -Tesp32c6.rom.phy.ld \ + -Tesp32c6.rom.pp.ld \ + -Tesp32c6.rom.net80211.ld \ + -Tesp32c6.rom.newlib.ld \ + -Tesp32c6.rom.coexist.ld \ + -Tesp32c6.rom.heap.ld \ + -Tesp32c6.rom.wdt.ld else ifeq ($(IDF_TARGET),esp32s2) LDFLAGS += \ -T$(IDF_TARGET).rom.newlib-data.ld \ @@ -222,7 +235,7 @@ endif LIBS := -lgcc -lc -lstdc++ # Use toolchain libm if we're not using our own. -ifndef INTERNAL_LIBM +ifneq ($(INTERNAL_LIBM),1) LIBS += -lm endif @@ -262,12 +275,16 @@ SRC_C += \ SRC_C += $(wildcard common-hal/espidf/*.c) -ifeq ($(IDF_TARGET),esp32c3) +ifneq ($(CIRCUITPY_ESP_USB_SERIAL_JTAG),0) SRC_C += supervisor/usb_serial_jtag.c -else -SRC_C += \ - peripherals/pcnt.c \ - peripherals/touch.c +endif + +ifneq ($(CIRCUITPY_COUNTIO),0) +SRC_C += peripherals/pcnt.c +endif + +ifneq ($(CIRCUITPY_TOUCHIO_USE_NATIVE),0) +SRC_C += peripherals/touch.c endif ifneq ($(CIRCUITPY_USB),0) @@ -435,13 +452,28 @@ endif ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_coex esp_common esp_event esp_hw_support esp_mm esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ifneq ($(CIRCUITPY_BLEIO),0) + BLE_IMPL_esp32 := esp32 + BLE_IMPL_esp32s3 := esp32c3 + BLE_IMPL_esp32c2 := libble + BLE_IMPL_esp32c3 := esp32c3 + BLE_IMPL_esp32c6 := libble + BLE_IMPL_esp32h2 := libble + BLE_IMPL = $(BLE_IMPL_$(IDF_TARGET)) + ESP_IDF_COMPONENTS_LINK += bt - ifeq ($(IDF_TARGET),esp32) - BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a - else + ifeq ($(BLE_IMPL),esp32) + BINARY_BLOBS += esp-idf/components/bt/controller/lib_esp32/$(IDF_TARGET)/libbtdm_app.a + endif + + ifeq ($(BLE_IMPL),esp32c3) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ esp-idf/components/bt/controller/lib_esp32c3_family/$(IDF_TARGET)/libbtdm_app.a endif + + ifeq ($(BLE_IMPL),libble) + BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libbtbb.a \ + esp-idf/components/bt/controller/lib_$(IDF_TARGET)/$(IDF_TARGET)-bt-lib/libble_app.a + endif endif ifneq ($(CIRCUITPY_ESPULP),0) ESP_IDF_COMPONENTS_LINK += ulp @@ -469,11 +501,16 @@ ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/esp-camera/libesp-camera endif ifneq ($(VALID_BOARD),) +# From esp-idf/components/bootloader/Kconfig.projbuild # BOOTLOADER_OFFSET is determined by chip type, based on the ROM bootloader, and is not changeable. ifeq ($(IDF_TARGET),esp32) BOOTLOADER_OFFSET = 0x1000 +else ifeq ($(IDF_TARGET),esp32h2) +BOOTLOADER_OFFSET = 0x0 else ifeq ($(IDF_TARGET),esp32c3) BOOTLOADER_OFFSET = 0x0 +else ifeq ($(IDF_TARGET),esp32c6) +BOOTLOADER_OFFSET = 0x0 else ifeq ($(IDF_TARGET),esp32s3) BOOTLOADER_OFFSET = 0x0 else ifeq ($(IDF_TARGET),esp32s2) diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h index cae80fa78c..7ff1fb17ca 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.h @@ -36,5 +36,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk index e4467a3bbf..e0aee0c478 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h index 32b0940881..9a9ccd8124 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h @@ -43,5 +43,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk index e2ce1e438d..a8b7315c11 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk index 054810a088..2fb409d247 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 2MB CIRCUITPY_DUALBANK = 0 + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk index 3597166303..9bcaa3473a 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h index 2cdf48fad3..7b93665cee 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h @@ -40,5 +40,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk index b3fc9f5252..5ad71b2da5 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk @@ -7,3 +7,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h index ce2969bbda..d882e10861 100644 --- a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h +++ b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.h @@ -40,5 +40,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk index a470d7a088..1743090e0e 100644 --- a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h new file mode 100644 index 0000000000..68fa84c75c --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.h @@ -0,0 +1,35 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-C6-DevKitC-1-N8" +#define MICROPY_HW_MCU_NAME "ESP32C6" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO17) +#define DEFAULT_UART_BUS_TX (&pin_GPIO16) diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk new file mode 100644 index 0000000000..e15d2bf41e --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/mpconfigboard.mk @@ -0,0 +1,8 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x00C60002 + +IDF_TARGET = esp32c6 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c new file mode 100644 index 0000000000..441bf33909 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/pins.c @@ -0,0 +1,36 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_IO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig new file mode 100644 index 0000000000..54a5473075 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitc_1_n8/sdkconfig @@ -0,0 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32c6" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c new file mode 100644 index 0000000000..f749ee60d2 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h new file mode 100644 index 0000000000..dd6b260e51 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.h @@ -0,0 +1,37 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Board setup +#define MICROPY_HW_BOARD_NAME "ESP32-C6-DevKitM-1" +#define MICROPY_HW_MCU_NAME "ESP32-C6N4" + +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO16) +#define DEFAULT_UART_BUS_TX (&pin_GPIO17) diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk new file mode 100644 index 0000000000..75e097afa8 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk @@ -0,0 +1,8 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x00C60001 + +IDF_TARGET = esp32c6 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 4MB diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c new file mode 100644 index 0000000000..243b6040d0 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/pins.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_MTMS), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MTDI), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_MTCK), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_MTDO), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig new file mode 100644 index 0000000000..30a4bea2cc --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/sdkconfig @@ -0,0 +1,15 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="ESP32-C6-DevKitM-1" +# end of LWIP + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h index 2a90d91845..315384627b 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h @@ -44,5 +44,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk index d1cd0129fd..99c910e6d2 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h index 3e68e6adf9..ce0643e787 100644 --- a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h +++ b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.h @@ -44,5 +44,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk index a202fd8ad3..6778550a2d 100644 --- a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk @@ -7,5 +7,7 @@ CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h index 23bb5ee9b2..6d33513e3c 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.h @@ -34,5 +34,3 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk index e0df58f756..03f5171a31 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk index 6a19c783f1..9e777889c0 100644 --- a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 diff --git a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h index 3e8be96d7d..90174f60ff 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.h @@ -35,8 +35,6 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} -// #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) - // Serial over UART #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO20) #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO21) diff --git a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk index 25a6f87428..2f3b62f90f 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h index 2153513306..0ed8ea8925 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h @@ -45,8 +45,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO20) #define DEFAULT_UART_BUS_TX (&pin_GPIO21) -// For REPL over built-in USB Serial -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) - // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk index 94c64a8273..1bb9d0835f 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h index 638be9d197..26fa6b7f83 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.h @@ -10,5 +10,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO20) #define DEFAULT_UART_BUS_TX (&pin_GPIO21) - -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk index d7325cf44e..4bec24347e 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 diff --git a/ports/espressif/common-hal/analogbufio/BufferedIn.c b/ports/espressif/common-hal/analogbufio/BufferedIn.c index 9dd66bc9da..567c10c963 100644 --- a/ports/espressif/common-hal/analogbufio/BufferedIn.c +++ b/ports/espressif/common-hal/analogbufio/BufferedIn.c @@ -56,12 +56,14 @@ #elif defined(CONFIG_IDF_TARGET_ESP32S2) #define ADC_RESULT_BYTE 2 #define ADC_CONV_LIMIT_EN 0 -#elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32H2) +#elif defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) #define ADC_RESULT_BYTE 4 #define ADC_CONV_LIMIT_EN 0 #elif defined(CONFIG_IDF_TARGET_ESP32S3) #define ADC_RESULT_BYTE 4 #define ADC_CONV_LIMIT_EN 0 +#else +#error No known CONFIG_IDF_TARGET_xxx found #endif static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_t *convert_mode, adc_digi_output_format_t *output_format); @@ -205,7 +207,12 @@ void common_hal_analogbufio_bufferedin_deinit(analogbufio_bufferedin_obj_t *self } static bool check_valid_data(const adc_digi_output_data_t *data, const mcu_pin_obj_t *pin, adc_digi_convert_mode_t convert_mode, adc_digi_output_format_t output_format) { - unsigned int unit = data->type2.unit; + unsigned int unit; + #if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 + unit = 0; + #else + unit = data->type2.unit; + #endif if (output_format == ADC_DIGI_OUTPUT_FORMAT_TYPE2) { if (data->type2.channel >= SOC_ADC_CHANNEL_NUM(unit)) { return false; diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index 6af0ace1d2..983e2dd754 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -25,14 +25,18 @@ */ #include "common-hal/analogio/AnalogIn.h" + +#include "bindings/espidf/__init__.h" #include "shared-bindings/analogio/AnalogIn.h" #include "py/mperrno.h" #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" -#include "driver/adc.h" +#include "adc_cali_schemes.h" +#include "esp_adc/adc_oneshot.h" +#include "esp_adc/adc_cali.h" #include "driver/gpio.h" -#include "esp_adc_cal.h" +#include "hal/adc_types.h" #include "shared-bindings/microcontroller/Pin.h" @@ -42,13 +46,17 @@ #define NO_OF_SAMPLES 2 #define ATTENUATION ADC_ATTEN_DB_11 #if defined(CONFIG_IDF_TARGET_ESP32) -#define DATA_WIDTH ADC_WIDTH_BIT_12 +#define DATA_WIDTH ADC_BITWIDTH_12 #elif defined(CONFIG_IDF_TARGET_ESP32C3) -#define DATA_WIDTH ADC_WIDTH_BIT_12 +#define DATA_WIDTH ADC_BITWIDTH_12 +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#define DATA_WIDTH ADC_BITWIDTH_12 #elif defined(CONFIG_IDF_TARGET_ESP32S2) -#define DATA_WIDTH ADC_WIDTH_BIT_13 +#define DATA_WIDTH ADC_BITWIDTH_13 #elif defined(CONFIG_IDF_TARGET_ESP32S3) -#define DATA_WIDTH ADC_WIDTH_BIT_12 +#define DATA_WIDTH ADC_BITWIDTH_12 +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#define DATA_WIDTH ADC_BITWIDTH_12 #else #error No known CONFIG_IDF_TARGET_xxx found #endif @@ -79,38 +87,86 @@ void common_hal_analogio_analogin_deinit(analogio_analogin_obj_t *self) { } uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { - if (self->pin->adc_index == ADC_UNIT_1) { - adc1_config_width(DATA_WIDTH); - adc1_config_channel_atten((adc1_channel_t)self->pin->adc_channel, ATTENUATION); - } else if (self->pin->adc_index == ADC_UNIT_2) { - adc2_config_channel_atten((adc2_channel_t)self->pin->adc_channel, ATTENUATION); - } else { - raise_ValueError_invalid_pin(); + adc_oneshot_unit_handle_t adc_handle; + adc_oneshot_unit_init_cfg_t adc_config = { + .unit_id = self->pin->adc_index, + .ulp_mode = ADC_ULP_MODE_DISABLE + }; + cp_check_esp_error(adc_oneshot_new_unit(&adc_config, &adc_handle)); + + adc_oneshot_chan_cfg_t channel_config = { + .atten = ATTENUATION, + .bitwidth = DATA_WIDTH + }; + adc_channel_t channel = (adc_channel_t)self->pin->adc_channel; + adc_oneshot_config_channel(adc_handle, channel, &channel_config); + + adc_cali_scheme_ver_t supported_schemes; + adc_cali_check_scheme(&supported_schemes); + adc_cali_scheme_ver_t calibration_scheme; + adc_cali_handle_t calibration; + + #if defined(ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED + adc_cali_curve_fitting_config_t config = { + .unit_id = self->pin->adc_index, + .chan = channel, + .atten = ATTENUATION, + .bitwidth = DATA_WIDTH + }; + if (adc_cali_create_scheme_curve_fitting(&config, &calibration) == ESP_OK) { + calibration_scheme = ADC_CALI_SCHEME_VER_CURVE_FITTING; } - - // Automatically select calibration process depending on status of efuse - esp_adc_cal_characteristics_t adc_chars; - memset(&adc_chars, 0, sizeof(adc_chars)); - esp_adc_cal_characterize(self->pin->adc_index, ATTENUATION, DATA_WIDTH, DEFAULT_VREF, &adc_chars); - - uint32_t adc_reading = 0; - // Multisampling - for (int i = 0; i < NO_OF_SAMPLES; i++) { - if (self->pin->adc_index == ADC_UNIT_1) { - adc_reading += adc1_get_raw((adc1_channel_t)self->pin->adc_channel); - } else { - int raw; - esp_err_t r = adc2_get_raw((adc2_channel_t)self->pin->adc_channel, DATA_WIDTH, &raw); - if (r != ESP_OK) { - mp_raise_ValueError(translate("ADC2 is being used by WiFi")); - } - adc_reading += raw; + #endif + #if defined(ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED + if (calibration_scheme == 0) { + adc_cali_line_fitting_config_t config = { + .unit_id = self->pin->adc_index, + .atten = ATTENUATION, + .bitwidth = DATA_WIDTH, + #ifdef CONFIG_IDF_TARGET_ESP32 + .default_vref = DEFAULT_VREF; + #endif + }; + if (adc_cali_create_scheme_line_fitting(&config, &calibration) == ESP_OK) { + calibration_scheme = ADC_CALI_SCHEME_VER_LINE_FITTING; } } - adc_reading /= NO_OF_SAMPLES; + #endif + + uint32_t adc_reading = 0; + size_t sample_count = 0; + // Multisampling + esp_err_t ret = ESP_OK; + for (int i = 0; i < NO_OF_SAMPLES; i++) { + int raw; + ret = adc_oneshot_read(adc_handle, channel, &raw); + if (ret != ESP_OK) { + continue; + } + adc_reading += raw; + sample_count += 1; + } + if (sample_count == 0) { + raise_esp_error(ret); + } + adc_reading /= sample_count; // This corrects non-linear regions of the ADC range with a LUT, so it's a better reading than raw - uint32_t voltage = esp_adc_cal_raw_to_voltage(adc_reading, &adc_chars); + int voltage; + adc_cali_raw_to_voltage(calibration, adc_reading, &voltage); + + + #if defined(ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED + if (calibration_scheme == ADC_CALI_SCHEME_VER_CURVE_FITTING) { + adc_cali_delete_scheme_curve_fitting(calibration); + } + #endif + #if defined(ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_LINE_FITTING_SUPPORTED + if (calibration_scheme == ADC_CALI_SCHEME_VER_LINE_FITTING) { + adc_cali_delete_scheme_line_fitting(calibration); + } + #endif + adc_oneshot_del_unit(adc_handle); return voltage * ((1 << 16) - 1) / 3300; } diff --git a/ports/espressif/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c index 797d00697d..e96861191f 100644 --- a/ports/espressif/common-hal/busio/UART.c +++ b/ports/espressif/common-hal/busio/UART.c @@ -230,7 +230,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, uart_config.stop_bits = UART_STOP_BITS_2; } // uart_set_stop_bits(self->uart_num, stop_bits); - uart_config.source_clk = UART_SCLK_APB; // guessing here... + uart_config.source_clk = UART_SCLK_DEFAULT; // config all in one? if (uart_param_config(self->uart_num, &uart_config) != ESP_OK) { diff --git a/ports/espressif/common-hal/canio/Listener.c b/ports/espressif/common-hal/canio/Listener.c index 66ce096970..c884bd46a1 100644 --- a/ports/espressif/common-hal/canio/Listener.c +++ b/ports/espressif/common-hal/canio/Listener.c @@ -39,40 +39,29 @@ #include "hal/twai_ll.h" +#if SOC_TWAI_CONTROLLER_NUM > 1 +#define TWAI TWAI0 +#endif + // IDE = "extended ID" flag of packet header. We always add this bit to the // mask because a match is always for just one kind of address length #define FILTER16_IDE (1 << 3) #define FILTER32_IDE (1 << 2) -// Work around a problem reported at -// https://github.com/espressif/esp-idf/issues/6020 where -// twai_ll_set_acc_filter does not work under -Os optimization -__attribute__((optimize("O0"))) -__attribute__((noinline)) -static void canio_set_acc_filter(twai_dev_t *hw, uint32_t code, uint32_t mask, bool single_filter) { - uint32_t code_swapped = __builtin_bswap32(code); - uint32_t mask_swapped = __builtin_bswap32(mask); - for (int i = 0; i < 4; i++) { - hw->acceptance_filter.acr[i].val = ((code_swapped >> (i * 8)) & 0xFF); - hw->acceptance_filter.amr[i].val = ((mask_swapped >> (i * 8)) & 0xFF); - } - hw->mode_reg.afm = single_filter; -} - STATIC void install_standard_filter(canio_listener_obj_t *self, canio_match_obj_t *match) { - canio_set_acc_filter(&TWAI, match->id << 21, ~(match->mask << 21), true); + twai_ll_set_acc_filter(&TWAI, match->id << 21, ~(match->mask << 21), true); self->extended = false; self->standard = true; } STATIC void install_extended_filter(canio_listener_obj_t *self, canio_match_obj_t *match) { - canio_set_acc_filter(&TWAI, match->id << 3, ~(match->mask << 3), true); + twai_ll_set_acc_filter(&TWAI, match->id << 3, ~(match->mask << 3), true); self->extended = true; self->standard = false; } STATIC void install_all_match_filter(canio_listener_obj_t *self) { - canio_set_acc_filter(&TWAI, 0u, ~0u, true); + twai_ll_set_acc_filter(&TWAI, 0u, ~0u, true); self->extended = true; self->standard = true; } diff --git a/ports/espressif/common-hal/frequencyio/FrequencyIn.c b/ports/espressif/common-hal/frequencyio/FrequencyIn.c index 1a82b90f45..92e76f1207 100644 --- a/ports/espressif/common-hal/frequencyio/FrequencyIn.c +++ b/ports/espressif/common-hal/frequencyio/FrequencyIn.c @@ -60,11 +60,15 @@ static void IRAM_ATTR timer_interrupt_handler(void *self_in) { // reset interrupt timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0); + #if SOC_TIMER_GROUP_TIMERS_PER_GROUP > 1 if (self->timer.idx) { device->int_clr_timers.t1_int_clr = 1; } else { - device->int_clr_timers.t0_int_clr = 1; - } + #endif + device->int_clr_timers.t0_int_clr = 1; + #if SOC_TIMER_GROUP_TIMERS_PER_GROUP > 1 +} + #endif #if defined(CONFIG_IDF_TARGET_ESP32S3) device->hw_timer[self->timer.idx].config.tn_alarm_en = 1; diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 4c01d988a9..a3226415b2 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -59,15 +59,18 @@ STATIC uint64_t _in_use_pin_mask; #define GPIO_SEL_18 (BIT(18)) /*!< Pin 18 selected */ #define GPIO_SEL_19 (BIT(19)) /*!< Pin 19 selected */ #define GPIO_SEL_20 (BIT(20)) /*!< Pin 20 selected */ +#if SOC_GPIO_PIN_COUNT > 21 #define GPIO_SEL_21 (BIT(21)) /*!< Pin 21 selected */ -#if defined(CONFIG_IDF_TARGET_ESP32) +#endif +#if SOC_GPIO_PIN_COUNT > 22 #define GPIO_SEL_22 (BIT(22)) /*!< Pin 22 selected */ #define GPIO_SEL_23 (BIT(23)) /*!< Pin 23 selected */ - +#define GPIO_SEL_24 (BIT(24)) /*!< Pin 24 selected */ #define GPIO_SEL_25 (BIT(25)) /*!< Pin 25 selected */ -#endif #define GPIO_SEL_26 (BIT(26)) /*!< Pin 26 selected */ #define GPIO_SEL_27 (BIT(27)) /*!< Pin 27 selected */ +#endif +#if SOC_GPIO_PIN_COUNT > 28 #define GPIO_SEL_28 (BIT(28)) /*!< Pin 28 selected */ #define GPIO_SEL_29 (BIT(29)) /*!< Pin 29 selected */ #define GPIO_SEL_30 (BIT(30)) /*!< Pin 30 selected */ @@ -80,6 +83,7 @@ STATIC uint64_t _in_use_pin_mask; #define GPIO_SEL_37 ((uint64_t)PIN_BIT(37)) /*!< Pin 37 selected */ #define GPIO_SEL_38 ((uint64_t)PIN_BIT(38)) /*!< Pin 38 selected */ #define GPIO_SEL_39 ((uint64_t)PIN_BIT(39)) /*!< Pin 39 selected */ +#endif #if SOC_GPIO_PIN_COUNT > 40 #define GPIO_SEL_40 ((uint64_t)PIN_BIT(40)) /*!< Pin 40 selected */ #define GPIO_SEL_41 ((uint64_t)PIN_BIT(41)) /*!< Pin 41 selected */ @@ -88,11 +92,11 @@ STATIC uint64_t _in_use_pin_mask; #define GPIO_SEL_44 ((uint64_t)PIN_BIT(44)) /*!< Pin 44 selected */ #define GPIO_SEL_45 ((uint64_t)PIN_BIT(45)) /*!< Pin 45 selected */ #define GPIO_SEL_46 ((uint64_t)PIN_BIT(46)) /*!< Pin 46 selected */ -#if defined(CONFIG_IDF_TARGET_ESP32S3) +#endif +#if SOC_GPIO_PIN_COUNT > 47 #define GPIO_SEL_47 ((uint64_t)PIN_BIT(47)) /*!< Pin 47 selected */ #define GPIO_SEL_48 ((uint64_t)PIN_BIT(48)) /*!< Pin 48 selected */ #endif -#endif // Bit mask of all pins that should never EVER be reset. // Typically these are SPI flash and PSRAM control pins, and communication pins. @@ -126,6 +130,26 @@ static const uint64_t pin_mask_reset_forbidden = #endif #endif // ESP32C3 + #if defined(CONFIG_IDF_TARGET_ESP32C6) + // Never ever reset pins used to communicate with SPI flash. + GPIO_SEL_24 | // SPICS0 + GPIO_SEL_25 | // SPIQ + GPIO_SEL_26 | // SPIWP + GPIO_SEL_28 | // SPIHD + GPIO_SEL_29 | // SPICLK + GPIO_SEL_30 | // SPID + #if CIRCUITPY_ESP_USB_SERIAL_JTAG + // Never ever reset serial/JTAG communication pins. + GPIO_SEL_12 | // USB D- + GPIO_SEL_13 | // USB D+ + #endif + #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) && CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0 + // Never reset debug UART/console pins. + GPIO_SEL_16 | + GPIO_SEL_17 | + #endif + #endif // ESP32C6 + #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) // Never ever reset pins used to communicate with SPI flash and PSRAM. GPIO_SEL_19 | // USB D- @@ -254,10 +278,12 @@ void preserve_pin_number(gpio_num_t pin_number) { _preserved_pin_mask |= PIN_BIT(pin_number); } if (_preserved_pin_mask) { + #if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP // Allow pin holds to work during deep sleep. This increases power consumption noticeably // during deep sleep, so enable holds only if we actually are holding some pins. // 270uA or so extra current is consumed even with no pins held. gpio_deep_sleep_hold_en(); + #endif } } @@ -301,7 +327,9 @@ void common_hal_reset_pin(const mcu_pin_obj_t *pin) { void reset_all_pins(void) { // Undo deep sleep holds in case we woke up from deep sleep. // We still need to unhold individual pins, which is done by _reset_pin. + #if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP gpio_deep_sleep_hold_dis(); + #endif for (uint8_t i = 0; i < GPIO_PIN_COUNT; i++) { uint32_t iomux_address = GPIO_PIN_MUX_REG[i]; diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index 8e8196ea0e..7112937ab1 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -65,17 +65,7 @@ float common_hal_mcu_processor_get_voltage(void) { } uint32_t common_hal_mcu_processor_get_frequency(void) { - #if defined(CONFIG_IDF_TARGET_ESP32) - return CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000; - #elif defined(CONFIG_IDF_TARGET_ESP32C3) - return CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ * 1000000; - #elif defined(CONFIG_IDF_TARGET_ESP32S2) - return CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000; - #elif defined(CONFIG_IDF_TARGET_ESP32S3) - return CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ * 1000000; - #else - #error No known CONFIG_IDF_TARGET_xxx found - #endif + return CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ * 1000000; } STATIC uint8_t swap_nibbles(uint8_t v) { diff --git a/ports/espressif/common-hal/microcontroller/__init__.c b/ports/espressif/common-hal/microcontroller/__init__.c index 7ec9b215f1..6ef1d77764 100644 --- a/ports/espressif/common-hal/microcontroller/__init__.c +++ b/ports/espressif/common-hal/microcontroller/__init__.c @@ -42,21 +42,30 @@ #include "freertos/FreeRTOS.h" -#include "soc/rtc_cntl_reg.h" #include "esp_private/system_internal.h" #if defined(CONFIG_IDF_TARGET_ESP32) +#include "soc/rtc_cntl_reg.h" #include "esp32/rom/rtc.h" #elif defined(CONFIG_IDF_TARGET_ESP32C3) +#include "soc/rtc_cntl_reg.h" #include "esp32c3/rom/rtc.h" +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#include "soc/lp_aon_reg.h" +#include "esp32c6/rom/rtc.h" #elif defined(CONFIG_IDF_TARGET_ESP32S2) +#include "soc/rtc_cntl_reg.h" #include "esp32s2/rom/rtc.h" #include "esp32s2/rom/usb/usb_persist.h" #include "esp32s2/rom/usb/chip_usb_dw_wrapper.h" #elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "soc/rtc_cntl_reg.h" #include "esp32s3/rom/rtc.h" #include "esp32s3/rom/usb/usb_persist.h" #include "esp32s3/rom/usb/chip_usb_dw_wrapper.h" +#elif defined(CONFIG_IDF_TARGET_ESP32H) +#include "soc/lp_aon_reg.h" +#include "esp32h2/rom/rtc.h" #else #error No known CONFIG_IDF_TARGET_xxx found #endif @@ -101,10 +110,18 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) REG_WRITE(RTC_RESET_CAUSE_REG, 0); // reset uf2 #endif + #if SOC_LP_AON_SUPPORTED + REG_WRITE(LP_AON_STORE0_REG, 0); // reset safe mode + #else REG_WRITE(RTC_CNTL_STORE0_REG, 0); // reset safe mode + #endif #if !defined(CONFIG_IDF_TARGET_ESP32) + #if SOC_LP_AON_SUPPORTED + REG_WRITE(LP_AON_SYS_CFG_REG, 0); // reset bootloader + #else REG_WRITE(RTC_CNTL_OPTION1_REG, 0); // reset bootloader #endif + #endif break; case RUNMODE_SAFE_MODE: // enter safe mode on next boot @@ -118,8 +135,12 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) chip_usb_set_persist_flags(USBDC_BOOT_DFU); #endif + #if SOC_LP_AON_SUPPORTED + REG_WRITE(LP_AON_SYS_CFG_REG, LP_AON_FORCE_DOWNLOAD_BOOT); + #else REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT); #endif + #endif break; default: break; diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults new file mode 100644 index 0000000000..02516de4e4 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults @@ -0,0 +1,66 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth +# +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +# +# NimBLE Options +# +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 +# end of Memory Settings + +CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options + +# end of Bluetooth + +# +# Driver Configurations +# +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + +# end of Driver Configurations + +# +# PHY +# +CONFIG_ESP_PHY_ENABLE_USB=y +# end of PHY + +# +# Wi-Fi +# +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +# end of Wi-Fi + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults index 949113b7cf..2ea4419003 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-80m.defaults @@ -1,10 +1,14 @@ # CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set CONFIG_ESPTOOLPY_FLASHFREQ_80M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_64M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_48M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_32M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_16M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT=y diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 55a8e3cc06..d613b0f785 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -35,6 +35,14 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 # CONFIG_ESP_DEBUG_OCDAWARE is not set # end of ESP System Settings +# +# Wi-Fi +# +CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP_WIFI_NVS_ENABLED is not set +# end of Wi-Fi + # # LWIP # diff --git a/ports/espressif/mpconfigport.h b/ports/espressif/mpconfigport.h index e4733356bb..bb333ae4ac 100644 --- a/ports/espressif/mpconfigport.h +++ b/ports/espressif/mpconfigport.h @@ -59,12 +59,10 @@ // Nearly all boards have this because it is used to enter the ROM bootloader. #ifndef CIRCUITPY_BOOT_BUTTON - #ifdef CONFIG_IDF_TARGET_ESP32C3 + #if defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32H2) #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - #else - #ifndef CONFIG_IDF_TARGET_ESP32 - #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - #endif + #elif !defined(CONFIG_IDF_TARGET_ESP32) + #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) #endif #endif @@ -90,12 +88,6 @@ #define CIRCUITPY_I2C_ALLOW_INTERNAL_PULL_UP (0) #endif -// Define to (1) in mpconfigboard.h if the board uses the internal USB to -// Serial/JTAG to connect do USB. -#ifndef CIRCUITPY_ESP_USB_SERIAL_JTAG -#define CIRCUITPY_ESP_USB_SERIAL_JTAG (0) -#endif - #ifndef DEFAULT_RESERVED_PSRAM #define DEFAULT_RESERVED_PSRAM (0) #endif diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index bb15fce92b..bc5a0533ff 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -2,7 +2,7 @@ INTERNAL_FLASH_FILESYSTEM = 1 # Internal math library is substantially smaller than toolchain one -INTERNAL_LIBM = 1 +INTERNAL_LIBM = 0 # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ @@ -68,16 +68,36 @@ CIRCUITPY_TOUCHIO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 0 # Features CIRCUITPY_USB = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 + +else ifeq ($(IDF_TARGET),esp32c6) +# Modules +CIRCUITPY_ALARM = 0 +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_ESPULP = 0 +CIRCUITPY_MEMORYMAP = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_TOUCHIO ?= 1 +CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +# Features +CIRCUITPY_USB = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 else ifeq ($(IDF_TARGET),esp32s2) # Modules CIRCUITPY_BLEIO = 0 CIRCUITPY_RGBMATRIX_USES_SUPERVISOR_ALLOCATION = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 + else ifeq ($(IDF_TARGET),esp32s3) # Modules CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_RGBMATRIX_USES_SUPERVISOR_ALLOCATION = 0 + +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 + endif # No room for dualbank on boards with 2MB flash diff --git a/ports/espressif/mphalport.c b/ports/espressif/mphalport.c index 76d2c05cc3..0342c56c11 100644 --- a/ports/espressif/mphalport.c +++ b/ports/espressif/mphalport.c @@ -32,10 +32,16 @@ #include "components/esp_rom/include/esp32/rom/ets_sys.h" #elif defined(CONFIG_IDF_TARGET_ESP32C3) #include "components/esp_rom/include/esp32c3/rom/ets_sys.h" +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#include "components/esp_rom/include/esp32c6/rom/ets_sys.h" +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#include "components/esp_rom/include/esp32h2/rom/ets_sys.h" #elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "components/esp_rom/include/esp32s2/rom/ets_sys.h" #elif defined(CONFIG_IDF_TARGET_ESP32S3) #include "components/esp_rom/include/esp32s3/rom/ets_sys.h" +#else +#error Unknown CONFIG_IDF_TARGET_xxx #endif void mp_hal_delay_us(mp_uint_t delay) { @@ -43,7 +49,7 @@ void mp_hal_delay_us(mp_uint_t delay) { } // This is provided by the esp-idf/components/xtensa/esp32s2/libhal.a binary blob. -#ifndef CONFIG_IDF_TARGET_ESP32C3 +#ifndef CONFIG_IDF_TARGET_ARCH_RISCV extern void xthal_window_spill(void); #endif @@ -61,7 +67,7 @@ mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { // there is a HAL call to do it. There is a bit of a race condition here // because the register value could change after it's been restored but that // is unlikely to happen with a heap pointer while we do a GC. - #ifndef CONFIG_IDF_TARGET_ESP32C3 + #ifndef CONFIG_IDF_TARGET_ARCH_RISCV xthal_window_spill(); #endif return (mp_uint_t)__builtin_frame_address(0); diff --git a/ports/espressif/peripherals/esp32c6/pins.c b/ports/espressif/peripherals/esp32c6/pins.c new file mode 100644 index 0000000000..51f68777c6 --- /dev/null +++ b/ports/espressif/peripherals/esp32c6/pins.c @@ -0,0 +1,59 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "peripherals/pins.h" + +const mcu_pin_obj_t pin_GPIO0 = PIN(0, ADC_UNIT_1, ADC_CHANNEL_0, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_1, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_2, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_3, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_5, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO6 = PIN(6, ADC_UNIT_1, ADC_CHANNEL_6, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO7 = PIN(7, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO8 = PIN(8, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO9 = PIN(9, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO10 = PIN(10, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO11 = PIN(11, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO12 = PIN(12, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO13 = PIN(13, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO14 = PIN(14, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO15 = PIN(15, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO16 = PIN(16, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO17 = PIN(17, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO18 = PIN(18, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO19 = PIN(19, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO20 = PIN(20, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO21 = PIN(21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO22 = PIN(22, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO23 = PIN(23, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO24 = PIN(24, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO25 = PIN(25, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO28 = PIN(28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO29 = PIN(29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO30 = PIN(30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/espressif/peripherals/esp32c6/pins.h b/ports/espressif/peripherals/esp32c6/pins.h new file mode 100644 index 0000000000..4c2b4390e7 --- /dev/null +++ b/ports/espressif/peripherals/esp32c6/pins.h @@ -0,0 +1,94 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Scott Shawcroft for Adafruit Industries LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// DO NOT include this file directly. +// Use shared-bindings/microcontroller/Pin.h instead. +// This ensures that all necessary includes are already included. + +#pragma once + +#define GPIO0_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO0; +#define GPIO1_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO1; +#define GPIO2_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO2; +#define GPIO3_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO3; +#define GPIO4_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO4; +#define GPIO5_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO5; +#define GPIO6_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO6; +#define GPIO7_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO7; +#define GPIO8_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO8; +#define GPIO9_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO9; +#define GPIO10_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO10; +#define GPIO11_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO11; +#define GPIO12_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO12; +#define GPIO13_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO13; +#define GPIO14_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO14; +#define GPIO15_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO15; +#define GPIO16_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO16; +#define GPIO17_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO17; +#define GPIO18_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO18; +#define GPIO19_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO19; +#define GPIO20_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO20; +#define GPIO21_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO21; +#define GPIO22_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO22; +#define GPIO23_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO23; +#define GPIO24_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO24; +#define GPIO25_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO25; +#define GPIO26_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO26; +#define GPIO27_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO27; +#define GPIO28_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO28; +#define GPIO29_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO29; +#define GPIO30_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO30; diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index 911e5f271b..e5a6539f61 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -69,6 +69,10 @@ extern const mp_obj_type_t mcu_pin_type; #include "esp32/pins.h" #elif defined(CONFIG_IDF_TARGET_ESP32C3) #include "esp32c3/pins.h" +#elif defined(CONFIG_IDF_TARGET_ESP32C6) +#include "esp32c6/pins.h" +#elif defined(CONFIG_IDF_TARGET_ESP32H2) +#include "esp32h2/pins.h" #elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/pins.h" #elif defined(CONFIG_IDF_TARGET_ESP32S3) diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 462cf9e361..09f90b506d 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -87,7 +87,13 @@ #endif #include "soc/efuse_reg.h" +#if defined(CONFIG_IDF_TARGET_ESP3H2) || defined(CONFIG_IDF_TARGET_ESP32C6) +#include "soc/lp_aon_reg.h" +#define CP_SAVED_WORD_REGISTER LP_AON_STORE0_REG +#else #include "soc/rtc_cntl_reg.h" +#define CP_SAVED_WORD_REGISTER RTC_CNTL_STORE0_REG +#endif #include "soc/spi_pins.h" #include "bootloader_flash_config.h" @@ -451,7 +457,7 @@ void reset_to_bootloader(void) { } void reset_cpu(void) { - #ifndef CONFIG_IDF_TARGET_ESP32C3 + #ifndef CONFIG_IDF_TARGET_ARCH_RISCV esp_backtrace_print(100); #endif esp_restart(); @@ -491,13 +497,12 @@ bool port_has_fixed_stack(void) { return true; } -// Place the word to save just after our BSS section that gets blanked. void port_set_saved_word(uint32_t value) { - REG_WRITE(RTC_CNTL_STORE0_REG, value); + REG_WRITE(CP_SAVED_WORD_REGISTER, value); } uint32_t port_get_saved_word(void) { - return REG_READ(RTC_CNTL_STORE0_REG); + return REG_READ(CP_SAVED_WORD_REGISTER); } uint64_t port_get_raw_ticks(uint8_t *subticks) { diff --git a/ports/espressif/tools/build_memory_info.py b/ports/espressif/tools/build_memory_info.py index bbcd3d2df7..04ed04331a 100644 --- a/ports/espressif/tools/build_memory_info.py +++ b/ports/espressif/tools/build_memory_info.py @@ -38,12 +38,27 @@ internal_memory = { ("Internal SRAM 1", (0x3FC8_0000, 0x4037_8000), 416 * 1024), ("Internal SRAM 2", (0x3FCF_0000,), 64 * 1024), ], + "esp32c2": [ + # Name, Start, Length + ("Internal SRAM 0", (0x4037_C000,), 16 * 1024), + ("Internal SRAM 1", (0x3FCA_0000, 0x4038_0000), 256 * 1024), + ], "esp32c3": [ # Name, Start, Length ("RTC Fast Memory", (0x5000_0000,), 8 * 1024), ("Internal SRAM 0", (0x4037_C000,), 16 * 1024), ("Internal SRAM 1", (0x3FC8_0000, 0x4038_0000), 384 * 1024), ], + "esp32c6": [ + # Name, Start, Length + ("LP SRAM", (0x5000_0000,), 16 * 1024), + ("HP SRAM", (0x4080_0000,), 512 * 1024), + ], + "esp32h2": [ + # Name, Start, Length + ("LP SRAM", (0x5000_0000,), 4 * 1024), + ("HP SRAM", (0x4080_0000,), 320 * 1024), + ], } diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 42500412e0..3c247d67c8 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -173,7 +173,7 @@ def update(debug, board, update_all): if key == "IDF_TARGET": target = value if uf2_bootloader is None: - uf2_bootloader = target not in ("esp32", "esp32c3") + uf2_bootloader = target not in ("esp32", "esp32c3", "esp32c6", "esp32h2") elif key == "CIRCUITPY_ESP_FLASH_SIZE": flash_size = value elif key == "CIRCUITPY_ESP_FLASH_MODE": diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index c400707ac1..e15383cc5f 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -243,6 +243,9 @@ CFLAGS += -DCIRCUITPY_ESPNOW=$(CIRCUITPY_ESPNOW) CIRCUITPY_ESPULP ?= 0 CFLAGS += -DCIRCUITPY_ESPULP=$(CIRCUITPY_ESPULP) +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 0 +CFLAGS += -DCIRCUITPY_ESP_USB_SERIAL_JTAG=$(CIRCUITPY_ESP_USB_SERIAL_JTAG) + CIRCUITPY_ESPCAMERA ?= 0 CFLAGS += -DCIRCUITPY_ESPCAMERA=$(CIRCUITPY_ESPCAMERA) diff --git a/py/makeqstrdefs.py b/py/makeqstrdefs.py index adf6195389..178149c688 100644 --- a/py/makeqstrdefs.py +++ b/py/makeqstrdefs.py @@ -94,7 +94,10 @@ def preprocess(): def pp(flags): def run(files): - return subprocess.check_output(args.pp + flags + files) + completed = subprocess.run(args.pp + flags + files, stdout=subprocess.PIPE) + if completed.returncode != 0: + raise RuntimeError() + return completed.stdout return run From 39192cc896d09cb72794bdf5d81726a8a6bfb520 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 20 Sep 2023 11:20:11 -0700 Subject: [PATCH 108/129] C6 works --- ports/espressif/Makefile | 2 +- ports/espressif/esp-idf-config/sdkconfig.defaults | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 4e2953b495..4488a334fd 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -182,7 +182,7 @@ endif ifeq ($(IDF_TARGET_ARCH),xtensa) CFLAGS += -mlongcalls else ifeq ($(IDF_TARGET_ARCH),riscv) -CFLAGS += -march=rv32imc +CFLAGS += -march=rv32imac_zicsr_zifencei endif LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index d613b0f785..93d771e1aa 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -27,6 +27,12 @@ CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y # end of Driver Configurations +# +# PHY +# +# CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE is not set +# end of PHY + # # ESP System Settings # From 6649b17fb5b98efed97e9234c670bb16cdf6cac3 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 21 Sep 2023 10:58:53 -0700 Subject: [PATCH 109/129] H2 works --- ports/espressif/Makefile | 18 ++++- .../mpconfigboard.mk | 4 ++ .../mpconfigboard.mk | 2 + .../espressif_esp32h2_devkitm_1_n4/board.c | 29 ++++++++ .../mpconfigboard.h | 37 ++++++++++ .../mpconfigboard.mk | 10 +++ .../espressif_esp32h2_devkitm_1_n4/pins.c | 62 ++++++++++++++++ .../espressif_esp32h2_devkitm_1_n4/sdkconfig | 16 +++++ .../common-hal/analogbufio/BufferedIn.c | 2 +- ports/espressif/common-hal/canio/Listener.c | 2 +- .../common-hal/microcontroller/Pin.c | 29 +++++++- .../common-hal/microcontroller/Processor.c | 4 ++ .../common-hal/microcontroller/__init__.c | 8 +-- .../esp-idf-config/sdkconfig-esp32h2.defaults | 66 +++++++++++++++++ .../sdkconfig-flash-48m.defaults | 14 ++++ ports/espressif/mpconfigport.mk | 19 +++++ ports/espressif/peripherals/esp32h2/pins.c | 47 +++++++++++++ ports/espressif/peripherals/esp32h2/pins.h | 70 +++++++++++++++++++ ports/espressif/supervisor/port.c | 2 +- 19 files changed, 430 insertions(+), 11 deletions(-) create mode 100644 ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c create mode 100644 ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h create mode 100644 ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk create mode 100644 ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c create mode 100644 ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig create mode 100644 ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults create mode 100644 ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults create mode 100644 ports/espressif/peripherals/esp32h2/pins.c create mode 100644 ports/espressif/peripherals/esp32h2/pins.h diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 4488a334fd..80f3b18497 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -30,6 +30,9 @@ CROSS_COMPILE = riscv32-esp-elf- else ifeq ($(IDF_TARGET),esp32c6) IDF_TARGET_ARCH = riscv CROSS_COMPILE = riscv32-esp-elf- +else ifeq ($(IDF_TARGET),esp32h2) +IDF_TARGET_ARCH = riscv +CROSS_COMPILE = riscv32-esp-elf- else IDF_TARGET_ARCH = xtensa CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- @@ -221,6 +224,11 @@ LDFLAGS += \ -Tesp32c6.rom.coexist.ld \ -Tesp32c6.rom.heap.ld \ -Tesp32c6.rom.wdt.ld +else ifeq ($(IDF_TARGET),esp32h2) +LDFLAGS += \ + -Tesp32h2.rom.heap.ld \ + -Tesp32h2.rom.newlib.ld \ + -Tesp32h2.rom.wdt.ld else ifeq ($(IDF_TARGET),esp32s2) LDFLAGS += \ -T$(IDF_TARGET).rom.newlib-data.ld \ @@ -445,12 +453,18 @@ update-board-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) BINARY_WIFI_BLOBS = libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a -BINARY_BLOBS = esp-idf/components/esp_coex/lib/$(IDF_TARGET)/libcoexist.a esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a +ifneq ($(CIRCUITPY_WIFI),0) + BINARY_BLOBS += esp-idf/components/esp_coex/lib/$(IDF_TARGET)/libcoexist.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +endif ifeq ($(IDF_TARGET),esp32) BINARY_BLOBS += esp-idf/components/esp_phy/lib/$(IDF_TARGET)/librtc.a endif -ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_coex esp_common esp_event esp_hw_support esp_mm esp_netif esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls mdns newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc esp_app_format esp_common esp_event esp_hw_support esp_mm esp_partition esp_phy esp_pm esp_ringbuf esp_rom esp_system esp_timer freertos hal heap log newlib nvs_flash pthread soc spi_flash vfs +ifneq ($(CIRCUITPY_WIFI),0) + ESP_IDF_COMPONENTS_LINK += esp_coex esp_netif esp-tls esp_wifi lwip mbedtls mdns wpa_supplicant +endif ifneq ($(CIRCUITPY_BLEIO),0) BLE_IMPL_esp32 := esp32 BLE_IMPL_esp32s3 := esp32c3 diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk index a67c8e38e4..c3e0b6001d 100644 --- a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk index 75e097afa8..3588556427 100644 --- a/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32c6_devkitm_1_n4/mpconfigboard.mk @@ -6,3 +6,5 @@ IDF_TARGET = esp32c6 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c new file mode 100644 index 0000000000..f749ee60d2 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h new file mode 100644 index 0000000000..1536f4296d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.h @@ -0,0 +1,37 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Board setup +#define MICROPY_HW_BOARD_NAME "ESP32-H2-DevKitM-1" +#define MICROPY_HW_MCU_NAME "ESP32-H2N4" + +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO23) +#define DEFAULT_UART_BUS_TX (&pin_GPIO24) diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk new file mode 100644 index 0000000000..a4398b4918 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x01420001 + +IDF_TARGET = esp32h2 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 48m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c new file mode 100644 index 0000000000..466962a34f --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/pins.c @@ -0,0 +1,62 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_IO22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_IO25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_MTMS), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_MTDO), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_MTCK), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MTDI), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig new file mode 100644 index 0000000000..1fb757bf0f --- /dev/null +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig @@ -0,0 +1,16 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# ESP System Settings +# +CONFIG_ESP_CONSOLE_SECONDARY_NONE=y +# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set +# end of ESP System Settings + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/common-hal/analogbufio/BufferedIn.c b/ports/espressif/common-hal/analogbufio/BufferedIn.c index 567c10c963..fb517b3623 100644 --- a/ports/espressif/common-hal/analogbufio/BufferedIn.c +++ b/ports/espressif/common-hal/analogbufio/BufferedIn.c @@ -208,7 +208,7 @@ void common_hal_analogbufio_bufferedin_deinit(analogbufio_bufferedin_obj_t *self static bool check_valid_data(const adc_digi_output_data_t *data, const mcu_pin_obj_t *pin, adc_digi_convert_mode_t convert_mode, adc_digi_output_format_t output_format) { unsigned int unit; - #if CONFIG_IDF_TARGET_ESP32C6 || CONFIG_IDF_TARGET_ESP32H2 + #if SOC_ADC_PERIPH_NUM == 1 unit = 0; #else unit = data->type2.unit; diff --git a/ports/espressif/common-hal/canio/Listener.c b/ports/espressif/common-hal/canio/Listener.c index c884bd46a1..2bf385b3dd 100644 --- a/ports/espressif/common-hal/canio/Listener.c +++ b/ports/espressif/common-hal/canio/Listener.c @@ -39,7 +39,7 @@ #include "hal/twai_ll.h" -#if SOC_TWAI_CONTROLLER_NUM > 1 +#if SOC_TWAI_CONTROLLER_NUM > 1 || !defined(TWAI) #define TWAI TWAI0 #endif diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index a3226415b2..5c2724e103 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -150,6 +150,31 @@ static const uint64_t pin_mask_reset_forbidden = #endif #endif // ESP32C6 + #if defined(CONFIG_IDF_TARGET_ESP32H2) + // Never ever reset pins used to communicate with the in-package SPI flash. + GPIO_SEL_15 | + GPIO_SEL_16 | + GPIO_SEL_17 | + GPIO_SEL_18 | + GPIO_SEL_19 | + GPIO_SEL_20 | + GPIO_SEL_21 | + // It isn't clear what these are used for but they aren't broken out for + // user use. + GPIO_SEL_6 | + GPIO_SEL_7 | + #if CIRCUITPY_ESP_USB_SERIAL_JTAG + // Never ever reset serial/JTAG communication pins. + GPIO_SEL_26 | // USB D- + GPIO_SEL_27 | // USB D+ + #endif + #if defined(CONFIG_ESP_CONSOLE_UART_DEFAULT) && CONFIG_ESP_CONSOLE_UART_DEFAULT && CONFIG_ESP_CONSOLE_UART_NUM == 0 + // Never reset debug UART/console pins. + GPIO_SEL_23 | + GPIO_SEL_24 | + #endif + #endif // ESP32C6 + #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) // Never ever reset pins used to communicate with SPI flash and PSRAM. GPIO_SEL_19 | // USB D- @@ -278,7 +303,7 @@ void preserve_pin_number(gpio_num_t pin_number) { _preserved_pin_mask |= PIN_BIT(pin_number); } if (_preserved_pin_mask) { - #if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP + #if defined(SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP) && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP // Allow pin holds to work during deep sleep. This increases power consumption noticeably // during deep sleep, so enable holds only if we actually are holding some pins. // 270uA or so extra current is consumed even with no pins held. @@ -327,7 +352,7 @@ void common_hal_reset_pin(const mcu_pin_obj_t *pin) { void reset_all_pins(void) { // Undo deep sleep holds in case we woke up from deep sleep. // We still need to unhold individual pins, which is done by _reset_pin. - #if !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP + #if defined(SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP) && !SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP gpio_deep_sleep_hold_dis(); #endif diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index 7112937ab1..4248a972f4 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -80,6 +80,8 @@ void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { #if defined(CONFIG_IDF_TARGET_ESP32) uint32_t mac_address_part = REG_READ(EFUSE_BLK0_RDATA1_REG); + #elif defined(CONFIG_IDF_TARGET_ESP32H2) + uint32_t mac_address_part = REG_READ(EFUSE_RD_MAC_SYS_0_REG); #else uint32_t mac_address_part = REG_READ(EFUSE_RD_MAC_SPI_SYS_0_REG); #endif @@ -95,6 +97,8 @@ void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { // and 16 in the high order word #if defined(CONFIG_IDF_TARGET_ESP32) mac_address_part = REG_READ(EFUSE_BLK0_RDATA2_REG); + #elif defined(CONFIG_IDF_TARGET_ESP32H2) + mac_address_part = REG_READ(EFUSE_RD_MAC_SYS_1_REG); #else mac_address_part = REG_READ(EFUSE_RD_MAC_SPI_SYS_1_REG); #endif diff --git a/ports/espressif/common-hal/microcontroller/__init__.c b/ports/espressif/common-hal/microcontroller/__init__.c index 6ef1d77764..470bebae58 100644 --- a/ports/espressif/common-hal/microcontroller/__init__.c +++ b/ports/espressif/common-hal/microcontroller/__init__.c @@ -63,7 +63,7 @@ #include "esp32s3/rom/rtc.h" #include "esp32s3/rom/usb/usb_persist.h" #include "esp32s3/rom/usb/chip_usb_dw_wrapper.h" -#elif defined(CONFIG_IDF_TARGET_ESP32H) +#elif defined(CONFIG_IDF_TARGET_ESP32H2) #include "soc/lp_aon_reg.h" #include "esp32h2/rom/rtc.h" #else @@ -110,13 +110,13 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) REG_WRITE(RTC_RESET_CAUSE_REG, 0); // reset uf2 #endif - #if SOC_LP_AON_SUPPORTED + #ifdef SOC_LP_AON_SUPPORTED REG_WRITE(LP_AON_STORE0_REG, 0); // reset safe mode #else REG_WRITE(RTC_CNTL_STORE0_REG, 0); // reset safe mode #endif #if !defined(CONFIG_IDF_TARGET_ESP32) - #if SOC_LP_AON_SUPPORTED + #ifdef SOC_LP_AON_SUPPORTED REG_WRITE(LP_AON_SYS_CFG_REG, 0); // reset bootloader #else REG_WRITE(RTC_CNTL_OPTION1_REG, 0); // reset bootloader @@ -135,7 +135,7 @@ void common_hal_mcu_on_next_reset(mcu_runmode_t runmode) { #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) chip_usb_set_persist_flags(USBDC_BOOT_DFU); #endif - #if SOC_LP_AON_SUPPORTED + #ifdef SOC_LP_AON_SUPPORTED REG_WRITE(LP_AON_SYS_CFG_REG, LP_AON_FORCE_DOWNLOAD_BOOT); #else REG_WRITE(RTC_CNTL_OPTION1_REG, RTC_CNTL_FORCE_DOWNLOAD_BOOT); diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults new file mode 100644 index 0000000000..02516de4e4 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults @@ -0,0 +1,66 @@ +# +# Espressif IoT Development Framework Configuration +# +# +# Component config +# +# +# Bluetooth +# +CONFIG_BT_ENABLED=y +CONFIG_BT_NIMBLE_ENABLED=y +# +# NimBLE Options +# +CONFIG_BT_NIMBLE_LOG_LEVEL_NONE=y +CONFIG_BT_NIMBLE_NVS_PERSIST=y +# +# Memory Settings +# +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 +# end of Memory Settings + +CONFIG_BT_NIMBLE_EXT_ADV=y +# end of NimBLE Options + +# end of Bluetooth + +# +# Driver Configurations +# +# +# PCNT Configuration +# +CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y +# end of PCNT Configuration + +# +# RMT Configuration +# +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y +# end of RMT Configuration + +# +# I2S Configuration +# +CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y +# end of I2S Configuration + +# end of Driver Configurations + +# +# PHY +# +CONFIG_ESP_PHY_ENABLE_USB=y +# end of PHY + +# +# Wi-Fi +# +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +# end of Wi-Fi + +# end of Component config + +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults new file mode 100644 index 0000000000..b710fd2255 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-48m.defaults @@ -0,0 +1,14 @@ +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_64M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_48M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_32M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_16M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set +CONFIG_ESPTOOLPY_FLASHFREQ_48M_DEFAULT=y diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index bc5a0533ff..e537ba3ed4 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -84,6 +84,25 @@ CIRCUITPY_TOUCHIO_USE_NATIVE = 0 CIRCUITPY_USB = 0 CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 +else ifeq ($(IDF_TARGET),esp32h2) +# Modules +CIRCUITPY_ALARM = 0 +# Turn off analogio because calibration is currently supported. +# https://github.com/espressif/esp-idf/issues/11038 +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_ESPCAMERA = 0 +CIRCUITPY_ESPULP = 0 +CIRCUITPY_MEMORYMAP = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_TOUCHIO ?= 1 +CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +# Features +CIRCUITPY_USB = 0 +CIRCUITPY_ESP_USB_SERIAL_JTAG ?= 1 +CIRCUITPY_WIFI = 0 + else ifeq ($(IDF_TARGET),esp32s2) # Modules CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/peripherals/esp32h2/pins.c b/ports/espressif/peripherals/esp32h2/pins.c new file mode 100644 index 0000000000..a085ca09ae --- /dev/null +++ b/ports/espressif/peripherals/esp32h2/pins.c @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "peripherals/pins.h" + +const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_2, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_3, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO8 = PIN(8, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO9 = PIN(9, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO10 = PIN(10, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO11 = PIN(11, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO12 = PIN(12, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO13 = PIN(13, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO14 = PIN(14, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO22 = PIN(22, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO23 = PIN(23, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO24 = PIN(24, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO25 = PIN(25, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/espressif/peripherals/esp32h2/pins.h b/ports/espressif/peripherals/esp32h2/pins.h new file mode 100644 index 0000000000..7d781ff733 --- /dev/null +++ b/ports/espressif/peripherals/esp32h2/pins.h @@ -0,0 +1,70 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Scott Shawcroft for Adafruit Industries LLC + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// DO NOT include this file directly. +// Use shared-bindings/microcontroller/Pin.h instead. +// This ensures that all necessary includes are already included. + +#pragma once + +#define GPIO0_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO0; +#define GPIO1_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO1; +#define GPIO2_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO2; +#define GPIO3_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO3; +#define GPIO4_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO4; +#define GPIO5_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO5; +#define GPIO8_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO8; +#define GPIO9_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO9; +#define GPIO10_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO10; +#define GPIO11_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO11; +#define GPIO12_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO12; +#define GPIO13_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO13; +#define GPIO14_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO14; +#define GPIO22_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO22; +#define GPIO23_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO23; +#define GPIO24_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO24; +#define GPIO25_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO25; +#define GPIO26_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO26; +#define GPIO27_EXISTS 1 +extern const mcu_pin_obj_t pin_GPIO27; diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 09f90b506d..609096cc3f 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -87,7 +87,7 @@ #endif #include "soc/efuse_reg.h" -#if defined(CONFIG_IDF_TARGET_ESP3H2) || defined(CONFIG_IDF_TARGET_ESP32C6) +#if defined(SOC_LP_AON_SUPPORTED) #include "soc/lp_aon_reg.h" #define CP_SAVED_WORD_REGISTER LP_AON_STORE0_REG #else From 16d1dc2be07ee7f35079515b081dd817319ab311 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 21 Sep 2023 13:52:47 -0700 Subject: [PATCH 110/129] Update all target sdkconfig --- ports/espressif/Makefile | 1 + .../boards/adafruit_feather_esp32_v2/board.c | 2 +- .../adafruit_qualia_s3_rgb666/sdkconfig | 1 - .../boards/espressif_esp32s3_lcd_ev/sdkconfig | 53 +++++------- .../espressif/common-hal/alarm/SleepMemory.h | 6 +- .../espressif/common-hal/analogio/AnalogIn.c | 4 +- .../espressif/common-hal/analogio/AnalogOut.c | 58 +++++++------ .../espressif/common-hal/analogio/AnalogOut.h | 7 +- ports/espressif/common-hal/canio/Listener.c | 2 +- .../esp-idf-config/sdkconfig-debug.defaults | 86 ++----------------- .../esp-idf-config/sdkconfig-esp32.defaults | 2 - .../esp-idf-config/sdkconfig-esp32c3.defaults | 9 +- .../esp-idf-config/sdkconfig-esp32s2.defaults | 9 +- .../esp-idf-config/sdkconfig-esp32s3.defaults | 11 +-- .../sdkconfig-flash-40m.defaults | 4 + .../esp-idf-config/sdkconfig-psram.defaults | 6 ++ .../esp-idf-config/sdkconfig.defaults | 3 +- ports/espressif/tools/update_sdkconfig.py | 33 +++++-- tools/ci_check_duplicate_usb_vid_pid.py | 4 +- 19 files changed, 127 insertions(+), 174 deletions(-) diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 80f3b18497..c9c29ce2f7 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -77,6 +77,7 @@ INC += \ -isystem esp-idf/components/bt/host/nimble/port/include \ -isystem esp-idf/components/driver/include \ -isystem esp-idf/components/driver/deprecated \ + -isystem esp-idf/components/driver/dac/include \ -isystem esp-idf/components/driver/gpio/include \ -isystem esp-idf/components/driver/i2c/include \ -isystem esp-idf/components/driver/i2s/include \ diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/board.c b/ports/espressif/boards/adafruit_feather_esp32_v2/board.c index 78341beb3b..02c3cb2ff4 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig index 912dd14b11..8e26f268e7 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/sdkconfig @@ -4,7 +4,6 @@ # # Component config # - # # LWIP # diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig b/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig index bc1b20063b..ec582be223 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/sdkconfig @@ -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 -CONFIG_SPIRAM_TYPE_AUTO=y -# end of SPI RAM config +# +# Component 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 is not set -# CONFIG_SPIRAM_USE_MALLOC is not set -CONFIG_SPIRAM_MEMTEST=y # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="circuitpy" # 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 Espressif IoT Development Framework Configuration diff --git a/ports/espressif/common-hal/alarm/SleepMemory.h b/ports/espressif/common-hal/alarm/SleepMemory.h index 626f748a67..68e9a7d1a6 100644 --- a/ports/espressif/common-hal/alarm/SleepMemory.h +++ b/ports/espressif/common-hal/alarm/SleepMemory.h @@ -41,7 +41,11 @@ // is set. Any memory not allocated by us can be used by the ESP-IDF for heap or other purposes. // Use half of RTC_SLOW_MEM or RTC_FAST_MEM. -#define SLEEP_MEMORY_LENGTH (4096) +#ifdef CONFIG_IDF_TARGET_ESP32 +#define SLEEP_MEMORY_LENGTH (3 * 1024) +#else +#define SLEEP_MEMORY_LENGTH (4 * 1024) +#endif typedef struct { mp_obj_base_t base; diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index 983e2dd754..ea322690f7 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -103,7 +103,7 @@ uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { adc_cali_scheme_ver_t supported_schemes; adc_cali_check_scheme(&supported_schemes); - adc_cali_scheme_ver_t calibration_scheme; + adc_cali_scheme_ver_t calibration_scheme = 0; adc_cali_handle_t calibration; #if defined(ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED) && ADC_CALI_SCHEME_CURVE_FITTING_SUPPORTED @@ -124,7 +124,7 @@ uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { .atten = ATTENUATION, .bitwidth = DATA_WIDTH, #ifdef CONFIG_IDF_TARGET_ESP32 - .default_vref = DEFAULT_VREF; + .default_vref = DEFAULT_VREF, #endif }; if (adc_cali_create_scheme_line_fitting(&config, &calibration) == ESP_OK) { diff --git a/ports/espressif/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c index 1a1e74391b..d3a3349af6 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.c +++ b/ports/espressif/common-hal/analogio/AnalogOut.c @@ -35,63 +35,69 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate/translate.h" -#if defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32S2) -#include "components/driver/include/driver/dac_common.h" -#define HAS_DAC 1 +#ifdef SOC_DAC_SUPPORTED +#include "driver/dac_oneshot.h" + #if defined(CONFIG_IDF_TARGET_ESP32) -#define pin_CHANNEL_1 pin_GPIO25 -#define pin_CHANNEL_2 pin_GPIO26 +#define pin_CHANNEL_0 pin_GPIO25 +#define pin_CHANNEL_1 pin_GPIO26 #elif defined(CONFIG_IDF_TARGET_ESP32S2) -#define pin_CHANNEL_1 pin_GPIO17 -#define pin_CHANNEL_2 pin_GPIO18 +#define pin_CHANNEL_0 pin_GPIO17 +#define pin_CHANNEL_1 pin_GPIO18 #endif -#else -#define HAS_DAC 0 +static dac_oneshot_handle_t _active_handles[SOC_DAC_CHAN_NUM]; #endif + void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, const mcu_pin_obj_t *pin) { - #if HAS_DAC - if (pin == &pin_CHANNEL_1) { - self->channel = DAC_CHANNEL_1; - } else if (pin == &pin_CHANNEL_2) { - self->channel = DAC_CHANNEL_2; + #ifdef SOC_DAC_SUPPORTED + if (pin == &pin_CHANNEL_0) { + self->channel = DAC_CHAN_0; + } else if (pin == &pin_CHANNEL_1) { + self->channel = DAC_CHAN_1; } else { raise_ValueError_invalid_pin(); } - dac_output_enable(self->channel); + dac_oneshot_config_t config = { + .chan_id = self->channel + }; + dac_oneshot_new_channel(&config, &self->handle); + _active_handles[self->channel] = self->handle; #else mp_raise_NotImplementedError(NULL); #endif } bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { - #if HAS_DAC - return self->channel == DAC_CHANNEL_MAX; + #ifdef SOC_DAC_SUPPORTED + return self->handle == NULL; #else return false; #endif } void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { - #if HAS_DAC - dac_output_disable(self->channel); - self->channel = DAC_CHANNEL_MAX; + #ifdef SOC_DAC_SUPPORTED + dac_oneshot_del_channel(self->handle); + self->handle = NULL; + _active_handles[self->channel] = NULL; #endif } void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, uint16_t value) { - #if HAS_DAC + #ifdef SOC_DAC_SUPPORTED uint8_t dac_value = (value * 255) / 65535; - dac_output_enable(self->channel); - dac_output_voltage(self->channel, dac_value); + dac_oneshot_output_voltage(self->handle, dac_value); #endif } void analogout_reset(void) { - #if HAS_DAC - dac_output_disable(DAC_CHANNEL_1); - dac_output_disable(DAC_CHANNEL_2); + #ifdef SOC_DAC_SUPPORTED + for (uint8_t c = 0; c < SOC_DAC_CHAN_NUM; c++) { + dac_oneshot_del_channel(_active_handles[c]); + _active_handles[c] = NULL; + } #endif } diff --git a/ports/espressif/common-hal/analogio/AnalogOut.h b/ports/espressif/common-hal/analogio/AnalogOut.h index 085c4e6783..26cdd08675 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.h +++ b/ports/espressif/common-hal/analogio/AnalogOut.h @@ -30,12 +30,17 @@ #include "common-hal/microcontroller/Pin.h" +#ifdef SOC_DAC_SUPPORTED +#include "esp-idf/components/driver/dac/include/driver/dac_oneshot.h" +#endif #include "py/obj.h" typedef struct { mp_obj_base_t base; - const mcu_pin_obj_t *pin; + #ifdef SOC_DAC_SUPPORTED + dac_oneshot_handle_t handle; uint8_t channel; + #endif } analogio_analogout_obj_t; void analogout_reset(void); diff --git a/ports/espressif/common-hal/canio/Listener.c b/ports/espressif/common-hal/canio/Listener.c index 2bf385b3dd..0df8ee1b8d 100644 --- a/ports/espressif/common-hal/canio/Listener.c +++ b/ports/espressif/common-hal/canio/Listener.c @@ -39,7 +39,7 @@ #include "hal/twai_ll.h" -#if SOC_TWAI_CONTROLLER_NUM > 1 || !defined(TWAI) +#if !defined(TWAI) && defined(TWAI0) #define TWAI TWAI0 #endif diff --git a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults index 69f4d43289..5976192600 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults @@ -1,95 +1,21 @@ # -# Bootloader config +# Espressif IoT Development Framework Configuration # -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set -CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y -# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set -# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set -# end of Bootloader config - -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set # # Compiler options # CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_PERF is not set -# CONFIG_COMPILER_OPTIMIZATION_NONE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 -# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set # end of Compiler options -CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# +# Component config +# # # ESP System Settings # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y -# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set # end of ESP System Settings -CONFIG_ESP_CONSOLE_UART_DEFAULT=y -# CONFIG_ESP_CONSOLE_USB_CDC is not set -# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set -# CONFIG_ESP_CONSOLE_NONE is not set -CONFIG_ESP_CONSOLE_UART=y -CONFIG_ESP_CONSOLE_MULTIPLE_UART=y -CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 -# -# FreeRTOS -# -CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y -CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y -# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set -# CONFIG_FREERTOS_ASSERT_DISABLE is not set -CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y -CONFIG_FREERTOS_DEBUG_OCDAWARE=y -# end of FreeRTOS +# end of Component config -CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y -# -# Hardware Abstraction Layer (HAL) and Low Level (LL) -# -# CONFIG_HAL_ASSERTION_DISABLE is not set -# CONFIG_HAL_ASSERTION_SILENT is not set -# CONFIG_HAL_ASSERTION_ENABLE is not set -CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 -# end of Hardware Abstraction Layer (HAL) and Low Level (LL) - -# -# Log output -# -# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set -# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set -# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set -CONFIG_LOG_DEFAULT_LEVEL_INFO=y -# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set -# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set -# end of Log output - -CONFIG_LWIP_ESP_LWIP_ASSERT=y -# -# Deprecated options for backward compatibility -# -CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set -CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y -# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set -# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set -CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 -CONFIG_CONSOLE_UART_DEFAULT=y -# CONFIG_CONSOLE_UART_CUSTOM is not set -# CONFIG_ESP_CONSOLE_UART_NONE is not set -CONFIG_CONSOLE_UART_NUM=0 -CONFIG_CONSOLE_UART_BAUDRATE=115200 -# end of Deprecated options for backward compatibility +# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index 5ae4d4c6b5..9bcb508016 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -51,8 +51,6 @@ CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 # # Wi-Fi # -CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=y -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 # CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set # end of Wi-Fi diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index a41a780e68..ea0223c3e4 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -17,8 +17,8 @@ CONFIG_BT_NIMBLE_NVS_PERSIST=y # # Memory Settings # -CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 -CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 # end of Memory Settings CONFIG_BT_NIMBLE_EXT_ADV=y @@ -52,10 +52,7 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y # # Wi-Fi # -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 # end of Wi-Fi # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 09c5a69663..232772a4af 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -49,12 +49,9 @@ CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM=y # # 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 +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 +CONFIG_ESP_WIFI_RX_BA_WIN=4 # end of Wi-Fi # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 2bfd87be1e..7975246ee4 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -18,8 +18,8 @@ CONFIG_BT_NIMBLE_NVS_PERSIST=y # # Memory Settings # -CONFIG_BT_NIMBLE_ACL_BUF_COUNT=20 -CONFIG_BT_NIMBLE_HCI_EVT_BUF_SIZE=70 +CONFIG_BT_NIMBLE_TRANSPORT_ACL_FROM_LL_COUNT=20 +CONFIG_BT_NIMBLE_TRANSPORT_EVT_SIZE=70 # end of Memory Settings CONFIG_BT_NIMBLE_EXT_ADV=y @@ -79,11 +79,8 @@ CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 # # 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=16 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 # end of Wi-Fi # diff --git a/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults b/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults index 2900c10879..235a62a57e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-flash-40m.defaults @@ -1,10 +1,14 @@ # CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_64M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_60M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_48M is not set CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_32M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_30M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_24M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_16M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_15M is not set +# CONFIG_ESPTOOLPY_FLASHFREQ_80M_DEFAULT is not set diff --git a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults index f1bc476a9f..0ac0e6c7bc 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-psram.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-psram.defaults @@ -16,6 +16,12 @@ CONFIG_SPIRAM_USE_MEMMAP=y # end of ESP PSRAM +# +# Wi-Fi +# +CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=16 +# end of Wi-Fi + # end of Component config # end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 93d771e1aa..811d35eb51 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -45,7 +45,7 @@ CONFIG_ESP_MAIN_TASK_STACK_SIZE=16384 # Wi-Fi # CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +CONFIG_ESP_WIFI_STATIC_TX_BUFFER=y # CONFIG_ESP_WIFI_NVS_ENABLED is not set # end of Wi-Fi @@ -132,4 +132,5 @@ CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 # end of Component config +CONFIG_IDF_EXPERIMENTAL_FEATURES=y # end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py index 3c247d67c8..efae6a4dc1 100644 --- a/ports/espressif/tools/update_sdkconfig.py +++ b/ports/espressif/tools/update_sdkconfig.py @@ -164,6 +164,7 @@ def update(debug, board, update_all): board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") psram_size = "0" uf2_bootloader = None + ble_enabled = None for line in board_make.read_text().split("\n"): if "=" not in line or line.startswith("#"): continue @@ -174,6 +175,11 @@ def update(debug, board, update_all): target = value if uf2_bootloader is None: uf2_bootloader = target not in ("esp32", "esp32c3", "esp32c6", "esp32h2") + if ble_enabled is None: + ble_enabled = target not in ( + "esp32", + "esp32s2", + ) # ESP32 is disabled by us. S2 doesn't support it. elif key == "CIRCUITPY_ESP_FLASH_SIZE": flash_size = value elif key == "CIRCUITPY_ESP_FLASH_MODE": @@ -188,6 +194,8 @@ def update(debug, board, update_all): psram_freq = value elif key == "UF2_BOOTLOADER": uf2_bootloader = not (value == "0") + elif key == "CIRCUITPY_BLEIO": + ble_enabled = not (value == "0") os.environ["IDF_TARGET"] = target os.environ[ @@ -232,8 +240,9 @@ def update(debug, board, update_all): sdkconfigs.extend((psram_config, psram_size_config, psram_mode_config, psram_freq_config)) target_config = pathlib.Path(f"esp-idf-config/sdkconfig-{target}.defaults") sdkconfigs.append(target_config) - ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") - sdkconfigs.append(ble_config) + if ble_enabled: + ble_config = pathlib.Path(f"esp-idf-config/sdkconfig-ble.defaults") + sdkconfigs.append(ble_config) board_config = pathlib.Path(f"boards/{board}/sdkconfig") # Don't include the board file in cp defaults. The board may have custom # overrides. @@ -349,15 +358,29 @@ def update(debug, board, update_all): first = False target_kconfig_snippets.add(loc) target_symbols = target_symbols.union(differing_keys) + + # kconfig settings can be set by others. item.referenced doesn't + # know this. So we collect all things that reference this using + # rev_dep. + all_references = set(item.referenced) + to_unpack = [item.rev_dep] + while to_unpack: + rdep = to_unpack.pop() + if isinstance(rdep, tuple): + to_unpack.extend(rdep) + elif isinstance(rdep, int): + # skip logic + pass + else: + all_references.add(rdep) + all_references.update(rdep.referenced) psram_reference = False - for referenced in item.referenced: + for referenced in all_references: if referenced.name.startswith("IDF_TARGET"): target_reference = True - break if referenced.name in target_symbols: # Implicit target symbols target_reference = True - break if referenced.name == "SPIRAM": psram_reference = True diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index c311f1fd3a..b8170aa9e3 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -95,7 +95,9 @@ def check_vid_pid(files, clusterlist): if duplicates are found, and lists the duplicates. """ - usb_pattern = re.compile(r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3)$", flags=re.M) + usb_pattern = re.compile( + r"^CIRCUITPY_USB\s*=\s*0$|^IDF_TARGET = (esp32|esp32c3|esp32c6|esp32h2)$", flags=re.M + ) usb_ids = defaultdict(set) for board_config in files: From 1480d70d17cd75ffef4daf9b22b87730790a6552 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 21 Sep 2023 16:02:41 -0700 Subject: [PATCH 111/129] Fix builds * Disable bleio on C3 with 4MB flash. * Fix gpio include path in board.c's that use it. --- .../boards/01space_lcd042_esp32c3/mpconfigboard.mk | 2 ++ .../espressif/boards/adafruit_feather_esp32s2/board.c | 2 +- .../adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c | 2 +- .../boards/adafruit_feather_esp32s3_nopsram/board.c | 2 +- .../espressif/boards/adafruit_matrixportal_s3/board.c | 2 +- .../espressif/boards/adafruit_qtpy_esp32_pico/board.c | 2 +- .../boards/adafruit_qtpy_esp32c3/mpconfigboard.mk | 2 ++ ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c | 2 +- ports/espressif/boards/ai_thinker_esp32-c3s/board.c | 2 +- .../boards/ai_thinker_esp32-c3s/mpconfigboard.mk | 2 ++ ports/espressif/boards/arduino_nano_esp32s3/board.c | 10 +--------- .../arduino_nano_esp32s3_inverted_statusled/board.c | 10 +--------- .../espressif/boards/beetle-esp32-c3/mpconfigboard.mk | 2 ++ .../boards/cytron_maker_feather_aiot_s3/board.c | 2 +- ports/espressif/boards/deneyap_kart/board.c | 2 +- ports/espressif/boards/deneyap_kart_1a/board.c | 2 +- ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk | 2 ++ ports/espressif/boards/espressif_esp32_eye/board.c | 2 +- ports/espressif/boards/espressif_esp32_lyrat/board.c | 2 +- ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk | 2 ++ ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk | 2 ++ .../boards/luatos_core_esp32c3/mpconfigboard.mk | 2 ++ .../boards/luatos_core_esp32c3_ch343/mpconfigboard.mk | 2 ++ ports/espressif/boards/m5stack_core2/board.c | 2 +- .../espressif/boards/m5stack_stamp_c3/mpconfigboard.mk | 2 ++ ports/espressif/boards/m5stack_stick_c/board.c | 2 +- ports/espressif/boards/m5stack_stick_c_plus/board.c | 2 +- ports/espressif/boards/m5stack_timer_camera_x/board.c | 2 +- .../boards/microdev_micro_c3/mpconfigboard.mk | 2 ++ .../boards/seeed_xiao_esp32c3/mpconfigboard.mk | 2 ++ .../espressif/boards/unexpectedmaker_tinypico/board.c | 2 +- .../boards/unexpectedmaker_tinypico_nano/board.c | 2 +- ports/espressif/common-hal/canio/Listener.c | 3 ++- 33 files changed, 46 insertions(+), 37 deletions(-) diff --git a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk index e0aee0c478..5f37ab5fac 100644 --- a/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/01space_lcd042_esp32c3/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index f701d18442..4d64c316e1 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c index 983d62a911..ba228d7b12 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c index 983d62a911..ba228d7b12 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s3_nopsram/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/board.c b/ports/espressif/boards/adafruit_matrixportal_s3/board.c index a023845eb0..a5067b98fd 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/board.c +++ b/ports/espressif/boards/adafruit_matrixportal_s3/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c b/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c index b714fd41f0..0e4504e8b8 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk index a8b7315c11..df1a53faba 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c index 0118b6d8ea..9e9b34a237 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/board.c @@ -28,7 +28,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "soc/usb_serial_jtag_struct.h" void board_init(void) { diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c index 0118b6d8ea..9e9b34a237 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c @@ -28,7 +28,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/board.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "soc/usb_serial_jtag_struct.h" void board_init(void) { diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk index 9bcaa3473a..8bc9948aee 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/arduino_nano_esp32s3/board.c b/ports/espressif/boards/arduino_nano_esp32s3/board.c index 8952a19c5d..58432f9811 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3/board.c @@ -27,15 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} +#include "components/driver/gpio/include/driver/gpio.h" bool espressif_board_reset_pin_number(gpio_num_t pin_number) { if (pin_number == 13) { diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c index 8952a19c5d..58432f9811 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c @@ -27,15 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" - -void board_init(void) { - // Debug UART - #ifdef DEBUG - common_hal_never_reset_pin(&pin_GPIO43); - common_hal_never_reset_pin(&pin_GPIO44); - #endif -} +#include "components/driver/gpio/include/driver/gpio.h" bool espressif_board_reset_pin_number(gpio_num_t pin_number) { if (pin_number == 13) { diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk index 5ad71b2da5..034d94bb5f 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.mk @@ -9,3 +9,5 @@ CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c b/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c index 1f9ef3c4e7..8f1a584194 100644 --- a/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c +++ b/ports/espressif/boards/cytron_maker_feather_aiot_s3/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/deneyap_kart/board.c b/ports/espressif/boards/deneyap_kart/board.c index 8c0c8b8b0b..12d8928cd5 100644 --- a/ports/espressif/boards/deneyap_kart/board.c +++ b/ports/espressif/boards/deneyap_kart/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/deneyap_kart_1a/board.c b/ports/espressif/boards/deneyap_kart_1a/board.c index 8c0c8b8b0b..12d8928cd5 100644 --- a/ports/espressif/boards/deneyap_kart_1a/board.c +++ b/ports/espressif/boards/deneyap_kart_1a/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk index 1743090e0e..98e4e4c9a5 100644 --- a/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk +++ b/ports/espressif/boards/deneyap_kart_g/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32_eye/board.c b/ports/espressif/boards/espressif_esp32_eye/board.c index 1c09fb1316..b37123db04 100644 --- a/ports/espressif/boards/espressif_esp32_eye/board.c +++ b/ports/espressif/boards/espressif_esp32_eye/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/espressif_esp32_lyrat/board.c b/ports/espressif/boards/espressif_esp32_lyrat/board.c index 8c0c8b8b0b..12d8928cd5 100644 --- a/ports/espressif/boards/espressif_esp32_lyrat/board.c +++ b/ports/espressif/boards/espressif_esp32_lyrat/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk index 99c910e6d2..b6dea28098 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk index 6778550a2d..56c03ddf68 100644 --- a/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk +++ b/ports/espressif/boards/lolin_c3_pico/mpconfigboard.mk @@ -9,5 +9,7 @@ CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 +CIRCUITPY_BLEIO = 0 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk index 03f5171a31..dfd8ff63de 100644 --- a/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk index 9e777889c0..8a425a75cb 100644 --- a/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk +++ b/ports/espressif/boards/luatos_core_esp32c3_ch343/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/m5stack_core2/board.c b/ports/espressif/boards/m5stack_core2/board.c index e64ac35a7d..29011638b2 100644 --- a/ports/espressif/boards/m5stack_core2/board.c +++ b/ports/espressif/boards/m5stack_core2/board.c @@ -34,7 +34,7 @@ #include "shared-bindings/board/__init__.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk index 2f3b62f90f..e360567a0a 100644 --- a/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk +++ b/ports/espressif/boards/m5stack_stamp_c3/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ=80m CIRCUITPY_ESP_FLASH_SIZE=4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/m5stack_stick_c/board.c b/ports/espressif/boards/m5stack_stick_c/board.c index 779125a017..7f9b5a54f4 100644 --- a/ports/espressif/boards/m5stack_stick_c/board.c +++ b/ports/espressif/boards/m5stack_stick_c/board.c @@ -33,7 +33,7 @@ #include "shared-module/displayio/mipi_constants.h" #include "shared-bindings/board/__init__.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_stick_c_plus/board.c b/ports/espressif/boards/m5stack_stick_c_plus/board.c index ea43209c24..5901f8cea8 100644 --- a/ports/espressif/boards/m5stack_stick_c_plus/board.c +++ b/ports/espressif/boards/m5stack_stick_c_plus/board.c @@ -33,7 +33,7 @@ #include "shared-module/displayio/mipi_constants.h" #include "shared-bindings/board/__init__.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/m5stack_timer_camera_x/board.c b/ports/espressif/boards/m5stack_timer_camera_x/board.c index 65b857c3ae..162ad40a80 100755 --- a/ports/espressif/boards/m5stack_timer_camera_x/board.c +++ b/ports/espressif/boards/m5stack_timer_camera_x/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk index 1bb9d0835f..dd3e159386 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk index 4bec24347e..3e2c97dab9 100644 --- a/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk +++ b/ports/espressif/boards/seeed_xiao_esp32c3/mpconfigboard.mk @@ -8,3 +8,5 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_USB_SERIAL_JTAG = 1 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/board.c b/ports/espressif/boards/unexpectedmaker_tinypico/board.c index e59af9528d..530c27f776 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinypico/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c b/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c index d66ab9e5f1..551058611e 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/board.c @@ -27,7 +27,7 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" -#include "components/driver/include/driver/gpio.h" +#include "components/driver/gpio/include/driver/gpio.h" #include "components/hal/include/hal/gpio_hal.h" #include "common-hal/microcontroller/Pin.h" diff --git a/ports/espressif/common-hal/canio/Listener.c b/ports/espressif/common-hal/canio/Listener.c index 0df8ee1b8d..a6c0dbf90c 100644 --- a/ports/espressif/common-hal/canio/Listener.c +++ b/ports/espressif/common-hal/canio/Listener.c @@ -39,7 +39,8 @@ #include "hal/twai_ll.h" -#if !defined(TWAI) && defined(TWAI0) +// There is no logic that dictates TWAI vs TWAI0 +#if defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C6) #define TWAI TWAI0 #endif From faa445e347d4508d7bb6bf2b8cb175702cea2d63 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 22 Sep 2023 09:58:32 -0700 Subject: [PATCH 112/129] Three more board fixes --- .../espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk | 2 ++ ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk | 4 ++++ ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk index 2fb409d247..fec39d79f3 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.mk @@ -10,3 +10,5 @@ CIRCUITPY_ESP_FLASH_SIZE = 2MB CIRCUITPY_DUALBANK = 0 CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk index 2ca19f332c..de5601680c 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t-01c3/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk index 7a80145217..ede6428e8b 100644 --- a/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk +++ b/ports/espressif/boards/lilygo_ttgo_t-oi-plus/mpconfigboard.mk @@ -6,3 +6,7 @@ IDF_TARGET = esp32c3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP_USB_SERIAL_JTAG = 0 + +CIRCUITPY_BLEIO = 0 From c726e87344b1d1a6a90e7ca9666e122163a462b0 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 22 Sep 2023 15:05:20 -0700 Subject: [PATCH 113/129] Enable BLE on H2 devkit --- .../mpconfigboard.mk | 2 -- .../espressif_esp32h2_devkitm_1_n4/sdkconfig | 16 ---------------- .../esp-idf-config/sdkconfig-opt.defaults | 1 + 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk index a4398b4918..82eb611bdf 100644 --- a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/mpconfigboard.mk @@ -6,5 +6,3 @@ IDF_TARGET = esp32h2 CIRCUITPY_ESP_FLASH_MODE = qio CIRCUITPY_ESP_FLASH_FREQ = 48m CIRCUITPY_ESP_FLASH_SIZE = 4MB - -CIRCUITPY_BLEIO = 0 diff --git a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig index 1fb757bf0f..e69de29bb2 100644 --- a/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig +++ b/ports/espressif/boards/espressif_esp32h2_devkitm_1_n4/sdkconfig @@ -1,16 +0,0 @@ -# -# Espressif IoT Development Framework Configuration -# -# -# Component config -# -# -# ESP System Settings -# -CONFIG_ESP_CONSOLE_SECONDARY_NONE=y -# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set -# end of ESP System Settings - -# end of Component config - -# end of Espressif IoT Development Framework Configuration diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index ebf294736a..74502488dc 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -29,6 +29,7 @@ CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y CONFIG_ESP_CONSOLE_NONE=y +CONFIG_ESP_CONSOLE_SECONDARY_NONE=y # end of ESP System Settings # From 409d1a83b629c3302388859289c4ba01daff7f4c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 09:45:35 -0500 Subject: [PATCH 114/129] displayio: fix releasing dot clock framebuffres in release_displays this caused problems particularly when the framebuffer was not associated with a display. --- shared-module/displayio/__init__.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index f01cca781e..a62b0a8bb5 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -43,6 +43,10 @@ #include "supervisor/spi_flash_api.h" #include "py/mpconfig.h" +#if CIRCUITPY_DOTCLOCKFRAMEBUFFER +#include "shared-bindings/dotclockframebuffer/DotClockFramebuffer.h" +#endif + #if CIRCUITPY_SHARPDISPLAY #include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" @@ -133,6 +137,10 @@ void common_hal_displayio_release_displays(void) { common_hal_displayio_fourwire_deinit(&display_buses[i].fourwire_bus); } else if (bus_type == &displayio_i2cdisplay_type) { common_hal_displayio_i2cdisplay_deinit(&display_buses[i].i2cdisplay_bus); + #if CIRCUITPY_DOTCLOCKFRAMEBUFFER + } else if (bus_type == &dotclockframebuffer_framebuffer_type) { + common_hal_dotclockframebuffer_framebuffer_deinit(&display_buses[i].dotclock); + #endif #if CIRCUITPY_PARALLELDISPLAY } else if (bus_type == ¶lleldisplay_parallelbus_type) { common_hal_paralleldisplay_parallelbus_deinit(&display_buses[i].parallel_bus); From 04ad525c09da7ff052ea469ca67ff7108059acc1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 11:31:16 -0500 Subject: [PATCH 115/129] Re-work ioexpander_send_init_sequence * can now send the I2C bus initialization code * can now reset the display on an I/O expander pin * parameters re-ordered to enable easy use with **board.TFT_IO_EXPANDER --- .../dotclockframebuffer/__init__.c | 54 +++++++++++++------ .../dotclockframebuffer/__init__.h | 3 +- shared-module/dotclockframebuffer/__init__.c | 30 +++++++++-- 3 files changed, 67 insertions(+), 20 deletions(-) diff --git a/shared-bindings/dotclockframebuffer/__init__.c b/shared-bindings/dotclockframebuffer/__init__.c index 07f9f826dd..669b7a2bd7 100644 --- a/shared-bindings/dotclockframebuffer/__init__.c +++ b/shared-bindings/dotclockframebuffer/__init__.c @@ -39,15 +39,17 @@ //| //| def ioexpander_send_init_sequence( //| bus: busio.I2C, +//| init_sequence: ReadableBuffer, +//| *, +//| i2c_init_sequence: ReadableBuffer, //| i2c_address: int, -//| reg_addr: int, -//| gpio_data_len: Length, //| gpio_address: int, +//| gpio_data_len: Length, //| gpio_data: int, //| cs_bit: int, //| mosi_bit: int, //| clk_bit: int, -//| init_sequence: ReadableBuffer, +//| reset_bit: Optional[int], //| ): //| """Send a displayio-style initialization sequence over an I2C I/O expander //| @@ -60,30 +62,41 @@ //| //| Normally this function is used via a convenience library that is specific to the display & I/O expander in use. //| +//| If the board has an integrated I/O expander, ``**board.TFT_IO_EXPANDER`` expands to the proper arguments starting with ``gpio_address``. +//| Note that this may include the ``i2c_init_sequence`` argument which can change the direction & value of I/O expander pins. +//| If this is undesirable, take a copy of ``TFT_IO_EXPANDER`` and change or remove the ``i2c_init_sequence`` key. +//| +//| If the board has an integrated display that requires an initialization sequence, ``board.TFT_INIT_SEQUENCE`` is the initialization string for the display. +//| //| :param busio.I2C bus: The I2C bus where the I/O expander resides -//| :param busio.i2c_address: int: The I2C bus address of the I/O expander +//| :param int busio.i2c_address: The I2C bus address of the I/O expander +//| :param ReadableBuffer init_sequence: The initialization sequence to send to the display //| :param int gpio_address: The address portion of the I2C transaction (1 byte) //| :param int gpio_data_len: The size of the data portion of the I2C transaction, 1 or 2 bytes //| :param int gpio_data: The output value for all GPIO bits other than cs, mosi, and clk (needed because GPIO expanders may be unable to read back the current output value) //| :param int cs_bit: The bit number (from 0 to 7, or from 0 to 15) of the chip select bit in the GPIO register //| :param int mosi_value: The bit number (from 0 to 7, or from 0 to 15) of the data out bit in the GPIO register //| :param int clk_value: The bit number (from 0 to 7, or from 0 to 15) of the clock out bit in the GPIO register +//| :param Optional[int] reset_value: The bit number (from 0 to 7, or from 0 to 15) of the display reset bit in the GPIO register +//| :param Optional[ReadableBuffer] i2c_init_sequence: An initialization sequence to send to the I2C expander //| """ //| STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - enum { ARG_bus, ARG_i2c_address, ARG_gpio_address, ARG_gpio_data_len, ARG_gpio_data, ARG_cs_bit, ARG_mosi_bit, ARG_clk_bit, ARG_init_sequence, NUM_ARGS }; + enum { ARG_bus, ARG_init_sequence, ARG_i2c_address, ARG_gpio_address, ARG_gpio_data_len, ARG_gpio_data, ARG_cs_bit, ARG_mosi_bit, ARG_clk_bit, ARG_reset_bit, ARG_i2c_init_sequence, NUM_ARGS }; static const mp_arg_t allowed_args[] = { { MP_QSTR_bus, MP_ARG_REQUIRED | MP_ARG_OBJ }, - { MP_QSTR_i2c_address, MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_gpio_address, MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_gpio_data_len, MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_gpio_data, MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_cs_bit, MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_mosi_bit, MP_ARG_REQUIRED | MP_ARG_INT }, - { MP_QSTR_clk_bit, MP_ARG_REQUIRED | MP_ARG_INT }, { MP_QSTR_init_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_i2c_address, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_address, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_data_len, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_gpio_data, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_cs_bit, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_mosi_bit, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_clk_bit, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT }, + { MP_QSTR_reset_bit, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = MP_ROM_NONE } }, + { MP_QSTR_i2c_init_sequence, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = MP_ROM_NONE } }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -99,8 +112,8 @@ STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos mp_int_t mosi_bit = args[ARG_mosi_bit].u_int; mp_int_t clk_bit = args[ARG_clk_bit].u_int; - mp_buffer_info_t bufinfo; - mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo, MP_BUFFER_READ); + mp_buffer_info_t bufinfo_display_init_sequence; + mp_get_buffer_raise(args[ARG_init_sequence].u_obj, &bufinfo_display_init_sequence, MP_BUFFER_READ); mp_arg_validate_int_range(i2c_address, 0, 127, MP_QSTR_i2c_address); mp_arg_validate_int_range(gpio_data_len, 1, 2, MP_QSTR_gpio_dat_len); @@ -110,6 +123,16 @@ STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos mp_arg_validate_int_range(mosi_bit, 0, max_bit, MP_QSTR_mosi_bit); mp_arg_validate_int_range(clk_bit, 0, max_bit, MP_QSTR_clk_bit); mp_arg_validate_int_range(gpio_data, 0, (1 << (max_bit * 8)) - 1, MP_QSTR_gpio_data); + mp_int_t reset_mask = 0; + if (args[ARG_reset_bit].u_obj != MP_ROM_NONE) { + mp_int_t reset_bit = mp_arg_validate_int_range(mp_arg_validate_type_int(args[ARG_reset_bit].u_obj, MP_QSTR_reset_bit), 0, max_bit, MP_QSTR_reset_bit); + reset_mask = (1 << reset_bit); + } + + mp_buffer_info_t bufinfo_i2c_init_sequence = {}; + if (args[ARG_i2c_init_sequence].u_obj != mp_const_none) { + mp_get_buffer_raise(args[ARG_i2c_init_sequence].u_obj, &bufinfo_i2c_init_sequence, MP_BUFFER_READ); + } dotclockframebuffer_ioexpander_spi_bus b = { .bus = bus_obj, @@ -120,9 +143,10 @@ STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos .cs_mask = 0x100 << cs_bit, .mosi_mask = 0x100 << mosi_bit, .clk_mask = 0x100 << clk_bit, + .reset_mask = reset_mask, }; - dotclockframebuffer_ioexpander_send_init_sequence(&b, bufinfo.buf, bufinfo.len); + dotclockframebuffer_ioexpander_send_init_sequence(&b, &bufinfo_i2c_init_sequence, &bufinfo_display_init_sequence); return mp_const_none; } diff --git a/shared-bindings/dotclockframebuffer/__init__.h b/shared-bindings/dotclockframebuffer/__init__.h index de69021a1b..864eac3573 100644 --- a/shared-bindings/dotclockframebuffer/__init__.h +++ b/shared-bindings/dotclockframebuffer/__init__.h @@ -51,6 +51,7 @@ typedef struct { uint32_t cs_mask; uint32_t mosi_mask; uint32_t clk_mask; + uint32_t reset_mask; } dotclockframebuffer_ioexpander_spi_bus; -void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const uint8_t *init_sequence, uint16_t init_sequence_len); +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const mp_buffer_info_t *i2c_bus_init, const mp_buffer_info_t *display_init); diff --git a/shared-module/dotclockframebuffer/__init__.c b/shared-module/dotclockframebuffer/__init__.c index 9bea7c2897..1fa2426d2d 100644 --- a/shared-module/dotclockframebuffer/__init__.c +++ b/shared-module/dotclockframebuffer/__init__.c @@ -43,15 +43,37 @@ static void ioexpander_bus_send(dotclockframebuffer_ioexpander_spi_bus *bus, // * CPOL=CPHA=0 // * CS deasserted after each init sequence step, but not otherwise just like // displayio fourwire bus without data_as_commands -void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const uint8_t *init_sequence, uint16_t init_sequence_len) { +void dotclockframebuffer_ioexpander_send_init_sequence(dotclockframebuffer_ioexpander_spi_bus *bus, const mp_buffer_info_t *i2c_bus_init, const mp_buffer_info_t *display_init) { while (!common_hal_busio_i2c_try_lock(bus->bus)) { RUN_BACKGROUND_TASKS; } - // ensure deasserted CS and idle CLK - pin_change(bus, /* set */ bus->cs_mask, /* clear */ bus->clk_mask); + // send i2c init sequence + { + size_t init_sequence_len = i2c_bus_init->len; + const uint8_t *init_sequence = i2c_bus_init->buf; - for (uint32_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { + for (size_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { + uint8_t data_size = init_sequence[i]; + const uint8_t *data_ptr = &init_sequence[i + 1]; + (void)common_hal_busio_i2c_write(bus->bus, bus->i2c_device_address, data_ptr, data_size); + i = i + data_size + 1; + } + } + + // ensure deasserted CS and idle CLK (and set other pins according to addr_reg_shadow); enter reset mode if applicable + pin_change(bus, /* set */ bus->cs_mask, /* clear */ bus->clk_mask | bus->reset_mask); + + if (bus->reset_mask) { + mp_hal_delay_ms(10); // reset pulse length + pin_change(bus, /* set */ bus->reset_mask, /* clear */ 0); + mp_hal_delay_ms(100); // display start-up time + } + + size_t init_sequence_len = display_init->len; + const uint8_t *init_sequence = display_init->buf; + + for (size_t i = 0; i < init_sequence_len; /* NO INCREMENT */) { const uint8_t *cmd = init_sequence + i; uint8_t data_size = *(cmd + 1); bool delay = (data_size & DELAY) != 0; From ce22edba15ab9759d7140b2ff6ad1a0e46b53271 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 11:33:01 -0500 Subject: [PATCH 116/129] On Qualia, define board.TFT_IO_EXPANDER these arguments make it easier to call ioexpander_send_init_sequence --- .../boards/adafruit_qualia_s3_rgb666/pins.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c index 4bd25d26cb..141b08e353 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c @@ -1,6 +1,27 @@ #include "py/objtuple.h" #include "shared-bindings/board/__init__.h" +#define MP_DEFINE_BYTES_OBJ(obj_name, bin) mp_obj_str_t obj_name = {{&mp_type_bytes}, 0, sizeof(bin) - 1, (const byte *)bin} + +STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, + "\2\2\0" // set data inversion register (no inversions) + "\2\1\xfe" // set output data (CLK idle low, all others high) + "\2\3\x78" // set direction register (cs, mosi, clk, reset as outputs) + ); + +STATIC const mp_rom_map_elem_t tft_io_expander_table[] = { + { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x3F)}, + { MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xFD)}, + { MP_ROM_QSTR(MP_QSTR_cs_bit), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_mosi_bit), MP_ROM_INT(7)}, + { MP_ROM_QSTR(MP_QSTR_clk_bit), MP_ROM_INT(0)}, + { MP_ROM_QSTR(MP_QSTR_reset_bit), MP_ROM_INT(2)}, + { MP_ROM_QSTR(MP_QSTR_i2c_init_sequence), &i2c_init_byte_obj}, +}; +MP_DEFINE_CONST_DICT(tft_io_expander_dict, tft_io_expander_table); + STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, 5, @@ -53,6 +74,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_IO_EXPANDER), MP_ROM_PTR(&tft_io_expander_dict) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(MICROPY_HW_NEOPIXEL) }, From 65310ab6151961b66678b8cec179ecaea48ef68f Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 12:00:04 -0500 Subject: [PATCH 117/129] update io expander table for rev C --- ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c index 141b08e353..3d4b9571bb 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c @@ -10,7 +10,7 @@ STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, ); STATIC const mp_rom_map_elem_t tft_io_expander_table[] = { - { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x3F)}, + { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x38)}, { MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)}, { MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)}, { MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xFD)}, From 6263f6af847c3035734b7790ccd16c37d1975936 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 14:58:09 -0500 Subject: [PATCH 118/129] Switch to i2c init string for espressif lcd ev, expose values via board --- .../boards/adafruit_qualia_s3_rgb666/pins.c | 3 +- .../boards/espressif_esp32s3_lcd_ev/board.c | 34 +++++++++---------- .../boards/espressif_esp32s3_lcd_ev/board.h | 31 +++++++++++++++++ .../boards/espressif_esp32s3_lcd_ev/pins.c | 15 ++++++++ 4 files changed, 64 insertions(+), 19 deletions(-) create mode 100644 ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c index 3d4b9571bb..ef25d5d5b6 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c @@ -73,9 +73,8 @@ MP_DEFINE_CONST_DICT(tft_dict, tft_table); STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_TFT), MP_ROM_PTR(&tft_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_dict) }, { MP_ROM_QSTR(MP_QSTR_TFT_IO_EXPANDER), MP_ROM_PTR(&tft_io_expander_dict) }, - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(MICROPY_HW_NEOPIXEL) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c index 86d4d0960d..726012d1f7 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.c @@ -33,6 +33,9 @@ #include "shared-bindings/framebufferio/FramebufferDisplay.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-module/displayio/__init__.h" +#include "boards/espressif_esp32s3_lcd_ev/board.h" + +#define MP_DEFINE_BYTES_OBJ(obj_name, bin) mp_obj_str_t obj_name = {{&mp_type_bytes}, 0, sizeof(bin) - 1, (const byte *)bin} static const uint8_t display_init_sequence[] = { 0xf0, 5, 0x55, 0xaa, 0x52, 0x08, 0x00, @@ -80,8 +83,17 @@ static const uint8_t display_init_sequence[] = { 0x3a, 1, 0x66, 0x3a, 1, 0x66, 0x11, 0x80, 120, - 0x29, 0x0 + 0x29, 0x0, + 0, // trailing NUL for Python bytes() representation }; +MP_DEFINE_BYTES_OBJ(display_init_byte_obj, display_init_sequence); + +static const char i2c_bus_init_sequence[] = { + 2, 3, 0xf1, // set GPIO direction + 2, 2, 0, // disable all output inversion + 0, // trailing NUL for Python bytes() representation +}; +MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, i2c_bus_init_sequence); static const mcu_pin_obj_t *red_pins[] = { &pin_GPIO1, &pin_GPIO2, &pin_GPIO42, &pin_GPIO41, &pin_GPIO40 @@ -103,7 +115,7 @@ void board_init(void) { /* hsync */ &pin_GPIO46, /* dclk */ &pin_GPIO9, /* data */ red_pins, MP_ARRAY_SIZE(red_pins), green_pins, MP_ARRAY_SIZE(green_pins), blue_pins, MP_ARRAY_SIZE(blue_pins), - /* frequency */ 6500000, + /* frequency */ 12000000, /* width x height */ 480, 480, /* horizontal: pulse, back & front porch, idle */ 13, 20, 40, false, /* vertical: pulse, back & front porch, idle */ 15, 20, 40, false, @@ -127,20 +139,6 @@ void board_init(void) { common_hal_busio_i2c_construct(&i2c, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 400000, 255); const int i2c_device_address = 32; - common_hal_busio_i2c_try_lock(&i2c); - - { - uint8_t buf[2] = {3, 0xf1}; // set GPIO direction - common_hal_busio_i2c_write(&i2c, i2c_device_address, buf, sizeof(buf)); - } - - { - uint8_t buf[2] = {2, 0}; // set all output pins low initially - common_hal_busio_i2c_write(&i2c, i2c_device_address, buf, sizeof(buf)); - } - - common_hal_busio_i2c_unlock(&i2c); - dotclockframebuffer_ioexpander_spi_bus spibus = { .bus = &i2c, .i2c_device_address = i2c_device_address, @@ -151,7 +149,9 @@ void board_init(void) { .clk_mask = 0x100 << 2, }; - dotclockframebuffer_ioexpander_send_init_sequence(&spibus, display_init_sequence, sizeof(display_init_sequence)); + static const mp_buffer_info_t bufinfo_display_init = { (void *)display_init_sequence, sizeof(display_init_sequence) - 1 }; + static const mp_buffer_info_t bufinfo_i2c_bus_init = { (void *)i2c_bus_init_sequence, sizeof(i2c_bus_init_sequence) - 1 }; + dotclockframebuffer_ioexpander_send_init_sequence(&spibus, &bufinfo_i2c_bus_init, &bufinfo_display_init); common_hal_busio_i2c_deinit(&i2c); } diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h new file mode 100644 index 0000000000..e8f5286542 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/board.h @@ -0,0 +1,31 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#pragma once + +#include "py/objstr.h" + +extern mp_obj_str_t display_init_byte_obj, i2c_init_byte_obj; diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c index d66fc534a4..da25b509a9 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/pins.c @@ -1,7 +1,20 @@ #include "py/objtuple.h" +#include "boards/espressif_esp32s3_lcd_ev/board.h" #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" +STATIC const mp_rom_map_elem_t tft_io_expander_table[] = { + { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x20)}, + { MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xF1)}, + { MP_ROM_QSTR(MP_QSTR_cs_bit), MP_ROM_INT(1)}, + { MP_ROM_QSTR(MP_QSTR_mosi_bit), MP_ROM_INT(3)}, + { MP_ROM_QSTR(MP_QSTR_clk_bit), MP_ROM_INT(2)}, + { MP_ROM_QSTR(MP_QSTR_i2c_init_sequence), &i2c_init_byte_obj}, +}; +MP_DEFINE_CONST_DICT(tft_io_expander_dict, tft_io_expander_table); + STATIC const mp_rom_obj_tuple_t tft_r_pins = { {&mp_type_tuple}, 5, @@ -73,6 +86,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_TFT_PINS), MP_ROM_PTR(&tft_pins_dict) }, { MP_ROM_QSTR(MP_QSTR_TFT_TIMINGS), MP_ROM_PTR(&tft_timings_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_IO_EXPANDER), MP_ROM_PTR(&tft_io_expander_dict) }, + { MP_ROM_QSTR(MP_QSTR_TFT_INIT_SEQUENCE), &display_init_byte_obj}, { MP_ROM_QSTR(MP_QSTR_I2S_SCK), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_I2S_MCLK), MP_ROM_PTR(&pin_GPIO5) }, From 747b6e8d2e5ba10d901875726c843b54b43c6775 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 16:39:38 -0500 Subject: [PATCH 119/129] enable LCD_RGB_RESTART_IN_VSYNC this "should" turn permanent tearing into temporary tearing. --- .../esp-idf-config/sdkconfig-esp32s3.defaults | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 7975246ee4..18c48c1f0d 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -57,6 +57,17 @@ CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y # end of Driver Configurations +# +# LCD and Touch Panel +# +# +# LCD Peripheral Configuration +# +CONFIG_LCD_RGB_RESTART_IN_VSYNC=y +# end of LCD Peripheral Configuration + +# end of LCD and Touch Panel + # # ESP System Settings # From 03141d40af1e4c1ebd9f9df01f7e1e72f3cbb098 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 26 Sep 2023 07:45:01 -0500 Subject: [PATCH 120/129] espressif: i2c: initialize "has_lock" Otherwise, a stack-constructed i2c instance might get some other value here. --- ports/espressif/common-hal/busio/I2C.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/common-hal/busio/I2C.c b/ports/espressif/common-hal/busio/I2C.c index b9775adfd7..ea752c986d 100644 --- a/ports/espressif/common-hal/busio/I2C.c +++ b/ports/espressif/common-hal/busio/I2C.c @@ -82,6 +82,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, self->sda_pin = sda; self->scl_pin = scl; self->i2c_num = peripherals_i2c_get_free_num(); + self->has_lock = 0; if (self->i2c_num == I2C_NUM_MAX) { mp_raise_ValueError(translate("All I2C peripherals are in use")); From 3af5cbc312c588a80cadec906d2e25ab8991abc8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 26 Sep 2023 07:48:52 -0500 Subject: [PATCH 121/129] bump ram to 120MHz --- .../espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk index 2315d4e20f..183103f17e 100644 --- a/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_lcd_ev/mpconfigboard.mk @@ -11,7 +11,7 @@ CIRCUITPY_ESP_FLASH_SIZE = 16MB CIRCUITPY_ESP_PSRAM_SIZE = 8MB CIRCUITPY_ESP_PSRAM_MODE = opi -CIRCUITPY_ESP_PSRAM_FREQ = 80m +CIRCUITPY_ESP_PSRAM_FREQ = 120m CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 UF2_BOOTLOADER = 0 From 6990c37320d3afaad840d07921534044c8fbd5fb Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 26 Sep 2023 08:33:00 -0500 Subject: [PATCH 122/129] Fix calculation of bit-weight for reset pin --- shared-bindings/dotclockframebuffer/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/dotclockframebuffer/__init__.c b/shared-bindings/dotclockframebuffer/__init__.c index 669b7a2bd7..30f4022d0f 100644 --- a/shared-bindings/dotclockframebuffer/__init__.c +++ b/shared-bindings/dotclockframebuffer/__init__.c @@ -126,7 +126,7 @@ STATIC mp_obj_t ioexpander_send_init_sequence(size_t n_args, const mp_obj_t *pos mp_int_t reset_mask = 0; if (args[ARG_reset_bit].u_obj != MP_ROM_NONE) { mp_int_t reset_bit = mp_arg_validate_int_range(mp_arg_validate_type_int(args[ARG_reset_bit].u_obj, MP_QSTR_reset_bit), 0, max_bit, MP_QSTR_reset_bit); - reset_mask = (1 << reset_bit); + reset_mask = 0x100 << reset_bit; } mp_buffer_info_t bufinfo_i2c_init_sequence = {}; From 1c2362b758f0a28abc1c261111956f3fdec57d2d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 26 Sep 2023 08:33:10 -0500 Subject: [PATCH 123/129] bump qualia psram to 120MHz --- .../espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk index 65c872cf74..7659cd160a 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.mk @@ -11,6 +11,6 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 8MB CIRCUITPY_ESP_PSRAM_MODE = opi -CIRCUITPY_ESP_PSRAM_FREQ = 80m +CIRCUITPY_ESP_PSRAM_FREQ = 120m CIRCUITPY_DOTCLOCKFRAMEBUFFER = 1 From 3d3061f6f7714e1349e1cede52e23235d0cb7233 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 26 Sep 2023 08:33:27 -0500 Subject: [PATCH 124/129] fix qualia board definition --- .../boards/adafruit_qualia_s3_rgb666/pins.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c index ef25d5d5b6..a8920961e0 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c @@ -3,14 +3,15 @@ #define MP_DEFINE_BYTES_OBJ(obj_name, bin) mp_obj_str_t obj_name = {{&mp_type_bytes}, 0, sizeof(bin) - 1, (const byte *)bin} -STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, - "\2\2\0" // set data inversion register (no inversions) - "\2\1\xfe" // set output data (CLK idle low, all others high) - "\2\3\x78" // set direction register (cs, mosi, clk, reset as outputs) - ); +static const char i2c_bus_init_sequence[] = { + 2, 3, 0x78, // set GPIO direction + 2, 2, 0, // disable all output inversion + 0, // trailing NUL for python bytes() representation +}; +STATIC MP_DEFINE_BYTES_OBJ(i2c_init_byte_obj, i2c_bus_init_sequence); STATIC const mp_rom_map_elem_t tft_io_expander_table[] = { - { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x38)}, + { MP_ROM_QSTR(MP_QSTR_i2c_address), MP_ROM_INT(0x3f)}, { MP_ROM_QSTR(MP_QSTR_gpio_address), MP_ROM_INT(1)}, { MP_ROM_QSTR(MP_QSTR_gpio_data_len), MP_ROM_INT(1)}, { MP_ROM_QSTR(MP_QSTR_gpio_data), MP_ROM_INT(0xFD)}, From 3fdfb9bd321af1a6060291d247ac8043c556b288 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 26 Sep 2023 11:53:01 -0700 Subject: [PATCH 125/129] Update ADC and I2S APIs for 5.1 This fixes ESP32 because the BufferedIn used the old ADC API and I2S did too indirectly. Fixes #8429 --- .gitmodules | 3 - locale/circuitpython.pot | 26 +-- main.c | 2 + ports/espressif/Makefile | 11 - .../adafruit_qtpy_esp32_pico/mpconfigboard.mk | 6 +- .../common-hal/analogbufio/BufferedIn.c | 109 +++++----- .../common-hal/analogbufio/BufferedIn.h | 4 + .../espressif/common-hal/analogio/AnalogOut.c | 4 +- .../espressif/common-hal/audiobusio/I2SOut.c | 43 ++-- .../espressif/common-hal/audiobusio/I2SOut.h | 2 +- .../common-hal/audiobusio/__init__.c | 195 ++++++++---------- .../common-hal/audiobusio/__init__.h | 15 +- .../esp-idf-config/sdkconfig-esp32.defaults | 6 - .../esp-idf-config/sdkconfig-esp32c3.defaults | 6 - .../esp-idf-config/sdkconfig-esp32c6.defaults | 6 - .../esp-idf-config/sdkconfig-esp32h2.defaults | 6 - .../esp-idf-config/sdkconfig-esp32s2.defaults | 6 - .../esp-idf-config/sdkconfig-esp32s3.defaults | 6 - .../esp-idf-config/sdkconfig.defaults | 6 - ports/espressif/esp-iot-solution | 1 - ports/espressif/mpconfigport.mk | 1 + ports/espressif/peripherals/pins.h | 2 +- ports/espressif/supervisor/port.c | 8 - 23 files changed, 183 insertions(+), 291 deletions(-) delete mode 160000 ports/espressif/esp-iot-solution diff --git a/.gitmodules b/.gitmodules index 9693f68421..75f1d5f233 100644 --- a/.gitmodules +++ b/.gitmodules @@ -147,9 +147,6 @@ [submodule "ports/espressif/esp-protocols"] path = ports/espressif/esp-protocols url = https://github.com/espressif/esp-protocols.git -[submodule "ports/espressif/esp-iot-solution"] - path = ports/espressif/esp-iot-solution - url = https://github.com/espressif/esp-iot-solution.git [submodule "ports/espressif/esp-camera"] path = ports/espressif/esp-camera url = https://github.com/adafruit/esp32-camera.git diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c4038db1fa..a523baebba 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -447,10 +447,6 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2156,11 +2152,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2179,20 +2170,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4207,7 +4188,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4364,10 +4346,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/main.c b/main.c index 72f9fd6fab..dff92da757 100644 --- a/main.c +++ b/main.c @@ -1190,7 +1190,9 @@ void NORETURN nlr_jump_fail(void *val) { #ifndef NDEBUG static void NORETURN __fatal_error(const char *msg) { + #if CIRCUITPY_DEBUG == 0 reset_into_safe_mode(SAFE_MODE_HARD_FAULT); + #endif while (true) { } } diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index c9c29ce2f7..0622e67447 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -304,17 +304,6 @@ ifneq ($(CIRCUITPY_BLEIO),0) SRC_C += common-hal/_bleio/ble_events.c endif -ifneq ($(CIRCUITPY_PARALLELDISPLAY),0) -ifeq ($(IDF_TARGET),esp32s3) -LCD_SRC = 8080_lcd_$(IDF_TARGET) -else -LCD_SRC = i2s_lcd_$(IDF_TARGET)_driver -endif -SRC_C += esp-iot-solution/components/bus/$(LCD_SRC).c -$(BUILD)/esp-iot-solution/components/bus/$(LCD_SRC).o: CFLAGS += -Wno-sign-compare -CFLAGS += -isystem esp-iot-solution/components/bus/include -endif - ifneq ($(CIRCUITPY_DOTCLOCKFRAMEBUFFER),0) CFLAGS += -isystem esp-idf/components/esp_lcd/include CFLAGS += -isystem esp-idf/components/esp_lcd/interface diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk index 829acb46f9..b4b40c58c4 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.mk @@ -4,9 +4,9 @@ CIRCUITPY_CREATION_ID = 0x00320003 IDF_TARGET = esp32 CIRCUITPY_ESP_FLASH_SIZE = 8MB -CIRCUITPY_ESP_FLASH_MODE = dio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio -CIRCUITPY_ESP_PSRAM_FREQ = 40m +CIRCUITPY_ESP_PSRAM_FREQ = 80m diff --git a/ports/espressif/common-hal/analogbufio/BufferedIn.c b/ports/espressif/common-hal/analogbufio/BufferedIn.c index fb517b3623..47942c7c33 100644 --- a/ports/espressif/common-hal/analogbufio/BufferedIn.c +++ b/ports/espressif/common-hal/analogbufio/BufferedIn.c @@ -28,6 +28,7 @@ */ #include +#include "bindings/espidf/__init__.h" #include "common-hal/analogbufio/BufferedIn.h" #include "shared-bindings/analogbufio/BufferedIn.h" #include "shared-bindings/microcontroller/Pin.h" @@ -39,7 +40,6 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" -#include "driver/adc.h" // #define DEBUG_ANALOGBUFIO @@ -72,35 +72,10 @@ static void stop_dma(analogbufio_bufferedin_obj_t *self); void common_hal_analogbufio_bufferedin_construct(analogbufio_bufferedin_obj_t *self, const mcu_pin_obj_t *pin, uint32_t sample_rate) { self->pin = pin; self->sample_rate = sample_rate; -} - -static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_t *convert_mode, adc_digi_output_format_t *output_format) { - uint16_t adc1_chan_mask = 0; - uint16_t adc2_chan_mask = 0; - - const mcu_pin_obj_t *pin = self->pin; - uint32_t sample_rate = self->sample_rate; - - *output_format = ADC_DIGI_OUTPUT_FORMAT_TYPE1; - if (pin->adc_index == ADC_UNIT_1) { - *convert_mode = ADC_CONV_SINGLE_UNIT_1; - } else { - *convert_mode = ADC_CONV_SINGLE_UNIT_2; - } - if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) { raise_ValueError_invalid_pin(); } - /* - * Chip version Conversion Mode Output Format Type - * ESP32 1 TYPE1 - * ESP32S2 1,2,BOTH,ALTER TYPE1, TYPE2 - * ESP32C3 ALTER TYPE2 - * ESP32S3 1,2,BOTH,ALTER TYPE2 - * ESP32H3 1,2,BOTH,ALTER TYPE2 - */ - #if defined(CONFIG_IDF_TARGET_ESP32) if (pin->adc_index != ADC_UNIT_1) { /* @@ -112,6 +87,36 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ } #endif + // C3 and S3 have errata related to ADC2 and continuous mode. + #if (defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3)) && !defined(CONFIG_ADC_CONTINUOUS_FORCE_USE_ADC2_ON_C3_S3) + if (pin->adc_index != ADC_UNIT_1) { + raise_ValueError_invalid_pin(); + } + #endif + + common_hal_mcu_pin_claim(pin); +} + +static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_t *convert_mode, adc_digi_output_format_t *output_format) { + const mcu_pin_obj_t *pin = self->pin; + uint32_t sample_rate = self->sample_rate; + + *output_format = ADC_DIGI_OUTPUT_FORMAT_TYPE1; + if (pin->adc_index == ADC_UNIT_1) { + *convert_mode = ADC_CONV_SINGLE_UNIT_1; + } else { + *convert_mode = ADC_CONV_SINGLE_UNIT_2; + } + + /* + * Chip version Conversion Mode Output Format Type + * ESP32 1 TYPE1 + * ESP32S2 1,2,BOTH,ALTER TYPE1, TYPE2 + * ESP32C3 ALTER TYPE2 + * ESP32S3 1,2,BOTH,ALTER TYPE2 + * ESP32H3 1,2,BOTH,ALTER TYPE2 + */ + #if defined(CONFIG_IDF_TARGET_ESP32C3) /* ESP32C3 only supports alter mode */ *convert_mode = ADC_CONV_ALTER_UNIT; @@ -121,34 +126,21 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ *output_format = ADC_DIGI_OUTPUT_FORMAT_TYPE2; #endif - common_hal_mcu_pin_claim(pin); - - if (pin->adc_index == ADC_UNIT_1) { - adc1_chan_mask = 1 << pin->adc_channel; - } else { - adc2_chan_mask = 1 << pin->adc_channel; - } - - adc_digi_init_config_t adc_dma_config = { + adc_continuous_handle_cfg_t adc_dma_config = { .max_store_buf_size = DMA_BUFFER_SIZE, - .conv_num_each_intr = NUM_SAMPLES_PER_INTERRUPT, - .adc1_chan_mask = adc1_chan_mask, - .adc2_chan_mask = adc2_chan_mask, + .conv_frame_size = NUM_SAMPLES_PER_INTERRUPT * SOC_ADC_DIGI_DATA_BYTES_PER_CONV }; #if defined(DEBUG_ANALOGBUFIO) mp_printf(&mp_plat_print, "pin:%d, ADC channel:%d, ADC index:%d, adc1_chan_mask:0x%x, adc2_chan_mask:0x%x\n", pin->number, pin->adc_channel, pin->adc_index, adc1_chan_mask, adc2_chan_mask); #endif // DEBUG_ANALOGBUFIO - esp_err_t err = adc_digi_initialize(&adc_dma_config); + esp_err_t err = adc_continuous_new_handle(&adc_dma_config, &self->handle); if (ESP_OK != err) { stop_dma(self); - common_hal_analogbufio_bufferedin_deinit(self); - mp_raise_ValueError_varg(translate("Unable to initialize ADC DMA controller, ErrorCode:%d"), err); + CHECK_ESP_RESULT(err); } - adc_digi_configuration_t dig_cfg = { - .conv_limit_en = ADC_CONV_LIMIT_EN, - .conv_limit_num = 250, + adc_continuous_config_t dig_cfg = { .pattern_num = NUM_ADC_CHANNELS, .sample_freq_hz = sample_rate, .conv_mode = *convert_mode, @@ -174,25 +166,28 @@ static void start_dma(analogbufio_bufferedin_obj_t *self, adc_digi_convert_mode_ mp_printf(&mp_plat_print, "adc_pattern[0].channel:%d, adc_pattern[0].unit:%d, adc_pattern[0].atten:%d\n", adc_pattern[0].channel, adc_pattern[0].unit, adc_pattern[0].atten); #endif // DEBUG_ANALOGBUFIO - err = adc_digi_controller_configure(&dig_cfg); + err = adc_continuous_config(self->handle, &dig_cfg); if (ESP_OK != err) { stop_dma(self); - common_hal_analogbufio_bufferedin_deinit(self); - mp_raise_ValueError_varg(translate("Unable to configure ADC DMA controller, ErrorCode:%d"), err); + CHECK_ESP_RESULT(err); } - err = adc_digi_start(); + err = adc_continuous_start(self->handle); if (ESP_OK != err) { stop_dma(self); - common_hal_analogbufio_bufferedin_deinit(self); - mp_raise_ValueError_varg(translate("Unable to start ADC DMA controller, ErrorCode:%d"), err); + CHECK_ESP_RESULT(err); } + self->started = true; } static void stop_dma(analogbufio_bufferedin_obj_t *self) { - adc_digi_stop(); - adc_digi_deinitialize(); - // Release ADC Pin - reset_pin_number(self->pin->number); + if (self->started) { + adc_continuous_stop(self->handle); + self->started = false; + } + if (self->handle != NULL) { + adc_continuous_deinit(self->handle); + self->handle = NULL; + } } bool common_hal_analogbufio_bufferedin_deinited(analogbufio_bufferedin_obj_t *self) { @@ -203,6 +198,8 @@ void common_hal_analogbufio_bufferedin_deinit(analogbufio_bufferedin_obj_t *self if (common_hal_analogbufio_bufferedin_deinited(self)) { return; } + // Release ADC Pin + reset_pin_number(self->pin->number); self->pin = NULL; } @@ -242,7 +239,7 @@ static bool check_valid_data(const adc_digi_output_data_t *data, const mcu_pin_o } uint32_t common_hal_analogbufio_bufferedin_readinto(analogbufio_bufferedin_obj_t *self, uint8_t *buffer, uint32_t len, uint8_t bytes_per_sample) { - uint8_t result[NUM_SAMPLES_PER_INTERRUPT] __attribute__ ((aligned(4))) = {0}; + uint8_t result[NUM_SAMPLES_PER_INTERRUPT * SOC_ADC_DIGI_DATA_BYTES_PER_CONV] __attribute__ ((aligned(4))) = {0}; uint32_t captured_samples = 0; uint32_t captured_bytes = 0; esp_err_t ret; @@ -263,7 +260,7 @@ uint32_t common_hal_analogbufio_bufferedin_readinto(analogbufio_bufferedin_obj_t while (captured_bytes < len) { ret_num = 0; - ret = adc_digi_read_bytes(result, NUM_SAMPLES_PER_INTERRUPT, &ret_num, ADC_READ_TIMEOUT_MS); + ret = adc_continuous_read(self->handle, result, NUM_SAMPLES_PER_INTERRUPT * SOC_ADC_DIGI_DATA_BYTES_PER_CONV, &ret_num, ADC_READ_TIMEOUT_MS); if (ret == ESP_OK) { for (uint32_t i = 0; i < ret_num; i += ADC_RESULT_BYTE) { diff --git a/ports/espressif/common-hal/analogbufio/BufferedIn.h b/ports/espressif/common-hal/analogbufio/BufferedIn.h index 909455ca06..8e0695c57d 100644 --- a/ports/espressif/common-hal/analogbufio/BufferedIn.h +++ b/ports/espressif/common-hal/analogbufio/BufferedIn.h @@ -32,11 +32,15 @@ #include "common-hal/microcontroller/Pin.h" #include "py/obj.h" +#include "components/esp_adc/include/esp_adc/adc_continuous.h" + // This is the analogbufio object typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; uint32_t sample_rate; + adc_continuous_handle_t handle; + bool started; } analogbufio_bufferedin_obj_t; #endif // MICROPY_INCLUDED_ESP32_COMMON_HAL_ANALOGBUFIO_BUFFEREDIN_H diff --git a/ports/espressif/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c index d3a3349af6..b2bf7294f1 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.c +++ b/ports/espressif/common-hal/analogio/AnalogOut.c @@ -96,7 +96,9 @@ void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, void analogout_reset(void) { #ifdef SOC_DAC_SUPPORTED for (uint8_t c = 0; c < SOC_DAC_CHAN_NUM; c++) { - dac_oneshot_del_channel(_active_handles[c]); + if (_active_handles[c] != NULL) { + dac_oneshot_del_channel(_active_handles[c]); + } _active_handles[c] = NULL; } #endif diff --git a/ports/espressif/common-hal/audiobusio/I2SOut.c b/ports/espressif/common-hal/audiobusio/I2SOut.c index 8b03a534a4..33e5dd6ac0 100644 --- a/ports/espressif/common-hal/audiobusio/I2SOut.c +++ b/ports/espressif/common-hal/audiobusio/I2SOut.c @@ -44,7 +44,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate/translate.h" -#include "driver/i2s.h" +#include "driver/i2s_std.h" // Caller validates that pins are free. void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, @@ -53,15 +53,20 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, if (main_clock != NULL) { mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock); } - port_i2s_allocate_init(&self->peripheral, left_justified); + port_i2s_allocate_init(&self->i2s, left_justified); - i2s_pin_config_t i2s_pin_config = { - .bck_io_num = bit_clock->number, - .ws_io_num = word_select->number, - .data_out_num = data->number, - .data_in_num = I2S_PIN_NO_CHANGE, + i2s_std_config_t i2s_config = { + .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000), + .slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO), + .gpio_cfg = { + .mclk = I2S_GPIO_UNUSED, + .bclk = bit_clock->number, + .ws = word_select->number, + .dout = data->number, + .din = I2S_GPIO_UNUSED, + } }; - CHECK_ESP_RESULT(i2s_set_pin(self->peripheral.instance, &i2s_pin_config)); + CHECK_ESP_RESULT(i2s_channel_init_std_mode(self->i2s.handle, &i2s_config)); self->bit_clock = bit_clock; self->word_select = word_select; self->data = data; @@ -71,7 +76,7 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, } bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t *self) { - return self->peripheral.instance == -1; + return self->data == NULL; } void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { @@ -79,6 +84,10 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { return; } + common_hal_audiobusio_i2sout_stop(self); + + port_i2s_deinit(&self->i2s); + if (self->bit_clock) { reset_pin_number(self->bit_clock->number); } @@ -94,10 +103,6 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { } self->data = NULL; - if (self->peripheral.instance >= 0) { - port_i2s_reset_instance(self->peripheral.instance); - } - self->peripheral.instance = -1; } void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, @@ -105,27 +110,27 @@ void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, if (common_hal_audiobusio_i2sout_get_playing(self)) { common_hal_audiobusio_i2sout_stop(self); } - port_i2s_play(&self->peripheral, sample, loop); + port_i2s_play(&self->i2s, sample, loop); } void common_hal_audiobusio_i2sout_pause(audiobusio_i2sout_obj_t *self) { - port_i2s_pause(&self->peripheral); + port_i2s_pause(&self->i2s); } void common_hal_audiobusio_i2sout_resume(audiobusio_i2sout_obj_t *self) { - port_i2s_resume(&self->peripheral); + port_i2s_resume(&self->i2s); } bool common_hal_audiobusio_i2sout_get_paused(audiobusio_i2sout_obj_t *self) { - return port_i2s_paused(&self->peripheral); + return port_i2s_paused(&self->i2s); } void common_hal_audiobusio_i2sout_stop(audiobusio_i2sout_obj_t *self) { - port_i2s_stop(&self->peripheral); + port_i2s_stop(&self->i2s); } bool common_hal_audiobusio_i2sout_get_playing(audiobusio_i2sout_obj_t *self) { - return port_i2s_playing(&self->peripheral); + return port_i2s_playing(&self->i2s); } #endif // CIRCUITPY_AUDIOBUSIO_I2SOUT diff --git a/ports/espressif/common-hal/audiobusio/I2SOut.h b/ports/espressif/common-hal/audiobusio/I2SOut.h index 891e9af674..48ab26a42e 100644 --- a/ports/espressif/common-hal/audiobusio/I2SOut.h +++ b/ports/espressif/common-hal/audiobusio/I2SOut.h @@ -36,7 +36,7 @@ typedef struct { mp_obj_base_t base; - i2s_t peripheral; + i2s_t i2s; const mcu_pin_obj_t *bit_clock; const mcu_pin_obj_t *word_select; const mcu_pin_obj_t *data; diff --git a/ports/espressif/common-hal/audiobusio/__init__.c b/ports/espressif/common-hal/audiobusio/__init__.c index ff86fded7f..d05e40c772 100644 --- a/ports/espressif/common-hal/audiobusio/__init__.c +++ b/ports/espressif/common-hal/audiobusio/__init__.c @@ -35,70 +35,26 @@ #include "shared-module/audiocore/__init__.h" -#define I2S_QUEUE_SIZE (3) - -static i2s_t *i2s_instance[I2S_NUM_AUTO]; -static QueueHandle_t i2s_queues[I2S_NUM_AUTO]; -static TaskHandle_t i2s_tasks[I2S_NUM_AUTO]; - -void port_i2s_allocate_i2s0(void) { - if (!i2s_instance[0]) { - i2s_instance[0] = (void *)~(intptr_t)0; - return; - } - - mp_raise_RuntimeError(translate("Peripheral in use")); -} - -static int8_t port_i2s_allocate(void) { - #if defined(I2S_NUM_1) - if (!i2s_instance[1]) { - return 1; - } - #endif - if (!i2s_instance[0]) { - return 0; - } - - mp_raise_RuntimeError(translate("Peripheral in use")); -} - -void port_i2s_reset_instance(int i) { - assert(i >= 0 && i < I2S_NUM_AUTO); - if (i2s_tasks[i]) { - vTaskDelete(i2s_tasks[i]); - } - i2s_tasks[i] = NULL; - - (void)i2s_driver_uninstall(i); - i2s_instance[i] = NULL; -} - -void i2s_reset(void) { - for (int i = 0; i < I2S_NUM_AUTO; i++) { - port_i2s_reset_instance(i); - } -} - -#define I2S_WRITE_DELAY pdMS_TO_TICKS(1) +#define CIRCUITPY_BUFFER_COUNT 3 +#define CIRCUITPY_BUFFER_SIZE 1023 +#define CIRCUITPY_OUTPUT_SLOTS 2 static void i2s_fill_buffer(i2s_t *self) { - if (self->instance < 0 || self->instance >= I2S_NUM_AUTO) { + if (self->next_buffer_size == 0) { + // Error, no new buffer queued. return; } -#define STACK_BUFFER_SIZE (4096) - int16_t signed_samples[STACK_BUFFER_SIZE / sizeof(int16_t)]; - + int16_t *output_buffer = (int16_t *)self->next_buffer; + size_t output_buffer_size = self->next_buffer_size; + const size_t bytes_per_output_frame = 4; + size_t bytes_per_input_frame = self->channel_count * self->bytes_per_sample; if (!self->playing || self->paused || !self->sample || self->stopping) { - memset(signed_samples, 0, sizeof(signed_samples)); - - size_t bytes_written = 0; - do { - CHECK_ESP_RESULT(i2s_write(self->instance, signed_samples, sizeof(signed_samples), &bytes_written, I2S_WRITE_DELAY)); - } while (bytes_written != 0); + memset(output_buffer, 0, self->next_buffer_size); + self->next_buffer = NULL; + self->next_buffer_size = 0; return; } - while (!self->stopping) { + while (!self->stopping && output_buffer_size > 0) { if (self->sample_data == self->sample_end) { uint32_t sample_buffer_length; audioio_get_buffer_result_t get_buffer_result = @@ -118,51 +74,45 @@ static void i2s_fill_buffer(i2s_t *self) { break; } } - size_t bytes_written = 0; - size_t bytecount = self->sample_end - self->sample_data; + size_t sample_bytecount = self->sample_end - self->sample_data; + // The framecount is the minimum of space left in the output buffer or left in the incoming sample. + size_t framecount = MIN(output_buffer_size / bytes_per_output_frame, sample_bytecount / bytes_per_input_frame); if (self->samples_signed && self->channel_count == 2) { if (self->bytes_per_sample == 2) { - CHECK_ESP_RESULT(i2s_write(self->instance, self->sample_data, bytecount, &bytes_written, I2S_WRITE_DELAY)); + memcpy(output_buffer, self->sample_data, framecount * bytes_per_output_frame); } else { - CHECK_ESP_RESULT(i2s_write_expand(self->instance, self->sample_data, bytecount, 8, 16, &bytes_written, I2S_WRITE_DELAY)); + audiosample_convert_s8s_s16s(output_buffer, ((int8_t *)self->sample_data), framecount); } } else { - const size_t bytes_per_output_frame = 4; - size_t bytes_per_input_frame = self->channel_count * self->bytes_per_sample; - size_t framecount = MIN(STACK_BUFFER_SIZE / bytes_per_output_frame, bytecount / bytes_per_input_frame); if (self->samples_signed) { assert(self->channel_count == 1); if (self->bytes_per_sample == 1) { - audiosample_convert_s8m_s16s(signed_samples, (int8_t *)(void *)self->sample_data, framecount); + audiosample_convert_s8m_s16s(output_buffer, (int8_t *)(void *)self->sample_data, framecount); } else { - audiosample_convert_s16m_s16s(signed_samples, (int16_t *)(void *)self->sample_data, framecount); + audiosample_convert_s16m_s16s(output_buffer, (int16_t *)(void *)self->sample_data, framecount); } } else { if (self->channel_count == 1) { if (self->bytes_per_sample == 1) { - audiosample_convert_u8m_s16s(signed_samples, (uint8_t *)(void *)self->sample_data, framecount); + audiosample_convert_u8m_s16s(output_buffer, (uint8_t *)(void *)self->sample_data, framecount); } else { - audiosample_convert_u16m_s16s(signed_samples, (uint16_t *)(void *)self->sample_data, framecount); + audiosample_convert_u16m_s16s(output_buffer, (uint16_t *)(void *)self->sample_data, framecount); } } else { if (self->bytes_per_sample == 1) { - audiosample_convert_u8s_s16s(signed_samples, (uint8_t *)(void *)self->sample_data, framecount); + audiosample_convert_u8s_s16s(output_buffer, (uint8_t *)(void *)self->sample_data, framecount); } else { - audiosample_convert_u16s_s16s(signed_samples, (uint16_t *)(void *)self->sample_data, framecount); + audiosample_convert_u16s_s16s(output_buffer, (uint16_t *)(void *)self->sample_data, framecount); } } } - size_t expanded_bytes_written = 0; - CHECK_ESP_RESULT(i2s_write(self->instance, signed_samples, bytes_per_output_frame * framecount, &expanded_bytes_written, I2S_WRITE_DELAY)); - assert(expanded_bytes_written % 4 == 0); - bytes_written = expanded_bytes_written / bytes_per_output_frame * bytes_per_input_frame; - } - self->sample_data += bytes_written; - // We have filled the DMA buffer - if (!bytes_written) { - break; } + self->sample_data += framecount * bytes_per_input_frame; + output_buffer += framecount * CIRCUITPY_OUTPUT_SLOTS; + output_buffer_size -= framecount * bytes_per_output_frame; } + self->next_buffer = NULL; + self->next_buffer_size = 0; } static void i2s_callback_fun(void *self_in) { @@ -170,39 +120,41 @@ static void i2s_callback_fun(void *self_in) { i2s_fill_buffer(self); } -static void i2s_event_task(void *self_in) { +static bool i2s_event_interrupt(i2s_chan_handle_t handle, i2s_event_data_t *event, void *self_in) { i2s_t *self = self_in; - while (true) { - i2s_event_type_t event; - BaseType_t result = xQueueReceive(i2s_queues[self->instance], &event, portMAX_DELAY); - if (result && event == I2S_EVENT_TX_DONE) { - background_callback_add(&self->callback, i2s_callback_fun, self_in); - } - } + self->underrun = self->underrun || self->next_buffer != NULL; + self->next_buffer = *(int16_t **)event->data; + self->next_buffer_size = event->size; + background_callback_add(&self->callback, i2s_callback_fun, self_in); + return false; } void port_i2s_allocate_init(i2s_t *self, bool left_justified) { - self->instance = port_i2s_allocate(); - - i2s_config_t i2s_config = { - .mode = I2S_MODE_MASTER | I2S_MODE_TX, - .sample_rate = 44100, - .bits_per_sample = 16, - .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, - .communication_format = left_justified ? I2S_COMM_FORMAT_STAND_I2S : I2S_COMM_FORMAT_STAND_I2S, - .dma_buf_count = 3, - .dma_buf_len = 1024, // in _frames_, so 1024 is 4096 bytes per dma buf - .use_apll = false, + i2s_chan_config_t chan_config = { + .id = I2S_NUM_AUTO, + .role = I2S_ROLE_MASTER, + .dma_desc_num = CIRCUITPY_BUFFER_COUNT, + .dma_frame_num = CIRCUITPY_BUFFER_SIZE, // in _frames_, so 1023 is 4092 bytes per dma buf which is the maximum }; - CHECK_ESP_RESULT(i2s_driver_install(self->instance, &i2s_config, I2S_QUEUE_SIZE, &i2s_queues[self->instance])); - - if (!xTaskCreate(i2s_event_task, "I2S_task", 3 * configMINIMAL_STACK_SIZE, self, CONFIG_PTHREAD_TASK_PRIO_DEFAULT, &i2s_tasks[self->instance])) { - mp_raise_OSError_msg(translate("xTaskCreate failed")); + esp_err_t err = i2s_new_channel(&chan_config, &self->handle, NULL); + if (err == ESP_ERR_NOT_FOUND) { + mp_raise_RuntimeError(translate("Peripheral in use")); } - i2s_instance[self->instance] = self; + i2s_event_callbacks_t callbacks = { + .on_recv = NULL, + .on_recv_q_ovf = NULL, + .on_sent = i2s_event_interrupt, + .on_send_q_ovf = NULL, + }; + i2s_channel_register_event_callback(self->handle, &callbacks, self); } +void port_i2s_deinit(i2s_t *self) { + port_i2s_stop(self); + i2s_del_channel(self->handle); + self->handle = NULL; +} void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { self->sample = sample; @@ -216,9 +168,6 @@ void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { audiosample_get_buffer_structure(sample, false, &single_buffer, &samples_signed, &max_buffer_length, &spacing); self->samples_signed = samples_signed; - self->playing = true; - self->paused = false; - self->stopping = false; self->sample_data = self->sample_end = NULL; // We always output stereo so output twice as many bits. // uint16_t bits_per_sample_output = bits_per_sample * 2; @@ -226,12 +175,32 @@ void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { audiosample_reset_buffer(self->sample, false, 0); uint32_t sample_rate = audiosample_sample_rate(sample); - if (sample_rate != self->i2s_config.sample_rate) { - CHECK_ESP_RESULT(i2s_set_sample_rates(self->instance, audiosample_sample_rate(sample))); - self->i2s_config.sample_rate = sample_rate; + i2s_std_clk_config_t clk_config = I2S_STD_CLK_DEFAULT_CONFIG(sample_rate); + CHECK_ESP_RESULT(i2s_channel_reconfig_std_clock(self->handle, &clk_config)); + + // preload the data + self->playing = true; + self->paused = false; + self->stopping = false; + // This will be slow but we can't rewind the underlying sample. So, we will + // preload one frame at a time and drop the last sample that can't fit. + // We cap ourselves at the max DMA set to prevent a sample drop if starting + // fresh. + uint32_t starting_frame; + size_t bytes_loaded = 4; + size_t preloaded = 0; + while (bytes_loaded > 0 && preloaded < CIRCUITPY_BUFFER_SIZE * CIRCUITPY_BUFFER_COUNT) { + self->next_buffer = &starting_frame; + self->next_buffer_size = sizeof(starting_frame); + i2s_fill_buffer(self); + i2s_channel_preload_data(self->handle, &starting_frame, sizeof(uint32_t), &bytes_loaded); + preloaded += 1; } - background_callback_add(&self->callback, i2s_callback_fun, self); + // enable the channel + i2s_channel_enable(self->handle); + + // The IDF will call us back when there is a free DMA buffer. } bool port_i2s_playing(i2s_t *self) { @@ -243,8 +212,8 @@ bool port_i2s_paused(i2s_t *self) { } void port_i2s_stop(i2s_t *self) { + port_i2s_pause(self); self->sample = NULL; - self->paused = false; self->playing = false; self->stopping = false; } @@ -252,13 +221,13 @@ void port_i2s_stop(i2s_t *self) { void port_i2s_pause(i2s_t *self) { if (!self->paused) { self->paused = true; - CHECK_ESP_RESULT(i2s_stop(self->instance)); + CHECK_ESP_RESULT(i2s_channel_disable(self->handle)); } } void port_i2s_resume(i2s_t *self) { if (self->paused) { self->paused = false; - CHECK_ESP_RESULT(i2s_start(self->instance)); + CHECK_ESP_RESULT(i2s_channel_enable(self->handle)); } } diff --git a/ports/espressif/common-hal/audiobusio/__init__.h b/ports/espressif/common-hal/audiobusio/__init__.h index 00dc99d30a..a2e397828a 100644 --- a/ports/espressif/common-hal/audiobusio/__init__.h +++ b/ports/espressif/common-hal/audiobusio/__init__.h @@ -30,7 +30,7 @@ #include "supervisor/background_callback.h" -#include "driver/i2s.h" +#include "driver/i2s_std.h" typedef struct { mp_obj_t *sample; @@ -42,23 +42,22 @@ typedef struct { bool samples_signed; int8_t bytes_per_sample; int8_t channel_count; - int8_t instance; uint16_t buffer_length; uint8_t *sample_data, *sample_end; - i2s_config_t i2s_config; + void *next_buffer; + size_t next_buffer_size; + i2s_chan_handle_t handle; background_callback_t callback; + bool underrun; } i2s_t; void port_i2s_allocate_init(i2s_t *self, bool left_justified); -void port_i2s_reset_instance(int i); -void i2s_reset(void); +void port_i2s_deinit(i2s_t *self); + void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop); void port_i2s_stop(i2s_t *self); bool port_i2s_playing(i2s_t *self); bool port_i2s_paused(i2s_t *self); void port_i2s_pause(i2s_t *self); void port_i2s_resume(i2s_t *self); - -// some uses (imagecapture) can only operate on i2s0 and need their own init code -void port_i2s_allocate_i2s0(void); diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults index 9bcb508016..de30ada541 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32.defaults @@ -28,12 +28,6 @@ CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # end of RMT Configuration -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults index ea0223c3e4..76a7924f67 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -41,12 +41,6 @@ CONFIG_BT_NIMBLE_EXT_ADV=y CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # end of RMT Configuration -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults index 02516de4e4..c1776fc47c 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c6.defaults @@ -41,12 +41,6 @@ CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # end of RMT Configuration -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults index 02516de4e4..c1776fc47c 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32h2.defaults @@ -41,12 +41,6 @@ CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # end of RMT Configuration -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults index 232772a4af..eba36817a8 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -19,12 +19,6 @@ CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # end of RMT Configuration -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults index 7975246ee4..5f58a14dae 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -49,12 +49,6 @@ CONFIG_PCNT_SUPPRESS_DEPRECATE_WARN=y CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y # end of RMT Configuration -# -# I2S Configuration -# -CONFIG_I2S_SUPPRESS_DEPRECATE_WARN=y -# end of I2S Configuration - # end of Driver Configurations # diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 811d35eb51..74c9019d99 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -13,12 +13,6 @@ CONFIG_PARTITION_TABLE_CUSTOM=y # # Driver Configurations # -# -# Legacy ADC Configuration -# -CONFIG_ADC_SUPPRESS_DEPRECATE_WARN=y -# end of Legacy ADC Configuration - # # GPTimer Configuration # diff --git a/ports/espressif/esp-iot-solution b/ports/espressif/esp-iot-solution deleted file mode 160000 index d07eb2733c..0000000000 --- a/ports/espressif/esp-iot-solution +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d07eb2733ca5d3379578f3952de04b4a4d188f36 diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index e537ba3ed4..a7960b8eea 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -36,6 +36,7 @@ CIRCUITPY_I2CTARGET ?= 1 CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_MEMORYMAP ?= 1 CIRCUITPY_NVM ?= 1 +CIRCUITPY_PARALLELDISPLAY ?= 0 # Turn off because it uses the old I2S driver which conflicts with the new ADC driver. CIRCUITPY_PS2IO ?= 1 # Disabled temporarily CIRCUITPY_RGBMATRIX ?= 0 diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index e5a6539f61..5d759c6612 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -49,7 +49,7 @@ extern const mp_obj_type_t mcu_pin_type; #define NO_PIN (GPIO_NUM_NC) -#define NO_ADC 0 +#define NO_ADC SOC_ADC_PERIPH_NUM #define NO_ADC_CHANNEL SOC_ADC_MAX_CHANNEL_NUM #define NO_TOUCH_CHANNEL TOUCH_PAD_MAX diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 609096cc3f..8962fb870f 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -74,10 +74,6 @@ #include "peripherals/touch.h" #endif -#if CIRCUITPY_AUDIOBUSIO -#include "common-hal/audiobusio/__init__.h" -#endif - #if CIRCUITPY_BLEIO #include "shared-bindings/_bleio/__init__.h" #endif @@ -388,10 +384,6 @@ void reset_port(void) { analogout_reset(); #endif - #if CIRCUITPY_AUDIOBUSIO - i2s_reset(); - #endif - #if CIRCUITPY_BUSIO i2c_reset(); spi_reset(); From fdab0f7212f3fd3a55c0ffe538ec231a62086f19 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 27 Sep 2023 18:13:54 +0200 Subject: [PATCH 126/129] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 32 +++++++--------------------- locale/cs.po | 29 +++++-------------------- locale/de_DE.po | 45 ++++++++++++++++++--------------------- locale/el.po | 29 +++++-------------------- locale/en_GB.po | 44 +++++++++++++++++--------------------- locale/es.po | 46 ++++++++++++++++++---------------------- locale/fil.po | 26 ++--------------------- locale/fr.po | 32 +++++++--------------------- locale/hi.po | 26 ++--------------------- locale/it_IT.po | 29 +++++-------------------- locale/ja.po | 26 ++--------------------- locale/ko.po | 26 ++--------------------- locale/nl.po | 29 +++++-------------------- locale/pl.po | 29 +++++-------------------- locale/pt_BR.po | 44 +++++++++++++++++--------------------- locale/ru.po | 44 +++++++++++++++++--------------------- locale/sv.po | 44 +++++++++++++++++--------------------- locale/tr.po | 29 +++++-------------------- locale/zh_Latn_pinyin.po | 44 +++++++++++++++++--------------------- 19 files changed, 196 insertions(+), 457 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 9bbc16b76e..73369c3774 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -450,10 +450,6 @@ msgstr "pow() 3-arg tidak didukung" msgid "A hardware interrupt channel is already in use" msgstr "Sebuah channel hardware interrupt sedang digunakan" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 sedang digunakan oleh WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2180,11 +2176,6 @@ msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2203,20 +2194,10 @@ msgstr "Tidak dapat menemukan GCLK yang kosong" msgid "Unable to init parser" msgstr "Tidak dapat memulai parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Tidak dapat membaca data palet warna" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4234,7 +4215,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "argumen keyword tidak diharapkan" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "keyword argumen '%q' tidak diharapkan" @@ -4391,10 +4373,6 @@ msgstr "jumlah nilai yang salah untuk dibongkar" msgid "wrong output type" msgstr "tipe output salah" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate gagal" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi harus ndarray" @@ -4407,6 +4385,12 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 sedang digunakan oleh WiFi" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate gagal" + #~ msgid "queue overflow" #~ msgstr "antrian meluap (overflow)" diff --git a/locale/cs.po b/locale/cs.po index 564fdb4689..5f4c7f1df1 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -451,10 +451,6 @@ msgstr "pow() nepodporuje 3 argumenty" msgid "A hardware interrupt channel is already in use" msgstr "Kanál hardwarového přerušení je již používán" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "WiFi používá ADC2" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2169,11 +2165,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2192,20 +2183,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4220,7 +4201,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4377,10 +4359,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4393,6 +4371,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "WiFi používá ADC2" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "Objekt 'coroutine' není iterátor" diff --git a/locale/de_DE.po b/locale/de_DE.po index 7282d7a399..aa17cf6313 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -458,10 +458,6 @@ msgstr "3-arg pow() wird nicht unterstützt" msgid "A hardware interrupt channel is already in use" msgstr "Ein Hardware Interrupt Kanal wird schon benutzt" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 wird vom WiFi benutzt" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2207,11 +2203,6 @@ msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" msgid "Unable to allocate the heap." msgstr "Keine Allokation auf dem Heap möglich." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "ADC-DMA-Controller konnte nicht konfiguriert werden, Fehlercode: %d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Lock kann nicht erzeugt werden" @@ -2230,20 +2221,10 @@ msgstr "Konnte keinen freien GCLK finden" msgid "Unable to init parser" msgstr "Parser konnte nicht gestartet werden" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "ADC-DMA-Controller konnte nicht initialisiert werden, Fehlercode: %d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Konnte Farbpalettendaten nicht lesen" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "ADC-DMA-Controller konnte nicht gestartet werden, Fehlercode: %d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4302,7 +4283,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "unerwartetes Schlüsselwort-Argument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "unerwartetes Schlüsselwort-Argument '%q'" @@ -4459,10 +4441,6 @@ msgstr "falsche Anzahl zu entpackender Werte" msgid "wrong output type" msgstr "Falscher Ausgabetyp" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate fehlgeschlagen" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi muss ein ndarray sein" @@ -4475,6 +4453,25 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 wird vom WiFi benutzt" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "ADC-DMA-Controller konnte nicht konfiguriert werden, Fehlercode: %d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "" +#~ "ADC-DMA-Controller konnte nicht initialisiert werden, Fehlercode: %d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "ADC-DMA-Controller konnte nicht gestartet werden, Fehlercode: %d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate fehlgeschlagen" + #~ msgid "Unable to write to address." #~ msgstr "An die Adresse kann nicht geschrieben werden." diff --git a/locale/el.po b/locale/el.po index 350c6cf713..086718f45b 100644 --- a/locale/el.po +++ b/locale/el.po @@ -459,10 +459,6 @@ msgstr "pow() με 3 παραμέτρους δεν υποστηρίζεται" msgid "A hardware interrupt channel is already in use" msgstr "Ένα κανάλι interrupt υλικού είναι ήδη σε χρήση" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "Το ADC2 χρησιμοποιείται απο το WIFI" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2182,11 +2178,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2205,20 +2196,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4233,7 +4214,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4390,10 +4372,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4406,6 +4384,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "Το ADC2 χρησιμοποιείται απο το WIFI" + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/en_GB.po b/locale/en_GB.po index 158b5a1c9c..8c8ad14d5a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -460,10 +460,6 @@ msgstr "3-arg pow() not supported" msgid "A hardware interrupt channel is already in use" msgstr "A hardware interrupt channel is already in use" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 is being used by WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "AP could not be started" @@ -2185,11 +2181,6 @@ msgstr "Unable to allocate buffers for signed conversion" msgid "Unable to allocate the heap." msgstr "Unable to allocate the heap." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Unable to configure ADC DMA controller, ErrorCode:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Unable to create lock" @@ -2208,20 +2199,10 @@ msgstr "Unable to find free GCLK" msgid "Unable to init parser" msgstr "Unable to init parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Unable to initialise ADC DMA controller, ErrorCode:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Unable to read colour palette data" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Unable to start ADC DMA controller, ErrorCode:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4248,7 +4229,8 @@ msgstr "unexpected indent" msgid "unexpected keyword argument" msgstr "unexpected keyword argument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "unexpected keyword argument '%q'" @@ -4405,10 +4387,6 @@ msgstr "wrong number of values to unpack" msgid "wrong output type" msgstr "wrong output type" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate failed" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi must be an ndarray" @@ -4421,6 +4399,24 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 is being used by WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Unable to configure ADC DMA controller, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Unable to initialise ADC DMA controller, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Unable to start ADC DMA controller, ErrorCode:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate failed" + #~ msgid "Unable to write to address." #~ msgstr "Unable to write to address." diff --git a/locale/es.po b/locale/es.po index d1f2891c54..c1b8b53df1 100644 --- a/locale/es.po +++ b/locale/es.po @@ -462,10 +462,6 @@ msgstr "pow() con 3 argumentos no soportado" msgid "A hardware interrupt channel is already in use" msgstr "Un canal de interrupción por hardware ya está en uso" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 está siendo usado por WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2221,11 +2217,6 @@ msgstr "No se pudieron asignar buffers para la conversión con signo" msgid "Unable to allocate the heap." msgstr "Imposible de asignar el heap." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Imposible de configurar el controlador ADC DMA , código de error:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "No se puede crear bloqueo" @@ -2244,21 +2235,10 @@ msgstr "No se pudo encontrar un GCLK libre" msgid "Unable to init parser" msgstr "Incapaz de inicializar el parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" -"No es posible de inicializar el controlador ADC DMA, código de error:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "No se pudo leer los datos de la paleta de colores" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Imposible de iniciar el controlador ADC DMA, código de error:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4298,7 +4278,8 @@ msgstr "sangría inesperada" msgid "unexpected keyword argument" msgstr "argumento por palabra clave inesperado" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "argumento por palabra clave inesperado '%q'" @@ -4455,10 +4436,6 @@ msgstr "numero erroneo de valores a descomprimir" msgid "wrong output type" msgstr "tipo de salida incorrecta" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "fallo en xTaskCreate" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi debe ser un ndarray" @@ -4471,6 +4448,25 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 está siendo usado por WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Imposible de configurar el controlador ADC DMA , código de error:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "" +#~ "No es posible de inicializar el controlador ADC DMA, código de error:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Imposible de iniciar el controlador ADC DMA, código de error:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "fallo en xTaskCreate" + #~ msgid "Unable to write to address." #~ msgstr "Imposible de escribir en esa dirección." diff --git a/locale/fil.po b/locale/fil.po index 739d957998..7fcc48e35c 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -449,10 +449,6 @@ msgstr "3-arg pow() hindi suportado" msgid "A hardware interrupt channel is already in use" msgstr "Isang channel ng hardware interrupt ay ginagamit na" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2170,11 +2166,6 @@ msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2193,20 +2184,10 @@ msgstr "Hindi mahanap ang libreng GCLK" msgid "Unable to init parser" msgstr "Hindi ma-init ang parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4241,7 +4222,8 @@ msgstr "hindi inaasahang indent" msgid "unexpected keyword argument" msgstr "hindi inaasahang argumento ng keyword" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "hindi inaasahang argumento ng keyword na '%q'" @@ -4398,10 +4380,6 @@ msgstr "maling number ng value na i-unpack" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 10b20a3d51..b8b53001cf 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -461,10 +461,6 @@ msgstr "pow() non supporté avec 3 paramètres" msgid "A hardware interrupt channel is already in use" msgstr "Un canal d'interruptions matériel est déjà utilisé" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 est utilisé pars le Wifi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2228,11 +2224,6 @@ msgstr "Impossible d'allouer des tampons pour une conversion signée" msgid "Unable to allocate the heap." msgstr "Impossible d'allouer le tas." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Impossible de créer un verrou ('lock')" @@ -2251,20 +2242,10 @@ msgstr "Impossible de trouver un GCLK libre" msgid "Unable to init parser" msgstr "Impossible d'initialiser le parser" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Impossible de lire les données de la palette de couleurs" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4318,7 +4299,8 @@ msgstr "indentation inattendue" msgid "unexpected keyword argument" msgstr "paramètre nommé inattendu" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "paramètre nommé '%q' inattendu" @@ -4475,10 +4457,6 @@ msgstr "mauvais nombre de valeurs à dégrouper" msgid "wrong output type" msgstr "type de sortie incorrect" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "Échec de xTaskCreate" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi doit être un ndarray" @@ -4491,6 +4469,12 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 est utilisé pars le Wifi" + +#~ msgid "xTaskCreate failed" +#~ msgstr "Échec de xTaskCreate" + #~ msgid "Unable to write to address." #~ msgstr "L'écriture a échoué." diff --git a/locale/hi.po b/locale/hi.po index 87f0f9ec35..3a08024011 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -447,10 +447,6 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2156,11 +2152,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2179,20 +2170,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4207,7 +4188,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4364,10 +4346,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index f4b862ac4c..e8fb475d1a 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -452,10 +452,6 @@ msgstr "pow() con tre argmomenti non supportata" msgid "A hardware interrupt channel is already in use" msgstr "Un canale di interruzione hardware è già in uso" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 sta usando il WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2177,11 +2173,6 @@ msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2200,20 +2191,10 @@ msgstr "Impossibile trovare un GCLK libero" msgid "Unable to init parser" msgstr "Inizilizzazione del parser non possibile" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4251,7 +4232,8 @@ msgstr "indentazione inaspettata" msgid "unexpected keyword argument" msgstr "argomento nominato inaspettato" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "argomento nominato '%q' inaspettato" @@ -4408,10 +4390,6 @@ msgstr "numero di valori da scompattare non corretto" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4424,6 +4402,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 sta usando il WiFi" + #~ msgid "queue overflow" #~ msgstr "overflow della coda" diff --git a/locale/ja.po b/locale/ja.po index efe1ba664e..01a9ed389d 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -454,10 +454,6 @@ msgstr "引数3つのpow()は非対応" msgid "A hardware interrupt channel is already in use" msgstr "ハードウェア割り込みチャネルは使用中" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2171,11 +2167,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2194,20 +2185,10 @@ msgstr "" msgid "Unable to init parser" msgstr "パーザを初期化できません" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "カラーパレットデータを読み込めません" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4227,7 +4208,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "キーワード引数'%q'は使えません" @@ -4384,10 +4366,6 @@ msgstr "アンパックする値の個数が不正です" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "ziはndarrayでなければなりません" diff --git a/locale/ko.po b/locale/ko.po index 1ff7ddc557..a07596e9df 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -448,10 +448,6 @@ msgstr "" msgid "A hardware interrupt channel is already in use" msgstr "" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2160,11 +2156,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2183,20 +2174,10 @@ msgstr "" msgid "Unable to init parser" msgstr "파서를 초기화(init) 할 수 없습니다" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4211,7 +4192,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4368,10 +4350,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 6ddb299e45..7372014908 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -447,10 +447,6 @@ msgstr "3-arg pow() niet ondersteund" msgid "A hardware interrupt channel is already in use" msgstr "Een hardware interrupt kanaal is al in gebruik" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 wordt gebruikt door WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2175,11 +2171,6 @@ msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Kan vergrendeling niet maken" @@ -2198,20 +2189,10 @@ msgstr "Niet in staat een vrije GCLK te vinden" msgid "Unable to init parser" msgstr "Niet in staat om de parser te initialiseren" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Niet in staat kleurenpalet data te lezen" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4239,7 +4220,8 @@ msgstr "onverwachte inspringing" msgid "unexpected keyword argument" msgstr "onverwacht trefwoordargument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "onverwacht trefwoordargument '%q'" @@ -4396,10 +4378,6 @@ msgstr "verkeerd aantal waarden om uit te pakken" msgid "wrong output type" msgstr "onjuist uitvoer type" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi moet een ndarray zijn" @@ -4412,6 +4390,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 wordt gebruikt door WiFi" + #~ msgid "queue overflow" #~ msgstr "wachtrij overloop" diff --git a/locale/pl.po b/locale/pl.po index 77e5af1268..d1879d98b7 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -449,10 +449,6 @@ msgstr "3-argumentowy pow() jest niewspierany" msgid "A hardware interrupt channel is already in use" msgstr "Kanał przerwań sprzętowych w użyciu" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 jest używany przez WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2162,11 +2158,6 @@ msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2185,20 +2176,10 @@ msgstr "Brak wolnego GCLK" msgid "Unable to init parser" msgstr "Błąd ustawienia parsera" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Nie można odczytać danych palety" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4214,7 +4195,8 @@ msgstr "złe wcięcie" msgid "unexpected keyword argument" msgstr "zły argument nazwany" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "zły argument nazwany '%q'" @@ -4371,10 +4353,6 @@ msgstr "zła liczba wartości do rozpakowania" msgid "wrong output type" msgstr "nieprawidłowy typ wyjścia" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4387,6 +4365,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 jest używany przez WiFi" + #~ msgid "queue overflow" #~ msgstr "przepełnienie kolejki" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index a3bbce9653..bb2cbfe806 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -464,10 +464,6 @@ msgstr "3-arg pow() não compatível" msgid "A hardware interrupt channel is already in use" msgstr "Um canal de interrupção de hardware já está em uso" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "O ADC2 está sendo usado pelo WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "Não foi possível iniciar o AP" @@ -2222,11 +2218,6 @@ msgstr "Não é possível alocar buffers para conversão assinada" msgid "Unable to allocate the heap." msgstr "Não é possível alocar a área de alocação dinâmica de variáveis." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Não foi possível configurar o controlador ADC DMA, ErrorCode:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Não é possível criar um lock" @@ -2245,20 +2236,10 @@ msgstr "Não é possível encontrar GCLK livre" msgid "Unable to init parser" msgstr "Não foi possível iniciar o analisador" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Não foi possível inicializar o controlador ADC DMA, ErrorCode:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Não foi possível ler os dados da paleta de cores" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Não foi possível iniciar o controlador ADC DMA, ErrorCode:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4306,7 +4287,8 @@ msgstr "recuo inesperado" msgid "unexpected keyword argument" msgstr "argumento inesperado da palavra-chave" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "argumento inesperado da palavra-chave '%q'" @@ -4463,10 +4445,6 @@ msgstr "quantidade incorreta dos valores para descompressão" msgid "wrong output type" msgstr "tipo da saída incorreta" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "o xTaskCreate falhou" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi deve ser um ndarray" @@ -4479,6 +4457,24 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "O ADC2 está sendo usado pelo WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Não foi possível configurar o controlador ADC DMA, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Não foi possível inicializar o controlador ADC DMA, ErrorCode:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Não foi possível iniciar o controlador ADC DMA, ErrorCode:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "o xTaskCreate falhou" + #~ msgid "Unable to write to address." #~ msgstr "Não é possível gravar no endereço." diff --git a/locale/ru.po b/locale/ru.po index 7f4b6088bb..8c5846b8ae 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -463,10 +463,6 @@ msgstr "Pow() с 3 аргументами не поддерживается" msgid "A hardware interrupt channel is already in use" msgstr "Канал аппаратного прерывания уже используется" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 используется WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "AP не может быть запущен" @@ -2224,11 +2220,6 @@ msgstr "Не удается выделить буферы для подписа msgid "Unable to allocate the heap." msgstr "Невозможно выделить кучу." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Невозможно настроить контроллер ADC DMA, код ошибки:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Не удается создать блокировку" @@ -2247,20 +2238,10 @@ msgstr "Не удается найти бесплатный GCLK" msgid "Unable to init parser" msgstr "Не удается инициировать синтаксический анализатор" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Невозможно инициализировать контроллер ADC DMA, код ошибки:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Не удается прочитать данные цветовой палитры" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Не удается запустить контроллер ADC DMA, код ошибки:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4314,7 +4295,8 @@ msgstr "Неожиданный отступ" msgid "unexpected keyword argument" msgstr "Неожиданный аргумент ключевого слова" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "неожиданный аргумент ключевого слова '%q'" @@ -4471,10 +4453,6 @@ msgstr "Неправильное количество значений для р msgid "wrong output type" msgstr "неверный тип вывода" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "x Создать задачу не удалось" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "зи, должно быть, массивом ndarray" @@ -4487,6 +4465,24 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 используется WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Невозможно настроить контроллер ADC DMA, код ошибки:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Невозможно инициализировать контроллер ADC DMA, код ошибки:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Не удается запустить контроллер ADC DMA, код ошибки:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "x Создать задачу не удалось" + #~ msgid "Unable to write to address." #~ msgstr "Невозможно написать на адрес." diff --git a/locale/sv.po b/locale/sv.po index 90ba90457a..11bd679480 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -461,10 +461,6 @@ msgstr "3-arguments pow() stöds inte" msgid "A hardware interrupt channel is already in use" msgstr "En kanal för hårdvaruavbrott används redan" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 används av WiFi" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "Kunde inte starta AP" @@ -2196,11 +2192,6 @@ msgstr "Det går inte att allokera buffert för signerad konvertering" msgid "Unable to allocate the heap." msgstr "Kan inte allokera heap." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "Kan inte konfigurera ADC DMA controller, Felkod:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Kan inte skapa lås" @@ -2219,20 +2210,10 @@ msgstr "Det gick inte att hitta ledig GCLK" msgid "Unable to init parser" msgstr "Kan inte initiera tolken" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "Kan inte inititiera ADC DMA-controller, Felkod:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Det går inte att läsa färgpalettdata" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "Kan inte starta ADC DMA controller, Felkod:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4265,7 +4246,8 @@ msgstr "oväntat indrag" msgid "unexpected keyword argument" msgstr "oväntat nyckelordsargument" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "oväntat nyckelordsargument '%q'" @@ -4422,10 +4404,6 @@ msgstr "fel antal värden för att packa upp" msgid "wrong output type" msgstr "fel utdatatyp" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate misslyckades" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi måste vara en ndarray" @@ -4438,6 +4416,24 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 används av WiFi" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "Kan inte konfigurera ADC DMA controller, Felkod:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "Kan inte inititiera ADC DMA-controller, Felkod:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "Kan inte starta ADC DMA controller, Felkod:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate misslyckades" + #~ msgid "Unable to write to address." #~ msgstr "Det går inte att skriva till adress." diff --git a/locale/tr.po b/locale/tr.po index 66aee1321d..069b0bba3e 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -456,10 +456,6 @@ msgstr "3-argümanlı pow() desteklenmemektedir" msgid "A hardware interrupt channel is already in use" msgstr "Bir donanım kesme kanalı halihazırda kullanılmaktadır" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2, WiFi tarafından kullanılmaktadır" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "" @@ -2176,11 +2172,6 @@ msgstr "" msgid "Unable to allocate the heap." msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "" @@ -2199,20 +2190,10 @@ msgstr "" msgid "Unable to init parser" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4227,7 +4208,8 @@ msgstr "" msgid "unexpected keyword argument" msgstr "" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "" @@ -4384,10 +4366,6 @@ msgstr "" msgid "wrong output type" msgstr "" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "" @@ -4400,6 +4378,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2, WiFi tarafından kullanılmaktadır" + #~ msgid "'coroutine' object is not an iterator" #~ msgstr "'coroutine' nesnesi bir iteratör değildir" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 3cf7b93b0d..558fa37016 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -462,10 +462,6 @@ msgstr "bù zhī chí 3-arg pow()" msgid "A hardware interrupt channel is already in use" msgstr "Yìngjiàn zhōngduàn tōngdào yǐ zài shǐyòng zhōng" -#: ports/espressif/common-hal/analogio/AnalogIn.c -msgid "ADC2 is being used by WiFi" -msgstr "ADC2 zhèngzài bèi WiFi shǐ yòng" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" msgstr "wúfǎ qǐdòng AP" @@ -2199,11 +2195,6 @@ msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn" msgid "Unable to allocate the heap." msgstr "wú fǎ fēn pèi duī." -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to configure ADC DMA controller, ErrorCode:%d" -msgstr "wú fǎ pèi zhì ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" - #: ports/espressif/common-hal/busio/I2C.c msgid "Unable to create lock" msgstr "Wúfǎ chuàngjiàn suǒ" @@ -2222,20 +2213,10 @@ msgstr "Wúfǎ zhǎodào miǎnfèi de GCLK" msgid "Unable to init parser" msgstr "Wúfǎ chūshǐhuà jiěxī qì" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" -msgstr "wú fǎ chū shǐ huà ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" - #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" msgstr "Wúfǎ dúqǔ tiáosèbǎn shùjù" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -#, c-format -msgid "Unable to start ADC DMA controller, ErrorCode:%d" -msgstr "wú fǎ qǐ dòng ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" - #: ports/espressif/common-hal/mdns/Server.c #: ports/raspberrypi/common-hal/mdns/Server.c msgid "Unable to start mDNS query" @@ -4270,7 +4251,8 @@ msgstr "wèi yùliào de suō jìn" msgid "unexpected keyword argument" msgstr "yìwài de guānjiàn cí cānshù" -#: py/bc.c py/objnamedtuple.c shared-bindings/traceback/__init__.c +#: py/argcheck.c py/bc.c py/objnamedtuple.c +#: shared-bindings/traceback/__init__.c msgid "unexpected keyword argument '%q'" msgstr "yìwài de guānjiàn cí cānshù '%q'" @@ -4427,10 +4409,6 @@ msgstr "wúfǎ jiě bāo de zhí shù" msgid "wrong output type" msgstr "cuòwù de shūchū lèixíng" -#: ports/espressif/common-hal/audiobusio/__init__.c -msgid "xTaskCreate failed" -msgstr "xTaskCreate shī bài" - #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be an ndarray" msgstr "zi bìxū shì ndarray" @@ -4443,6 +4421,24 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "ADC2 is being used by WiFi" +#~ msgstr "ADC2 zhèngzài bèi WiFi shǐ yòng" + +#, c-format +#~ msgid "Unable to configure ADC DMA controller, ErrorCode:%d" +#~ msgstr "wú fǎ pèi zhì ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" + +#, c-format +#~ msgid "Unable to initialize ADC DMA controller, ErrorCode:%d" +#~ msgstr "wú fǎ chū shǐ huà ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" + +#, c-format +#~ msgid "Unable to start ADC DMA controller, ErrorCode:%d" +#~ msgstr "wú fǎ qǐ dòng ADC DMA kòng zhì qì, cuò wù dài mǎ:%d" + +#~ msgid "xTaskCreate failed" +#~ msgstr "xTaskCreate shī bài" + #~ msgid "Unable to write to address." #~ msgstr "Wú fǎ xiě rù dì zhǐ." From ad837d44eda9de444c64821d8cef5b095d878580 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 27 Sep 2023 09:16:38 -0700 Subject: [PATCH 127/129] Tweak for make quirk --- ports/espressif/mpconfigport.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index a7960b8eea..cc2ddf9f07 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -36,7 +36,8 @@ CIRCUITPY_I2CTARGET ?= 1 CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_MEMORYMAP ?= 1 CIRCUITPY_NVM ?= 1 -CIRCUITPY_PARALLELDISPLAY ?= 0 # Turn off because it uses the old I2S driver which conflicts with the new ADC driver. +# Turn off because it uses the old I2S driver which conflicts with the new ADC driver. +CIRCUITPY_PARALLELDISPLAY ?= 0 CIRCUITPY_PS2IO ?= 1 # Disabled temporarily CIRCUITPY_RGBMATRIX ?= 0 From f80d08e207b11eea3d45cf253d141fd62d6e1d1c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 27 Sep 2023 14:07:00 -0500 Subject: [PATCH 128/129] Make dot clock displays with a masked portion on the left work --- .../dotclockframebuffer/DotClockFramebuffer.c | 11 +++++--- .../dotclockframebuffer/DotClockFramebuffer.h | 1 + .../dotclockframebuffer/DotClockFramebuffer.c | 25 +++++++++++++++++++ .../dotclockframebuffer/DotClockFramebuffer.h | 1 + .../framebufferio/FramebufferDisplay.c | 2 +- 5 files changed, 36 insertions(+), 4 deletions(-) diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c index d9e8d97da8..ade19da396 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.c @@ -175,9 +175,10 @@ void common_hal_dotclockframebuffer_framebuffer_construct(dotclockframebuffer_fr self->frequency = frequency; self->row_stride = 2 * (width + overscan_left); + self->first_pixel_offset = 2 * overscan_left; self->refresh_rate = frequency / (width + hsync_front_porch + hsync_back_porch) / (height + vsync_front_porch + vsync_back_porch); - self->bufinfo.buf = (uint8_t *)fb + 2 * overscan_left; // first line starts after overscan_left pixels - self->bufinfo.len = 2 * (cfg->timings.h_res * cfg->timings.v_res - overscan_left); // no overscan after last line + self->bufinfo.buf = (uint8_t *)fb; + self->bufinfo.len = 2 * (cfg->timings.h_res * cfg->timings.v_res); self->bufinfo.typecode = 'H' | MP_OBJ_ARRAY_TYPECODE_FLAG_RW; // LCD_CAM.lcd_ctrl2.lcd_vsync_idle_pol = _vsync_polarity; @@ -202,7 +203,7 @@ bool common_hal_dotclockframebuffer_framebuffer_deinitialized(dotclockframebuffe mp_int_t common_hal_dotclockframebuffer_framebuffer_get_width(dotclockframebuffer_framebuffer_obj_t *self) { - return self->panel_config.timings.h_res; + return self->panel_config.timings.h_res - self->first_pixel_offset / 2; } mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuffer_framebuffer_obj_t *self) { @@ -217,6 +218,10 @@ mp_int_t common_hal_dotclockframebuffer_framebuffer_get_row_stride(dotclockframe return self->row_stride; } +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(dotclockframebuffer_framebuffer_obj_t *self) { + return self->first_pixel_offset; +} + void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self) { Cache_WriteBack_Addr((uint32_t)(self->bufinfo.buf), self->bufinfo.len); } diff --git a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h index a40f28ea52..1432b7009b 100644 --- a/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h +++ b/ports/espressif/common-hal/dotclockframebuffer/DotClockFramebuffer.h @@ -39,6 +39,7 @@ typedef struct dotclockframebuffer_framebuffer_obj { mp_buffer_info_t bufinfo; mp_int_t row_stride; uint32_t frequency, refresh_rate; + uint32_t first_pixel_offset; uint64_t used_pins_mask; volatile int32_t frame_count; esp_lcd_rgb_panel_config_t panel_config; diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c index e214351414..6799618efa 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.c @@ -269,6 +269,24 @@ MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_row_stride_obj, do MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_row_stride_obj, (mp_obj_t)&dotclockframebuffer_framebuffer_get_row_stride_obj); +//| first_pixel_offset: int +//| """The first_pixel_offset of the display, in bytes +//| +//| Due to overscan or alignment requirements, the memory address for row N+1 may not be exactly ``2*width`` bytes after the memory address for row N. +//| This property gives the stride in **bytes**. +//| +//| On Espressif this value is **guaranteed** to be a multiple of the 2 (i.e., it is a whole number of pixels)""" +//| +STATIC mp_obj_t dotclockframebuffer_framebuffer_get_first_pixel_offset(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(dotclockframebuffer_framebuffer_get_first_pixel_offset_obj, dotclockframebuffer_framebuffer_get_first_pixel_offset); + +MP_PROPERTY_GETTER(dotclockframebuffer_framebuffer_first_pixel_offset_obj, + (mp_obj_t)&dotclockframebuffer_framebuffer_get_first_pixel_offset_obj); + STATIC mp_int_t dotclockframebuffer_framebuffer_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; // a readonly framebuffer would be unusual but not impossible @@ -331,6 +349,11 @@ STATIC int dotclockframebuffer_framebuffer_get_row_stride_proto(mp_obj_t self_in return common_hal_dotclockframebuffer_framebuffer_get_row_stride(self); } +STATIC int dotclockframebuffer_framebuffer_get_first_pixel_offset_proto(mp_obj_t self_in) { + dotclockframebuffer_framebuffer_obj_t *self = (dotclockframebuffer_framebuffer_obj_t *)self_in; + return common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(self); +} + STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) .get_bufinfo = dotclockframebuffer_framebuffer_get_bufinfo, @@ -340,6 +363,7 @@ STATIC const framebuffer_p_t dotclockframebuffer_framebuffer_proto = { .get_height = dotclockframebuffer_framebuffer_get_height_proto, .get_color_depth = dotclockframebuffer_framebuffer_get_color_depth_proto, .get_row_stride = dotclockframebuffer_framebuffer_get_row_stride_proto, + .get_first_pixel_offset = dotclockframebuffer_framebuffer_get_first_pixel_offset_proto, .get_bytes_per_cell = dotclockframebuffer_framebuffer_get_bytes_per_cell_proto, .get_native_frames_per_second = dotclockframebuffer_framebuffer_get_native_frames_per_second_proto, .swapbuffers = dotclockframebuffer_framebuffer_swapbuffers, @@ -351,6 +375,7 @@ STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&dotclockframebuffer_framebuffer_width_obj) }, { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&dotclockframebuffer_framebuffer_height_obj) }, { MP_ROM_QSTR(MP_QSTR_row_stride), MP_ROM_PTR(&dotclockframebuffer_framebuffer_row_stride_obj) }, + { MP_ROM_QSTR(MP_QSTR_first_pixel_offset), MP_ROM_PTR(&dotclockframebuffer_framebuffer_first_pixel_offset_obj) }, { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&dotclockframebuffer_framebuffer_frequency_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh_rate), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_rate_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&dotclockframebuffer_framebuffer_refresh_obj) }, diff --git a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h index 074625c4c0..0f99d2017e 100644 --- a/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h +++ b/shared-bindings/dotclockframebuffer/DotClockFramebuffer.h @@ -56,4 +56,5 @@ mp_int_t common_hal_dotclockframebuffer_framebuffer_get_height(dotclockframebuff mp_int_t common_hal_dotclockframebuffer_framebuffer_get_frequency(dotclockframebuffer_framebuffer_obj_t *self); mp_int_t common_hal_dotclockframebuffer_framebuffer_get_refresh_rate(dotclockframebuffer_framebuffer_obj_t *self); mp_int_t common_hal_dotclockframebuffer_framebuffer_get_row_stride(dotclockframebuffer_framebuffer_obj_t *self); +mp_int_t common_hal_dotclockframebuffer_framebuffer_get_first_pixel_offset(dotclockframebuffer_framebuffer_obj_t *self); void common_hal_dotclockframebuffer_framebuffer_refresh(dotclockframebuffer_framebuffer_obj_t *self); diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 6db2c3fec1..5129b66592 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -85,7 +85,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu } self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); - size_t framebuffer_size = self->first_pixel_offset + self->row_stride * self->core.height; + size_t framebuffer_size = self->first_pixel_offset + self->row_stride * (self->core.height - 1) + self->core.width * self->core.colorspace.depth / 8; mp_arg_validate_length_min(self->bufinfo.len, framebuffer_size, MP_QSTR_framebuffer); From b3141933afbdcc7eeaf695d5b0f55899d75243a9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 27 Sep 2023 15:01:18 -0500 Subject: [PATCH 129/129] FramebufferDisplay: dirty rows are physical .. so they need a correct row count, which could be the "core.width" of a 90/180 rotated display. While I discovered this on the very unusual 320x960 display it could have affected any framebuffer display that was taller than it was wide, including sharp memory displays and rgbmatrix displays. --- shared-module/framebufferio/FramebufferDisplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 5129b66592..737cef5ad0 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -252,7 +252,9 @@ STATIC void _refresh_display(framebufferio_framebufferdisplay_obj_t *self) { displayio_display_core_start_refresh(&self->core); const displayio_area_t *current_area = _get_refresh_areas(self); if (current_area) { - uint8_t dirty_row_bitmask[(self->core.height + 7) / 8]; + bool transposed = (self->core.rotation == 90 || self->core.rotation == 270); + int row_count = transposed ? self->core.width : self->core.height; + uint8_t dirty_row_bitmask[(row_count + 7) / 8]; memset(dirty_row_bitmask, 0, sizeof(dirty_row_bitmask)); self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); while (current_area != NULL) {