From 668f96e6e9dd53f97c4a033db3042d71a0f14e8f Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Wed, 15 Mar 2023 12:05:38 +0530 Subject: [PATCH 001/291] update watchdog implementation - add note about deprecation of `deinit` - refactor `WatchDogMode` implementation - make validation of watchdog mode port specific --- shared-bindings/watchdog/WatchDogMode.c | 85 ++++++------------------ shared-bindings/watchdog/WatchDogMode.h | 13 +--- shared-bindings/watchdog/WatchDogTimer.c | 32 ++++----- 3 files changed, 35 insertions(+), 95 deletions(-) diff --git a/shared-bindings/watchdog/WatchDogMode.c b/shared-bindings/watchdog/WatchDogMode.c index c707054d27..343702e4b1 100644 --- a/shared-bindings/watchdog/WatchDogMode.c +++ b/shared-bindings/watchdog/WatchDogMode.c @@ -1,9 +1,9 @@ /* - * This file is part of the Micro Python project, http://micropython.org/ + * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * - * Copyright (c) 2020 Sean Cross for Adafruit Industries + * Copyright (c) 2023 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 @@ -24,76 +24,33 @@ * THE SOFTWARE. */ +#include "py/enum.h" + #include "shared-bindings/watchdog/WatchDogMode.h" +MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, NONE, WATCHDOGMODE_NONE); +MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RAISE, WATCHDOGMODE_RAISE); +MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RESET, WATCHDOGMODE_RESET); + //| class WatchDogMode: -//| """run state of the watchdog timer""" +//| """Run state of the watchdog timer.""" +//| +//| NONE: WatchDogMode +//| """The `WatchDogTimer` is disabled.""" //| -//| def __init__(self) -> None: -//| """Enum-like class to define the run mode of the watchdog timer.""" //| RAISE: WatchDogMode -//| """Raise an exception when the WatchDogTimer expires. -//| -//| **Limitations:** ``RAISE`` mode is not supported on SAMD or RP2040. -//| -//| :type WatchDogMode:""" +//| """Raise an exception when the `WatchDogTimer` expires.""" //| //| RESET: WatchDogMode -//| """Reset the system if the WatchDogTimer expires. +//| """Reset the system when the `WatchDogTimer` expires.""" //| -//| :type WatchDogMode:""" -//| -const mp_obj_type_t watchdog_watchdogmode_type; - -const watchdog_watchdogmode_obj_t watchdog_watchdogmode_raise_obj = { - { &watchdog_watchdogmode_type }, +MAKE_ENUM_MAP(watchdog_watchdogmode) { + MAKE_ENUM_MAP_ENTRY(watchdogmode, NONE), + MAKE_ENUM_MAP_ENTRY(watchdogmode, RAISE), + MAKE_ENUM_MAP_ENTRY(watchdogmode, RESET), }; +STATIC MP_DEFINE_CONST_DICT(watchdog_watchdogmode_locals_dict, watchdog_watchdogmode_locals_table); -const watchdog_watchdogmode_obj_t watchdog_watchdogmode_reset_obj = { - { &watchdog_watchdogmode_type }, -}; +MAKE_PRINTER(watchdog, watchdog_watchdogmode); -watchdog_watchdogmode_t watchdog_watchdogmode_obj_to_type(mp_obj_t obj) { - if (obj == MP_ROM_PTR(&watchdog_watchdogmode_raise_obj)) { - return WATCHDOGMODE_RAISE; - } else if (obj == MP_ROM_PTR(&watchdog_watchdogmode_reset_obj)) { - return WATCHDOGMODE_RESET; - } - return WATCHDOGMODE_NONE; -} - -mp_obj_t watchdog_watchdogmode_type_to_obj(watchdog_watchdogmode_t mode) { - switch (mode) { - case WATCHDOGMODE_RAISE: - return (mp_obj_t)MP_ROM_PTR(&watchdog_watchdogmode_raise_obj); - case WATCHDOGMODE_RESET: - return (mp_obj_t)MP_ROM_PTR(&watchdog_watchdogmode_reset_obj); - case WATCHDOGMODE_NONE: - default: - return MP_ROM_NONE; - } -} - -STATIC const mp_rom_map_elem_t watchdog_watchdogmode_locals_dict_table[] = { - {MP_ROM_QSTR(MP_QSTR_RAISE), MP_ROM_PTR(&watchdog_watchdogmode_raise_obj)}, - {MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&watchdog_watchdogmode_reset_obj)}, -}; -STATIC MP_DEFINE_CONST_DICT(watchdog_watchdogmode_locals_dict, watchdog_watchdogmode_locals_dict_table); - -STATIC void watchdog_watchdogmode_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { - qstr runmode = MP_QSTR_None; - if (MP_OBJ_TO_PTR(self_in) == MP_ROM_PTR(&watchdog_watchdogmode_raise_obj)) { - runmode = MP_QSTR_RAISE; - } else if (MP_OBJ_TO_PTR(self_in) == MP_ROM_PTR(&watchdog_watchdogmode_reset_obj)) { - runmode = MP_QSTR_RESET; - } - mp_printf(print, "%q.%q.%q", MP_QSTR_watchdog, MP_QSTR_WatchDogMode, - runmode); -} - -const mp_obj_type_t watchdog_watchdogmode_type = { - { &mp_type_type }, - .name = MP_QSTR_WatchDogMode, - .print = watchdog_watchdogmode_print, - .locals_dict = (mp_obj_t)&watchdog_watchdogmode_locals_dict, -}; +MAKE_ENUM_TYPE(watchdog, WatchDogMode, watchdog_watchdogmode); diff --git a/shared-bindings/watchdog/WatchDogMode.h b/shared-bindings/watchdog/WatchDogMode.h index fb09445a9f..fd27d4d46a 100644 --- a/shared-bindings/watchdog/WatchDogMode.h +++ b/shared-bindings/watchdog/WatchDogMode.h @@ -1,5 +1,5 @@ /* - * This file is part of the Micro Python project, http://micropython.org/ + * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * @@ -27,7 +27,7 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGMODE_H #define MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGMODE_H -#include "py/obj.h" +#include "py/enum.h" typedef enum { WATCHDOGMODE_NONE, @@ -37,13 +37,4 @@ typedef enum { extern const mp_obj_type_t watchdog_watchdogmode_type; -watchdog_watchdogmode_t watchdog_watchdogmode_obj_to_type(mp_obj_t obj); -mp_obj_t watchdog_watchdogmode_type_to_obj(watchdog_watchdogmode_t mode); - -typedef struct { - mp_obj_base_t base; -} watchdog_watchdogmode_obj_t; -extern const watchdog_watchdogmode_obj_t watchdog_watchdogmode_raise_obj; -extern const watchdog_watchdogmode_obj_t watchdog_watchdogmode_reset_obj; - #endif // MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGMODE_H diff --git a/shared-bindings/watchdog/WatchDogTimer.c b/shared-bindings/watchdog/WatchDogTimer.c index acfd353c34..10ab334330 100644 --- a/shared-bindings/watchdog/WatchDogTimer.c +++ b/shared-bindings/watchdog/WatchDogTimer.c @@ -71,8 +71,14 @@ STATIC mp_obj_t watchdog_watchdogtimer_feed(mp_obj_t self_in) { STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_feed_obj, watchdog_watchdogtimer_feed); //| def deinit(self) -> None: -//| """Stop the watchdog timer. This may raise an error if the watchdog -//| timer cannot be disabled on this platform.""" +//| """Stop the watchdog timer. +//| +//| :raises RuntimeError: if the watchdog timer cannot be disabled on this platform. +//| +//| .. note:: This is deprecated in ``8.1.0`` and will be removed in ``9.0.0``. +//| Set watchdog `mode` to `WatchDogMode.NONE` instead. +//| +//| """ //| ... STATIC mp_obj_t watchdog_watchdogtimer_deinit(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); @@ -94,7 +100,7 @@ STATIC mp_obj_t watchdog_watchdogtimer_obj_set_timeout(mp_obj_t self_in, mp_obj_ watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); mp_float_t timeout = mp_obj_get_float(timeout_obj); - mp_arg_validate_int_min((int)timeout, 0, MP_QSTR_timeout); + mp_arg_validate_int_min(timeout, 0, MP_QSTR_timeout); common_hal_watchdog_set_timeout(self, timeout); return mp_const_none; @@ -122,27 +128,13 @@ MP_PROPERTY_GETSET(watchdog_watchdogtimer_timeout_obj, //| STATIC mp_obj_t watchdog_watchdogtimer_obj_get_mode(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - return watchdog_watchdogmode_type_to_obj(common_hal_watchdog_get_mode(self)); + return cp_enum_find(&watchdog_watchdogmode_type, common_hal_watchdog_get_mode(self)); } MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_get_mode_obj, watchdog_watchdogtimer_obj_get_mode); -STATIC mp_obj_t watchdog_watchdogtimer_obj_set_mode(mp_obj_t self_in, mp_obj_t mode_obj) { +STATIC mp_obj_t watchdog_watchdogtimer_obj_set_mode(mp_obj_t self_in, mp_obj_t obj) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - watchdog_watchdogmode_t current_mode = common_hal_watchdog_get_mode(self); - watchdog_watchdogmode_t new_mode = watchdog_watchdogmode_obj_to_type(mode_obj); - mp_float_t current_timeout = common_hal_watchdog_get_timeout(self); - - // When setting the mode, the timeout value must be greater than zero - if (new_mode == WATCHDOGMODE_RESET || new_mode == WATCHDOGMODE_RAISE) { - mp_arg_validate_int_min((int)current_timeout, 0, MP_QSTR_timeout); - } - - // Don't allow changing the mode once the watchdog timer has been started - if (current_mode == WATCHDOGMODE_RESET && new_mode != WATCHDOGMODE_RESET) { - mp_raise_TypeError(translate("WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET")); - } - - common_hal_watchdog_set_mode(self, new_mode); + common_hal_watchdog_set_mode(self, cp_enum_value(&watchdog_watchdogmode_type, obj, MP_QSTR_mode)); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_mode_obj, watchdog_watchdogtimer_obj_set_mode); From 5e0dce286ee8c8aea71e6ac77c09b1da048d5fdb Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:14:21 +0530 Subject: [PATCH 002/291] update watchdog implementation for atmel-samd --- .../common-hal/watchdog/WatchDogTimer.c | 107 +++++++++++------- .../common-hal/watchdog/WatchDogTimer.h | 2 +- ports/atmel-samd/supervisor/port.c | 11 ++ 3 files changed, 76 insertions(+), 44 deletions(-) diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c index 65d238ce75..0c0ef85bb2 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c @@ -34,58 +34,69 @@ #include "component/wdt.h" +#define SYNC_CTRL_WRITE while (WDT->SYNCBUSY.reg) {} + +static void watchdog_disable(void) { + // disable watchdog + WDT->CTRLA.reg = 0; + SYNC_CTRL_WRITE +} + +static void watchdog_enable(watchdog_watchdogtimer_obj_t *self) { + // disable watchdog for config + watchdog_disable(); + + int wdt_cycles = (int)(self->timeout * 1024); + if (wdt_cycles < 8) { + wdt_cycles = 8; + } + + // ceil(log2(n)) = 32 - __builtin_clz(n - 1) when n > 1 (if int is 32 bits) + int log2_wdt_cycles = (sizeof(int) * CHAR_BIT) - __builtin_clz(wdt_cycles - 1); + int setting = log2_wdt_cycles - 3; // CYC8_Val is 0 + + OSC32KCTRL->OSCULP32K.bit.EN1K = 1; // Enable out 1K (for WDT) + + WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt + WDT->CONFIG.bit.PER = setting; // Set period for chip reset + WDT->CTRLA.bit.WEN = 0; // Disable window mode + SYNC_CTRL_WRITE + common_hal_watchdog_feed(self); // Clear watchdog interval + WDT->CTRLA.bit.ENABLE = 1; // Start watchdog now! + SYNC_CTRL_WRITE +} + void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { WDT->CLEAR.reg = WDT_CLEAR_CLEAR_KEY; } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { - if (self->mode == WATCHDOGMODE_RESET) { - mp_raise_RuntimeError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET")); - } else { - self->mode = WATCHDOGMODE_NONE; + if (self->mode == WATCHDOGMODE_NONE) { + return; } + watchdog_disable(); + self->mode = WATCHDOGMODE_NONE; +} + +void watchdog_reset(void) { + common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); } mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } -STATIC void setup_wdt(watchdog_watchdogtimer_obj_t *self, int setting) { - OSC32KCTRL->OSCULP32K.bit.EN1K = 1; // Enable out 1K (for WDT) - - // disable watchdog for config - WDT->CTRLA.reg = 0; - while (WDT->SYNCBUSY.reg) { // Sync CTRL write - } - - WDT->INTENCLR.reg = WDT_INTENCLR_EW; // Disable early warning interrupt - WDT->CONFIG.bit.PER = setting; // Set period for chip reset - WDT->CTRLA.bit.WEN = 0; // Disable window mode - while (WDT->SYNCBUSY.reg) { // Sync CTRL write - } - common_hal_watchdog_feed(self); // Clear watchdog interval - WDT->CTRLA.bit.ENABLE = 1; // Start watchdog now! - while (WDT->SYNCBUSY.reg) { - } -} - void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) { - int wdt_cycles = (int)(new_timeout * 1024); - if (wdt_cycles < 8) { - wdt_cycles = 8; + if (!(self->timeout < new_timeout || self->timeout > new_timeout)) { + return; } - if (wdt_cycles > 16384) { - mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value")); - } - // ceil(log2(n)) = 32 - __builtin_clz(n - 1) when n > 1 (if int is 32 bits) - int log2_wdt_cycles = (sizeof(int) * CHAR_BIT) - __builtin_clz(wdt_cycles - 1); - int setting = log2_wdt_cycles - 3; // CYC8_Val is 0 - float timeout = (8 << setting) / 1024.f; + + mp_arg_validate_int_max(new_timeout, 16, MP_QSTR_timeout); + self->timeout = new_timeout; if (self->mode == WATCHDOGMODE_RESET) { - setup_wdt(self, setting); + watchdog_enable(self); } - self->timeout = timeout; } watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_t *self) { @@ -93,13 +104,23 @@ watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_ } void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) { - if (self->mode != new_mode) { - if (new_mode == WATCHDOGMODE_RAISE) { - mp_raise_NotImplementedError(translate("RAISE mode is not implemented")); - } else if (new_mode == WATCHDOGMODE_NONE) { - common_hal_watchdog_deinit(self); - } - self->mode = new_mode; - common_hal_watchdog_set_timeout(self, self->timeout); + if (self->mode == new_mode) { + return; } + + switch (new_mode) { + case WATCHDOGMODE_NONE: + common_hal_watchdog_deinit(self); + break; + case WATCHDOGMODE_RAISE: + mp_raise_NotImplementedError(NULL); + break; + case WATCHDOGMODE_RESET: + watchdog_enable(self); + break; + default: + return; + } + + self->mode = new_mode; } diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h index ce34f0b8ab..579e8ce65f 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h @@ -38,6 +38,6 @@ struct _watchdog_watchdogtimer_obj_t { }; // This needs to be called in order to disable the watchdog -// void watchdog_reset(void); +void watchdog_reset(void); #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 45b999f1a1..1a961dd12e 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -388,13 +388,16 @@ void reset_port(void) { #if CIRCUITPY_BUSIO reset_sercoms(); #endif + #if CIRCUITPY_AUDIOIO audio_dma_reset(); audioout_reset(); #endif + #if CIRCUITPY_AUDIOBUSIO pdmin_reset(); #endif + #if CIRCUITPY_AUDIOBUSIO_I2SOUT i2sout_reset(); #endif @@ -406,14 +409,18 @@ void reset_port(void) { #if CIRCUITPY_TOUCHIO && CIRCUITPY_TOUCHIO_USE_NATIVE touchin_reset(); #endif + eic_reset(); + #if CIRCUITPY_PULSEIO pulsein_reset(); pulseout_reset(); #endif + #if CIRCUITPY_PWMIO pwmout_reset(); #endif + #if CIRCUITPY_PWMIO || CIRCUITPY_AUDIOIO || CIRCUITPY_FREQUENCYIO reset_timers(); #endif @@ -423,6 +430,10 @@ void reset_port(void) { analogout_reset(); #endif + #if CIRCUITPY_WATCHDOG + watchdog_reset(); + #endif + reset_gclks(); #if CIRCUITPY_PEW From 0acf2e8c9bbfe90aa5b6b84272e8d8ada93dd722 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:18:13 +0530 Subject: [PATCH 003/291] update watchdog implementation for espressif --- .../common-hal/watchdog/WatchDogTimer.c | 56 ++++++++++++++----- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c index 159c99458f..6a7c91622e 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.c +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -33,9 +33,18 @@ #include "esp_task_wdt.h" extern void esp_task_wdt_isr_user_handler(void); + void esp_task_wdt_isr_user_handler(void) { + // just delete, deiniting TWDT in isr context causes a crash + if (esp_task_wdt_delete(NULL) == ESP_OK) { + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + self->mode = WATCHDOGMODE_NONE; + } + + // schedule watchdog timeout exception mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&mp_watchdog_timeout_exception)); MP_STATE_THREAD(mp_pending_exception) = &mp_watchdog_timeout_exception; + #if MICROPY_ENABLE_SCHEDULER if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) { MP_STATE_VM(sched_state) = MP_SCHED_PENDING; @@ -44,12 +53,13 @@ void esp_task_wdt_isr_user_handler(void) { } void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { - if (esp_task_wdt_reset() != ESP_OK) { - mp_raise_RuntimeError(translate("watchdog not initialized")); - } + esp_task_wdt_reset(); } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { + if (self->mode == WATCHDOGMODE_NONE) { + return; + } if (esp_task_wdt_delete(NULL) == ESP_OK && esp_task_wdt_deinit() == ESP_OK) { self->mode = WATCHDOGMODE_NONE; } @@ -59,11 +69,11 @@ void watchdog_reset(void) { common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); } -static void wdt_config(watchdog_watchdogtimer_obj_t *self) { +static void wdt_config(uint32_t timeout, watchdog_watchdogmode_t mode) { // 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) { - mp_raise_RuntimeError(translate("Initialization failed due to lack of memory")); + if (esp_task_wdt_init(timeout, mode == WATCHDOGMODE_RESET) != ESP_OK) { + mp_raise_msg(&mp_type_MemoryError, NULL); } esp_task_wdt_add(NULL); } @@ -73,12 +83,17 @@ mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { } void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) { - if ((uint64_t)new_timeout > UINT32_MAX) { - mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value")); + if (!(self->timeout < new_timeout || self->timeout > new_timeout)) { + return; } - if ((uint32_t)self->timeout != (uint32_t)new_timeout) { - self->timeout = new_timeout; - wdt_config(self); + + if ((uint64_t)new_timeout > UINT32_MAX) { + mp_raise_ValueError_varg(translate("%q must be <= %d"), MP_QSTR_timeout, UINT32_MAX); + } + self->timeout = new_timeout; + + if (self->mode != WATCHDOGMODE_NONE) { + wdt_config(new_timeout, self->mode); } } @@ -87,8 +102,21 @@ watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_ } void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) { - if (self->mode != new_mode) { - self->mode = new_mode; - wdt_config(self); + if (self->mode == new_mode) { + return; } + + switch (new_mode) { + case WATCHDOGMODE_NONE: + common_hal_watchdog_deinit(self); + break; + case WATCHDOGMODE_RAISE: + case WATCHDOGMODE_RESET: + wdt_config(self->timeout, new_mode); + break; + default: + return; + } + + self->mode = new_mode; } From 8ff408161aaec99d0e3e6a9871fcb8bc86ea1213 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Wed, 15 Mar 2023 16:38:50 +0530 Subject: [PATCH 004/291] update watchdog implementation for raspberrypi --- .../common-hal/watchdog/WatchDogTimer.c | 56 +++++++++++-------- .../common-hal/watchdog/WatchDogTimer.h | 2 +- ports/raspberrypi/supervisor/port.c | 4 ++ 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c index f23ccda777..14ae9c7f9b 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c @@ -32,38 +32,39 @@ #include "src/rp2_common/hardware_watchdog/include/hardware/watchdog.h" +#define WATCHDOG_ENABLE watchdog_enable(self->timeout * 1000, false) + void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { watchdog_update(); } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { - if (self->mode == WATCHDOGMODE_RESET) { - mp_raise_RuntimeError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET")); - } else { - self->mode = WATCHDOGMODE_NONE; + if (self->mode == WATCHDOGMODE_NONE) { + return; } + hw_clear_bits(&watchdog_hw->ctrl, WATCHDOG_CTRL_ENABLE_BITS); + self->mode = WATCHDOGMODE_NONE; } -/* void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); + common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); } -*/ mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) { - // max timeout is 8.388607 sec - // this is rounded down to 8.388 sec - uint64_t timeout = new_timeout * 1000; - if (timeout > 8388) { - mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value")); + if (!(self->timeout < new_timeout || self->timeout > new_timeout)) { + return; } - if ((uint16_t)self->timeout != timeout) { - watchdog_enable(timeout, false); - self->timeout = new_timeout; + + // max timeout is 8.388607 sec, this is rounded down to 8 sec + mp_arg_validate_int_max(new_timeout, 8, MP_QSTR_timeout); + self->timeout = new_timeout; + + if (self->mode == WATCHDOGMODE_RESET) { + WATCHDOG_ENABLE; } } @@ -72,12 +73,23 @@ watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_ } void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) { - if (self->mode != new_mode) { - if (new_mode == WATCHDOGMODE_RAISE) { - mp_raise_NotImplementedError(translate("RAISE mode is not implemented")); - } else if (new_mode == WATCHDOGMODE_NONE) { - common_hal_watchdog_deinit(self); - } - self->mode = new_mode; + if (self->mode == new_mode) { + return; } + + switch (new_mode) { + case WATCHDOGMODE_NONE: + common_hal_watchdog_deinit(self); + break; + case WATCHDOGMODE_RAISE: + mp_raise_NotImplementedError(NULL); + break; + case WATCHDOGMODE_RESET: + WATCHDOG_ENABLE; + break; + default: + return; + } + + self->mode = new_mode; } diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h index ce34f0b8ab..579e8ce65f 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h @@ -38,6 +38,6 @@ struct _watchdog_watchdogtimer_obj_t { }; // This needs to be called in order to disable the watchdog -// void watchdog_reset(void); +void watchdog_reset(void); #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index f3da71cbd7..f2331f8cfd 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -201,6 +201,10 @@ void reset_port(void) { ssl_reset(); #endif + #if CIRCUITPY_WATCHDOG + watchdog_reset(); + #endif + #if CIRCUITPY_WIFI wifi_reset(); #endif From 11cf031284d42228f6b6d4af35cf07155ac2cc4f Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Wed, 15 Mar 2023 19:03:57 +0530 Subject: [PATCH 005/291] reset watchdog conditionally --- main.c | 6 ++++++ .../common-hal/watchdog/WatchDogTimer.c | 15 ++++++++++++++- .../common-hal/watchdog/WatchDogTimer.c | 16 ++++++++++++++-- ports/nrf/common-hal/watchdog/WatchDogTimer.c | 15 +++++++++++++-- .../common-hal/watchdog/WatchDogTimer.c | 18 +++++++++++++++--- shared/runtime/pyexec.h | 4 ++++ 6 files changed, 66 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index 002c97c167..2b4545379e 100644 --- a/main.c +++ b/main.c @@ -243,6 +243,12 @@ void supervisor_execution_status(void) { } #endif +#if CIRCUITPY_WATCHDOG +pyexec_result_t *pyexec_result(void) { + return &_exec_result; +} +#endif + // Look for the first file that exists in the list of filenames, using mp_import_stat(). // Return its index. If no file found, return -1. STATIC const char *first_existing_file_in_list(const char *const *filenames, size_t n_filenames) { diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c index 0c0ef85bb2..15683a1275 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c @@ -28,8 +28,12 @@ #include "py/runtime.h" +#include "shared/runtime/pyexec.h" + #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/watchdog/WatchDogTimer.h" +#include "shared-bindings/microcontroller/__init__.h" + #include "common-hal/watchdog/WatchDogTimer.h" #include "component/wdt.h" @@ -79,7 +83,16 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { } void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + if (self->mode == WATCHDOGMODE_RESET) { + mp_obj_t exception = pyexec_result()->exception; + if (exception != MP_OBJ_NULL && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + return; + } + } + common_hal_watchdog_deinit(self); } mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c index 6a7c91622e..b11da03770 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.c +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -25,11 +25,14 @@ */ #include "py/runtime.h" -#include "common-hal/watchdog/WatchDogTimer.h" + +#include "shared/runtime/pyexec.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/microcontroller/__init__.h" +#include "common-hal/watchdog/WatchDogTimer.h" + #include "esp_task_wdt.h" extern void esp_task_wdt_isr_user_handler(void); @@ -66,7 +69,16 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { } void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + if (self->mode == WATCHDOGMODE_RESET) { + mp_obj_t exception = pyexec_result()->exception; + if (exception != MP_OBJ_NULL && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + return; + } + } + common_hal_watchdog_deinit(self); } static void wdt_config(uint32_t timeout, watchdog_watchdogmode_t mode) { diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c index 99c360c46d..872c4642db 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c @@ -33,12 +33,14 @@ #include "py/objproperty.h" #include "py/runtime.h" -#include "common-hal/watchdog/WatchDogTimer.h" +#include "shared/runtime/pyexec.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/watchdog/WatchDogTimer.h" +#include "common-hal/watchdog/WatchDogTimer.h" + #include "supervisor/port.h" #include "nrf/timers.h" @@ -108,7 +110,16 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { } void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + if (self->mode == WATCHDOGMODE_RESET) { + mp_obj_t exception = pyexec_result()->exception; + if (exception != MP_OBJ_NULL && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + return; + } + } + common_hal_watchdog_deinit(self); } mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c index 14ae9c7f9b..29234b46b0 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c @@ -25,12 +25,15 @@ */ #include "py/runtime.h" -#include "common-hal/watchdog/WatchDogTimer.h" + +#include "shared/runtime/pyexec.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/microcontroller/__init__.h" -#include "src/rp2_common/hardware_watchdog/include/hardware/watchdog.h" +#include "common-hal/watchdog/WatchDogTimer.h" + +#include "hardware/watchdog.h" #define WATCHDOG_ENABLE watchdog_enable(self->timeout * 1000, false) @@ -47,7 +50,16 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { } void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + if (self->mode == WATCHDOGMODE_RESET) { + mp_obj_t exception = pyexec_result()->exception; + if (exception != MP_OBJ_NULL && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + return; + } + } + common_hal_watchdog_deinit(self); } mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { diff --git a/shared/runtime/pyexec.h b/shared/runtime/pyexec.h index 411426eaaa..d0c012fe46 100644 --- a/shared/runtime/pyexec.h +++ b/shared/runtime/pyexec.h @@ -67,6 +67,10 @@ extern uint8_t pyexec_repl_active; int pyexec_exit_handler(const void *source, pyexec_result_t *result); #endif +#if CIRCUITPY_WATCHDOG +pyexec_result_t *pyexec_result(void); +#endif + #if MICROPY_REPL_INFO mp_obj_t pyb_set_repl_info(mp_obj_t o_value); MP_DECLARE_CONST_FUN_OBJ_1(pyb_set_repl_info_obj); From 8964228ed5daeed5ffe184336e752779e048063b Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 16 Mar 2023 11:24:43 +0530 Subject: [PATCH 006/291] silently return when watchdog isn't active --- locale/circuitpython.pot | 49 +++++-------------- .../common-hal/watchdog/WatchDogTimer.c | 2 +- shared-bindings/watchdog/WatchDogTimer.c | 25 ++++------ 3 files changed, 23 insertions(+), 53 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 560dffe6a4..6f1d86c7ee 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -184,12 +184,12 @@ msgstr "" msgid "%q must be <= %d" msgstr "" -#: py/argcheck.c -msgid "%q must be >= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" msgstr "" -#: ports/espressif/common-hal/analogbufio/BufferedIn.c -msgid "%q must be array of type 'H'" +#: py/argcheck.c +msgid "%q must be >= %d" msgstr "" #: shared-bindings/analogbufio/BufferedIn.c @@ -200,6 +200,10 @@ msgstr "" msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" msgstr "" +#: ports/espressif/common-hal/analogbufio/BufferedIn.c +msgid "%q must be array of type 'H'" +msgstr "" + #: ports/raspberrypi/bindings/cyw43/__init__.c py/argcheck.c py/objexcept.c #: shared-bindings/canio/CAN.c shared-bindings/digitalio/Pull.c msgid "%q must be of type %q or %q, not %q" @@ -1154,10 +1158,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1229,7 +1229,8 @@ msgstr "" msgid "Interrupt error." msgstr "" -#: py/argcheck.c shared-bindings/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c py/argcheck.c +#: shared-bindings/digitalio/DigitalInOut.c #: shared-bindings/displayio/EPaperDisplay.c msgid "Invalid %q" msgstr "" @@ -1523,10 +1524,6 @@ msgstr "" msgid "No in or out in program" msgstr "" -#: shared-bindings/aesio/aes.c -msgid "No key was specified" -msgstr "" - #: shared-bindings/time/__init__.c msgid "No long integer support" msgstr "" @@ -1822,11 +1819,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2350,20 +2342,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -3044,8 +3026,8 @@ msgid "extra positional arguments given" msgstr "" #: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c -#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c -#: shared-module/gifio/GifWriter.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 "" @@ -4087,10 +4069,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4291,10 +4270,6 @@ msgstr "" msgid "value_count must be > 0" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c index b11da03770..5cc778a0b9 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.c +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -100,7 +100,7 @@ void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_floa } if ((uint64_t)new_timeout > UINT32_MAX) { - mp_raise_ValueError_varg(translate("%q must be <= %d"), MP_QSTR_timeout, UINT32_MAX); + mp_raise_ValueError_varg(translate("%q must be <= %u"), MP_QSTR_timeout, UINT32_MAX); } self->timeout = new_timeout; diff --git a/shared-bindings/watchdog/WatchDogTimer.c b/shared-bindings/watchdog/WatchDogTimer.c index 10ab334330..cc91a09ef2 100644 --- a/shared-bindings/watchdog/WatchDogTimer.c +++ b/shared-bindings/watchdog/WatchDogTimer.c @@ -50,22 +50,18 @@ //| //| def __init__(self) -> None: -//| """Not currently dynamically supported. Access the sole instance through `microcontroller.watchdog`.""" +//| """Access the sole instance through `microcontroller.watchdog`.""" //| ... //| def feed(self) -> None: //| """Feed the watchdog timer. This must be called regularly, otherwise -//| the timer will expire.""" +//| the timer will expire. Silently does nothing if the watchdog isn't active.""" //| ... STATIC mp_obj_t watchdog_watchdogtimer_feed(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - watchdog_watchdogmode_t current_mode = common_hal_watchdog_get_mode(self); - - if (current_mode == WATCHDOGMODE_NONE) { - mp_raise_ValueError(translate("WatchDogTimer is not currently running")); + if (common_hal_watchdog_get_mode(self) != WATCHDOGMODE_NONE) { + common_hal_watchdog_feed(self); } - - common_hal_watchdog_feed(self); return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_feed_obj, watchdog_watchdogtimer_feed); @@ -89,7 +85,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_deinit_obj, watchdog_wat //| timeout: float //| """The maximum number of seconds that can elapse between calls -//| to feed()""" +//| to `feed()`""" STATIC mp_obj_t watchdog_watchdogtimer_obj_get_timeout(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); return mp_obj_new_float(common_hal_watchdog_get_timeout(self)); @@ -114,17 +110,16 @@ MP_PROPERTY_GETSET(watchdog_watchdogtimer_timeout_obj, //| mode: WatchDogMode //| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode`. //| -//| Setting a WatchDogMode activates the WatchDog:: +//| Setting a `WatchDogMode` activates the WatchDog:: //| -//| import microcontroller -//| import watchdog +//| from microcontroller import watchdog as w +//| from watchdog import WatchDogMode //| -//| w = microcontroller.watchdog //| w.timeout = 5 -//| w.mode = watchdog.WatchDogMode.RAISE +//| w.mode = WatchDogMode.RESET //| //| -//| Once set, the WatchDogTimer will perform the specified action if the timer expires.""" +//| Once set, the `WatchDogTimer` will perform the specified action if the timer expires.""" //| STATIC mp_obj_t watchdog_watchdogtimer_obj_get_mode(mp_obj_t self_in) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); From 0aa7854d5b3f6a7a3756f8e4c8243d38e301c95b Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 19 Jun 2023 18:00:49 +0300 Subject: [PATCH 007/291] Update pico-sdk to 1.5.1 --- ports/raspberrypi/sdk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/sdk b/ports/raspberrypi/sdk index 2ccab115de..6a7db34ff6 160000 --- a/ports/raspberrypi/sdk +++ b/ports/raspberrypi/sdk @@ -1 +1 @@ -Subproject commit 2ccab115de0d42d31d6611cca19ef0cd0d2ccaa7 +Subproject commit 6a7db34ff63345a7badec79ebea3aaef1712f374 From e139cd9ec06bdb3dd0520d6774809d33c1b9275a Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 21 Jun 2023 01:35:52 +0300 Subject: [PATCH 008/291] Update cyw43 to 1.0.1 --- ports/raspberrypi/lib/cyw43-driver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/lib/cyw43-driver b/ports/raspberrypi/lib/cyw43-driver index e52dd14a15..8ef38a6d32 160000 --- a/ports/raspberrypi/lib/cyw43-driver +++ b/ports/raspberrypi/lib/cyw43-driver @@ -1 +1 @@ -Subproject commit e52dd14a15e6a53e6263840704470246aa77c5ce +Subproject commit 8ef38a6d32c54f850bff8f189bdca19ded33792a From 112f0fd7675960f7cbf403882364e67e5ee39309 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 21 Jun 2023 01:43:10 +0300 Subject: [PATCH 009/291] Add `-Wno-undef` to rp2 makefile for sdk --- ports/raspberrypi/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 7eb67b77ba..9c7c8549ca 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -142,6 +142,7 @@ INC += \ -Isdk_config \ -I../../lib/tinyusb/src \ -I../../supervisor/shared/usb \ + -I../bindings/cyw43/__init__.h \ -I$(BUILD) # Pico specific configuration @@ -171,7 +172,7 @@ else endif # Remove -Wno-stringop-overflow after we can test with CI's GCC 10. Mac's looks weird. -DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-cast-align +DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-cast-align -Wno-undef CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS) -Werror=missing-prototypes From 4e01674cbde4021731d452f0fa92bedb6664bb69 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 13 Jul 2023 14:49:08 -0700 Subject: [PATCH 010/291] Fix rp2 safe mode via reset press The picodvi PR #7880 switched the saved word to the watchdog register since it reworked the RAM layout. This works for reset_into_safe_mode because the watchdog scratch registers are preserved by soft resets. They *aren't* preserved for pressing the reset button. So it broken manual safe mode. Switch back to using RAM to store the saved word but use the pico-sdks "uninitialized" designation instead of a fixed location. Also fixes USB host feather status neopixel by setting the power pin. --- .../adafruit_feather_rp2040_usb_host/mpconfigboard.h | 1 + ports/raspberrypi/supervisor/port.c | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/mpconfigboard.h index f300bfe711..053d5b523b 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040_usb_host/mpconfigboard.h @@ -2,6 +2,7 @@ #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO21) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO20) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 08a9d96c2e..cfbf3b6a04 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -247,14 +247,15 @@ uint32_t *port_heap_get_top(void) { return port_stack_get_top(); } +uint32_t __uninitialized_ram(saved_word); void port_set_saved_word(uint32_t value) { - // Store in a watchdog scratch register instead of RAM. 4-7 are used by the - // sdk. 0 is used by alarm. 1-3 are free. - watchdog_hw->scratch[1] = value; + // Store in RAM because the watchdog scratch registers don't survive + // resetting by pulling the RUN pin low. + saved_word = value; } uint32_t port_get_saved_word(void) { - return watchdog_hw->scratch[1]; + return saved_word; } static volatile bool ticks_enabled; From 8ea0835ff62c487b23e5574e9dce95f9474e0cf9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 10:51:11 -0500 Subject: [PATCH 011/291] Allow any files to be rendered as jinja templates by including a comment ".. jinja" anywhere in the file. By convention, this should be at the top. os.getenv will use this so it can render a 'supported boards' list. --- docs/rstjinja.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/rstjinja.py b/docs/rstjinja.py index 7ab92a9793..5cac1a5e15 100644 --- a/docs/rstjinja.py +++ b/docs/rstjinja.py @@ -1,6 +1,15 @@ # Derived from code on Eric Holscher's blog, found at: # https://www.ericholscher.com/blog/2016/jul/25/integrating-jinja-rst-sphinx/ +import re + +def render_with_jinja(docname, source): + if "shared-bindings/support_matrix" in docname: + return True + if re.search('^\s+.. jinja$', source[0], re.M): + return True + return False + def rstjinja(app, docname, source): """ Render our pages as a jinja template for fancy templating goodness. @@ -9,12 +18,12 @@ def rstjinja(app, docname, source): if app.builder.format not in ("html", "latex"): return - # we only want our one jinja template to run through this func - if "shared-bindings/support_matrix" not in docname: + # we only want specific files to run through this func + if not render_with_jinja(docname, source): return src = rendered = source[0] - print(docname) + print(f"rendering {docname} as jinja templates") if app.builder.format == "html": rendered = app.builder.templates.render_string( From d7ff56b00e1ff20cf85d220241b1f93b799bd789 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 10:51:27 -0500 Subject: [PATCH 012/291] sort a block of items --- docs/shared_bindings_matrix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index f7efb47385..011bf595cc 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -73,8 +73,8 @@ ADDITIONAL_MODULES = { "fontio": "CIRCUITPY_DISPLAYIO", "io": "CIRCUITPY_IO", "select": "MICROPY_PY_USELECT_SELECT", - "terminalio": "CIRCUITPY_DISPLAYIO", "sys": "CIRCUITPY_SYS", + "terminalio": "CIRCUITPY_DISPLAYIO", "usb": "CIRCUITPY_USB_HOST", } From 9593ec44b1463a58020afdff18fae72ee6689dc8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 10:51:35 -0500 Subject: [PATCH 013/291] add os.getenv to the support matrix --- docs/shared_bindings_matrix.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 011bf595cc..9d7ea470e4 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -72,6 +72,7 @@ ADDITIONAL_MODULES = { "collections": "CIRCUITPY_COLLECTIONS", "fontio": "CIRCUITPY_DISPLAYIO", "io": "CIRCUITPY_IO", + "os.getenv": "CIRCUITPY_OS_GETENV", "select": "MICROPY_PY_USELECT_SELECT", "sys": "CIRCUITPY_SYS", "terminalio": "CIRCUITPY_DISPLAYIO", @@ -86,6 +87,7 @@ MODULES_NOT_IN_BINDINGS = [ "collections", "errno", "json", + "os.getenv", "re", "select", "sys", From 6a2499227a3c3910def42fdc14af0591001008bc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 10:51:53 -0500 Subject: [PATCH 014/291] render the board support list within the docs of os.getenv --- shared-bindings/os/__init__.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/shared-bindings/os/__init__.c b/shared-bindings/os/__init__.c index e9e5f0885f..18fec53049 100644 --- a/shared-bindings/os/__init__.c +++ b/shared-bindings/os/__init__.c @@ -41,6 +41,8 @@ //| """functions that an OS normally provides //| //| |see_cpython_module| :mod:`cpython:os`. +//| +//| .. jinja //| """ //| //| import typing @@ -88,7 +90,24 @@ MP_DEFINE_CONST_FUN_OBJ_0(os_getcwd_obj, os_getcwd); //| def getenv(key: str, default: Optional[str] = None) -> Optional[str]: //| """Get the environment variable value for the given key or return ``default``. //| -//| This may load values from disk so cache the result instead of calling this often.""" +//| This may load values from disk so cache the result instead of calling this often. +//| +//| On boards that do not support ``settings.toml`` reading in the core, this function will raise NotImplementedError. +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//|
    +//| {% for board in support_matrix_reverse["os.getenv"] %} +//|
  • {{ board }} +//| {% endfor %} +//|
+//|
+//|

+//| +//| """ //| ... //| STATIC mp_obj_t os_getenv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { From aca93d0ebb3c61fea0fc3390aabb659ced71c9a3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 11:13:57 -0500 Subject: [PATCH 015/291] MODULES_NOT_IN_BINDINGS can skip listing things in ADDITIONAL_MODULES --- docs/shared_bindings_matrix.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index 9d7ea470e4..be001ac792 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -79,20 +79,7 @@ ADDITIONAL_MODULES = { "usb": "CIRCUITPY_USB_HOST", } -MODULES_NOT_IN_BINDINGS = [ - "_asyncio", - "array", - "binascii", - "builtins", - "collections", - "errno", - "json", - "os.getenv", - "re", - "select", - "sys", - "ulab", -] +MODULES_NOT_IN_BINDINGS = [ "binascii", "errno", "json", "re", "ulab" ] FROZEN_EXCLUDES = ["examples", "docs", "tests", "utils", "conf.py", "setup.py"] """Files and dirs at the root of a frozen directory that should be ignored. @@ -119,7 +106,7 @@ def get_bindings(): bindings_modules = [] for d in get_circuitpython_root_dir().glob("ports/*/bindings"): bindings_modules.extend(module.name for module in d.iterdir() if d.is_dir()) - return shared_bindings_modules + bindings_modules + MODULES_NOT_IN_BINDINGS + return shared_bindings_modules + bindings_modules + MODULES_NOT_IN_BINDINGS + list(ADDITIONAL_MODULES.keys()) def get_board_mapping(): From f15eceb24c2d74b4e7df07360a7d0a41230ef05a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 11:14:50 -0500 Subject: [PATCH 016/291] Document more classes that can be separately enabled --- docs/shared_bindings_matrix.py | 5 +++++ shared-bindings/busio/SPI.c | 17 ++++++++++++++++- shared-bindings/busio/UART.c | 17 ++++++++++++++++- shared-bindings/busio/__init__.c | 2 ++ shared-bindings/keypad/KeyMatrix.c | 17 ++++++++++++++++- shared-bindings/keypad/Keys.c | 17 ++++++++++++++++- shared-bindings/keypad/ShiftRegisterKeys.c | 17 ++++++++++++++++- shared-bindings/keypad/__init__.c | 2 ++ 8 files changed, 89 insertions(+), 5 deletions(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index be001ac792..e61c28abcb 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -69,9 +69,14 @@ ADDITIONAL_MODULES = { "array": "CIRCUITPY_ARRAY", # always available, so depend on something that's always 1. "builtins": "CIRCUITPY", + "busio.SPI": "CIRCUITPY_BUSIO_SPI", + "busio.UART": "CIRCUITPY_BUSIO_UART", "collections": "CIRCUITPY_COLLECTIONS", "fontio": "CIRCUITPY_DISPLAYIO", "io": "CIRCUITPY_IO", + "keypad.KeyMatrix": "CIRCUITPY_KEYPAD_KEYMATRIX", + "keypad.Keys": "CIRCUITPY_KEYPAD_KEYS", + "keypad.ShiftRegisterKeys": "CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS", "os.getenv": "CIRCUITPY_OS_GETENV", "select": "MICROPY_PY_USELECT_SELECT", "sys": "CIRCUITPY_SYS", diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c index ccdceb5760..4a85a8372f 100644 --- a/shared-bindings/busio/SPI.c +++ b/shared-bindings/busio/SPI.c @@ -52,7 +52,22 @@ //| `!MOSI`, `!MISO`. Its up to the client to manage the appropriate //| select line, often abbreviated `!CS` or `!SS`. (This is common because //| multiple secondaries can share the `!clock`, `!MOSI` and `!MISO` lines -//| and therefore the hardware.)""" +//| and therefore the hardware.) +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//|
    +//| {% for board in support_matrix_reverse["busio.SPI"] %} +//|
  • {{ board }} +//| {% endfor %} +//|
+//|
+//|

+//| +//| """ //| //| def __init__( //| self, diff --git a/shared-bindings/busio/UART.c b/shared-bindings/busio/UART.c index a10dc8efad..44fcd770ab 100644 --- a/shared-bindings/busio/UART.c +++ b/shared-bindings/busio/UART.c @@ -44,7 +44,22 @@ // #define STREAM_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__) //| class UART: -//| """A bidirectional serial protocol""" +//| """A bidirectional serial protocol +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//|
    +//| {% for board in support_matrix_reverse["busio.UART"] %} +//|
  • {{ board }} +//| {% endfor %} +//|
+//|
+//|

+//| +//| """ //| //| def __init__( //| self, diff --git a/shared-bindings/busio/__init__.c b/shared-bindings/busio/__init__.c index 4d62c8333e..776920385e 100644 --- a/shared-bindings/busio/__init__.c +++ b/shared-bindings/busio/__init__.c @@ -77,6 +77,8 @@ //| //| Tutorial for UART: //| https://learn.adafruit.com/circuitpython-essentials/circuitpython-uart-serial +//| +//| .. jinja //| """ STATIC const mp_rom_map_elem_t busio_module_globals_table[] = { diff --git a/shared-bindings/keypad/KeyMatrix.c b/shared-bindings/keypad/KeyMatrix.c index 2209f3f68f..d4ccb906b9 100644 --- a/shared-bindings/keypad/KeyMatrix.c +++ b/shared-bindings/keypad/KeyMatrix.c @@ -35,7 +35,22 @@ #include "shared-bindings/util.h" //| class KeyMatrix: -//| """Manage a 2D matrix of keys with row and column pins.""" +//| """Manage a 2D matrix of keys with row and column pins. +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//|
    +//| {% for board in support_matrix_reverse["keypad.KeyMatrix"] %} +//|
  • {{ board }} +//| {% endfor %} +//|
+//|
+//|

+//| +//| """ //| //| def __init__( //| self, diff --git a/shared-bindings/keypad/Keys.c b/shared-bindings/keypad/Keys.c index 2481fedc6b..090b9a47c8 100644 --- a/shared-bindings/keypad/Keys.c +++ b/shared-bindings/keypad/Keys.c @@ -35,7 +35,22 @@ #include "shared-bindings/util.h" //| class Keys: -//| """Manage a set of independent keys.""" +//| """Manage a set of independent keys. +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//|
    +//| {% for board in support_matrix_reverse["keypad.Keys"] %} +//|
  • {{ board }} +//| {% endfor %} +//|
+//|
+//|

+//| +//| """ //| //| def __init__( //| self, diff --git a/shared-bindings/keypad/ShiftRegisterKeys.c b/shared-bindings/keypad/ShiftRegisterKeys.c index 1fcf517ac3..803f485a99 100644 --- a/shared-bindings/keypad/ShiftRegisterKeys.c +++ b/shared-bindings/keypad/ShiftRegisterKeys.c @@ -35,7 +35,22 @@ #include "shared-bindings/util.h" //| class ShiftRegisterKeys: -//| """Manage a set of keys attached to an incoming shift register.""" +//| """Manage a set of keys attached to an incoming shift register. +//| +//| .. raw:: html +//| +//|

+//|

+//| Available on these boards +//|
    +//| {% for board in support_matrix_reverse["keypad.ShiftRegisterKeys"] %} +//|
  • {{ board }} +//| {% endfor %} +//|
+//|
+//|

+//| +//| """ //| //| def __init__( //| self, diff --git a/shared-bindings/keypad/__init__.c b/shared-bindings/keypad/__init__.c index 7dd76c1947..f53c58a398 100644 --- a/shared-bindings/keypad/__init__.c +++ b/shared-bindings/keypad/__init__.c @@ -89,6 +89,8 @@ const mp_obj_property_t keypad_generic_events_obj = { //| //| For more information about working with the `keypad` module in CircuitPython, //| see `this Learn guide `_. +//| +//| .. jinja //| """ STATIC mp_rom_map_elem_t keypad_module_globals_table[] = { From f41e314f486cda69d331693612788ef198d77fdd Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 20 Jul 2023 11:15:54 -0500 Subject: [PATCH 017/291] document builtins.pow3 availability this makes it show up in the support matrix --- docs/shared_bindings_matrix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index e61c28abcb..4cc9409325 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -69,6 +69,7 @@ ADDITIONAL_MODULES = { "array": "CIRCUITPY_ARRAY", # always available, so depend on something that's always 1. "builtins": "CIRCUITPY", + "builtins.pow3": "CIRCUITPY_BUILTINS_POW3", "busio.SPI": "CIRCUITPY_BUSIO_SPI", "busio.UART": "CIRCUITPY_BUSIO_UART", "collections": "CIRCUITPY_COLLECTIONS", From ed2e30b4d1646dd7093554f168714e2be946b159 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 21 Jul 2023 13:07:05 -0700 Subject: [PATCH 018/291] Added Arduino Nano ESP32-S3 --- .../boards/arduino_nano_esp32s3/board.c | 39 ++++++++++++ .../arduino_nano_esp32s3/mpconfigboard.h | 57 +++++++++++++++++ .../arduino_nano_esp32s3/mpconfigboard.mk | 17 +++++ .../boards/arduino_nano_esp32s3/pins.c | 63 +++++++++++++++++++ .../boards/arduino_nano_esp32s3/sdkconfig | 43 +++++++++++++ 5 files changed, 219 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 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..3b1f5efd87 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/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/arduino_nano_esp32s3/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h new file mode 100644 index 0000000000..8e55a9285d --- /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 CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO12, .sda = &pin_GPIO11}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO48, .mosi = &pin_GPIO38, .miso = &pin_GPIO47}} + +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO43, .rx = &pin_GPIO44}} 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..5eb6e2360e --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3/pins.c @@ -0,0 +1,63 @@ +#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 + + { 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_D12), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_D13), 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), MP_ROM_PTR(&pin_GPIO48) }, + + { 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_TX0), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX0), 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/arduino_nano_esp32s3/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig new file mode 100644 index 0000000000..5e920f29ff --- /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 \ No newline at end of file From e47e7bcdde760f80799d853d9191797f0dae276b Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 21 Jul 2023 14:50:24 -0700 Subject: [PATCH 019/291] Ran pre-commit --- ports/espressif/boards/arduino_nano_esp32s3/sdkconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig index 5e920f29ff..2acf08a4a7 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig +++ b/ports/espressif/boards/arduino_nano_esp32s3/sdkconfig @@ -40,4 +40,4 @@ CONFIG_SPIRAM_MEMTEST=y # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" -# end of LWIP \ No newline at end of file +# end of LWIP From 391bb1c45f22f3d25e8bc26c31904ed373b27ca0 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 26 May 2023 12:29:43 -0400 Subject: [PATCH 020/291] Add Adafruit Metro RP2040 --- .../boards/adafruit_metro_rp2040/board.c | 29 ++++++++ .../adafruit_metro_rp2040/mpconfigboard.h | 14 ++++ .../adafruit_metro_rp2040/mpconfigboard.mk | 9 +++ .../pico-sdk-configboard.h | 4 ++ .../boards/adafruit_metro_rp2040/pins.c | 66 +++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 ports/raspberrypi/boards/adafruit_metro_rp2040/board.c create mode 100644 ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/adafruit_metro_rp2040/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/adafruit_metro_rp2040/pins.c diff --git a/ports/raspberrypi/boards/adafruit_metro_rp2040/board.c b/ports/raspberrypi/boards/adafruit_metro_rp2040/board.c new file mode 100644 index 0000000000..331653173e --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_metro_rp2040/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..62eabc67f8 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.h @@ -0,0 +1,14 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit Metro RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO14) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO17) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO16) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO19) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..14b3af9d57 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x239A +USB_PID = 0x813E +USB_PRODUCT = "Metro RP2040" +USB_MANUFACTURER = "Adafruit" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ" diff --git a/ports/raspberrypi/boards/adafruit_metro_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/adafruit_metro_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_metro_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/adafruit_metro_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_metro_rp2040/pins.c new file mode 100644 index 0000000000..04ae94c80f --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_metro_rp2040/pins.c @@ -0,0 +1,66 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + + // On-board switch reverses D0 and D1 connections to RX and TX. + + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX_D0_SWITCH_LEFT), MP_ROM_PTR(&pin_GPIO0) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX_D0_SWITCH_RIGHT), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX_D1_SWITCH_LEFT), MP_ROM_PTR(&pin_GPIO1) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX_D1_SWITCH_RIGHT), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CD), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDIO_CLOCK), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDIO_DATA0), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDIO_DATA1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDIO_DATA2), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO23) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SDIO_DATA3), MP_ROM_PTR(&pin_GPIO23) }, + + { 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_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 9a9fe1240df246263a98da1f42e5cfbdc6503fc0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 17 Jul 2023 12:56:55 -0500 Subject: [PATCH 021/291] update metro rp2040 to work with 16MB flash --- ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk index 14b3af9d57..20c3042b7a 100644 --- a/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_metro_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ" +EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ,W25Q128JV" From 90ec0f2ee0f710cf5d46666556e21651f8d3727a Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Tue, 27 Jun 2023 17:14:24 +1000 Subject: [PATCH 022/291] shared-bindings/zlib: Fix docs for zlib.decompress. The docs say the method is called `zlib_decompress` but should be just `decompress`. Signed-off-by: Jim Mussared --- shared-bindings/zlib/__init__.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shared-bindings/zlib/__init__.c b/shared-bindings/zlib/__init__.c index ba02914638..3b45e605e6 100644 --- a/shared-bindings/zlib/__init__.c +++ b/shared-bindings/zlib/__init__.c @@ -48,9 +48,7 @@ //| (commonly used in zlib library and gzip archiver). Compression is not yet implemented.""" //| -//| def zlib_decompress( -//| data: bytes, wbits: Optional[int] = 0, bufsize: Optional[int] = 0 -//| ) -> bytes: +//| def decompress(data: bytes, wbits: Optional[int] = 0, bufsize: Optional[int] = 0) -> bytes: //| """Return decompressed *data* as bytes. *wbits* is DEFLATE dictionary window //| size used during compression (8-15, the dictionary size is power of 2 of //| that value). Additionally, if value is positive, *data* is assumed to be From 311f6b0c79052e2e4f6b21dbfa55bb1fe32604d3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 27 Jun 2023 19:11:25 -0400 Subject: [PATCH 023/291] add Adafruit Metro M7 1011 SD --- .../boards/adafruit_metro_m7_1011_sd/board.c | 64 ++++++++ .../adafruit_metro_m7_1011_sd/flash_config.c | 153 ++++++++++++++++++ .../adafruit_metro_m7_1011_sd/mpconfigboard.h | 20 +++ .../mpconfigboard.mk | 8 + .../boards/adafruit_metro_m7_1011_sd/pins.c | 60 +++++++ .../boards/metro_m7_1011/mpconfigboard.mk | 2 +- ports/mimxrt10xx/boards/metro_m7_1011/pins.c | 5 + 7 files changed, 311 insertions(+), 1 deletion(-) create mode 100644 ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/board.c create mode 100644 ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/flash_config.c create mode 100644 ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.h create mode 100644 ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.mk create mode 100644 ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/pins.c diff --git a/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/board.c b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/board.c new file mode 100644 index 0000000000..62be2303a5 --- /dev/null +++ b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/board.c @@ -0,0 +1,64 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * Copyright (c) 2019 Artur Pacholec + * + * 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 "shared-bindings/microcontroller/Pin.h" + +// These pins should never ever be reset; doing so could interfere with basic operation. +// Used in common-hal/microcontroller/Pin.c +const mcu_pin_obj_t *mimxrt10xx_reset_forbidden_pins[] = { + // SWD Pins + &pin_GPIO_AD_13,// SWDIO + &pin_GPIO_AD_12,// SWCLK + + // FLEX flash + &pin_GPIO_SD_12, + &pin_GPIO_SD_11, + &pin_GPIO_SD_10, + &pin_GPIO_SD_09, + &pin_GPIO_SD_08, + &pin_GPIO_SD_07, + &pin_GPIO_SD_06, + NULL, // Must end in NULL. +}; + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. + +bool mimxrt10xx_board_reset_pin_number(const mcu_pin_obj_t *pin) { + #if CIRCUITPY_SWO_TRACE + if (pin == &pin_GPIO_AD_09) { + IOMUXC_SetPinMux( /* Add these lines*/ + IOMUXC_GPIO_AD_09_ARM_TRACE_SWO, + 0U); + IOMUXC_SetPinConfig( /* Add these lines*/ + IOMUXC_GPIO_AD_09_ARM_TRACE_SWO, + 0x00F9U); + return true; + } + #endif + return false; +} diff --git a/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/flash_config.c b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/flash_config.c new file mode 100644 index 0000000000..3b47af1d6c --- /dev/null +++ b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/flash_config.c @@ -0,0 +1,153 @@ +/* + * Copyright 2017 NXP + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "boards/flash_config.h" + +#include "xip/fsl_flexspi_nor_boot.h" + +// Config for W25Q32JV with QSPI routed. (compatible with GD25Q32) +__attribute__((section(".boot_hdr.conf"))) +const flexspi_nor_config_t qspiflash_config = { + .pageSize = 256u, + .sectorSize = 4u * 1024u, + .ipcmdSerialClkFreq = kFLEXSPISerialClk_133MHz, + .blockSize = 0x00010000, + .isUniformBlockSize = false, + .memConfig = + { + .tag = FLEXSPI_CFG_BLK_TAG, + .version = FLEXSPI_CFG_BLK_VERSION, + .readSampleClkSrc = kFLEXSPIReadSampleClk_LoopbackFromSckPad, + .csHoldTime = 3u, + .csSetupTime = 3u, + + .busyOffset = 0u, // Status bit 0 indicates busy. + .busyBitPolarity = 0u, // Busy when the bit is 1. + + .deviceModeCfgEnable = 1u, + .deviceModeType = kDeviceConfigCmdType_QuadEnable, + .deviceModeSeq = { + .seqId = 4u, + .seqNum = 1u, + }, + .deviceModeArg = 0x0200, + .configCmdEnable = 1u, + .configModeType[0] = kDeviceConfigCmdType_Generic, + .configCmdSeqs[0] = { + .seqId = 2u, + .seqNum = 1u, + }, + .deviceType = kFLEXSPIDeviceType_SerialNOR, + .sflashPadType = kSerialFlash_4Pads, + .serialClkFreq = kFLEXSPISerialClk_133MHz, + .sflashA1Size = FLASH_SIZE, + .lookupTable = + { + // FSL_ROM_FLEXSPI_LUT_SEQ(cmd0, pad0, op0, cmd1, pad1, op1) + // The high 16 bits is command 1 and the low are command 0. + // Within a command, the top 6 bits are the opcode, the next two are the number + // of pads and then last byte is the operand. The operand's meaning changes + // per opcode. + + // Indices with ROM should always have the same function because the ROM + // bootloader uses it. + + // 0: ROM: Read LUTs + // Quad version + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB /* the command to send */, + RADDR_SDR, FLEXSPI_4PAD, 24 /* bits to transmit */), + FSL_ROM_FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 6 /* 6 dummy cycles, 2 for M7-0 and 4 dummy */, + READ_SDR, FLEXSPI_4PAD, 0x04), + // Single fast read version, good for debugging. + // FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x0B /* the command to send */, + // RADDR_SDR, FLEXSPI_1PAD, 24 /* bits to transmit */), + // FSL_ROM_FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_1PAD, 8 /* 8 dummy clocks */, + // READ_SDR, FLEXSPI_1PAD, 0x04), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 1: ROM: Read status + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x05 /* the command to send */, + READ_SDR, FLEXSPI_1PAD, 0x02), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 2: Empty + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x35 /* the command to send */, + DUMMY_SDR, FLEXSPI_1PAD, 8), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 3: ROM: Write Enable + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x06 /* the command to send */, + STOP, FLEXSPI_1PAD, 0x00), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 4: Config: Write Status + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x01 /* the command to send */, + WRITE_SDR, FLEXSPI_1PAD, 0x02), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 5: ROM: Erase Sector + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x20 /* the command to send */, + RADDR_SDR, FLEXSPI_1PAD, 24 /* bits to transmit */), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 6: Empty + EMPTY_SEQUENCE, + + // 7: Empty + EMPTY_SEQUENCE, + + // 8: Block Erase + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xD8 /* the command to send */, + RADDR_SDR, FLEXSPI_1PAD, 24 /* bits to transmit */), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 9: ROM: Page program + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x02 /* the command to send */, + RADDR_SDR, FLEXSPI_1PAD, 24 /* bits to transmit */), + + FSL_ROM_FLEXSPI_LUT_SEQ(WRITE_SDR, FLEXSPI_1PAD, 0x04 /* data out */, + STOP, FLEXSPI_1PAD, 0), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 10: Empty + EMPTY_SEQUENCE, + + // 11: ROM: Chip erase + SEQUENCE(FSL_ROM_FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0x60 /* the command to send */, + STOP, FLEXSPI_1PAD, 0), + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS, + TWO_EMPTY_STEPS), + + // 12: Empty + EMPTY_SEQUENCE, + + // 13: ROM: Read SFDP + EMPTY_SEQUENCE, + + // 14: ROM: Restore no cmd + EMPTY_SEQUENCE, + + // 15: ROM: Dummy + EMPTY_SEQUENCE + }, + }, +}; diff --git a/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.h b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.h new file mode 100644 index 0000000000..589b2a2b65 --- /dev/null +++ b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.h @@ -0,0 +1,20 @@ +#define MICROPY_HW_BOARD_NAME "Metro MIMXRT1011" +#define MICROPY_HW_MCU_NAME "IMXRT1011DAE5A" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO_00) + +// If you change this, then make sure to update the linker scripts as well to +// make sure you don't overwrite code +#define CIRCUITPY_INTERNAL_NVM_SIZE 0 + +#define BOARD_FLASH_SIZE (8 * 1024 * 1024) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO_02) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO_01) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO_AD_06) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO_AD_04) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO_AD_03) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO_09) +#define DEFAULT_UART_BUS_TX (&pin_GPIO_10) diff --git a/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.mk b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.mk new file mode 100644 index 0000000000..ec4c04c78e --- /dev/null +++ b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x239A +USB_PID = 0x8142 +USB_PRODUCT = "Metro M7 iMX RT1011 SD" +USB_MANUFACTURER = "Adafruit" + +CHIP_VARIANT = MIMXRT1011DAE5A +CHIP_FAMILY = MIMXRT1011 +FLASH = W25Q64JV diff --git a/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/pins.c b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/pins.c new file mode 100644 index 0000000000..8096973aaf --- /dev/null +++ b/ports/mimxrt10xx/boards/adafruit_metro_m7_1011_sd/pins.c @@ -0,0 +1,60 @@ +#include "shared-bindings/board/__init__.h" + +#include "supervisor/board.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // Analog + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO_AD_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO_AD_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO_AD_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO_AD_05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO_AD_10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO_AD_08) }, + + // Digital + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO_09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO_09) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO_10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO_10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO_13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO_12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO_SD_00) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO_SD_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO_SD_02) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO_11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO_08) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO_07) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO_06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO_05) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO_04) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_LED),MP_ROM_PTR(&pin_GPIO_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D13),MP_ROM_PTR(&pin_GPIO_03) }, + + // SD control + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CD), MP_ROM_PTR(&pin_GPIO_AD_11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO_AD_14) }, + + // SPI + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO_AD_06) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO_AD_03) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO_AD_04) }, + + // I2C + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO_01) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO_02) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO_00) }, + + { 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_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_I2S_WORD_SELECT), MP_ROM_PTR(&pin_GPIO_06) }, // D10 + { MP_ROM_QSTR(MP_QSTR_I2S_BIT_CLOCK), MP_ROM_PTR(&pin_GPIO_07) }, // D9 + { MP_ROM_QSTR(MP_QSTR_I2S_DATA), MP_ROM_PTR(&pin_GPIO_04) }, // D12 +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk b/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk index 56155aa4d0..ec7c6c2f1c 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk +++ b/ports/mimxrt10xx/boards/metro_m7_1011/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x239A USB_PID = 0x80E2 -USB_PRODUCT = "Metro M7 iMX RT1011" +USB_PRODUCT = "Metro M7 iMX RT1011 AirLift" USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = MIMXRT1011DAE5A diff --git a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c index 98082e3c11..fe03d09764 100644 --- a/ports/mimxrt10xx/boards/metro_m7_1011/pins.c +++ b/ports/mimxrt10xx/boards/metro_m7_1011/pins.c @@ -58,8 +58,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_I2S_WORD_SELECT), MP_ROM_PTR(&pin_GPIO_06) }, // D10 { MP_ROM_QSTR(MP_QSTR_I2S_WSEL), MP_ROM_PTR(&pin_GPIO_06) }, // D10 + + { MP_ROM_QSTR(MP_QSTR_I2S_BIT_CLOCK), MP_ROM_PTR(&pin_GPIO_07) }, // D9 { MP_ROM_QSTR(MP_QSTR_I2S_BCLK), MP_ROM_PTR(&pin_GPIO_07) }, // D9 + + { MP_ROM_QSTR(MP_QSTR_I2S_DATA), MP_ROM_PTR(&pin_GPIO_04) }, // D12 { MP_ROM_QSTR(MP_QSTR_I2S_DOUT), MP_ROM_PTR(&pin_GPIO_04) }, // D12 }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 31aa9b2bb06c1745aa18c2ac67117ea03d91a80f Mon Sep 17 00:00:00 2001 From: Neradoc Date: Wed, 28 Jun 2023 15:11:23 +0200 Subject: [PATCH 024/291] Fix PSRAM on espressif ESP32S3 box and box lite --- ports/espressif/boards/espressif_esp32s3_box/sdkconfig | 1 + ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index ead0088da5..6884299abe 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -1,3 +1,4 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y CONFIG_SPIRAM_SPEED_80M=y diff --git a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig index ead0088da5..6884299abe 100644 --- a/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box_lite/sdkconfig @@ -1,3 +1,4 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y CONFIG_SPIRAM=y CONFIG_SPIRAM_MODE_OCT=y CONFIG_SPIRAM_SPEED_80M=y From 66d0d95f237dfb1b2202165819fa5eaf38669482 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 28 Jun 2023 22:56:08 -0400 Subject: [PATCH 025/291] adafruit_qtpy_esp32s3_4mbflash_2mbpsram --- .../board.c | 39 ++++++++++++ .../mpconfigboard.h | 45 ++++++++++++++ .../mpconfigboard.mk | 13 ++++ .../pins.c | 62 +++++++++++++++++++ .../sdkconfig | 47 ++++++++++++++ .../mpconfigboard.mk | 3 - 6 files changed, 206 insertions(+), 3 deletions(-) create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.h create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/pins.c create mode 100644 ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/board.c new file mode 100644 index 0000000000..3b1f5efd87 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/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/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.h new file mode 100644 index 0000000000..36319ce107 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.h @@ -0,0 +1,45 @@ +/* + * 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 QT Py ESP32-S3 4MB Flash 2MB PSRAM" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO39) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO38) + +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO6, .sda = &pin_GPIO7}, \ + {.scl = &pin_GPIO40, .sda = &pin_GPIO41}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO36, .mosi = &pin_GPIO35, .miso = &pin_GPIO37}} + +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO5, .rx = &pin_GPIO16}} + +#define DOUBLE_TAP_PIN (&pin_GPIO10) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk new file mode 100644 index 0000000000..50b1394a25 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -0,0 +1,13 @@ +USB_VID = 0x239A +USB_PID = 0x8144 + +USB_PRODUCT = "QT Py ESP32S3 4MB Flash 2MB PSRAM" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 8MB + +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/pins.c new file mode 100644 index 0000000000..5d0a3c0baa --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/pins.c @@ -0,0 +1,62 @@ +#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 + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { 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/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/sdkconfig new file mode 100644 index 0000000000..9a05ab0205 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_4mbflash_2mbpsram/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=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 +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + +# end of Component config diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk index e695bae635..ac1e32a40d 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk @@ -10,7 +10,4 @@ CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_FLASH_SIZE = 8MB -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register CIRCUITPY_ESPCAMERA = 0 From 97a8d713567701bc83fef41f361517ccc625cfbd Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 3 Jul 2023 12:08:10 -0700 Subject: [PATCH 026/291] Swapped address pins for Rev C --- ports/espressif/boards/adafruit_matrixportal_s3/pins.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/adafruit_matrixportal_s3/pins.c b/ports/espressif/boards/adafruit_matrixportal_s3/pins.c index bc2de4299b..5cdd9ab92c 100644 --- a/ports/espressif/boards/adafruit_matrixportal_s3/pins.c +++ b/ports/espressif/boards/adafruit_matrixportal_s3/pins.c @@ -77,10 +77,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_G2),MP_ROM_PTR(&pin_GPIO39) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_B2),MP_ROM_PTR(&pin_GPIO37) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRA),MP_ROM_PTR(&pin_GPIO35) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRA),MP_ROM_PTR(&pin_GPIO45) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRB),MP_ROM_PTR(&pin_GPIO36) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRC),MP_ROM_PTR(&pin_GPIO48) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRD),MP_ROM_PTR(&pin_GPIO45) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRD),MP_ROM_PTR(&pin_GPIO35) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_ADDRE),MP_ROM_PTR(&pin_GPIO21) }, { MP_OBJ_NEW_QSTR(MP_QSTR_MTX_CLK),MP_ROM_PTR(&pin_GPIO2) }, From 4dc9b0dde7e3502e95a3a3ea2df49031e005848f Mon Sep 17 00:00:00 2001 From: Zelin Cai Date: Fri, 7 Jul 2023 00:09:05 +0800 Subject: [PATCH 027/291] Added Makerdiary nRF52840 Connect Kit. Signed-off-by: Zelin Cai --- .../makerdiary_nrf52840_connectkit/README.md | 32 +++++++ .../makerdiary_nrf52840_connectkit/board.c | 29 +++++++ .../mpconfigboard.h | 30 +++++++ .../mpconfigboard.mk | 14 ++++ .../makerdiary_nrf52840_connectkit/pins.c | 84 +++++++++++++++++++ 5 files changed, 189 insertions(+) create mode 100644 ports/nrf/boards/makerdiary_nrf52840_connectkit/README.md create mode 100644 ports/nrf/boards/makerdiary_nrf52840_connectkit/board.c create mode 100644 ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.h create mode 100644 ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.mk create mode 100644 ports/nrf/boards/makerdiary_nrf52840_connectkit/pins.c diff --git a/ports/nrf/boards/makerdiary_nrf52840_connectkit/README.md b/ports/nrf/boards/makerdiary_nrf52840_connectkit/README.md new file mode 100644 index 0000000000..2d06ff73a0 --- /dev/null +++ b/ports/nrf/boards/makerdiary_nrf52840_connectkit/README.md @@ -0,0 +1,32 @@ +# Makerdiary nRF52840 Connect Kit + +## Introduction + +[nRF52840 Connect Kit](https://makerdiary.com/products/nrf52840-connectkit) is an open-source prototyping +kit designed for connected projects. It is built using the nRF52840 SoC, which has protocol support for +Bluetooth LE, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary stacks. It provides +Arm TrustZone® CryptoCell cryptographic unit as well as numerous peripherals such as USB 2.0, NFC-A, GPIO, +UART, SPI, TWI, PDM, I2S, QSPI, PWM, ADC, QDEC to support a wide range of applications. + +The design is available in an easy-to-use form factor with USB-C and 40 pin DIP/SMT type, including up to +32 multi-function GPIO pins (7 can be used as ADC inputs) and Serial Wire Debug (SWD) port. It features +RGB LED, Buttons, external 64 Mbit QSPI flash and flexible power management with various options for easily +powering the unit from USB-C, external supplies or batteries, and also has Chip antenna and U.FL receptacle +options to support various wireless scenarios. + +Refer to [nRF52840 Connect Kit wiki page](https://wiki.makerdiary.com/nrf52840-connectkit) for more details. + +![](https://wiki.makerdiary.com/nrf52840-connectkit/assets/images/nrf52840_connectkit_hero.png) + +## Hardware diagram + +The following figure illustrates the nRF52840 Connect Kit hardware diagram. The design is available in +Chip antenna and U.FL receptacle options, both have most of the same components except the antenna +interface. + +[![](https://wiki.makerdiary.com/nrf52840-connectkit/assets/images/pinout.png)](https://wiki.makerdiary.com/nrf52840-connectkit/assets/attachments/nrf52840-connectkit-quick-start-guide.pdf) + +## Get Involved + +We think the best way to learn is by doing. And to help you run CircuitPython on nRF52840 Connect Kit, +we have provided an extensive set of documentation. Find the details [here](https://wiki.makerdiary.com/nrf52840-connectkit/guides/python/). diff --git a/ports/nrf/boards/makerdiary_nrf52840_connectkit/board.c b/ports/nrf/boards/makerdiary_nrf52840_connectkit/board.c new file mode 100644 index 0000000000..fb1ce4fb83 --- /dev/null +++ b/ports/nrf/boards/makerdiary_nrf52840_connectkit/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 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/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.h b/ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.h new file mode 100644 index 0000000000..3cb15ca66b --- /dev/null +++ b/ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.h @@ -0,0 +1,30 @@ +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "Makerdiary nRF52840 Connect Kit" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 19) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 17) +#endif + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_24) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_25) + +#define DEFAULT_SPI_BUS_SCK (&pin_P0_14) +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_15) +#define DEFAULT_SPI_BUS_MISO (&pin_P0_16) + +#define DEFAULT_UART_BUS_RX (&pin_P0_12) +#define DEFAULT_UART_BUS_TX (&pin_P0_13) + +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_P1_10) +#define CIRCUITPY_RGB_STATUS_G (&pin_P1_11) +#define CIRCUITPY_RGB_STATUS_B (&pin_P1_12) diff --git a/ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.mk b/ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.mk new file mode 100644 index 0000000000..0e5c1181c7 --- /dev/null +++ b/ports/nrf/boards/makerdiary_nrf52840_connectkit/mpconfigboard.mk @@ -0,0 +1,14 @@ +USB_VID = 0x2886 +USB_PID = 0xF003 +USB_PRODUCT = "Makerdiary nRF52840 Connect Kit" +USB_MANUFACTURER = "Makerdiary" +SOFTDEV_VERSION=7.0.1 + +MCU_CHIP = nrf52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "MX25R6435F" + +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BLE +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/nrf/boards/makerdiary_nrf52840_connectkit/pins.c b/ports/nrf/boards/makerdiary_nrf52840_connectkit/pins.c new file mode 100644 index 0000000000..80478ca03f --- /dev/null +++ b/ports/nrf/boards/makerdiary_nrf52840_connectkit/pins.c @@ -0,0 +1,84 @@ +#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_P3), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_P4), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_P5), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_P6), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_P7), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_P8), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_P9), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_P10), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_P11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_P12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_P13), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_P14), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_P15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_P16), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_P18), MP_ROM_PTR(&pin_P0_18) }, + { MP_ROM_QSTR(MP_QSTR_P24), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_P25), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_P26), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_P27), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_P28), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_P29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_P30), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_P31), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_P32), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_P33), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_P34), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_P35), MP_ROM_PTR(&pin_P1_03) }, + { MP_ROM_QSTR(MP_QSTR_P36), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_P37), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_P38), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_P39), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_P40), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_P41), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_P42), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_P43), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_P44), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_P45), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_P46), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_P47), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_MEAS_EN), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_MODE), MP_ROM_PTR(&pin_P1_13) }, + + { MP_ROM_QSTR(MP_QSTR_USER), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_RESET), MP_ROM_PTR(&pin_P0_18) }, + + { MP_ROM_QSTR(MP_QSTR_LED0), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P1_12) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_12) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_25) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_16) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_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 b6d4488b317c626234fd4a37c5a90ebeed6a0f50 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+microdev1@users.noreply.github.com> Date: Sun, 9 Jul 2023 21:25:37 +0530 Subject: [PATCH 028/291] fix set hostname --- ports/raspberrypi/common-hal/wifi/Radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index e17b35d108..8571d490c4 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -88,7 +88,7 @@ mp_obj_t common_hal_wifi_radio_get_hostname(wifi_radio_obj_t *self) { void common_hal_wifi_radio_set_hostname(wifi_radio_obj_t *self, const char *hostname) { assert(strlen(hostname) < MP_ARRAY_SIZE(self->hostname)); - memcpy(self->hostname, hostname, strlen(hostname)); + strncpy(self->hostname, hostname, MP_ARRAY_SIZE(self->hostname) - 1); netif_set_hostname(NETIF_STA, self->hostname); netif_set_hostname(NETIF_AP, self->hostname); } From 317cab87a7539016516689557bb429388a25f9b0 Mon Sep 17 00:00:00 2001 From: Leah Post Date: Thu, 6 Jul 2023 20:14:09 +0200 Subject: [PATCH 029/291] Add new board: splitkb.com's Liatris --- .../boards/splitkb_liatris/board.c | 29 ++++++++++ .../boards/splitkb_liatris/mpconfigboard.h | 14 +++++ .../boards/splitkb_liatris/mpconfigboard.mk | 9 +++ .../splitkb_liatris/pico-sdk-configboard.h | 1 + .../raspberrypi/boards/splitkb_liatris/pins.c | 55 +++++++++++++++++++ 5 files changed, 108 insertions(+) create mode 100644 ports/raspberrypi/boards/splitkb_liatris/board.c create mode 100644 ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/splitkb_liatris/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/splitkb_liatris/pins.c diff --git a/ports/raspberrypi/boards/splitkb_liatris/board.c b/ports/raspberrypi/boards/splitkb_liatris/board.c new file mode 100644 index 0000000000..7d8b03d5f4 --- /dev/null +++ b/ports/raspberrypi/boards/splitkb_liatris/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 Conor Burns 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/raspberrypi/boards/splitkb_liatris/mpconfigboard.h b/ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.h new file mode 100644 index 0000000000..a38b4a5550 --- /dev/null +++ b/ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.h @@ -0,0 +1,14 @@ +#define MICROPY_HW_BOARD_NAME "splitkb.com Liatris" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO25) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO22) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO23) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.mk b/ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.mk new file mode 100644 index 0000000000..9ce0b7b925 --- /dev/null +++ b/ports/raspberrypi/boards/splitkb_liatris/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x2E8A +USB_PID = 0x1060 +USB_PRODUCT = "Liatris" +USB_MANUFACTURER = "splitkb.com" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" diff --git a/ports/raspberrypi/boards/splitkb_liatris/pico-sdk-configboard.h b/ports/raspberrypi/boards/splitkb_liatris/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/splitkb_liatris/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/splitkb_liatris/pins.c b/ports/raspberrypi/boards/splitkb_liatris/pins.c new file mode 100644 index 0000000000..8086ee7fb9 --- /dev/null +++ b/ports/raspberrypi/boards/splitkb_liatris/pins.c @@ -0,0 +1,55 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // Left, top->bottom + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + + // Right, top->bottom + { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + // Bottom, left->right + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + + // Internals + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_POWER_LED), MP_ROM_PTR(&pin_GPIO24) }, + + { 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_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From df821bf22c5b6ef973e4f483e1b5418c0fe1a541 Mon Sep 17 00:00:00 2001 From: Petr Sedlacek Date: Mon, 10 Jul 2023 22:57:45 +0200 Subject: [PATCH 030/291] Update 42. Keebs Frood support for Rev7 --- ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk b/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk index 955d8d63f5..50d28c6ea9 100644 --- a/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk +++ b/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "42. Keebs" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "ZD25WQ16B" +EXTERNAL_FLASH_DEVICES = "ZD25WQ16B, W25Q32JVxQ" From b87ceb26aa09011fada7b3dad740cae1ae346b76 Mon Sep 17 00:00:00 2001 From: Sylwester Date: Tue, 11 Jul 2023 09:52:47 +0200 Subject: [PATCH 031/291] Add Datanoise PicoADK --- .../boards/datanoise_picoadk/board.c | 29 +++++++++++ .../boards/datanoise_picoadk/mpconfigboard.h | 14 +++++ .../boards/datanoise_picoadk/mpconfigboard.mk | 9 ++++ .../datanoise_picoadk/pico-sdk-configboard.h | 4 ++ .../boards/datanoise_picoadk/pins.c | 51 +++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 ports/raspberrypi/boards/datanoise_picoadk/board.c create mode 100644 ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/datanoise_picoadk/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/datanoise_picoadk/pins.c diff --git a/ports/raspberrypi/boards/datanoise_picoadk/board.c b/ports/raspberrypi/boards/datanoise_picoadk/board.c new file mode 100644 index 0000000000..331653173e --- /dev/null +++ b/ports/raspberrypi/boards/datanoise_picoadk/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/raspberrypi/boards/datanoise_picoadk/mpconfigboard.h b/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.h new file mode 100644 index 0000000000..f287893eeb --- /dev/null +++ b/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.h @@ -0,0 +1,14 @@ +#define MICROPY_HW_BOARD_NAME "Datanoise PicoADK" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO15) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO12) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk b/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk new file mode 100644 index 0000000000..1398f0b97f --- /dev/null +++ b/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x2E8A +USB_PID = 0x104B +USB_PRODUCT = "PicoADK" +USB_MANUFACTURER = "Datanoise" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "GD25Q32C,W25Q32JVxQ" diff --git a/ports/raspberrypi/boards/datanoise_picoadk/pico-sdk-configboard.h b/ports/raspberrypi/boards/datanoise_picoadk/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/datanoise_picoadk/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/datanoise_picoadk/pins.c b/ports/raspberrypi/boards/datanoise_picoadk/pins.c new file mode 100644 index 0000000000..7bcfd9a6f2 --- /dev/null +++ b/ports/raspberrypi/boards/datanoise_picoadk/pins.c @@ -0,0 +1,51 @@ +#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_SCK), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_ADC_SCK), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_ADC_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_ADC_MISO), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_ADC_CS), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_I2S_DOUT), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_BCLK), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_I2S_LRCLK), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_I2S_DEMP), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_I2S_XSMT), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, + + { 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_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) } +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From a4b4f57ff14166443aebeb804061a8ec4f6aea09 Mon Sep 17 00:00:00 2001 From: Sylwester Date: Tue, 11 Jul 2023 10:01:46 +0200 Subject: [PATCH 032/291] Add Datanoise PicoADK --- ports/raspberrypi/boards/datanoise_picoadk/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/datanoise_picoadk/pins.c b/ports/raspberrypi/boards/datanoise_picoadk/pins.c index 7bcfd9a6f2..9f1cc85b56 100644 --- a/ports/raspberrypi/boards/datanoise_picoadk/pins.c +++ b/ports/raspberrypi/boards/datanoise_picoadk/pins.c @@ -42,7 +42,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2S_XSMT), MP_ROM_PTR(&pin_GPIO25) }, { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, - + { 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) }, From 6d45f4504c71b3825cc875c82a2d4549b3ff158e Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:24:33 -0500 Subject: [PATCH 033/291] web workflow: uses an mdns port service slot --- docs/workflows.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/workflows.md b/docs/workflows.md index 453b425491..a82130e63c 100644 --- a/docs/workflows.md +++ b/docs/workflows.md @@ -94,6 +94,10 @@ MDNS is used to resolve [`circuitpython.local`](http://circuitpython.local) to a hostname of the form `cpy-XXXXXX.local`. The `XXXXXX` is based on network MAC address. The device also provides the MDNS service with service type `_circuitpython` and protocol `_tcp`. +Since port 80 (or the port assigned to `CIRCUITPY_WEB_API_PORT`) is used for MDNS, the `mdns` +[module](https://docs.circuitpython.org/en/latest/shared-bindings/mdns/index.html#mdns.Server.advertise_service) +can't also advertise a service on that port. + ### HTTP The web server is HTTP 1.1 and may use chunked responses so that it doesn't need to precompute content length. From 3d212f70ebcddba7d4ac849a5b3e87cd3798369e Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:32:44 -0500 Subject: [PATCH 034/291] mdns: can't use web workflow port --- shared-bindings/mdns/Server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared-bindings/mdns/Server.c b/shared-bindings/mdns/Server.c index 0d06d67f0d..2afc64e02b 100644 --- a/shared-bindings/mdns/Server.c +++ b/shared-bindings/mdns/Server.c @@ -171,6 +171,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mdns_server_find_obj, 1, _mdns_server_find); //| ``service_type`` and ``protocol`` can only occur on one port. Any call after the first //| will update the entry's port. //| +//| If web workflow is active, the port it uses can't also be used to advertise a service. +//| //| :param str service_type: The service type such as "_http" //| :param str protocol: The service protocol such as "_tcp" //| :param int port: The port used by the service""" From 104cf0bb3a405d066f2f0094f7c272b923d94494 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:41:14 -0500 Subject: [PATCH 035/291] raspberrypi: start AP before set IPv4 --- shared-bindings/wifi/Radio.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 66502426cd..46f8f50f48 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -560,6 +560,11 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_ap_obj, //| ) -> None: //| """Sets the IP v4 address of the station. Must include the netmask and gateway. DNS address is optional. //| Setting the address manually will stop the DHCP client.""" +//| +//| .. note:: +//| +//| In the raspberrypi port (RP2040 CYW43), the access point needs to be started before the IP v4 address can be set. +//| """ //| ... STATIC mp_obj_t wifi_radio_set_ipv4_address(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_ipv4, ARG_netmask, ARG_gateway, ARG_ipv4_dns }; From 939149bb2fb02c954d03694d451311864395a607 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:53:52 -0500 Subject: [PATCH 036/291] formatting fix --- shared-bindings/wifi/Radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 46f8f50f48..ac97db85af 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -559,7 +559,7 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_ap_obj, //| ipv4_dns: Optional[ipaddress.IPv4Address], //| ) -> None: //| """Sets the IP v4 address of the station. Must include the netmask and gateway. DNS address is optional. -//| Setting the address manually will stop the DHCP client.""" +//| Setting the address manually will stop the DHCP client. //| //| .. note:: //| From 54b23feb060df2b520f78b47b79a7f1e62b9fcfe Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Thu, 13 Jul 2023 12:41:07 -0500 Subject: [PATCH 037/291] Update docs/workflows.md Co-authored-by: Scott Shawcroft --- docs/workflows.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/workflows.md b/docs/workflows.md index a82130e63c..10d2897870 100644 --- a/docs/workflows.md +++ b/docs/workflows.md @@ -94,9 +94,9 @@ MDNS is used to resolve [`circuitpython.local`](http://circuitpython.local) to a hostname of the form `cpy-XXXXXX.local`. The `XXXXXX` is based on network MAC address. The device also provides the MDNS service with service type `_circuitpython` and protocol `_tcp`. -Since port 80 (or the port assigned to `CIRCUITPY_WEB_API_PORT`) is used for MDNS, the `mdns` +Since port 80 (or the port assigned to `CIRCUITPY_WEB_API_PORT`) is used for web workflow, the `mdns` [module](https://docs.circuitpython.org/en/latest/shared-bindings/mdns/index.html#mdns.Server.advertise_service) -can't also advertise a service on that port. +can't advertise an additional service on that port. ### HTTP The web server is HTTP 1.1 and may use chunked responses so that it doesn't need to precompute From d84c69c056f449e321ad68f17963fa4eb4dbb8e8 Mon Sep 17 00:00:00 2001 From: Sylwester Date: Thu, 13 Jul 2023 12:04:27 +0200 Subject: [PATCH 038/291] Add NeoPixel Library for Datanoise PicoADK. --- ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk b/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk index 1398f0b97f..405821da3e 100644 --- a/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk +++ b/ports/raspberrypi/boards/datanoise_picoadk/mpconfigboard.mk @@ -7,3 +7,6 @@ CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "GD25Q32C,W25Q32JVxQ" + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel From aba171656d37569e8c3e5e7f5b6ca1094e884782 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 13 Jul 2023 09:47:38 -0500 Subject: [PATCH 039/291] throw an exception if os.getenv is used on a board without settings.toml support --- shared-bindings/os/__init__.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/os/__init__.c b/shared-bindings/os/__init__.c index 18fec53049..d8d4f404e8 100644 --- a/shared-bindings/os/__init__.c +++ b/shared-bindings/os/__init__.c @@ -122,7 +122,7 @@ STATIC mp_obj_t os_getenv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_ return common_hal_os_getenv(mp_obj_str_get_str(args[ARG_key].u_obj), args[ARG_default].u_obj); #else - return mp_const_none; + mp_raise_NotImplementedError(NULL); #endif } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(os_getenv_obj, 1, os_getenv); From 8abcbf3f3e732166e286a5f3a08c1ffed4a90a9a Mon Sep 17 00:00:00 2001 From: KB Sriram Date: Fri, 14 Jul 2023 21:53:58 -0700 Subject: [PATCH 040/291] py/objdict: Fix fromkeys to return the right type. Fixes https://github.com/adafruit/circuitpython/issues/8173 It looks like a small fix, and mostly independent of upstream plans around https://github.com/micropython/micropython/pull/6173 I also filed an issue upstream https://github.com/micropython/micropython/issues/12011 --- py/objdict.c | 16 ++++++++++++---- tests/basics/ordereddict1.py | 11 +++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/py/objdict.c b/py/objdict.c index 02aedacdd6..b63ea89137 100644 --- a/py/objdict.c +++ b/py/objdict.c @@ -110,8 +110,10 @@ STATIC void dict_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_ } } -mp_obj_t mp_obj_dict_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_obj_t dict_out = mp_obj_new_dict(0); +// This is a helper function to initialize an empty, but typed dictionary with +// a given number of slots. +STATIC mp_obj_t dict_new_typed(const mp_obj_type_t *type, const size_t n) { + mp_obj_t dict_out = mp_obj_new_dict(n); mp_obj_dict_t *dict = MP_OBJ_TO_PTR(dict_out); dict->base.type = type; #if MICROPY_PY_COLLECTIONS_ORDEREDDICT @@ -119,6 +121,11 @@ mp_obj_t mp_obj_dict_make_new(const mp_obj_type_t *type, size_t n_args, size_t n dict->map.is_ordered = 1; } #endif + return dict_out; +} + +mp_obj_t mp_obj_dict_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { + mp_obj_t dict_out = dict_new_typed(type, 0); if (n_args > 0 || n_kw > 0) { mp_obj_t args2[2] = {dict_out, args[0]}; // args[0] is always valid, even if it's not a positional arg mp_map_t kwargs; @@ -264,6 +271,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(dict_copy_obj, mp_obj_dict_copy); #if MICROPY_PY_BUILTINS_DICT_FROMKEYS // this is a classmethod STATIC mp_obj_t dict_fromkeys(size_t n_args, const mp_obj_t *args) { + mp_obj_type_t *type = MP_OBJ_TO_PTR(args[0]); mp_obj_t iter = mp_getiter(args[1], NULL); mp_obj_t value = mp_const_none; mp_obj_t next = MP_OBJ_NULL; @@ -277,9 +285,9 @@ STATIC mp_obj_t dict_fromkeys(size_t n_args, const mp_obj_t *args) { mp_obj_t len = mp_obj_len_maybe(args[1]); if (len == MP_OBJ_NULL) { /* object's type doesn't have a __len__ slot */ - self_out = mp_obj_new_dict(0); + self_out = dict_new_typed(type, 0); } else { - self_out = mp_obj_new_dict(MP_OBJ_SMALL_INT_VALUE(len)); + self_out = dict_new_typed(type, MP_OBJ_SMALL_INT_VALUE(len)); } mp_obj_dict_t *self = MP_OBJ_TO_PTR(self_out); diff --git a/tests/basics/ordereddict1.py b/tests/basics/ordereddict1.py index a6f305ff78..b70d7ff5d1 100644 --- a/tests/basics/ordereddict1.py +++ b/tests/basics/ordereddict1.py @@ -41,3 +41,14 @@ try: d.popitem() except: print('empty') + +# fromkeys returns the correct type and order +d = dict.fromkeys('abcdefghij') +print(type(d) == dict) +d = OrderedDict.fromkeys('abcdefghij') +print(type(d) == OrderedDict) +print(''.join(d)) + +# fromkey handles ordering with duplicates +d = OrderedDict.fromkeys('abcdefghijjihgfedcba') +print(''.join(d)) From bbf5e67fbb74b7c993136997eadd1f7c6a1d4f33 Mon Sep 17 00:00:00 2001 From: anecdata <16617689+anecdata@users.noreply.github.com> Date: Sun, 16 Jul 2023 20:35:49 -0500 Subject: [PATCH 041/291] docs: wifi.radio.ipv4_address_ap is read-only --- shared-bindings/wifi/Radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 66502426cd..c3c271b0da 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -616,7 +616,7 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_address_obj, (mp_obj_t)&wifi_radio_get_ipv4_address_obj); //| ipv4_address_ap: Optional[ipaddress.IPv4Address] -//| """IP v4 Address of the access point, when enabled. None otherwise.""" +//| """IP v4 Address of the access point, when enabled. None otherwise. (read-only)""" STATIC mp_obj_t wifi_radio_get_ipv4_address_ap(mp_obj_t self) { return common_hal_wifi_radio_get_ipv4_address_ap(self); } From 7f8f1b37fd078c37667c7b8f26772ebebc48b1ca Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 24 Jul 2023 10:47:37 -0700 Subject: [PATCH 042/291] Fix pin names --- .../boards/arduino_nano_esp32s3/pins.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ports/espressif/boards/arduino_nano_esp32s3/pins.c b/ports/espressif/boards/arduino_nano_esp32s3/pins.c index 5eb6e2360e..bf14bda2b9 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/pins.c +++ b/ports/espressif/boards/arduino_nano_esp32s3/pins.c @@ -9,7 +9,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_TX), 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) }, @@ -19,9 +23,16 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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) }, @@ -49,15 +60,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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), MP_ROM_PTR(&pin_GPIO48) }, - { 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_TX0), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_RX0), MP_ROM_PTR(&pin_GPIO44) }, - + { 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_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From f26d92fdb80affca378c36959fe1f6d822ddab1b Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 24 Jul 2023 15:11:22 -0700 Subject: [PATCH 043/291] Add inverted board and fix pins --- .../arduino_nano_esp32s3/mpconfigboard.h | 14 ++-- .../boards/arduino_nano_esp32s3/pins.c | 7 -- .../board.c | 39 +++++++++++ .../mpconfigboard.h | 54 ++++++++++++++++ .../mpconfigboard.mk | 17 +++++ .../pins.c | 64 +++++++++++++++++++ .../sdkconfig | 43 +++++++++++++ 7 files changed, 224 insertions(+), 14 deletions(-) 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/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h index 8e55a9285d..b9f22dab85 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h +++ b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h @@ -46,12 +46,12 @@ #define MICROPY_QSPI_CS (&pin_GPIO29) #endif +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO12) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO11) -#define CIRCUITPY_BOARD_I2C (1) -#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO12, .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 CIRCUITPY_BOARD_SPI (1) -#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO48, .mosi = &pin_GPIO38, .miso = &pin_GPIO47}} - -#define CIRCUITPY_BOARD_UART (1) -#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO43, .rx = &pin_GPIO44}} +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) \ No newline at end of file diff --git a/ports/espressif/boards/arduino_nano_esp32s3/pins.c b/ports/espressif/boards/arduino_nano_esp32s3/pins.c index bf14bda2b9..ca56c8900c 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/pins.c +++ b/ports/espressif/boards/arduino_nano_esp32s3/pins.c @@ -1,7 +1,5 @@ #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 @@ -9,11 +7,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_RX), MP_ROM_PTR(&pin_GPIO44) }, - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO43) }, - { MP_ROM_QSTR(MP_QSTR_TX), 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) }, @@ -66,6 +60,5 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_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/arduino_nano_esp32s3_inverted_statusled/board.c b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c new file mode 100644 index 0000000000..3b1f5efd87 --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/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/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h new file mode 100644 index 0000000000..71ad8d10ce --- /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) \ No newline at end of file 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..c9af3af25e --- /dev/null +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/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_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..2acf08a4a7 --- /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="espressif-esp32s3" +# end of LWIP From cd961982420b2772069ff6b557545693c986664f Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 24 Jul 2023 15:18:07 -0700 Subject: [PATCH 044/291] Ran pre-commit --- ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h | 2 +- .../arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h index b9f22dab85..7c046d9b72 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h +++ b/ports/espressif/boards/arduino_nano_esp32s3/mpconfigboard.h @@ -54,4 +54,4 @@ #define DEFAULT_SPI_BUS_MISO (&pin_GPIO47) #define DEFAULT_UART_BUS_RX (&pin_GPIO44) -#define DEFAULT_UART_BUS_TX (&pin_GPIO43) \ No newline at end of file +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h index 71ad8d10ce..4d4adcf1cb 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.h @@ -51,4 +51,4 @@ #define DEFAULT_SPI_BUS_SCK (&pin_GPIO48) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO38) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO47) \ No newline at end of file +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO47) From ae0ebfef2f209561ff0b73bef4aacb220354ba17 Mon Sep 17 00:00:00 2001 From: Tod Kurt Date: Fri, 21 Jul 2023 10:06:17 -0700 Subject: [PATCH 045/291] ESP32 synthio channels to 12 --- ports/espressif/mpconfigport.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 1b9808ad64..63cea3d0a8 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -38,6 +38,7 @@ CIRCUITPY_NVM ?= 1 CIRCUITPY_PS2IO ?= 1 CIRCUITPY_RGBMATRIX ?= 1 CIRCUITPY_ROTARYIO ?= 1 +CIRCUITPY_SYNTHIO_MAX_CHANNELS ?= 12 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 CIRCUITPY_WATCHDOG ?= 1 CIRCUITPY_WIFI ?= 1 From 8d87c1810e2624e2113a61fe3aa19fd915004aeb Mon Sep 17 00:00:00 2001 From: silabs-ChatNguyen Date: Tue, 25 Jul 2023 13:25:02 +0700 Subject: [PATCH 046/291] Change system clock to 78Mhz --- ports/silabs/circuitpython_efr32.slcp | 1 + ports/silabs/common-hal/microcontroller/Processor.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/silabs/circuitpython_efr32.slcp b/ports/silabs/circuitpython_efr32.slcp index d645f2b1ed..17c8118501 100644 --- a/ports/silabs/circuitpython_efr32.slcp +++ b/ports/silabs/circuitpython_efr32.slcp @@ -19,6 +19,7 @@ sdk_extension: - id: cp_efr32 version: 1.0.0 component: +- {id: device_init_dpll} - {id: bluetooth_feature_nvm} - {id: bluetooth_feature_gatt_server} - {id: bluetooth_feature_sm} diff --git a/ports/silabs/common-hal/microcontroller/Processor.c b/ports/silabs/common-hal/microcontroller/Processor.c index 841f3ba35f..12cf5ca809 100644 --- a/ports/silabs/common-hal/microcontroller/Processor.c +++ b/ports/silabs/common-hal/microcontroller/Processor.c @@ -50,7 +50,7 @@ float common_hal_mcu_processor_get_voltage(void) { } uint32_t common_hal_mcu_processor_get_frequency(void) { - return CMU_ClockFreqGet(cmuClock_HCLK); + return CMU_ClockFreqGet(cmuClock_SYSCLK); } void common_hal_mcu_processor_get_uid(uint8_t raw_id[]) { From eef5e8943a246feb90f401b1c7a9b7f7cbff8a60 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 25 Jul 2023 10:53:03 -0700 Subject: [PATCH 047/291] Updated duplicate vid checker --- tools/ci_check_duplicate_usb_vid_pid.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index f20630e886..dd7531dbb6 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -63,6 +63,7 @@ DEFAULT_CLUSTERLIST = { ], "0x239A:0x102E": ["weact_studio_pico", "weact_studio_pico_16mb"], "0x303A:0x8166": ["yd_esp32_s3_n8r8", "yd_esp32_s3_n16r8"], + "0x2341:0x0070": ["arduino_nano_esp32s3", "arduino_nano_esp32s3_inverted_statusled"], } cli_parser = argparse.ArgumentParser( From 197a7f31ab864fa44a2ba9de8fe2bf67c603757c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 26 Jul 2023 15:02:05 -0500 Subject: [PATCH 048/291] bump protomatter to 1.5.9 --- lib/protomatter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protomatter b/lib/protomatter index ecab2fa75e..5f0b40ed59 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit ecab2fa75e9d7675785d2b87f29a22f027da8ce5 +Subproject commit 5f0b40ed5991e22da63add5dbaeb7c194b72b607 From 76d69283a46229293ef8f426d4177f58a30351b4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 28 Jul 2023 10:44:38 -0500 Subject: [PATCH 049/291] update certificates to nina-fw 1.7.5 --- lib/certificates/nina-fw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/certificates/nina-fw b/lib/certificates/nina-fw index d73fe315cc..21205e4005 160000 --- a/lib/certificates/nina-fw +++ b/lib/certificates/nina-fw @@ -1 +1 @@ -Subproject commit d73fe315cc7f9148a0918490d3b75430c8444bf7 +Subproject commit 21205e400515a698266abaaea902bd1ea897bb5d From 5e8c38c8f9d915b8bc51b2acec9efc9a23821ff3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 2 Aug 2023 09:24:14 -0500 Subject: [PATCH 050/291] Add index.html as a redirect to README.html closes #8246 --- docs/redirects.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/redirects.txt b/docs/redirects.txt index b8282635ab..47ec20d577 100644 --- a/docs/redirects.txt +++ b/docs/redirects.txt @@ -1,3 +1,4 @@ +index.rst README.html shared-bindings//__init__.rst shared-bindings// shared-bindings/_bleio/Adapter.rst shared-bindings/_bleio/#_bleio.Adapter shared-bindings/_bleio/Address.rst shared-bindings/_bleio/#_bleio.Address From 67c5563eec5b34dd66d64685feedb058666fc0cb Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 3 Aug 2023 10:18:19 -0500 Subject: [PATCH 051/291] Apply -Wno-undef to just the needed file & remove incorrect -I arg --- ports/raspberrypi/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 9c7c8549ca..81af77706c 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -142,7 +142,6 @@ INC += \ -Isdk_config \ -I../../lib/tinyusb/src \ -I../../supervisor/shared/usb \ - -I../bindings/cyw43/__init__.h \ -I$(BUILD) # Pico specific configuration @@ -172,7 +171,7 @@ else endif # Remove -Wno-stringop-overflow after we can test with CI's GCC 10. Mac's looks weird. -DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-cast-align -Wno-undef +DISABLE_WARNINGS = -Wno-stringop-overflow -Wno-cast-align CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $(DISABLE_WARNINGS) -Werror=missing-prototypes @@ -237,6 +236,7 @@ SRC_SDK := \ SRC_SDK := $(addprefix sdk/, $(SRC_SDK)) $(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare -Wno-unused-variable -Wno-strict-overflow -Ilib/cyw43-driver +$(BUILD)/sdk/src/rp2_common/pico_standard_link/crt0.o: CFLAGS += -Wno-undef SRC_C += \ boards/$(BOARD)/board.c \ From 1d3b2b019a25a42b41327933feb8623619a7a21a Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 4 Aug 2023 08:54:22 -0700 Subject: [PATCH 052/291] Update settings to match micropython --- .../arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk | 2 +- .../boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig | 2 +- tools/ci_check_duplicate_usb_vid_pid.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 c9af3af25e..925c4ab6e2 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2341 -USB_PID = 0x0070 +USB_PID = 0x056B USB_PRODUCT = "Arduino Nano ESP32" USB_MANUFACTURER = "Arduino" diff --git a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig index 2acf08a4a7..26a26b5fe8 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/sdkconfig @@ -39,5 +39,5 @@ CONFIG_SPIRAM_MEMTEST=y # # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +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 dd7531dbb6..5232f6dc7c 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -63,7 +63,7 @@ DEFAULT_CLUSTERLIST = { ], "0x239A:0x102E": ["weact_studio_pico", "weact_studio_pico_16mb"], "0x303A:0x8166": ["yd_esp32_s3_n8r8", "yd_esp32_s3_n16r8"], - "0x2341:0x0070": ["arduino_nano_esp32s3", "arduino_nano_esp32s3_inverted_statusled"], + "0x2341:0x056B": ["arduino_nano_esp32s3", "arduino_nano_esp32s3_inverted_statusled"], } cli_parser = argparse.ArgumentParser( From a34d9b70e2a50608b54041eb4fa3d69b320e4071 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 4 Aug 2023 20:54:11 -0500 Subject: [PATCH 053/291] update protomatter to 1.5.10 --- lib/protomatter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protomatter b/lib/protomatter index 5f0b40ed59..ed2e701871 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit 5f0b40ed5991e22da63add5dbaeb7c194b72b607 +Subproject commit ed2e7018718caebba2b7550517b556e7734357ef From 7a4edfaa9f790b0256eb706bb6e4a22e94dacbee Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Wed, 9 Aug 2023 08:19:34 -0700 Subject: [PATCH 054/291] Override D13 pin --- ports/espressif/boards/arduino_nano_esp32s3/board.c | 11 +++++++++++ .../arduino_nano_esp32s3_inverted_statusled/board.c | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/ports/espressif/boards/arduino_nano_esp32s3/board.c b/ports/espressif/boards/arduino_nano_esp32s3/board.c index 3b1f5efd87..0fc5bd1426 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3/board.c @@ -27,6 +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 @@ -36,4 +37,14 @@ void board_init(void) { #endif } +bool espressif_board_reset_pin_number(gpio_num_t pin_number) { + if (pin_number == 13) { + // Set D13 LED to output by default. + gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); + 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/board.c b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c index 3b1f5efd87..0fc5bd1426 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c @@ -27,6 +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 @@ -36,4 +37,14 @@ void board_init(void) { #endif } +bool espressif_board_reset_pin_number(gpio_num_t pin_number) { + if (pin_number == 13) { + // Set D13 LED to output by default. + gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); + return true; + } + + return false; +} + // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. From d652c8d25cd54a6965e10a2b3a819c0079056168 Mon Sep 17 00:00:00 2001 From: Vladimir Smitka Date: Tue, 25 Jul 2023 14:40:53 +0200 Subject: [PATCH 055/291] Add PicoPad support --- .../boards/pajenicko_picopad/board.c | 114 ++++++++++++++++++ .../boards/pajenicko_picopad/link.ld | 1 + .../boards/pajenicko_picopad/mpconfigboard.h | 12 ++ .../boards/pajenicko_picopad/mpconfigboard.mk | 34 ++++++ .../pajenicko_picopad/pico-sdk-configboard.h | 1 + .../boards/pajenicko_picopad/pins.c | 113 +++++++++++++++++ 6 files changed, 275 insertions(+) create mode 100644 ports/raspberrypi/boards/pajenicko_picopad/board.c create mode 100644 ports/raspberrypi/boards/pajenicko_picopad/link.ld create mode 100644 ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/pajenicko_picopad/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pajenicko_picopad/pins.c diff --git a/ports/raspberrypi/boards/pajenicko_picopad/board.c b/ports/raspberrypi/boards/pajenicko_picopad/board.c new file mode 100644 index 0000000000..0d092a1f4d --- /dev/null +++ b/ports/raspberrypi/boards/pajenicko_picopad/board.c @@ -0,0 +1,114 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "supervisor/shared/board.h" + +displayio_fourwire_obj_t board_display_obj; + +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0x01, 0 | DELAY, 150, // SWRESET + + 0x36, 1, 0x68, // MADCTL + 0x35, 1, 0x00, // TEON + 0xB2, 5, 0x0c, 0x0c, 0x00, 0x33, 0x33, // FRMCTR2 + 0x3A, 1, 0x05, // COLMOD + 0xB7, 1, 0x14, // GCTRL + 0xBB, 1, 0x37, // VCOMS + 0xC0, 1, 0x2c, // LCMCTRL + 0xC2, 1, 0x01, // VDVVRHEN + 0xC3, 1, 0x12, // VRHS + 0xC4, 1, 0x20, // VDVS + 0xD0, 2, 0xa4, 0xa1, // PWRCTRL1 + 0xC6, 1, 0x0f, // FRCTRL2 + 0xE0, 14, 0xd0, 0x04, 0x0d, 0x11, 0x13, 0x2b, 0x3f, 0x54, 0x4c, 0x18, 0x0d, 0x0b, 0x1f, 0x23, // GMCTRP1 + 0xE1, 14, 0xd0, 0x04, 0x0c, 0x11, 0x13, 0x2c, 0x3f, 0x44, 0x51, 0x2f, 0x1f, 0x1f, 0x20, 0x23, // GMCTRN1 + 0x21, 0, // INVON + + 0x11, 0 | DELAY, 255, // SLPOUT + 0x29, 0 | DELAY, 100, // DISPON + + 0x2a, 4, 0x00, 0, 0x00, 0xfe, // CASET + 0x2b, 4, 0x00, 0, 0x00, 0xfe, // RASET + 0x2c, 0, // RAMWR +}; + +void board_init(void) { + 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_GPIO18, &pin_GPIO19, NULL, false); + common_hal_busio_spi_never_reset(spi); + + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_GPIO17, // TFT_DC Command or data + &pin_GPIO21, // TFT_CS Chip select + &pin_GPIO20, // TFT_RST Reset + 60000000, // Baudrate + 0, // Polarity + 0); // Phase + + displayio_display_obj_t *display = &allocate_display()->display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width + 240, // Height + 0, // column start + 0, // row start + 0, // rotation + 16, // Color depth + false, // Grayscale + false, // pixels in a byte share a row. Only valid for depths < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_bytes_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO16, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 60, // native_frames_per_second + true, // backlight_on_high + false, // SH1107_addressing + 50000); // backlight pwm frequency +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/raspberrypi/boards/pajenicko_picopad/link.ld b/ports/raspberrypi/boards/pajenicko_picopad/link.ld new file mode 100644 index 0000000000..e814bead4c --- /dev/null +++ b/ports/raspberrypi/boards/pajenicko_picopad/link.ld @@ -0,0 +1 @@ +firmware_size = 1532k; diff --git a/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.h b/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.h new file mode 100644 index 0000000000..26b8447860 --- /dev/null +++ b/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.h @@ -0,0 +1,12 @@ +#define MICROPY_HW_BOARD_NAME "Pajenicko PicoPad" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_DIGITALIO_HAVE_INVALID_PULL (1) +#define CIRCUITPY_DIGITALIO_HAVE_INVALID_DRIVE_MODE (1) + +#define MICROPY_HW_LED_STATUS (&pin_CYW0) + +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) diff --git a/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk b/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk new file mode 100644 index 0000000000..2eeea9723f --- /dev/null +++ b/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk @@ -0,0 +1,34 @@ +USB_VID = 0x2E8A +USB_PID = 0x1063 + +USB_PRODUCT = "PicoPad" +USB_MANUFACTURER = "Pajenicko s.r.o." + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY_KEYPAD = 1 +CIRCUITPY_STAGE = 1 +CIRCUITPY_AUDIOIO = 1 + +CIRCUITPY__EVE = 1 + +CIRCUITPY_CYW43 = 1 +CIRCUITPY_SSL = 1 +CIRCUITPY_SSL_MBEDTLS = 1 +CIRCUITPY_HASHLIB = 1 +CIRCUITPY_WEB_WORKFLOW = 1 +CIRCUITPY_MDNS = 1 +CIRCUITPY_SOCKETPOOL = 1 +CIRCUITPY_WIFI = 1 + +CIRCUITPY_PICODVI = 1 + +# Pimoroni PicoSystem peripherals are compatible, we can use of existing ugame.py +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/picosystem + +CFLAGS += -DCYW43_PIN_WL_HOST_WAKE=24 -DCYW43_PIN_WL_REG_ON=23 -DCYW43_WL_GPIO_COUNT=3 -DCYW43_WL_GPIO_LED_PIN=0 +# Must be accompanied by a linker script change +CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)' \ No newline at end of file diff --git a/ports/raspberrypi/boards/pajenicko_picopad/pico-sdk-configboard.h b/ports/raspberrypi/boards/pajenicko_picopad/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pajenicko_picopad/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pajenicko_picopad/pins.c b/ports/raspberrypi/boards/pajenicko_picopad/pins.c new file mode 100644 index 0000000000..de59502d69 --- /dev/null +++ b/ports/raspberrypi/boards/pajenicko_picopad/pins.c @@ -0,0 +1,113 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + //Default RPi Pico Pins + {MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0)}, + {MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1)}, + {MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2)}, + {MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3)}, + {MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4)}, + {MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5)}, + {MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6)}, + {MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7)}, + {MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8)}, + {MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9)}, + {MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10)}, + {MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11)}, + {MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12)}, + {MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13)}, + {MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14)}, + {MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15)}, + {MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16)}, + {MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17)}, + {MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18)}, + {MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19)}, + {MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20)}, + {MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21)}, + {MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22)}, + {MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26)}, + {MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27)}, + {MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28)}, + + //PicoPad external connector + /* + ┌──────┐ + GND -│1 2│- GND + 3V3 -│3 4│- VBAT + D5/A2 -│5 6│- ADC_VREF + D4/A1 -│7 8│- AGND + D3/TX/SDA -│9 10│- D0/A0 + D2/RX/SCL -│11 12│- D1 + └──────┘ + */ + + {MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO26)}, + {MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO14)}, + {MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO1)}, + {MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO0)}, + {MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO27)}, + {MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO28)}, + + {MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26)}, + {MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27)}, + {MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28)}, + + //PicoPad LCD + {MP_ROM_QSTR(MP_QSTR_LCD_RESET), MP_ROM_PTR(&pin_GPIO20)}, + {MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO21)}, + {MP_ROM_QSTR(MP_QSTR_LCD_SCLK), MP_ROM_PTR(&pin_GPIO18)}, + {MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO19)}, + {MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO17)}, + {MP_ROM_QSTR(MP_QSTR_LCD_BL), MP_ROM_PTR(&pin_GPIO16)}, + + //PicoPad Audio + {MP_ROM_QSTR(MP_QSTR_AUDIO), MP_ROM_PTR(&pin_GPIO15)}, + + //PicoPad USR LED (yellow) + {MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO22)}, + + //PicoPad Buttons + {MP_ROM_QSTR(MP_QSTR_SW_X), MP_ROM_PTR(&pin_GPIO9)}, + {MP_ROM_QSTR(MP_QSTR_SW_Y), MP_ROM_PTR(&pin_GPIO8)}, + {MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO7)}, + {MP_ROM_QSTR(MP_QSTR_SW_B), MP_ROM_PTR(&pin_GPIO6)}, + + {MP_ROM_QSTR(MP_QSTR_SW_DOWN), MP_ROM_PTR(&pin_GPIO5)}, + {MP_ROM_QSTR(MP_QSTR_SW_RIGHT), MP_ROM_PTR(&pin_GPIO2)}, + {MP_ROM_QSTR(MP_QSTR_SW_LEFT), MP_ROM_PTR(&pin_GPIO3)}, + {MP_ROM_QSTR(MP_QSTR_SW_UP), MP_ROM_PTR(&pin_GPIO4)}, + + //PicoPad SD Card + {MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO13)}, + {MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_GPIO10)}, + {MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO11)}, + {MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO12)}, + + //PicoPad Battery + {MP_ROM_QSTR(MP_QSTR_BAT_SENSE), MP_ROM_PTR(&pin_GPIO29)}, + + //PicoPad UART0 + {MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0)}, + {MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1)}, + + //PicoPad I2C0 + {MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO0)}, + {MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1)}, + + //PicoPad I2C1 + {MP_ROM_QSTR(MP_QSTR_SDA_ALT), MP_ROM_PTR(&pin_GPIO14)}, + {MP_ROM_QSTR(MP_QSTR_SCL_ALT), MP_ROM_PTR(&pin_GPIO27)}, + + + {MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj)}, + {MP_ROM_QSTR(MP_QSTR_I2C_ALT), MP_ROM_PTR(&board_i2c_obj)}, + {MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj)}, + + {MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_CYW1)}, + {MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_CYW0)}, + {MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_CYW2)}, + {MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 2819c88207165f32e884e88e7619a77a511062c3 Mon Sep 17 00:00:00 2001 From: Vladimir Smitka Date: Tue, 25 Jul 2023 19:25:27 +0200 Subject: [PATCH 056/291] Formatting --- .../boards/pajenicko_picopad/mpconfigboard.mk | 2 +- .../boards/pajenicko_picopad/pins.c | 27 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk b/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk index 2eeea9723f..65ad4bba91 100644 --- a/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pajenicko_picopad/mpconfigboard.mk @@ -31,4 +31,4 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/picosystem CFLAGS += -DCYW43_PIN_WL_HOST_WAKE=24 -DCYW43_PIN_WL_REG_ON=23 -DCYW43_WL_GPIO_COUNT=3 -DCYW43_WL_GPIO_LED_PIN=0 # Must be accompanied by a linker script change -CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)' \ No newline at end of file +CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)' diff --git a/ports/raspberrypi/boards/pajenicko_picopad/pins.c b/ports/raspberrypi/boards/pajenicko_picopad/pins.c index de59502d69..da1fe3b9dc 100644 --- a/ports/raspberrypi/boards/pajenicko_picopad/pins.c +++ b/ports/raspberrypi/boards/pajenicko_picopad/pins.c @@ -3,7 +3,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - //Default RPi Pico Pins + // Default RPi Pico Pins {MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0)}, {MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1)}, {MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2)}, @@ -31,7 +31,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { {MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27)}, {MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28)}, - //PicoPad external connector + // PicoPad external connector /* ┌──────┐ GND -│1 2│- GND @@ -40,7 +40,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { D4/A1 -│7 8│- AGND D3/TX/SDA -│9 10│- D0/A0 D2/RX/SCL -│11 12│- D1 - └──────┘ + └──────┘ */ {MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO26)}, @@ -54,7 +54,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { {MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27)}, {MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28)}, - //PicoPad LCD + // PicoPad LCD {MP_ROM_QSTR(MP_QSTR_LCD_RESET), MP_ROM_PTR(&pin_GPIO20)}, {MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO21)}, {MP_ROM_QSTR(MP_QSTR_LCD_SCLK), MP_ROM_PTR(&pin_GPIO18)}, @@ -62,13 +62,13 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { {MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO17)}, {MP_ROM_QSTR(MP_QSTR_LCD_BL), MP_ROM_PTR(&pin_GPIO16)}, - //PicoPad Audio + // PicoPad Audio {MP_ROM_QSTR(MP_QSTR_AUDIO), MP_ROM_PTR(&pin_GPIO15)}, - //PicoPad USR LED (yellow) + // PicoPad USR LED (yellow) {MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO22)}, - //PicoPad Buttons + // PicoPad Buttons {MP_ROM_QSTR(MP_QSTR_SW_X), MP_ROM_PTR(&pin_GPIO9)}, {MP_ROM_QSTR(MP_QSTR_SW_Y), MP_ROM_PTR(&pin_GPIO8)}, {MP_ROM_QSTR(MP_QSTR_SW_A), MP_ROM_PTR(&pin_GPIO7)}, @@ -79,24 +79,24 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { {MP_ROM_QSTR(MP_QSTR_SW_LEFT), MP_ROM_PTR(&pin_GPIO3)}, {MP_ROM_QSTR(MP_QSTR_SW_UP), MP_ROM_PTR(&pin_GPIO4)}, - //PicoPad SD Card + // PicoPad SD Card {MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO13)}, {MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_GPIO10)}, {MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO11)}, {MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO12)}, - //PicoPad Battery + // PicoPad Battery {MP_ROM_QSTR(MP_QSTR_BAT_SENSE), MP_ROM_PTR(&pin_GPIO29)}, - //PicoPad UART0 + // PicoPad UART0 {MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0)}, {MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1)}, - //PicoPad I2C0 + // PicoPad I2C0 {MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO0)}, {MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1)}, - //PicoPad I2C1 + // PicoPad I2C1 {MP_ROM_QSTR(MP_QSTR_SDA_ALT), MP_ROM_PTR(&pin_GPIO14)}, {MP_ROM_QSTR(MP_QSTR_SCL_ALT), MP_ROM_PTR(&pin_GPIO27)}, @@ -108,6 +108,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { {MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_CYW1)}, {MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_CYW0)}, {MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_CYW2)}, - {MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}}; + {MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From acd889609403b2e3d6d0e20e07d132c9a2847180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Smitka?= Date: Mon, 31 Jul 2023 12:22:27 +0200 Subject: [PATCH 057/291] Fix RGB/BGR color order --- ports/raspberrypi/boards/pajenicko_picopad/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/pajenicko_picopad/board.c b/ports/raspberrypi/boards/pajenicko_picopad/board.c index 0d092a1f4d..e81525d0d8 100644 --- a/ports/raspberrypi/boards/pajenicko_picopad/board.c +++ b/ports/raspberrypi/boards/pajenicko_picopad/board.c @@ -39,7 +39,7 @@ displayio_fourwire_obj_t board_display_obj; uint8_t display_init_sequence[] = { 0x01, 0 | DELAY, 150, // SWRESET - 0x36, 1, 0x68, // MADCTL + 0x36, 1, 0x60, // MADCTL 0x35, 1, 0x00, // TEON 0xB2, 5, 0x0c, 0x0c, 0x00, 0x33, 0x33, // FRMCTR2 0x3A, 1, 0x05, // COLMOD From 1b3993a29e6c98f37025976e50561db79f15d144 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Mon, 24 Jul 2023 18:41:52 -0700 Subject: [PATCH 058/291] Added initial Adafruit Metro ESP32-S3 --- .../boards/adafruit_metro_esp32s3/board.c | 29 ++++++++ .../adafruit_metro_esp32s3/mpconfigboard.h | 46 ++++++++++++ .../adafruit_metro_esp32s3/mpconfigboard.mk | 10 +++ .../boards/adafruit_metro_esp32s3/pins.c | 71 +++++++++++++++++++ .../boards/adafruit_metro_esp32s3/sdkconfig | 46 ++++++++++++ 5 files changed, 202 insertions(+) create mode 100644 ports/espressif/boards/adafruit_metro_esp32s3/board.c create mode 100644 ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.h create mode 100644 ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk create mode 100644 ports/espressif/boards/adafruit_metro_esp32s3/pins.c create mode 100644 ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/board.c b/ports/espressif/boards/adafruit_metro_esp32s3/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/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/adafruit_metro_esp32s3/mpconfigboard.h b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.h new file mode 100644 index 0000000000..d1e0ba0c26 --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.h @@ -0,0 +1,46 @@ +/* + * 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 Metro ESP32S3" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO45) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO13) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO48) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO47) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO41) +#define DEFAULT_UART_BUS_TX (&pin_GPIO40) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk new file mode 100644 index 0000000000..039c689eaf --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/mpconfigboard.mk @@ -0,0 +1,10 @@ +USB_VID = 0x239A +USB_PID = 0x0145 +USB_PRODUCT = "Metro ESP32-S3" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s3 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 16MB diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c new file mode 100644 index 0000000000..e27f72f3bb --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c @@ -0,0 +1,71 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO15) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO17) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO18) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO1) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO40) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO41) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO47) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO47),MP_ROM_PTR(&pin_GPIO47) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO48) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO48),MP_ROM_PTR(&pin_GPIO48) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_GPIO35) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO35),MP_ROM_PTR(&pin_GPIO35) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO37),MP_ROM_PTR(&pin_GPIO37) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO43) }, + + { 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_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/adafruit_metro_esp32s3/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig new file mode 100644 index 0000000000..2d819ad274 --- /dev/null +++ b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig @@ -0,0 +1,46 @@ +# +# 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=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 From 8dd52430b64a569dcae2ac5c01b3d05c09eb052d Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 25 Jul 2023 16:30:21 -0700 Subject: [PATCH 059/291] Change to octal ram --- ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig index 2d819ad274..2d72ed5391 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s3/sdkconfig @@ -8,8 +8,8 @@ CONFIG_ESP32S3_SPIRAM_SUPPORT=y # # SPI RAM config # -CONFIG_SPIRAM_MODE_QUAD=y -# CONFIG_SPIRAM_MODE_OCT is not set +# 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 From 4c62db2d055c20f3f5ddb06fa8e2a1bdfe3a0052 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 27 Jul 2023 16:46:15 -0700 Subject: [PATCH 060/291] Add D pins --- .../boards/adafruit_metro_esp32s3/pins.c | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c index e27f72f3bb..4ac6c49d29 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c +++ b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c @@ -27,18 +27,42 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO41) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO47) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO47),MP_ROM_PTR(&pin_GPIO47) }, @@ -55,8 +79,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO37),MP_ROM_PTR(&pin_GPIO37) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, From 9d69ddc583c5bea4a649fe448271b2371865f46a Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Thu, 27 Jul 2023 19:26:37 -0700 Subject: [PATCH 061/291] Add D0 and D1 --- ports/espressif/boards/adafruit_metro_esp32s3/pins.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c index 4ac6c49d29..dfad4381ef 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c +++ b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c @@ -21,12 +21,14 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO1) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO40) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, - + { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO41) }, { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO41) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO40) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, From 8b147ac74834eef8c6fd4e1be0c3422e194ef437 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Tue, 15 Aug 2023 18:30:59 -0400 Subject: [PATCH 062/291] Add SD_CS pin to Metro ESP32-S3 board definition. --- ports/espressif/boards/adafruit_metro_esp32s3/pins.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c index dfad4381ef..87ae5ba31b 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s3/pins.c +++ b/ports/espressif/boards/adafruit_metro_esp32s3/pins.c @@ -72,6 +72,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO48) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO48),MP_ROM_PTR(&pin_GPIO48) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO21) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, From 8c5c73df38ea71dc89eb0382988fa5e2939ffbdc Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Aug 2023 11:39:14 -0700 Subject: [PATCH 063/291] Add I2S MCLK support to iMX RT --- ports/atmel-samd/common-hal/audiobusio/I2SOut.c | 5 ++++- ports/espressif/common-hal/audiobusio/I2SOut.c | 6 ++++-- ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c | 16 +++++++++++++++- ports/mimxrt10xx/common-hal/audiobusio/I2SOut.h | 2 ++ .../peripherals/mimxrt10xx/MIMXRT1011/periph.c | 6 ++++++ .../peripherals/mimxrt10xx/MIMXRT1011/periph.h | 1 + .../peripherals/mimxrt10xx/MIMXRT1015/periph.c | 10 ++++++++++ .../peripherals/mimxrt10xx/MIMXRT1015/periph.h | 1 + .../peripherals/mimxrt10xx/MIMXRT1021/periph.c | 14 ++++++++++++++ .../peripherals/mimxrt10xx/MIMXRT1021/periph.h | 1 + .../peripherals/mimxrt10xx/MIMXRT1042/periph.c | 11 +++++++++++ .../peripherals/mimxrt10xx/MIMXRT1042/periph.h | 1 + .../peripherals/mimxrt10xx/MIMXRT1052/periph.c | 11 +++++++++++ .../peripherals/mimxrt10xx/MIMXRT1052/periph.h | 1 + .../peripherals/mimxrt10xx/MIMXRT1062/periph.c | 12 ++++++++++++ .../peripherals/mimxrt10xx/MIMXRT1062/periph.h | 1 + .../peripherals/mimxrt10xx/MIMXRT1176/periph.c | 9 +++++++++ .../peripherals/mimxrt10xx/MIMXRT1176/periph.h | 1 + ports/mimxrt10xx/tools/gen_peripherals_data.py | 2 +- ports/nrf/common-hal/audiobusio/I2SOut.c | 5 ++++- ports/raspberrypi/common-hal/audiobusio/I2SOut.c | 5 ++++- shared-bindings/audiobusio/I2SOut.c | 10 +++++++--- shared-bindings/audiobusio/I2SOut.h | 2 +- 23 files changed, 122 insertions(+), 11 deletions(-) diff --git a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c index 447252aace..9c1a00c052 100644 --- a/ports/atmel-samd/common-hal/audiobusio/I2SOut.c +++ b/ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -98,7 +98,10 @@ void i2sout_reset(void) { // Caller validates that pins are free. void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, const mcu_pin_obj_t *bit_clock, const mcu_pin_obj_t *word_select, - const mcu_pin_obj_t *data, bool left_justified) { + const mcu_pin_obj_t *data, const mcu_pin_obj_t *main_clock, bool left_justified) { + if (main_clock != NULL) { + mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock); + } uint8_t serializer = 0xff; uint8_t bc_clock_unit = 0xff; uint8_t ws_clock_unit = 0xff; diff --git a/ports/espressif/common-hal/audiobusio/I2SOut.c b/ports/espressif/common-hal/audiobusio/I2SOut.c index 440151e881..8b03a534a4 100644 --- a/ports/espressif/common-hal/audiobusio/I2SOut.c +++ b/ports/espressif/common-hal/audiobusio/I2SOut.c @@ -49,8 +49,10 @@ // Caller validates that pins are free. void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, const mcu_pin_obj_t *bit_clock, const mcu_pin_obj_t *word_select, - const mcu_pin_obj_t *data, bool left_justified) { - + const mcu_pin_obj_t *data, const mcu_pin_obj_t *main_clock, bool left_justified) { + if (main_clock != NULL) { + mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock); + } port_i2s_allocate_init(&self->peripheral, left_justified); i2s_pin_config_t i2s_pin_config = { diff --git a/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c b/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c index 9ba2762f1c..cba857a495 100644 --- a/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c +++ b/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c @@ -74,13 +74,22 @@ STATIC void config_periph_pin(const mcu_periph_obj_t *periph) { // Caller validates that pins are free. void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, const mcu_pin_obj_t *bit_clock, const mcu_pin_obj_t *word_select, - const mcu_pin_obj_t *data, bool left_justified) { + const mcu_pin_obj_t *data, const mcu_pin_obj_t *main_clock, bool left_justified) { int instance = -1; const mcu_periph_obj_t *bclk_periph = find_pin_function(mcu_i2s_tx_bclk_list, bit_clock, &instance, MP_QSTR_bit_clock); const mcu_periph_obj_t *sync_periph = find_pin_function(mcu_i2s_tx_sync_list, word_select, &instance, MP_QSTR_word_select); const mcu_periph_obj_t *data_periph = find_pin_function(mcu_i2s_tx_data0_list, data, &instance, MP_QSTR_data); + if (main_clock != NULL) { + const mcu_periph_obj_t *mclk_periph = find_pin_function(mcu_i2s_mclk_list, main_clock, &instance, MP_QSTR_main_clock); + self->mclk = main_clock; + claim_pin(main_clock); + config_periph_pin(mclk_periph); + IOMUXC_GPR->GPR1 |= IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (instance - 1); + } + self->instance = instance; + sai_transceiver_t config; SAI_GetClassicI2SConfig(&config, 16, kSAI_Stereo, 1); config.syncMode = kSAI_ModeAsync; @@ -121,6 +130,11 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { common_hal_reset_pin(self->data); self->data = NULL; + + IOMUXC_GPR->GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self->instance - 1)); + + common_hal_reset_pin(self->mclk); + self->mclk = NULL; } void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, diff --git a/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.h b/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.h index 319e52c159..3a2ed49b9a 100644 --- a/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.h +++ b/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.h @@ -39,6 +39,8 @@ typedef struct { const mcu_pin_obj_t *bit_clock; const mcu_pin_obj_t *word_select; const mcu_pin_obj_t *data; + const mcu_pin_obj_t *mclk; + uint8_t instance; } audiobusio_i2sout_obj_t; #endif diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c index a1468971dc..8a2e95b194 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.c @@ -174,6 +174,12 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[2] = { PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_SD_00), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[2] = { + PERIPH_PIN(1, 0, 0, 0, &pin_GPIO_08), + + PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_00), +}; + const mcu_periph_obj_t mcu_mqs_left_list[1] = { PERIPH_PIN(3, 4, 0, 0, &pin_GPIO_AD_01), }; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.h index f3bee9e464..b854ebe585 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1011/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[2]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[2]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[2]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[2]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[2]; extern const mcu_periph_obj_t mcu_mqs_left_list[1]; extern const mcu_periph_obj_t mcu_mqs_right_list[1]; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.c index c6b2c6b872..669109a858 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.c @@ -159,6 +159,16 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[4] = { PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_SD_B1_07), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[5] = { + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_EMC_20), + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_AD_B0_03), + + PERIPH_PIN(2, 3, 0, 0, &pin_GPIO_EMC_16), + + PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_17), + PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_SD_B1_05), +}; + const mcu_periph_obj_t mcu_mqs_left_list[2] = { PERIPH_PIN(3, 2, 0, 0, &pin_GPIO_EMC_17), PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_AD_B0_07), diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.h index cef33f1ffa..51295b8965 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1015/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[3]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[4]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[4]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[4]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[5]; extern const mcu_periph_obj_t mcu_mqs_left_list[2]; extern const mcu_periph_obj_t mcu_mqs_right_list[2]; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c index 9129c64272..13a1ab41b2 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.c @@ -268,6 +268,20 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[7] = { PERIPH_PIN(3, 3, kIOMUXC_SAI3_TX_SYNC_SELECT_INPUT, 1, &pin_GPIO_EMC_34), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[9] = { + PERIPH_PIN(1, 2, kIOMUXC_SAI1_MCLK_SELECT_INPUT, 0, &pin_GPIO_SD_B0_00), + PERIPH_PIN(1, 3, kIOMUXC_SAI1_MCLK_SELECT_INPUT, 1, &pin_GPIO_AD_B0_03), + PERIPH_PIN(1, 3, kIOMUXC_SAI1_MCLK_SELECT_INPUT, 2, &pin_GPIO_AD_B1_00), + PERIPH_PIN(1, 3, kIOMUXC_SAI1_MCLK_SELECT_INPUT, 3, &pin_GPIO_EMC_20), + + PERIPH_PIN(2, 3, kIOMUXC_SAI2_MCLK_SELECT_INPUT, 0, &pin_GPIO_SD_B0_00), + PERIPH_PIN(2, 3, kIOMUXC_SAI2_MCLK_SELECT_INPUT, 1, &pin_GPIO_EMC_16), + + PERIPH_PIN(3, 3, kIOMUXC_SAI3_MCLK_SELECT_INPUT, 0, &pin_GPIO_SD_B1_05), + PERIPH_PIN(3, 3, kIOMUXC_SAI3_MCLK_SELECT_INPUT, 1, &pin_GPIO_EMC_17), + PERIPH_PIN(3, 3, kIOMUXC_SAI3_MCLK_SELECT_INPUT, 2, &pin_GPIO_EMC_28), +}; + const mcu_periph_obj_t mcu_mqs_left_list[3] = { PERIPH_PIN(3, 2, 0, 0, &pin_GPIO_EMC_17), PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_38), diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h index 3dea33fa00..bb90c24250 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1021/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[7]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[7]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[7]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[7]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[9]; extern const mcu_periph_obj_t mcu_mqs_left_list[3]; extern const mcu_periph_obj_t mcu_mqs_right_list[3]; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.c index 104960b417..506e9b6fe6 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.c @@ -254,6 +254,17 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[6] = { PERIPH_PIN(3, 8, 0, 0, &pin_GPIO_SD_B1_02), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[6] = { + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_B0_13), + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_SD_B1_03), + + PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_EMC_07), + PERIPH_PIN(2, 3, 0, 0, &pin_GPIO_AD_B0_10), + + PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_37), + PERIPH_PIN(3, 8, 0, 0, &pin_GPIO_SD_B1_04), +}; + const mcu_periph_obj_t mcu_mqs_left_list[3] = { PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_14), PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_AD_B0_05), diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.h index 3df1a06d98..ef65ad582a 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1042/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[6]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[6]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[6]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[6]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[6]; extern const mcu_periph_obj_t mcu_mqs_left_list[3]; extern const mcu_periph_obj_t mcu_mqs_right_list[3]; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.c index 3ff474d7f4..de0bf66129 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.c @@ -267,6 +267,17 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[6] = { PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_39), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[6] = { + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_AD_B1_09), + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_B0_13), + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_SD_B1_03), + + PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_EMC_07), + PERIPH_PIN(2, 3, 0, 0, &pin_GPIO_AD_B0_10), + + PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_37), +}; + const mcu_periph_obj_t mcu_mqs_left_list[3] = { PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_14), PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_AD_B0_05), diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.h index 7d428eae1c..31c8c7b7f7 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1052/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[6]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[6]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[6]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[6]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[6]; extern const mcu_periph_obj_t mcu_mqs_left_list[3]; extern const mcu_periph_obj_t mcu_mqs_right_list[3]; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c index ab8fb2b4d8..b995910dc1 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.c @@ -272,6 +272,18 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[7] = { PERIPH_PIN(3, 8, 0, 0, &pin_GPIO_SD_B1_02), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[7] = { + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_AD_B1_09), + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_B0_13), + PERIPH_PIN(1, 3, 0, 0, &pin_GPIO_SD_B1_03), + + PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_EMC_07), + PERIPH_PIN(2, 3, 0, 0, &pin_GPIO_AD_B0_10), + + PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_37), + PERIPH_PIN(3, 8, 0, 0, &pin_GPIO_SD_B1_04), +}; + const mcu_periph_obj_t mcu_mqs_left_list[3] = { PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_14), PERIPH_PIN(3, 1, 0, 0, &pin_GPIO_AD_B0_05), diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.h index 36a42eba64..b6372646f6 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1062/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[7]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[7]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[7]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[7]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[7]; extern const mcu_periph_obj_t mcu_mqs_left_list[3]; extern const mcu_periph_obj_t mcu_mqs_right_list[3]; diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.c b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.c index f53136c94f..f5172a252a 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.c +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.c @@ -237,6 +237,15 @@ const mcu_periph_obj_t mcu_i2s_tx_sync_list[4] = { PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_B2_16), }; +const mcu_periph_obj_t mcu_i2s_mclk_list[4] = { + PERIPH_PIN(1, 0, 0, 0, &pin_GPIO_AD_17), + PERIPH_PIN(1, 4, 0, 0, &pin_GPIO_DISP_B2_03), + + PERIPH_PIN(2, 2, 0, 0, &pin_GPIO_EMC_B2_04), + + PERIPH_PIN(3, 3, 0, 0, &pin_GPIO_EMC_B2_17), +}; + const mcu_periph_obj_t mcu_mqs_left_list[2] = { PERIPH_PIN(3, 2, 0, 0, &pin_GPIO_EMC_B1_41), PERIPH_PIN(3, 2, 0, 0, &pin_GPIO_DISP_B2_01), diff --git a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.h b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.h index 266300df18..63e6da95f6 100644 --- a/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.h +++ b/ports/mimxrt10xx/peripherals/mimxrt10xx/MIMXRT1176/periph.h @@ -56,6 +56,7 @@ extern const mcu_periph_obj_t mcu_i2s_rx_sync_list[4]; extern const mcu_periph_obj_t mcu_i2s_tx_bclk_list[4]; extern const mcu_periph_obj_t mcu_i2s_tx_data0_list[4]; extern const mcu_periph_obj_t mcu_i2s_tx_sync_list[4]; +extern const mcu_periph_obj_t mcu_i2s_mclk_list[4]; extern const mcu_periph_obj_t mcu_mqs_left_list[2]; extern const mcu_periph_obj_t mcu_mqs_right_list[2]; diff --git a/ports/mimxrt10xx/tools/gen_peripherals_data.py b/ports/mimxrt10xx/tools/gen_peripherals_data.py index d87e9022b2..1062bfe91c 100644 --- a/ports/mimxrt10xx/tools/gen_peripherals_data.py +++ b/ports/mimxrt10xx/tools/gen_peripherals_data.py @@ -6,7 +6,7 @@ SIGNALS = { "LPI2C": ["SDA", "SCL"], "LPSPI": ["SCK", "SDO", "SDI"], "LPUART": ["RX", "TX", "RTS", "CTS"], - "I2S": ["RX_DATA0", "RX_SYNC", "TX_BCLK", "TX_DATA0", "TX_SYNC"], + "I2S": ["RX_DATA0", "RX_SYNC", "TX_BCLK", "TX_DATA0", "TX_SYNC", "MCLK"], "MQS": ["LEFT", "RIGHT"], } diff --git a/ports/nrf/common-hal/audiobusio/I2SOut.c b/ports/nrf/common-hal/audiobusio/I2SOut.c index 6e68583a03..b03b8fb11e 100644 --- a/ports/nrf/common-hal/audiobusio/I2SOut.c +++ b/ports/nrf/common-hal/audiobusio/I2SOut.c @@ -202,7 +202,10 @@ static void i2s_buffer_fill(audiobusio_i2sout_obj_t *self) { void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, const mcu_pin_obj_t *bit_clock, const mcu_pin_obj_t *word_select, - const mcu_pin_obj_t *data, bool left_justified) { + const mcu_pin_obj_t *data, const mcu_pin_obj_t *main_clock, bool left_justified) { + if (main_clock != NULL) { + mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock); + } if (instance) { mp_raise_RuntimeError(translate("Device in use")); } diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index 62d4058d1d..d9c5027cbd 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -103,7 +103,10 @@ void i2sout_reset(void) { // Caller validates that pins are free. void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, const mcu_pin_obj_t *bit_clock, const mcu_pin_obj_t *word_select, - const mcu_pin_obj_t *data, bool left_justified) { + const mcu_pin_obj_t *data, const mcu_pin_obj_t *main_clock, bool left_justified) { + if (main_clock != NULL) { + mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_main_clock); + } if (bit_clock->number != word_select->number - 1) { mp_raise_ValueError(translate("Bit clock and word select must be sequential pins")); } diff --git a/shared-bindings/audiobusio/I2SOut.c b/shared-bindings/audiobusio/I2SOut.c index 8c6f1a3a7a..3f697c35eb 100644 --- a/shared-bindings/audiobusio/I2SOut.c +++ b/shared-bindings/audiobusio/I2SOut.c @@ -44,13 +44,15 @@ //| word_select: microcontroller.Pin, //| data: microcontroller.Pin, //| *, -//| left_justified: bool +//| main_clock: microcontroller.Pin = None, +//| left_justified: bool = False //| ) -> None: //| """Create a I2SOut object associated with the given pins. //| //| :param ~microcontroller.Pin bit_clock: The bit clock (or serial clock) pin //| :param ~microcontroller.Pin word_select: The word select (or left/right clock) pin //| :param ~microcontroller.Pin data: The data pin +//| :param ~microcontroller.Pin main_clock: The main clock pin //| :param bool left_justified: True when data bits are aligned with the word select clock. False //| when they are shifted by one to match classic I2S protocol. //| @@ -100,11 +102,12 @@ STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_a mp_raise_NotImplementedError_varg(translate("%q"), MP_QSTR_I2SOut); return NULL; // Not reachable. #else - enum { ARG_bit_clock, ARG_word_select, ARG_data, ARG_left_justified }; + enum { ARG_bit_clock, ARG_word_select, ARG_data, ARG_main_clock, ARG_left_justified }; static const mp_arg_t allowed_args[] = { { MP_QSTR_bit_clock, MP_ARG_OBJ | MP_ARG_REQUIRED }, { MP_QSTR_word_select, MP_ARG_OBJ | MP_ARG_REQUIRED }, { MP_QSTR_data, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_main_clock, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, { MP_QSTR_left_justified, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_bool = false} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -113,10 +116,11 @@ STATIC mp_obj_t audiobusio_i2sout_make_new(const mp_obj_type_t *type, size_t n_a const mcu_pin_obj_t *bit_clock = validate_obj_is_free_pin(args[ARG_bit_clock].u_obj, MP_QSTR_bit_clock); const mcu_pin_obj_t *word_select = validate_obj_is_free_pin(args[ARG_word_select].u_obj, MP_QSTR_word_select); const mcu_pin_obj_t *data = validate_obj_is_free_pin(args[ARG_data].u_obj, MP_QSTR_data); + const mcu_pin_obj_t *main_clock = validate_obj_is_free_pin_or_none(args[ARG_main_clock].u_obj, MP_QSTR_main_clock); audiobusio_i2sout_obj_t *self = m_new_obj_with_finaliser(audiobusio_i2sout_obj_t); self->base.type = &audiobusio_i2sout_type; - common_hal_audiobusio_i2sout_construct(self, bit_clock, word_select, data, args[ARG_left_justified].u_bool); + common_hal_audiobusio_i2sout_construct(self, bit_clock, word_select, data, main_clock, args[ARG_left_justified].u_bool); return MP_OBJ_FROM_PTR(self); #endif diff --git a/shared-bindings/audiobusio/I2SOut.h b/shared-bindings/audiobusio/I2SOut.h index 64dcc3bf68..4fa56b5472 100644 --- a/shared-bindings/audiobusio/I2SOut.h +++ b/shared-bindings/audiobusio/I2SOut.h @@ -37,7 +37,7 @@ extern const mp_obj_type_t audiobusio_i2sout_type; void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, const mcu_pin_obj_t *bit_clock, const mcu_pin_obj_t *word_select, const mcu_pin_obj_t *data, - bool left_justified); + const mcu_pin_obj_t *main_clock, bool left_justified); void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self); bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t *self); From df19aa1646c491ea9f9eb31713322088eea55461 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Aug 2023 11:42:16 -0700 Subject: [PATCH 064/291] Update TinyUSB to improve abort handling --- lib/tinyusb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tinyusb b/lib/tinyusb index db59494b1b..1fdf29075d 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit db59494b1b24f7dad26c5c66c85a195a2cf09466 +Subproject commit 1fdf29075d4e613eacfa881166015263797db0f6 From 37d807509fe6dc91d5c50e98658ef526b0c125f2 Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Thu, 17 Aug 2023 19:00:17 +0100 Subject: [PATCH 065/291] port: Add M5Stack M5Paper board target --- .../espressif/boards/m5stack_m5paper/board.c | 100 ++++++++++++++++++ .../boards/m5stack_m5paper/mpconfigboard.h | 51 +++++++++ .../boards/m5stack_m5paper/mpconfigboard.mk | 9 ++ ports/espressif/boards/m5stack_m5paper/pins.c | 63 +++++++++++ .../boards/m5stack_m5paper/sdkconfig | 58 ++++++++++ 5 files changed, 281 insertions(+) create mode 100644 ports/espressif/boards/m5stack_m5paper/board.c create mode 100644 ports/espressif/boards/m5stack_m5paper/mpconfigboard.h create mode 100644 ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk create mode 100644 ports/espressif/boards/m5stack_m5paper/pins.c create mode 100644 ports/espressif/boards/m5stack_m5paper/sdkconfig diff --git a/ports/espressif/boards/m5stack_m5paper/board.c b/ports/espressif/boards/m5stack_m5paper/board.c new file mode 100644 index 0000000000..97dee2ac1c --- /dev/null +++ b/ports/espressif/boards/m5stack_m5paper/board.c @@ -0,0 +1,100 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 fonix232 + * + * 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/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/board/__init__.h" + + +const uint8_t display_start_sequence[] = { }; + +const uint8_t display_stop_sequence[] = { }; + +const uint8_t display_refresh_sequence[] = { }; + + +void board_init(void) { + + // TODO: Investigate how to initialise display + + // // Set up the SPI object used to control the display + // busio_spi_obj_t *spi = common_hal_board_create_spi(0); + // common_hal_busio_spi_never_reset(spi); + + // // Set up the DisplayIO pin object + // displayio_fourwire_obj_t *bus = &allocate_display_bus()->fourwire_bus; + // bus->base.type = &displayio_fourwire_type; + // common_hal_displayio_fourwire_construct(bus, + // spi, + // &pin_GPIO20, // EPD_DC Command or data + // &pin_GPIO15, // EPD_CS Chip select + // &pin_GPIO23, // EPD_RST Reset + // 1200000, // Baudrate + // 0, // Polarity + // 0); // Phase + + // displayio_epaperdisplay_obj_t *display = &allocate_display()->epaper_display; + // display->base.type = &displayio_epaperdisplay_type; + + // common_hal_displayio_epaperdisplay_construct( + // display, + // bus, + // display_start_sequence, sizeof(display_start_sequence), + // 1.0, // start up time + // display_stop_sequence, sizeof(display_stop_sequence), + // 540, // width + // 960, // height + // 540, // ram_width + // 960, // ram_height + // 0, // colstart + // 0, // rowstart + // 90, // rotation + // NO_COMMAND, // set_column_window_command + // NO_COMMAND, // set_row_window_command + // NO_COMMAND, // set_current_column_command + // NO_COMMAND, // set_current_row_command + // NO_COMMAND, // write_black_ram_command + // false, // black_bits_inverted + // NO_COMMAND, // write_color_ram_command + // false, // color_bits_inverted + // 0x000000, // highlight_color + // refresh_sequence, sizeof(refresh_sequence), + // 28.0, // refresh_time + // &pin_GPIO27, // busy_pin + // false, // busy_state + // 30.0, // seconds_per_frame + // false, // always_toggle_chip_select + // false, // grayscale + // true, // acep + // false, // two_byte_sequence_length + // false // address_little_endian + // ); +} diff --git a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h new file mode 100644 index 0000000000..012cb58761 --- /dev/null +++ b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h @@ -0,0 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 fonix232 + * + * 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 M5Paper" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO22, .sda = &pin_GPIO21}, \ + {.scl = &pin_GPIO32, .sda = &pin_GPIO25}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO14, .mosi = &pin_GPIO12, .miso = &pin_GPIO13}} + +// GPIO16 & GPIO17 are used for PSRAM +// #define CIRCUITPY_BOARD_UART (1) +// #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO17, .rx = &pin_GPIO16}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("You pressed button DOWN at start up.") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk new file mode 100644 index 0000000000..d3e2bb2aac --- /dev/null +++ b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.mk @@ -0,0 +1,9 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x0032000B + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESPCAMERA = 0 diff --git a/ports/espressif/boards/m5stack_m5paper/pins.c b/ports/espressif/boards/m5stack_m5paper/pins.c new file mode 100644 index 0000000000..5b7ce7a138 --- /dev/null +++ b/ports/espressif/boards/m5stack_m5paper/pins.c @@ -0,0 +1,63 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // Power MAIN + { MP_ROM_QSTR(MP_QSTR_POWER_MAIN),MP_ROM_PTR(&pin_GPIO2) }, + + // sd card + { MP_ROM_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_GPIO4) }, + + // Power EXT + { MP_ROM_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_GPIO5) }, + + // SPI Internal + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO14) }, + + // IT8951 + { MP_ROM_QSTR(MP_QSTR_IT8951_CS), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IT8951_RESET), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_IT8951_BUSY), MP_ROM_PTR(&pin_GPIO27) }, + + // Port C + { MP_ROM_QSTR(MP_QSTR_PORTC_RX), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_PORTC_TX), MP_ROM_PTR(&pin_GPIO19) }, + + // I2C + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO22) }, + + // EPD Power + { MP_ROM_QSTR(MP_QSTR_IT8951_POWER), MP_ROM_PTR(&pin_GPIO23) }, + + // Port A + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + + // Port B + { MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_PORTB_OUT), MP_ROM_PTR(&pin_GPIO33) }, + + // Battery voltage + { MP_ROM_QSTR(MP_QSTR_BATTERY_VOLTAGE), MP_ROM_PTR(&pin_GPIO35) }, + + // Touch + { MP_ROM_QSTR(MP_QSTR_TOUCH_INT), MP_ROM_PTR(&pin_GPIO36) }, + + // buttons + { MP_ROM_QSTR(MP_QSTR_BTN_UP), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_BTN_CENTER), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_BTN_DOWN), MP_ROM_PTR(&pin_GPIO39) }, + + + { 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_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_m5paper/sdkconfig b/ports/espressif/boards/m5stack_m5paper/sdkconfig new file mode 100644 index 0000000000..d77fe64525 --- /dev/null +++ b/ports/espressif/boards/m5stack_m5paper/sdkconfig @@ -0,0 +1,58 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=y +CONFIG_ESP32_REV_MIN_3=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 +# end of SPI RAM config + +# +# PSRAM clock and cs IO for ESP32 +# +CONFIG_D0WD_PSRAM_CLK_IO=17 +CONFIG_D0WD_PSRAM_CS_IO=16 +# end of PSRAM clock and cs IO for ESP32 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +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 From f93022b14203dfe6606ef626a1f52d495e2beffd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 17 Aug 2023 14:28:33 -0700 Subject: [PATCH 066/291] Two tweaks to mclk --- ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c | 8 +++++--- shared-bindings/audiobusio/I2SOut.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c b/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c index cba857a495..43074acc09 100644 --- a/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c +++ b/ports/mimxrt10xx/common-hal/audiobusio/I2SOut.c @@ -131,10 +131,12 @@ void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t *self) { common_hal_reset_pin(self->data); self->data = NULL; - IOMUXC_GPR->GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self->instance - 1)); + if (self->mclk != NULL) { + IOMUXC_GPR->GPR1 &= ~(IOMUXC_GPR_GPR1_SAI1_MCLK_DIR_MASK << (self->instance - 1)); - common_hal_reset_pin(self->mclk); - self->mclk = NULL; + common_hal_reset_pin(self->mclk); + self->mclk = NULL; + } } void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t *self, diff --git a/shared-bindings/audiobusio/I2SOut.c b/shared-bindings/audiobusio/I2SOut.c index 3f697c35eb..34e18e9cf2 100644 --- a/shared-bindings/audiobusio/I2SOut.c +++ b/shared-bindings/audiobusio/I2SOut.c @@ -44,7 +44,7 @@ //| word_select: microcontroller.Pin, //| data: microcontroller.Pin, //| *, -//| main_clock: microcontroller.Pin = None, +//| main_clock: Optional[microcontroller.Pin] = None, //| left_justified: bool = False //| ) -> None: //| """Create a I2SOut object associated with the given pins. From 37352cf7ec092c9afcf0eb29da929c7751dc7f88 Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Fri, 18 Aug 2023 11:22:26 +0100 Subject: [PATCH 067/291] fix: Apply pre-commit patch --- locale/circuitpython.pot | 4 ++++ ports/espressif/boards/m5stack_m5paper/board.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 0759f70c0c..e479a8aa62 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -2377,6 +2377,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/ports/espressif/boards/m5stack_m5paper/board.c b/ports/espressif/boards/m5stack_m5paper/board.c index 97dee2ac1c..55d1f3e349 100644 --- a/ports/espressif/boards/m5stack_m5paper/board.c +++ b/ports/espressif/boards/m5stack_m5paper/board.c @@ -60,10 +60,10 @@ void board_init(void) { // 1200000, // Baudrate // 0, // Polarity // 0); // Phase - + // displayio_epaperdisplay_obj_t *display = &allocate_display()->epaper_display; // display->base.type = &displayio_epaperdisplay_type; - + // common_hal_displayio_epaperdisplay_construct( // display, // bus, @@ -96,5 +96,5 @@ void board_init(void) { // true, // acep // false, // two_byte_sequence_length // false // address_little_endian - // ); + // ); } From 7933bb0ebee16700b0d8e67fcd5fc66e994cd4f3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 19 Aug 2023 10:07:46 -0400 Subject: [PATCH 068/291] improve hard fault message --- locale/circuitpython.pot | 13 +++++-------- supervisor/shared/safe_mode.c | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 282d229856..ab31c53e02 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -182,6 +182,7 @@ msgid "%q must be 1 when %q is True" msgstr "" #: py/argcheck.c shared-bindings/gifio/GifWriter.c +#: shared-module/gifio/OnDiskGif.c msgid "%q must be <= %d" msgstr "" @@ -1006,10 +1007,6 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1085,6 +1082,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c @@ -1950,10 +1951,6 @@ msgstr "" msgid "Size not supported" msgstr "" -#: ports/raspberrypi/common-hal/alarm/SleepMemory.c -msgid "Sleep Memory not available" -msgstr "" - #: shared-bindings/alarm/SleepMemory.c shared-bindings/memorymap/AddressRange.c #: shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 0ab97fc9a9..62280c7d82 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -209,7 +209,7 @@ void print_safe_mode_message(safe_mode_t reason) { message = translate("Failed to write internal flash."); break; case SAFE_MODE_HARD_FAULT: - message = translate("Fault detected by hardware."); + message = translate("Hard fault: memory access or instruction error."); break; case SAFE_MODE_INTERRUPT_ERROR: message = translate("Interrupt error."); From 10a022db87ae67f0fb0f05677d572e38b0096a1f Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sat, 19 Aug 2023 12:14:58 -0400 Subject: [PATCH 069/291] consolidate and shorten some error messages --- locale/circuitpython.pot | 30 ++++++++----------- ports/cxd56/common-hal/camera/Camera.c | 2 +- shared-bindings/displayio/Display.c | 2 +- shared-bindings/displayio/TileGrid.c | 2 +- .../framebufferio/FramebufferDisplay.c | 2 +- shared-bindings/struct/__init__.c | 4 +-- shared-bindings/vectorio/VectorShape.c | 2 +- shared-module/struct/__init__.c | 2 +- supervisor/shared/safe_mode.c | 4 +-- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index ab31c53e02..cdbb5fa24a 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -31,8 +31,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -633,11 +633,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "" -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -657,6 +652,12 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1786,6 +1787,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2016,10 +2021,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2605,8 +2606,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3863,10 +3863,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" diff --git a/ports/cxd56/common-hal/camera/Camera.c b/ports/cxd56/common-hal/camera/Camera.c index 606ad0f1e6..37b5f63d17 100644 --- a/ports/cxd56/common-hal/camera/Camera.c +++ b/ports/cxd56/common-hal/camera/Camera.c @@ -184,7 +184,7 @@ size_t common_hal_camera_take_picture(camera_obj_t *self, uint8_t *buffer, size_ mp_raise_ValueError(translate("Size not supported")); } if (!camera_check_buffer_length(width, height, format, len)) { - mp_raise_ValueError(translate("Buffer is too small")); + mp_raise_ValueError(translate("Buffer too small")); } if (!camera_check_format(format)) { mp_raise_ValueError(translate("Format not supported")); diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index c7fb6dadf4..5576e2cbfc 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -506,7 +506,7 @@ STATIC mp_obj_t displayio_display_obj_fill_row(size_t n_args, const mp_obj_t *po displayio_display_core_fill_area(&self->core, &area, mask, result_buffer); return result; } else { - mp_raise_ValueError(translate("Buffer is too small")); + mp_raise_ValueError(translate("Buffer too small")); } } MP_DEFINE_CONST_FUN_OBJ_KW(displayio_display_fill_row_obj, 1, displayio_display_obj_fill_row); diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index f2e16985c3..e9eeea40ff 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -351,7 +351,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_pixel_shader_obj, displayio_til STATIC mp_obj_t displayio_tilegrid_obj_set_pixel_shader(mp_obj_t self_in, mp_obj_t pixel_shader) { displayio_tilegrid_t *self = native_tilegrid(self_in); if (!mp_obj_is_type(pixel_shader, &displayio_palette_type) && !mp_obj_is_type(pixel_shader, &displayio_colorconverter_type)) { - mp_raise_TypeError(translate("pixel_shader must be displayio.Palette or displayio.ColorConverter")); + mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_pixel_shader); } common_hal_displayio_tilegrid_set_pixel_shader(self, pixel_shader); diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index a1ad6a0bac..d57081e16f 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -317,7 +317,7 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_fill_row(size_t n_args, con displayio_display_core_fill_area(&self->core, &area, mask, result_buffer); return result; } else { - mp_raise_ValueError(translate("Buffer is too small")); + mp_raise_ValueError(translate("Buffer too small")); } } MP_DEFINE_CONST_FUN_OBJ_KW(framebufferio_framebufferdisplay_fill_row_obj, 1, framebufferio_framebufferdisplay_obj_fill_row); diff --git a/shared-bindings/struct/__init__.c b/shared-bindings/struct/__init__.c index 5b63a15f15..61d90dc8bb 100644 --- a/shared-bindings/struct/__init__.c +++ b/shared-bindings/struct/__init__.c @@ -92,7 +92,7 @@ STATIC mp_obj_t struct_pack_into(size_t n_args, const mp_obj_t *args) { // negative offsets are relative to the end of the buffer offset = (mp_int_t)bufinfo.len + offset; if (offset < 0) { - mp_raise_RuntimeError(translate("buffer too small")); + mp_raise_RuntimeError(translate("Buffer too small")); } } byte *p = (byte *)bufinfo.buf; @@ -151,7 +151,7 @@ STATIC mp_obj_t struct_unpack_from(size_t n_args, const mp_obj_t *pos_args, mp_m // negative offsets are relative to the end of the buffer offset = bufinfo.len + offset; if (offset < 0) { - mp_raise_RuntimeError(translate("buffer too small")); + mp_raise_RuntimeError(translate("Buffer too small")); } } p += offset; diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index e5c806b943..a7bfde4744 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -226,7 +226,7 @@ STATIC mp_obj_t vectorio_vector_shape_obj_set_pixel_shader(mp_obj_t wrapper_shap vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); if (!mp_obj_is_type(pixel_shader, &displayio_palette_type) && !mp_obj_is_type(pixel_shader, &displayio_colorconverter_type)) { - mp_raise_TypeError(translate("pixel_shader must be displayio.Palette or displayio.ColorConverter")); + mp_raise_TypeError_varg(translate("unsupported %q type"), MP_QSTR_pixel_shader); } common_hal_vectorio_vector_shape_set_pixel_shader(self, pixel_shader); diff --git a/shared-module/struct/__init__.c b/shared-module/struct/__init__.c index 11e122915c..5fc3d30f25 100644 --- a/shared-module/struct/__init__.c +++ b/shared-module/struct/__init__.c @@ -126,7 +126,7 @@ void shared_modules_struct_pack_into(mp_obj_t fmt_in, byte *p, byte *end_p, size const mp_uint_t total_sz = shared_modules_struct_calcsize(fmt_in); if (p + total_sz > end_p) { - mp_raise_RuntimeError(translate("buffer too small")); + mp_raise_RuntimeError(translate("Buffer too small")); } size_t i = 0; diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 62280c7d82..6507b77e97 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -154,7 +154,7 @@ void print_safe_mode_message(safe_mode_t reason) { switch (reason) { case SAFE_MODE_BROWNOUT: - message = translate("The power dipped. Make sure you are providing enough power."); + message = translate("Power dipped. Make sure you are providing enough power."); break; case SAFE_MODE_USER: #if defined(BOARD_USER_SAFE_MODE_ACTION) @@ -228,7 +228,7 @@ void print_safe_mode_message(safe_mode_t reason) { break; } serial_write_compressed(message); - serial_write_compressed(translate("\nPlease file an issue with your program at https://github.com/adafruit/circuitpython/issues.")); + serial_write_compressed(translate("\nPlease file an issue with your program at github.com/adafruit/circuitpython/issues.")); } // Always tell user how to get out of safe mode. From 994bd2371fa89f4075cd83614f9e2d359fa32747 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 19 Aug 2023 12:07:07 -0500 Subject: [PATCH 070/291] canio: add a doc note about boards like CAN feather that use mcp2515 --- conf.py | 1 + shared-bindings/canio/__init__.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 645961c457..ba6e01f6a9 100644 --- a/conf.py +++ b/conf.py @@ -443,6 +443,7 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {"cpython": ('https://docs.python.org/3/', None), "register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None), + "mcp2515": ('https://circuitpython.readthedocs.io/projects/mcp2515/en/latest/', None), "typing": ('https://circuitpython.readthedocs.io/projects/adafruit-circuitpython-typing/en/latest/', None)} # Adapted from sphinxcontrib-redirects diff --git a/shared-bindings/canio/__init__.c b/shared-bindings/canio/__init__.c index ecef7ebde6..42edd68e38 100644 --- a/shared-bindings/canio/__init__.c +++ b/shared-bindings/canio/__init__.c @@ -27,7 +27,10 @@ //| """CAN bus access //| //| The `canio` module contains low level classes to support the CAN bus -//| protocol. +//| protocol on microcontrollers that have built-in CAN peripherals. +//| +//| Boards like the Adafruit RP2040 CAN Bus Feather that use an MCP2515 or +//| compatible chip use the `mcp2515:adafruit_mcp2515` module instead. //| //| CAN and Listener classes change hardware state and should be deinitialized when they //| are no longer needed if the program continues after use. To do so, either From 3120bd3d7d7f678fc4199ecfa3d3fba922d28112 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 20 Aug 2023 00:21:33 +0200 Subject: [PATCH 071/291] Fix displayio when CIRCUITPY_REPL_LOGO is disabled We have to make room for the status bar no matter if the logo is enabled or not. We probably should add a similar option for disabling the status bar. This makes the PewPew M4 port stop crashing. (cherry picked from commit b50a7fb9137383737fcc8f635a714b45f41e20ad) --- supervisor/shared/display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index ce7d78c42c..4e24175a1f 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -128,10 +128,8 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { status_bar->full_change = true; scroll_area->width_in_tiles = width_in_tiles; - scroll_area->height_in_tiles = height_in_tiles; - #if CIRCUITPY_REPL_LOGO - scroll_area->height_in_tiles -= 1; - #endif + // Leave space for the status bar, no matter if we have logo or not. + scroll_area->height_in_tiles = height_in_tiles - 1; scroll_area->pixel_width = scroll_area->width_in_tiles * scroll_area->tile_width; scroll_area->pixel_height = scroll_area->height_in_tiles * scroll_area->tile_height; // Right align the scroll area to give margin to the start of each line. From a5578cf0678625a246c3e2864aac27f75bf651a0 Mon Sep 17 00:00:00 2001 From: Ciro Cattuto Date: Mon, 21 Aug 2023 22:47:09 +0200 Subject: [PATCH 072/291] Fixed compilion error when FF_MAX_SS != FF_MIN_SS --- supervisor/shared/usb/usb_msc_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index f1830332d4..f212d55270 100644 --- a/supervisor/shared/usb/usb_msc_flash.c +++ b/supervisor/shared/usb/usb_msc_flash.c @@ -195,7 +195,7 @@ int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t * // MicroPython let's update the cached FatFs sector if it's the one // we just wrote. #if FF_MAX_SS != FF_MIN_SS - if (vfs->ssize == MSC_FLASH_BLOCK_SIZE) { + if (vfs->fatfs.ssize == MSC_FLASH_BLOCK_SIZE) { #else // The compiler can optimize this away. if (FF_MAX_SS == FILESYSTEM_BLOCK_SIZE) { From d23ddff97160ff5d1e9d7baff0ed360fa3b6a2d9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 21 Aug 2023 15:57:45 -0500 Subject: [PATCH 073/291] Add several constants needed to use multicast UDP This was verified by @todbot to work on esp32 s2 and s3; the constant should match any system that uses LWIP numbering. --- shared-bindings/socketpool/SocketPool.c | 6 ++++++ shared-bindings/socketpool/SocketPool.h | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c index 3023721378..381291fbaf 100644 --- a/shared-bindings/socketpool/SocketPool.c +++ b/shared-bindings/socketpool/SocketPool.c @@ -82,6 +82,10 @@ MP_DEFINE_EXCEPTION(gaierror, OSError) //| TCP_NODELAY: int //| //| IPPROTO_TCP: int +//| IPPROTO_IP: int +//| +//| IP_MULTICAST_TTL: int +//| //| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM) -> socketpool.Socket: //| """Create a new socket //| @@ -182,6 +186,8 @@ STATIC const mp_rom_map_elem_t socketpool_socketpool_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_TCP_NODELAY), MP_ROM_INT(SOCKETPOOL_TCP_NODELAY) }, { MP_ROM_QSTR(MP_QSTR_IPPROTO_TCP), MP_ROM_INT(SOCKETPOOL_IPPROTO_TCP) }, + { MP_ROM_QSTR(MP_QSTR_IPPROTO_IP), MP_ROM_INT(SOCKETPOOL_IPPROTO_IP) }, + { MP_ROM_QSTR(MP_QSTR_IP_MULTICAST_TTL), MP_ROM_INT(SOCKETPOOL_IP_MULTICAST_TTL) }, { MP_ROM_QSTR(MP_QSTR_EAI_NONAME), MP_ROM_INT(SOCKETPOOL_EAI_NONAME) }, }; diff --git a/shared-bindings/socketpool/SocketPool.h b/shared-bindings/socketpool/SocketPool.h index 6409f8c763..9e9d7fde4f 100644 --- a/shared-bindings/socketpool/SocketPool.h +++ b/shared-bindings/socketpool/SocketPool.h @@ -45,6 +45,7 @@ typedef enum { } socketpool_socketpool_addressfamily_t; typedef enum { + SOCKETPOOL_IPPROTO_IP = 0, SOCKETPOOL_IPPROTO_TCP = 6, } socketpool_socketpool_ipproto_t; @@ -52,6 +53,10 @@ typedef enum { SOCKETPOOL_TCP_NODELAY = 1, } socketpool_socketpool_tcpopt_t; +typedef enum { + SOCKETPOOL_IP_MULTICAST_TTL = 5, +} socketpool_socketpool_ipopt_t; + typedef enum { SOCKETPOOL_EAI_NONAME = -2, } socketpool_eai_t; From eba1f9d4fed3a1cd160bab9c68c79cda3c5f4bee Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Mon, 21 Aug 2023 19:36:28 -0400 Subject: [PATCH 074/291] fix framebuffer size for pimoroni dvi base --- ports/raspberrypi/boards/pimoroni_pico_dv_base/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base/board.c b/ports/raspberrypi/boards/pimoroni_pico_dv_base/board.c index bc5878bf24..ee86bb3651 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base/board.c +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base/board.c @@ -33,7 +33,7 @@ void board_init(void) { picodvi_framebuffer_obj_t *fb = &allocate_display_bus()->picodvi; fb->base.type = &picodvi_framebuffer_type; - common_hal_picodvi_framebuffer_construct(fb, 640, 480, + common_hal_picodvi_framebuffer_construct(fb, 320, 240, &pin_GPIO7, &pin_GPIO6, &pin_GPIO9, &pin_GPIO8, &pin_GPIO11, &pin_GPIO10, From 2fc413db24bf4ed3513bcfda0b02f11122f28d16 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 21 Aug 2023 21:34:14 -0500 Subject: [PATCH 075/291] Use the ".. jinja" tag to render support_matrix template .. and remove the substring check for the file. this fixes the problem with sphinx 7.2.2 that the "docname" can be None (see https://github.com/sphinx-doc/sphinx/issues/11620) --- docs/rstjinja.py | 4 +--- shared-bindings/support_matrix.rst | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/rstjinja.py b/docs/rstjinja.py index 5cac1a5e15..7d5fff5c6c 100644 --- a/docs/rstjinja.py +++ b/docs/rstjinja.py @@ -4,9 +4,7 @@ import re def render_with_jinja(docname, source): - if "shared-bindings/support_matrix" in docname: - return True - if re.search('^\s+.. jinja$', source[0], re.M): + if re.search('^\s*.. jinja$', source[0], re.M): return True return False diff --git a/shared-bindings/support_matrix.rst b/shared-bindings/support_matrix.rst index 3d5e544ea0..e3428ac5bc 100644 --- a/shared-bindings/support_matrix.rst +++ b/shared-bindings/support_matrix.rst @@ -11,6 +11,8 @@ Only those boards that provide those modules will be listed. To exclude boards that provide a module, type a "-" in front of the module name. You can also type a regular expression as a filter. +.. jinja + .. raw:: html

(all)

From 2ec145ba6c7105272b22924c0860ac579fe40a89 Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Tue, 22 Aug 2023 11:44:52 +0100 Subject: [PATCH 076/291] fix: Minor fixes for M5Paper --- .../boards/m5stack_m5paper/mpconfigboard.h | 5 +-- ports/espressif/boards/m5stack_m5paper/pins.c | 37 +++++++++++++------ .../boards/m5stack_m5paper/sdkconfig | 2 +- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h index 012cb58761..f80bf4b550 100644 --- a/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +++ b/ports/espressif/boards/m5stack_m5paper/mpconfigboard.h @@ -36,9 +36,8 @@ #define CIRCUITPY_BOARD_SPI (1) #define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO14, .mosi = &pin_GPIO12, .miso = &pin_GPIO13}} -// GPIO16 & GPIO17 are used for PSRAM -// #define CIRCUITPY_BOARD_UART (1) -// #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO17, .rx = &pin_GPIO16}} +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO19, .rx = &pin_GPIO18}} // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) diff --git a/ports/espressif/boards/m5stack_m5paper/pins.c b/ports/espressif/boards/m5stack_m5paper/pins.c index 5b7ce7a138..ead95d968f 100644 --- a/ports/espressif/boards/m5stack_m5paper/pins.c +++ b/ports/espressif/boards/m5stack_m5paper/pins.c @@ -1,17 +1,19 @@ #include "shared-bindings/board/__init__.h" #include "shared-module/displayio/__init__.h" +CIRCUITPY_BOARD_BUS_SINGLETON(porta_i2c, i2c, 1) + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS // Power MAIN - { MP_ROM_QSTR(MP_QSTR_POWER_MAIN),MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_POWER_MAIN), MP_ROM_PTR(&pin_GPIO2) }, // sd card - { MP_ROM_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO4) }, - // Power EXT - { MP_ROM_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_GPIO5) }, + // Power EXT - Controls 5V rail on Port A, B and C + { MP_ROM_QSTR(MP_QSTR_POWER_EXT), MP_ROM_PTR(&pin_GPIO5) }, // SPI Internal { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO12) }, @@ -21,26 +23,38 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // IT8951 { MP_ROM_QSTR(MP_QSTR_IT8951_CS), MP_ROM_PTR(&pin_GPIO15) }, { MP_ROM_QSTR(MP_QSTR_IT8951_RESET), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_IT8951_POWER), MP_ROM_PTR(&pin_GPIO23) }, { MP_ROM_QSTR(MP_QSTR_IT8951_BUSY), MP_ROM_PTR(&pin_GPIO27) }, - // Port C + // Port C - UART Mode - External pins { MP_ROM_QSTR(MP_QSTR_PORTC_RX), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_PORTC_TX), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, // I2C { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, - // EPD Power - { MP_ROM_QSTR(MP_QSTR_IT8951_POWER), MP_ROM_PTR(&pin_GPIO23) }, - - // Port A + // Port A - I2C Mode - External pins { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, - // Port B + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO32) }, + + // Port B - Generic I/O Mode - External pins { MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_PORTB_OUT), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, // Battery voltage { MP_ROM_QSTR(MP_QSTR_BATTERY_VOLTAGE), MP_ROM_PTR(&pin_GPIO35) }, @@ -55,6 +69,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_porta_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/espressif/boards/m5stack_m5paper/sdkconfig b/ports/espressif/boards/m5stack_m5paper/sdkconfig index d77fe64525..afbee57d19 100644 --- a/ports/espressif/boards/m5stack_m5paper/sdkconfig +++ b/ports/espressif/boards/m5stack_m5paper/sdkconfig @@ -36,7 +36,7 @@ CONFIG_SPIRAM_MEMTEST=y # # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreFire" +CONFIG_LWIP_LOCAL_HOSTNAME="M5Paper" # end of LWIP # Uncomment (remove ###) to send ESP_LOG output to TX/RX pins From 648ec1c0ed79871d0d8875d14e52eb0e5d0b5b60 Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Sat, 29 Oct 2022 17:27:21 +0100 Subject: [PATCH 077/291] feat: Add support for Waveshare RP2040-Plus --- .../boards/waveshare_rp2040_plus/board.c | 29 ++++++++++ .../waveshare_rp2040_plus/mpconfigboard.h | 2 + .../waveshare_rp2040_plus/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 1 + .../boards/waveshare_rp2040_plus/pins.c | 54 +++++++++++++++++++ 5 files changed, 97 insertions(+) create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus/board.c create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus/pins.c diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/board.c b/ports/raspberrypi/boards/waveshare_rp2040_plus/board.c new file mode 100644 index 0000000000..331653173e --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h new file mode 100644 index 0000000000..0dbaf070a4 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h @@ -0,0 +1,2 @@ +#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-Plus" +#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk new file mode 100644 index 0000000000..99bcfc51e7 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2E8A +USB_PID = 0x101D +USB_PRODUCT = "RP2040-Plus" +USB_MANUFACTURER = "Waveshare Electronics" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q32JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/pico-sdk-configboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_plus/pins.c new file mode 100644 index 0000000000..87ff27fa46 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/pins.c @@ -0,0 +1,54 @@ +#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_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 127f09b28c91d5aa0be785f848ba1bb911931f2a Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Sat, 29 Oct 2022 19:17:06 +0100 Subject: [PATCH 078/291] Update ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk --- ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk index 99bcfc51e7..9cf2a724be 100644 --- a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0x101D +USB_PID = 0x0005 USB_PRODUCT = "RP2040-Plus" USB_MANUFACTURER = "Waveshare Electronics" From 9a140dc3ee7a0659a3f717a770cb4fd904d5bdba Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Wed, 11 Jan 2023 12:21:15 +0000 Subject: [PATCH 079/291] Update ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk Co-authored-by: Scott Shawcroft --- ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk index 9cf2a724be..2b0647dca4 100644 --- a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0x0005 +USB_PID = 0x1020 USB_PRODUCT = "RP2040-Plus" USB_MANUFACTURER = "Waveshare Electronics" From bb1b827f55173a813d2e001d75cf4ea3971b56cb Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Tue, 22 Aug 2023 15:06:37 +0100 Subject: [PATCH 080/291] fix: Split 16M and 4M variants --- .../waveshare_rp2040_plus/mpconfigboard.h | 2 - .../board.c | 0 .../mpconfigboard.h | 2 + .../mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 0 .../pins.c | 0 .../boards/waveshare_rp2040_plus_4mb/board.c | 29 ++++++++++ .../waveshare_rp2040_plus_4mb/mpconfigboard.h | 2 + .../mpconfigboard.mk | 2 +- .../pico-sdk-configboard.h | 1 + .../boards/waveshare_rp2040_plus_4mb/pins.c | 54 +++++++++++++++++++ 11 files changed, 100 insertions(+), 3 deletions(-) delete mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h rename ports/raspberrypi/boards/{waveshare_rp2040_plus => waveshare_rp2040_plus_16mb}/board.c (100%) create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.mk rename ports/raspberrypi/boards/{waveshare_rp2040_plus => waveshare_rp2040_plus_16mb}/pico-sdk-configboard.h (100%) rename ports/raspberrypi/boards/{waveshare_rp2040_plus => waveshare_rp2040_plus_16mb}/pins.c (100%) create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/board.c create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.h rename ports/raspberrypi/boards/{waveshare_rp2040_plus => waveshare_rp2040_plus_4mb}/mpconfigboard.mk (83%) create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pins.c diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h deleted file mode 100644 index 0dbaf070a4..0000000000 --- a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.h +++ /dev/null @@ -1,2 +0,0 @@ -#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-Plus" -#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/board.c b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/board.c similarity index 100% rename from ports/raspberrypi/boards/waveshare_rp2040_plus/board.c rename to ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/board.c diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.h new file mode 100644 index 0000000000..1dd18e30eb --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.h @@ -0,0 +1,2 @@ +#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-Plus (16MB)" +#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.mk new file mode 100644 index 0000000000..b4f84bf09b --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2E8A +USB_PID = 0x1020 +USB_PRODUCT = "RP2040-Plus (16MB)" +USB_MANUFACTURER = "Waveshare Electronics" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/pico-sdk-configboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/pico-sdk-configboard.h similarity index 100% rename from ports/raspberrypi/boards/waveshare_rp2040_plus/pico-sdk-configboard.h rename to ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/pico-sdk-configboard.h diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/pins.c similarity index 100% rename from ports/raspberrypi/boards/waveshare_rp2040_plus/pins.c rename to ports/raspberrypi/boards/waveshare_rp2040_plus_16mb/pins.c diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/board.c b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/board.c new file mode 100644 index 0000000000..331653173e --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.h new file mode 100644 index 0000000000..3cf1f16066 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.h @@ -0,0 +1,2 @@ +#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-Plus (4MB)" +#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.mk similarity index 83% rename from ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk rename to ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.mk index 2b0647dca4..78b729ef58 100644 --- a/ports/raspberrypi/boards/waveshare_rp2040_plus/mpconfigboard.mk +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x2E8A USB_PID = 0x1020 -USB_PRODUCT = "RP2040-Plus" +USB_PRODUCT = "RP2040-Plus (4MB)" USB_MANUFACTURER = "Waveshare Electronics" CHIP_VARIANT = RP2040 diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pico-sdk-configboard.h b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pins.c new file mode 100644 index 0000000000..87ff27fa46 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_plus_4mb/pins.c @@ -0,0 +1,54 @@ +#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_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 4f7e66df08cb011272422c131ff1d922c0c0c810 Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Tue, 22 Aug 2023 15:17:40 +0100 Subject: [PATCH 081/291] fix: pre-commit --- ports/espressif/boards/m5stack_m5paper/pins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/m5stack_m5paper/pins.c b/ports/espressif/boards/m5stack_m5paper/pins.c index ead95d968f..ca5f18baac 100644 --- a/ports/espressif/boards/m5stack_m5paper/pins.c +++ b/ports/espressif/boards/m5stack_m5paper/pins.c @@ -52,7 +52,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { // Port B - Generic I/O Mode - External pins { MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, - + { MP_ROM_QSTR(MP_QSTR_PORTB_OUT), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, From 485924896edc917dbfbf60313a1796388bf046ee Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Aug 2023 10:30:57 -0500 Subject: [PATCH 082/291] RGBMatrix: document constructor arguments Closes: #8283 --- shared-bindings/rgbmatrix/RGBMatrix.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 0f5cc91fc7..9166241a24 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -186,7 +186,22 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| flicker during updates. //| //| A RGBMatrix is often used in conjunction with a -//| `framebufferio.FramebufferDisplay`.""" +//| `framebufferio.FramebufferDisplay`. +//| +//| :param int width: The overall width of the display in pixels +//| :param int height: The overall height of all displays in pixels +//| :param int tile: In a multi-row display, the number of rows of panels +//| :param int bit_depth: The color depth of the display. A value of 1 gives 8 colors, a value of 2 gives 64 colors, and so on. Increasing bit depth increases the CPU and RAM usage of the RGBMatrix, and may lower the panel refresh rate. The framebuffer is always in RGB565 format regardless of the bit depth setting +//| :param bool serpentine: In a multi-row display, True when alternate rows are rotated 180°, which can reduce wiring length +//| :param Sequence[digitalio.DigitalInOut] rgb_pins: The display's "RGB pins" +//| :param Sequence[digitalio.DigitalInOut] addr_pins: The display's "address pins" +//| :param digitalio.DigitalInOut clock_pin: The display's "clock pin" +//| :param digitalio.DigitalInOut latch_pin: The display's "latch pin" +//| :param digitalio.DigitalInOut output_enable_pin: The display's "output enable" pin +//| :param bool doublebuffer: True if the output is double-buffered +//| :param Optional[WriteableBuffer] framebuffer: A pre-allocated framebuffer to use. If unspecified, a framebuffer is allocated +//| +//| """ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { enum { ARG_width, ARG_bit_depth, ARG_rgb_list, ARG_addr_list, From 81ad2e05bae637c99546b7940b72e2c500dfa622 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Aug 2023 10:44:35 -0500 Subject: [PATCH 083/291] address review comments --- shared-bindings/rgbmatrix/RGBMatrix.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 9166241a24..0aa7e581b0 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -188,16 +188,16 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| A RGBMatrix is often used in conjunction with a //| `framebufferio.FramebufferDisplay`. //| -//| :param int width: The overall width of the display in pixels -//| :param int height: The overall height of all displays in pixels -//| :param int tile: In a multi-row display, the number of rows of panels -//| :param int bit_depth: The color depth of the display. A value of 1 gives 8 colors, a value of 2 gives 64 colors, and so on. Increasing bit depth increases the CPU and RAM usage of the RGBMatrix, and may lower the panel refresh rate. The framebuffer is always in RGB565 format regardless of the bit depth setting -//| :param bool serpentine: In a multi-row display, True when alternate rows are rotated 180°, which can reduce wiring length -//| :param Sequence[digitalio.DigitalInOut] rgb_pins: The display's "RGB pins" -//| :param Sequence[digitalio.DigitalInOut] addr_pins: The display's "address pins" -//| :param digitalio.DigitalInOut clock_pin: The display's "clock pin" -//| :param digitalio.DigitalInOut latch_pin: The display's "latch pin" -//| :param digitalio.DigitalInOut output_enable_pin: The display's "output enable" pin +//| :param int width: The overall width of the whole matrix in pixels +//| :param int height: The overall height of the whole matrix in pixels +//| :param int tile: In a multi-row matrix, the number of rows of panels +//| :param int bit_depth: The color depth of the matrix. A value of 1 gives 8 colors, a value of 2 gives 64 colors, and so on. Increasing bit depth increases the CPU and RAM usage of the RGBMatrix, and may lower the panel refresh rate. The framebuffer is always in RGB565 format regardless of the bit depth setting +//| :param bool serpentine: In a multi-row matrix, True when alternate rows of panels are rotated 180°, which can reduce wiring length +//| :param Sequence[digitalio.DigitalInOut] rgb_pins: The matrix's RGB pins +//| :param Sequence[digitalio.DigitalInOut] addr_pins: The matrix's address pins +//| :param digitalio.DigitalInOut clock_pin: The matrix's clock pin +//| :param digitalio.DigitalInOut latch_pin: The matrix's latch pin +//| :param digitalio.DigitalInOut output_enable_pin: The matrix's output enable pin //| :param bool doublebuffer: True if the output is double-buffered //| :param Optional[WriteableBuffer] framebuffer: A pre-allocated framebuffer to use. If unspecified, a framebuffer is allocated //| From 2dcc0d2a62c20ad7684e53db6b9d5c8b832e2511 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Aug 2023 10:46:34 -0500 Subject: [PATCH 084/291] further explain width and height, it can't hurt --- shared-bindings/rgbmatrix/RGBMatrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 0aa7e581b0..4b044eac5a 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -188,8 +188,8 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| A RGBMatrix is often used in conjunction with a //| `framebufferio.FramebufferDisplay`. //| -//| :param int width: The overall width of the whole matrix in pixels -//| :param int height: The overall height of the whole matrix in pixels +//| :param int width: The overall width of the whole matrix in pixels. For a matrix with multiple panels in row, this is the width of a single panel times the number of panels across. +//| :param int height: The overall height of the whole matrix in pixels. For a matrix with multiple rows of panels, this is the height of a single panel times the number of panels down. //| :param int tile: In a multi-row matrix, the number of rows of panels //| :param int bit_depth: The color depth of the matrix. A value of 1 gives 8 colors, a value of 2 gives 64 colors, and so on. Increasing bit depth increases the CPU and RAM usage of the RGBMatrix, and may lower the panel refresh rate. The framebuffer is always in RGB565 format regardless of the bit depth setting //| :param bool serpentine: In a multi-row matrix, True when alternate rows of panels are rotated 180°, which can reduce wiring length From e336dc90cf15ef61b235e3d6ad4fc435e6c61320 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Aug 2023 10:53:10 -0500 Subject: [PATCH 085/291] update explanation of height; it is optional --- shared-bindings/rgbmatrix/RGBMatrix.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index 4b044eac5a..c68798e352 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -189,7 +189,6 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| `framebufferio.FramebufferDisplay`. //| //| :param int width: The overall width of the whole matrix in pixels. For a matrix with multiple panels in row, this is the width of a single panel times the number of panels across. -//| :param int height: The overall height of the whole matrix in pixels. For a matrix with multiple rows of panels, this is the height of a single panel times the number of panels down. //| :param int tile: In a multi-row matrix, the number of rows of panels //| :param int bit_depth: The color depth of the matrix. A value of 1 gives 8 colors, a value of 2 gives 64 colors, and so on. Increasing bit depth increases the CPU and RAM usage of the RGBMatrix, and may lower the panel refresh rate. The framebuffer is always in RGB565 format regardless of the bit depth setting //| :param bool serpentine: In a multi-row matrix, True when alternate rows of panels are rotated 180°, which can reduce wiring length @@ -200,7 +199,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_ //| :param digitalio.DigitalInOut output_enable_pin: The matrix's output enable pin //| :param bool doublebuffer: True if the output is double-buffered //| :param Optional[WriteableBuffer] framebuffer: A pre-allocated framebuffer to use. If unspecified, a framebuffer is allocated -//| +//| :param int height: The optional overall height of the whole matrix in pixels. This value is not required because it can be calculated as described above. //| """ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { From c1dce99be97aa8a12d8e12f3a9d634e660e555c7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Aug 2023 10:55:55 -0500 Subject: [PATCH 086/291] Link to dedicated guide for rgbmatrix --- shared-bindings/rgbmatrix/__init__.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared-bindings/rgbmatrix/__init__.c b/shared-bindings/rgbmatrix/__init__.c index 1e9099adb6..62fb4abd59 100644 --- a/shared-bindings/rgbmatrix/__init__.c +++ b/shared-bindings/rgbmatrix/__init__.c @@ -31,7 +31,11 @@ #include "shared-bindings/rgbmatrix/RGBMatrix.h" -//| """Low-level routines for bitbanged LED matrices""" +//| """Low-level routines for bitbanged LED matrices +//| +//| For more information about working with RGB matrix panels in CircuitPython, see +//| `the dedicated learn guide `_. +//| """ STATIC const mp_rom_map_elem_t rgbmatrix_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_rgbmatrix) }, From 88c22d5052407d5e00a946748ef798c76ad1e0ce Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 22 Aug 2023 11:15:46 -0400 Subject: [PATCH 087/291] remove last uses of 'u' prefix --- extmod/moduasyncio.c | 2 +- extmod/modubinascii.c | 2 +- extmod/moduhashlib.c | 2 +- extmod/moduheapq.c | 2 +- extmod/modujson.c | 2 +- extmod/moduos.c | 2 +- extmod/moduplatform.c | 2 +- extmod/modurandom.c | 2 +- extmod/modure.c | 2 +- extmod/modutimeq.c | 239 ------------------ extmod/moduzlib.c | 2 +- ports/unix/coverage.c | 6 +- ports/unix/modtime.c | 2 +- ports/unix/moduselect.c | 2 +- py/modio.c | 2 +- py/modsys.c | 2 +- py/moduerrno.c | 4 - py/py.mk | 1 - tests/basics/array1.py | 9 +- tests/basics/array_add.py | 9 +- tests/basics/array_micropython.py | 9 +- tests/basics/bytes_add_array.py | 9 +- tests/basics/bytes_add_endian.py | 9 +- tests/basics/bytes_compare_array.py | 9 +- tests/basics/dict_fixed.py | 22 +- tests/basics/errno1.py | 14 +- tests/basics/io_buffered_writer.py | 2 +- tests/basics/io_bytesio_cow.py | 5 +- tests/basics/io_bytesio_ext.py | 5 +- tests/basics/io_bytesio_ext2.py | 5 +- tests/basics/io_iobase.py | 5 +- tests/basics/io_stringio1.py | 5 +- tests/basics/io_stringio_with.py | 5 +- tests/basics/io_write_ext.py | 6 +- tests/basics/memoryview1.py | 9 +- tests/basics/memoryview_slice_assign.py | 9 +- tests/basics/struct1.py | 11 +- tests/basics/struct1_intbig.py | 11 +- tests/basics/struct2.py | 11 +- tests/basics/struct_endian.py | 11 +- tests/basics/struct_overflow.py | 11 +- tests/basics/sys_path.py | 5 +- tests/basics/sys_tracebacklimit.py | 8 +- tests/basics/sys_tracebacklimit.py.exp | 30 +-- .../bitmaptools/_bmp16.py | 5 +- tests/circuitpython/getenv.py | 12 +- tests/circuitpython/zlib_decompress.py | 7 +- tests/cmdline/repl_micropyinspect | 4 +- tests/cmdline/repl_sys_ps1_ps2.py | 6 +- tests/cmdline/repl_sys_ps1_ps2.py.exp | 6 +- tests/extmod/btree1.py | 89 ------- tests/extmod/btree1.py.exp | 40 --- tests/extmod/btree_error.py | 42 --- tests/extmod/btree_error.py.exp | 6 - tests/extmod/btree_gc.py | 26 -- tests/extmod/btree_gc.py.exp | 80 ------ tests/extmod/framebuf1.py | 111 -------- tests/extmod/framebuf1.py.exp | 68 ----- tests/extmod/framebuf16.py | 66 ----- tests/extmod/framebuf16.py.exp | 57 ----- tests/extmod/framebuf2.py | 64 ----- tests/extmod/framebuf2.py.exp | 57 ----- tests/extmod/framebuf4.py | 55 ---- tests/extmod/framebuf4.py.exp | 112 -------- tests/extmod/framebuf8.py | 34 --- tests/extmod/framebuf8.py.exp | 15 -- tests/extmod/framebuf_palette.py | 35 --- tests/extmod/framebuf_palette.py.exp | 5 - tests/extmod/framebuf_subclass.py | 51 ---- tests/extmod/framebuf_subclass.py.exp | 4 - tests/extmod/ticks_diff.py | 2 +- tests/extmod/time_ms_us.py | 28 +- tests/extmod/uasyncio_await_return.py | 9 +- tests/extmod/uasyncio_basic.py | 15 +- tests/extmod/uasyncio_basic2.py | 9 +- tests/extmod/uasyncio_cancel_fair.py | 9 +- tests/extmod/uasyncio_cancel_fair2.py | 9 +- tests/extmod/uasyncio_cancel_self.py | 9 +- tests/extmod/uasyncio_cancel_task.py | 9 +- .../uasyncio_cancel_wait_on_finished.py | 9 +- tests/extmod/uasyncio_current_task.py | 9 +- tests/extmod/uasyncio_event.py | 9 +- tests/extmod/uasyncio_event_fair.py | 9 +- tests/extmod/uasyncio_exception.py | 9 +- tests/extmod/uasyncio_fair.py | 9 +- tests/extmod/uasyncio_gather.py | 11 +- tests/extmod/uasyncio_gather_notimpl.py | 11 +- tests/extmod/uasyncio_get_event_loop.py | 9 +- tests/extmod/uasyncio_heaplock.py | 11 +- tests/extmod/uasyncio_lock.py | 9 +- tests/extmod/uasyncio_lock_cancel.py | 9 +- tests/extmod/uasyncio_loop_stop.py | 9 +- tests/extmod/uasyncio_micropython.py | 18 +- tests/extmod/uasyncio_new_event_loop.py | 9 +- .../extmod/uasyncio_set_exception_handler.py | 9 +- tests/extmod/uasyncio_task_done.py | 9 +- tests/extmod/uasyncio_task_exception.py | 9 +- tests/extmod/uasyncio_threadsafeflag.py | 5 +- tests/extmod/uasyncio_wait_for.py | 9 +- tests/extmod/uasyncio_wait_for_fwd.py | 9 +- tests/extmod/uasyncio_wait_task.py | 15 +- tests/extmod/ubinascii_a2b_base64.py | 5 +- tests/extmod/ubinascii_b2a_base64.py | 5 +- tests/extmod/ubinascii_crc32.py | 5 +- tests/extmod/ubinascii_hexlify.py | 5 +- tests/extmod/ubinascii_micropython.py | 5 +- tests/extmod/ubinascii_unhexlify.py | 5 +- tests/extmod/ucryptolib_aes128_cbc.py | 16 -- tests/extmod/ucryptolib_aes128_cbc.py.exp | 2 - tests/extmod/ucryptolib_aes128_ctr.py | 28 -- tests/extmod/ucryptolib_aes128_ctr.py.exp | 3 - tests/extmod/ucryptolib_aes128_ecb.py | 16 -- tests/extmod/ucryptolib_aes128_ecb.py.exp | 2 - tests/extmod/ucryptolib_aes128_ecb_enc.py | 17 -- tests/extmod/ucryptolib_aes128_ecb_enc.py.exp | 1 - tests/extmod/ucryptolib_aes128_ecb_inpl.py | 15 -- .../extmod/ucryptolib_aes128_ecb_inpl.py.exp | 2 - tests/extmod/ucryptolib_aes128_ecb_into.py | 16 -- .../extmod/ucryptolib_aes128_ecb_into.py.exp | 2 - tests/extmod/ucryptolib_aes256_cbc.py | 16 -- tests/extmod/ucryptolib_aes256_cbc.py.exp | 2 - tests/extmod/ucryptolib_aes256_ecb.py | 16 -- tests/extmod/ucryptolib_aes256_ecb.py.exp | 2 - tests/extmod/uctypes_sizeof_od.py | 2 +- tests/extmod/uhashlib_final.py | 4 +- tests/extmod/uhashlib_md5.py | 13 +- tests/extmod/uhashlib_sha1.py | 13 +- tests/extmod/uhashlib_sha256.py | 13 +- tests/extmod/uheapq1.py | 11 +- tests/extmod/ujson_dump.py | 14 +- tests/extmod/ujson_dump_iobase.py | 12 +- tests/extmod/ujson_dump_separators.py | 14 +- tests/extmod/ujson_dumps.py | 9 +- tests/extmod/ujson_dumps_extra.py | 6 +- tests/extmod/ujson_dumps_float.py | 9 +- tests/extmod/ujson_dumps_ordereddict.py | 12 +- tests/extmod/ujson_dumps_separators.py | 9 +- tests/extmod/ujson_load.py | 14 +- tests/extmod/ujson_load_readinto.py | 2 +- tests/extmod/ujson_loads.py | 9 +- tests/extmod/ujson_loads_bytes.py | 9 +- tests/extmod/ujson_loads_float.py | 9 +- tests/extmod/umsgpack_pack.py | 14 +- tests/extmod/urandom_basic.py | 2 +- tests/extmod/urandom_extra.py | 9 +- tests/extmod/urandom_extra_float.py | 9 +- tests/extmod/urandom_seed_default.py | 9 +- tests/extmod/ure1.py | 9 +- tests/extmod/ure_debug.py | 6 +- tests/extmod/ure_error.py | 9 +- tests/extmod/ure_group.py | 9 +- tests/extmod/ure_groups.py | 9 +- tests/extmod/ure_limit.py | 4 +- tests/extmod/ure_namedclass.py | 9 +- tests/extmod/ure_span.py | 9 +- tests/extmod/ure_split.py | 9 +- tests/extmod/ure_split_empty.py | 6 +- tests/extmod/ure_split_notimpl.py | 2 +- tests/extmod/ure_stack_overflow.py | 9 +- tests/extmod/ure_sub.py | 11 +- tests/extmod/ure_sub_unmatched.py | 9 +- tests/extmod/uselect_poll_basic.py | 42 --- tests/extmod/uselect_poll_udp.py | 30 --- tests/extmod/usocket_tcp_basic.py | 17 -- tests/extmod/usocket_udp_nonblock.py | 20 -- tests/extmod/ussl_basic.py | 60 ----- tests/extmod/ussl_basic.py.exp | 7 - tests/extmod/ussl_keycert.py | 28 -- tests/extmod/ussl_keycert.py.exp | 3 - tests/extmod/utime_res.py | 16 +- tests/extmod/utime_time_ns.py | 14 +- tests/extmod/utimeq1.py | 146 ----------- tests/extmod/utimeq1.py.exp | 1 - tests/extmod/utimeq_stable.py | 22 -- tests/extmod/utimeq_stable.py.exp | 1 - tests/extmod/uzlib_decompio.py | 10 +- tests/extmod/uzlib_decompio_gz.py | 10 +- tests/extmod/uzlib_decompress.py | 7 +- tests/extmod/vfs_basic.py | 104 ++++---- tests/extmod/vfs_blockdev.py | 10 +- tests/extmod/vfs_fat_case.py | 22 +- tests/extmod/vfs_fat_fileio1.py | 24 +- tests/extmod/vfs_fat_fileio2.py | 28 +- tests/extmod/vfs_fat_finaliser.py | 8 +- tests/extmod/vfs_fat_more.py | 86 +++---- tests/extmod/vfs_fat_mtime.py | 14 +- tests/extmod/vfs_fat_oldproto.py | 12 +- tests/extmod/vfs_fat_ramdisk.py | 22 +- tests/extmod/vfs_fat_ramdisklarge.py | 12 +- tests/extmod/vfs_lfs.py | 12 +- tests/extmod/vfs_lfs_corrupt.py | 10 +- tests/extmod/vfs_lfs_error.py | 10 +- tests/extmod/vfs_lfs_file.py | 10 +- tests/extmod/vfs_lfs_mount.py | 32 +-- tests/extmod/vfs_lfs_mtime.py | 20 +- tests/extmod/vfs_lfs_superblock.py | 12 +- tests/extmod/vfs_posix.py | 40 +-- tests/extmod/vfs_userfs.py | 16 +- .../{uio_module.py => io_module.py} | 4 +- .../{uio_module.py.exp => io_module.py.exp} | 0 tests/float/float2int_doubleprec_intbig.py | 5 +- tests/float/float2int_fp30_intbig.py | 5 +- tests/float/float2int_intbig.py | 5 +- tests/float/float_struct.py | 5 +- tests/inlineasm/asmsum.py | 2 +- tests/io/open_append.py | 5 +- tests/io/open_plus.py | 5 +- tests/micropython/emg_exc.py | 2 +- tests/micropython/heapalloc_bytesio2.py | 4 +- tests/micropython/heapalloc_iter.py | 9 +- tests/micropython/import_mpy_invalid.py | 12 +- tests/micropython/import_mpy_native.py | 12 +- tests/micropython/import_mpy_native_gc.py | 12 +- tests/micropython/opt_level.py | 2 +- tests/perf_bench/bm_hexiom.py | 5 +- tests/perf_bench/core_import_mpy_multi.py | 10 +- tests/perf_bench/core_import_mpy_single.py | 10 +- tests/run-natmodtests.py | 10 +- tests/run-tests-exp.py | 2 +- tests/run-tests.py | 6 +- tests/stress/recursive_data.py | 2 +- tests/thread/stress_aes.py | 5 +- tests/thread/stress_heap.py | 5 +- tests/thread/thread_exit1.py | 5 +- tests/thread/thread_exit2.py | 5 +- tests/thread/thread_lock2.py | 5 +- tests/thread/thread_lock4.py | 5 +- tests/thread/thread_qstr1.py | 5 +- tests/thread/thread_start1.py | 5 +- tests/thread/thread_start2.py | 5 +- tests/unix/extra_coverage.py | 10 +- tests/unix/extra_coverage.py.exp | 30 +-- tests/unix/time.py | 5 +- 233 files changed, 739 insertions(+), 2839 deletions(-) delete mode 100644 extmod/modutimeq.c delete mode 100644 tests/extmod/btree1.py delete mode 100644 tests/extmod/btree1.py.exp delete mode 100644 tests/extmod/btree_error.py delete mode 100644 tests/extmod/btree_error.py.exp delete mode 100644 tests/extmod/btree_gc.py delete mode 100644 tests/extmod/btree_gc.py.exp delete mode 100644 tests/extmod/framebuf1.py delete mode 100644 tests/extmod/framebuf1.py.exp delete mode 100644 tests/extmod/framebuf16.py delete mode 100644 tests/extmod/framebuf16.py.exp delete mode 100644 tests/extmod/framebuf2.py delete mode 100644 tests/extmod/framebuf2.py.exp delete mode 100644 tests/extmod/framebuf4.py delete mode 100644 tests/extmod/framebuf4.py.exp delete mode 100644 tests/extmod/framebuf8.py delete mode 100644 tests/extmod/framebuf8.py.exp delete mode 100644 tests/extmod/framebuf_palette.py delete mode 100644 tests/extmod/framebuf_palette.py.exp delete mode 100644 tests/extmod/framebuf_subclass.py delete mode 100644 tests/extmod/framebuf_subclass.py.exp delete mode 100644 tests/extmod/ucryptolib_aes128_cbc.py delete mode 100644 tests/extmod/ucryptolib_aes128_cbc.py.exp delete mode 100644 tests/extmod/ucryptolib_aes128_ctr.py delete mode 100644 tests/extmod/ucryptolib_aes128_ctr.py.exp delete mode 100644 tests/extmod/ucryptolib_aes128_ecb.py delete mode 100644 tests/extmod/ucryptolib_aes128_ecb.py.exp delete mode 100644 tests/extmod/ucryptolib_aes128_ecb_enc.py delete mode 100644 tests/extmod/ucryptolib_aes128_ecb_enc.py.exp delete mode 100644 tests/extmod/ucryptolib_aes128_ecb_inpl.py delete mode 100644 tests/extmod/ucryptolib_aes128_ecb_inpl.py.exp delete mode 100644 tests/extmod/ucryptolib_aes128_ecb_into.py delete mode 100644 tests/extmod/ucryptolib_aes128_ecb_into.py.exp delete mode 100644 tests/extmod/ucryptolib_aes256_cbc.py delete mode 100644 tests/extmod/ucryptolib_aes256_cbc.py.exp delete mode 100644 tests/extmod/ucryptolib_aes256_ecb.py delete mode 100644 tests/extmod/ucryptolib_aes256_ecb.py.exp delete mode 100644 tests/extmod/uselect_poll_basic.py delete mode 100644 tests/extmod/uselect_poll_udp.py delete mode 100644 tests/extmod/usocket_tcp_basic.py delete mode 100644 tests/extmod/usocket_udp_nonblock.py delete mode 100644 tests/extmod/ussl_basic.py delete mode 100644 tests/extmod/ussl_basic.py.exp delete mode 100644 tests/extmod/ussl_keycert.py delete mode 100644 tests/extmod/ussl_keycert.py.exp delete mode 100644 tests/extmod/utimeq1.py delete mode 100644 tests/extmod/utimeq1.py.exp delete mode 100644 tests/extmod/utimeq_stable.py delete mode 100644 tests/extmod/utimeq_stable.py.exp rename tests/feature_check/{uio_module.py => io_module.py} (56%) rename tests/feature_check/{uio_module.py.exp => io_module.py.exp} (100%) diff --git a/extmod/moduasyncio.c b/extmod/moduasyncio.c index 2ba8efb1fe..4bd612d37b 100644 --- a/extmod/moduasyncio.c +++ b/extmod/moduasyncio.c @@ -357,6 +357,6 @@ const mp_obj_module_t mp_module_uasyncio = { .globals = (mp_obj_dict_t *)&mp_module_uasyncio_globals, }; -MP_REGISTER_MODULE(MP_QSTR__uasyncio, mp_module_uasyncio); +MP_REGISTER_MODULE(MP_QSTR__asyncio, mp_module_uasyncio); #endif // MICROPY_PY_UASYNCIO diff --git a/extmod/modubinascii.c b/extmod/modubinascii.c index d95f6f5554..6346b23e62 100644 --- a/extmod/modubinascii.c +++ b/extmod/modubinascii.c @@ -330,6 +330,6 @@ const mp_obj_module_t mp_module_ubinascii = { .globals = (mp_obj_dict_t *)&mp_module_binascii_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ubinascii, mp_module_ubinascii); +MP_REGISTER_MODULE(MP_QSTR_binascii, mp_module_ubinascii); #endif // MICROPY_PY_UBINASCII diff --git a/extmod/moduhashlib.c b/extmod/moduhashlib.c index 11f8d1e03d..64100bb499 100644 --- a/extmod/moduhashlib.c +++ b/extmod/moduhashlib.c @@ -382,6 +382,6 @@ const mp_obj_module_t mp_module_uhashlib = { .globals = (mp_obj_dict_t *)&mp_module_uhashlib_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uhashlib, mp_module_uhashlib); +MP_REGISTER_MODULE(MP_QSTR_hashlib, mp_module_uhashlib); #endif // MICROPY_PY_UHASHLIB diff --git a/extmod/moduheapq.c b/extmod/moduheapq.c index f48d9bceb1..c102e830ff 100644 --- a/extmod/moduheapq.c +++ b/extmod/moduheapq.c @@ -120,7 +120,7 @@ const mp_obj_module_t mp_module_uheapq = { .globals = (mp_obj_dict_t *)&mp_module_uheapq_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uheapq, mp_module_uheapq); +MP_REGISTER_MODULE(MP_QSTR_heapq, mp_module_uheapq); #endif #endif // MICROPY_PY_UHEAPQ diff --git a/extmod/modujson.c b/extmod/modujson.c index 14e45e2cc1..26241fa230 100644 --- a/extmod/modujson.c +++ b/extmod/modujson.c @@ -458,6 +458,6 @@ const mp_obj_module_t mp_module_ujson = { .globals = (mp_obj_dict_t *)&mp_module_ujson_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ujson, mp_module_ujson); +MP_REGISTER_MODULE(MP_QSTR_json, mp_module_ujson); #endif // MICROPY_PY_UJSON diff --git a/extmod/moduos.c b/extmod/moduos.c index a1752deb4a..4cbdf72627 100644 --- a/extmod/moduos.c +++ b/extmod/moduos.c @@ -181,6 +181,6 @@ const mp_obj_module_t mp_module_uos = { .globals = (mp_obj_dict_t *)&os_module_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uos, mp_module_uos); +MP_REGISTER_MODULE(MP_QSTR_os, mp_module_uos); #endif // MICROPY_PY_UOS diff --git a/extmod/moduplatform.c b/extmod/moduplatform.c index 1b35b08aa7..3590943bb1 100644 --- a/extmod/moduplatform.c +++ b/extmod/moduplatform.c @@ -75,6 +75,6 @@ const mp_obj_module_t mp_module_uplatform = { .globals = (mp_obj_dict_t *)&modplatform_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uplatform, mp_module_uplatform); +MP_REGISTER_MODULE(MP_QSTR_platform, mp_module_uplatform); #endif // MICROPY_PY_UPLATFORM diff --git a/extmod/modurandom.c b/extmod/modurandom.c index b661627190..68ebed32d3 100644 --- a/extmod/modurandom.c +++ b/extmod/modurandom.c @@ -255,7 +255,7 @@ const mp_obj_module_t mp_module_urandom = { .globals = (mp_obj_dict_t *)&mp_module_urandom_globals, }; -MP_REGISTER_MODULE(MP_QSTR_urandom, mp_module_urandom); +MP_REGISTER_MODULE(MP_QSTR_random, mp_module_urandom); #endif #endif // MICROPY_PY_URANDOM diff --git a/extmod/modure.c b/extmod/modure.c index 805c23d4ad..7ad6ccabce 100644 --- a/extmod/modure.c +++ b/extmod/modure.c @@ -491,7 +491,7 @@ const mp_obj_module_t mp_module_ure = { .globals = (mp_obj_dict_t *)&mp_module_re_globals, }; -MP_REGISTER_MODULE(MP_QSTR_ure, mp_module_ure); +MP_REGISTER_MODULE(MP_QSTR_re, mp_module_ure); #endif // Source files #include'd here to make sure they're compiled in diff --git a/extmod/modutimeq.c b/extmod/modutimeq.c deleted file mode 100644 index 7cabfee4be..0000000000 --- a/extmod/modutimeq.c +++ /dev/null @@ -1,239 +0,0 @@ -/* - * This file is part of the MicroPython project, http://micropython.org/ - * - * The MIT License (MIT) - * - * Copyright (c) 2014 Damien P. George - * Copyright (c) 2016-2017 Paul Sokolovsky - * - * 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/objlist.h" -#include "py/runtime.h" -#include "py/smallint.h" - -#include "supervisor/shared/translate/translate.h" - -#if MICROPY_PY_UTIMEQ - -#define MODULO MICROPY_PY_UTIME_TICKS_PERIOD - -#define DEBUG 0 - -// the algorithm here is modelled on CPython's heapq.py - -struct qentry { - mp_uint_t time; - mp_uint_t id; - mp_obj_t callback; - mp_obj_t args; -}; - -typedef struct _mp_obj_utimeq_t { - mp_obj_base_t base; - mp_uint_t alloc; - mp_uint_t len; - struct qentry items[]; -} mp_obj_utimeq_t; - -STATIC mp_uint_t utimeq_id; - -STATIC mp_obj_utimeq_t *utimeq_get_heap(mp_obj_t heap_in) { - return MP_OBJ_TO_PTR(heap_in); -} - -STATIC bool time_less_than(struct qentry *item, struct qentry *parent) { - mp_uint_t item_tm = item->time; - mp_uint_t parent_tm = parent->time; - mp_uint_t res = parent_tm - item_tm; - if (res == 0) { - // TODO: This actually should use the same "ring" logic - // as for time, to avoid artifacts when id's overflow. - return item->id < parent->id; - } - if ((mp_int_t)res < 0) { - res += MODULO; - } - return res && res < (MODULO / 2); -} - -STATIC mp_obj_t utimeq_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - mp_arg_check_num(n_args, n_kw, 1, 1, false); - mp_uint_t alloc = mp_obj_get_int(args[0]); - mp_obj_utimeq_t *o = mp_obj_malloc_var(mp_obj_utimeq_t, struct qentry, alloc, type); - memset(o->items, 0, sizeof(*o->items) * alloc); - o->alloc = alloc; - o->len = 0; - return MP_OBJ_FROM_PTR(o); -} - -STATIC void utimeq_heap_siftdown(mp_obj_utimeq_t *heap, mp_uint_t start_pos, mp_uint_t pos) { - struct qentry item = heap->items[pos]; - while (pos > start_pos) { - mp_uint_t parent_pos = (pos - 1) >> 1; - struct qentry *parent = &heap->items[parent_pos]; - bool lessthan = time_less_than(&item, parent); - if (lessthan) { - heap->items[pos] = *parent; - pos = parent_pos; - } else { - break; - } - } - heap->items[pos] = item; -} - -STATIC void utimeq_heap_siftup(mp_obj_utimeq_t *heap, mp_uint_t pos) { - mp_uint_t start_pos = pos; - mp_uint_t end_pos = heap->len; - struct qentry item = heap->items[pos]; - for (mp_uint_t child_pos = 2 * pos + 1; child_pos < end_pos; child_pos = 2 * pos + 1) { - // choose right child if it's <= left child - if (child_pos + 1 < end_pos) { - bool lessthan = time_less_than(&heap->items[child_pos], &heap->items[child_pos + 1]); - if (!lessthan) { - child_pos += 1; - } - } - // bubble up the smaller child - heap->items[pos] = heap->items[child_pos]; - pos = child_pos; - } - heap->items[pos] = item; - utimeq_heap_siftdown(heap, start_pos, pos); -} - -STATIC mp_obj_t mod_utimeq_heappush(size_t n_args, const mp_obj_t *args) { - (void)n_args; - mp_obj_t heap_in = args[0]; - mp_obj_utimeq_t *heap = utimeq_get_heap(heap_in); - if (heap->len == heap->alloc) { - mp_raise_IndexError(MP_ERROR_TEXT("queue overflow")); - } - mp_uint_t l = heap->len; - heap->items[l].time = MP_OBJ_SMALL_INT_VALUE(args[1]); - heap->items[l].id = utimeq_id++; - heap->items[l].callback = args[2]; - heap->items[l].args = args[3]; - utimeq_heap_siftdown(heap, 0, heap->len); - heap->len++; - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_utimeq_heappush_obj, 4, 4, mod_utimeq_heappush); - -STATIC mp_obj_t mod_utimeq_heappop(mp_obj_t heap_in, mp_obj_t list_ref) { - mp_obj_utimeq_t *heap = utimeq_get_heap(heap_in); - if (heap->len == 0) { - mp_raise_IndexError(MP_ERROR_TEXT("empty heap")); - } - mp_obj_list_t *ret = MP_OBJ_TO_PTR(list_ref); - if (!mp_obj_is_type(list_ref, &mp_type_list) || ret->len < 3) { - mp_raise_TypeError(NULL); - } - - struct qentry *item = &heap->items[0]; - ret->items[0] = MP_OBJ_NEW_SMALL_INT(item->time); - ret->items[1] = item->callback; - ret->items[2] = item->args; - heap->len -= 1; - heap->items[0] = heap->items[heap->len]; - heap->items[heap->len].callback = MP_OBJ_NULL; // so we don't retain a pointer - heap->items[heap->len].args = MP_OBJ_NULL; - if (heap->len) { - utimeq_heap_siftup(heap, 0); - } - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_utimeq_heappop_obj, mod_utimeq_heappop); - -STATIC mp_obj_t mod_utimeq_peektime(mp_obj_t heap_in) { - mp_obj_utimeq_t *heap = utimeq_get_heap(heap_in); - if (heap->len == 0) { - mp_raise_IndexError(MP_ERROR_TEXT("empty heap")); - } - - struct qentry *item = &heap->items[0]; - return MP_OBJ_NEW_SMALL_INT(item->time); -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_utimeq_peektime_obj, mod_utimeq_peektime); - -#if DEBUG -STATIC mp_obj_t mod_utimeq_dump(mp_obj_t heap_in) { - mp_obj_utimeq_t *heap = utimeq_get_heap(heap_in); - for (int i = 0; i < heap->len; i++) { - printf(UINT_FMT "\t%p\t%p\n", heap->items[i].time, - MP_OBJ_TO_PTR(heap->items[i].callback), MP_OBJ_TO_PTR(heap->items[i].args)); - } - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(mod_utimeq_dump_obj, mod_utimeq_dump); -#endif - -STATIC mp_obj_t utimeq_unary_op(mp_unary_op_t op, mp_obj_t self_in) { - mp_obj_utimeq_t *self = MP_OBJ_TO_PTR(self_in); - switch (op) { - case MP_UNARY_OP_BOOL: - return mp_obj_new_bool(self->len != 0); - case MP_UNARY_OP_LEN: - return MP_OBJ_NEW_SMALL_INT(self->len); - default: - return MP_OBJ_NULL; // op not supported - } -} - -STATIC const mp_rom_map_elem_t utimeq_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_push), MP_ROM_PTR(&mod_utimeq_heappush_obj) }, - { MP_ROM_QSTR(MP_QSTR_pop), MP_ROM_PTR(&mod_utimeq_heappop_obj) }, - { MP_ROM_QSTR(MP_QSTR_peektime), MP_ROM_PTR(&mod_utimeq_peektime_obj) }, - #if DEBUG - { MP_ROM_QSTR(MP_QSTR_dump), MP_ROM_PTR(&mod_utimeq_dump_obj) }, - #endif -}; - -STATIC MP_DEFINE_CONST_DICT(utimeq_locals_dict, utimeq_locals_dict_table); - -STATIC const mp_obj_type_t utimeq_type = { - { &mp_type_type }, - .flags = MP_TYPE_FLAG_EXTENDED, - .name = MP_QSTR_utimeq, - .make_new = utimeq_make_new, - .locals_dict = (void *)&utimeq_locals_dict, - MP_TYPE_EXTENDED_FIELDS( - .unary_op = utimeq_unary_op, - ), -}; - -STATIC const mp_rom_map_elem_t mp_module_utimeq_globals_table[] = { - { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_utimeq) }, - { MP_ROM_QSTR(MP_QSTR_utimeq), MP_ROM_PTR(&utimeq_type) }, -}; - -STATIC MP_DEFINE_CONST_DICT(mp_module_utimeq_globals, mp_module_utimeq_globals_table); - -const mp_obj_module_t mp_module_utimeq = { - .base = { &mp_type_module }, - .globals = (mp_obj_dict_t *)&mp_module_utimeq_globals, -}; - -MP_REGISTER_MODULE(MP_QSTR_utimeq, mp_module_utimeq); - -#endif // MICROPY_PY_UTIMEQ diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c index 5c16ea732c..b2f5b5af33 100644 --- a/extmod/moduzlib.c +++ b/extmod/moduzlib.c @@ -230,7 +230,7 @@ const mp_obj_module_t mp_module_uzlib = { }; -MP_REGISTER_MODULE(MP_QSTR_uzlib, mp_module_uzlib); +MP_REGISTER_MODULE(MP_QSTR_zlib, mp_module_uzlib); #endif // Source files #include'd here to make sure they're compiled in diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index d2f730a602..058abab5ce 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -326,12 +326,12 @@ STATIC mp_obj_t extra_coverage(void) { size_t len = mp_repl_autocomplete("__n", 3, &mp_plat_print, &str); mp_printf(&mp_plat_print, "%.*s\n", (int)len, str); - len = mp_repl_autocomplete("i", 1, &mp_plat_print, &str); + len = mp_repl_autocomplete("im", 2, &mp_plat_print, &str); mp_printf(&mp_plat_print, "%.*s\n", (int)len, str); mp_repl_autocomplete("import ", 7, &mp_plat_print, &str); - len = mp_repl_autocomplete("import ut", 9, &mp_plat_print, &str); + len = mp_repl_autocomplete("import ti", 9, &mp_plat_print, &str); mp_printf(&mp_plat_print, "%.*s\n", (int)len, str); - mp_repl_autocomplete("import utime", 12, &mp_plat_print, &str); + mp_repl_autocomplete("import ra", 9, &mp_plat_print, &str); mp_store_global(MP_QSTR_sys, mp_import_name(MP_QSTR_sys, mp_const_none, MP_OBJ_NEW_SMALL_INT(0))); mp_repl_autocomplete("sys.", 4, &mp_plat_print, &str); diff --git a/ports/unix/modtime.c b/ports/unix/modtime.c index c9eb09c15b..cec8baa8cd 100644 --- a/ports/unix/modtime.c +++ b/ports/unix/modtime.c @@ -232,6 +232,6 @@ const mp_obj_module_t mp_module_time = { .globals = (mp_obj_dict_t *)&mp_module_time_globals, }; -MP_REGISTER_MODULE(MP_QSTR_utime, mp_module_time); +MP_REGISTER_MODULE(MP_QSTR_time, mp_module_time); #endif // MICROPY_PY_UTIME diff --git a/ports/unix/moduselect.c b/ports/unix/moduselect.c index 7bfcf8fc56..8295f3d8b5 100644 --- a/ports/unix/moduselect.c +++ b/ports/unix/moduselect.c @@ -354,6 +354,6 @@ const mp_obj_module_t mp_module_uselect = { .globals = (mp_obj_dict_t *)&mp_module_select_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uselect, mp_module_uselect); +MP_REGISTER_MODULE(MP_QSTR_select, mp_module_uselect); #endif // MICROPY_PY_USELECT_POSIX diff --git a/py/modio.c b/py/modio.c index 836d04fb11..985903ffe7 100644 --- a/py/modio.c +++ b/py/modio.c @@ -245,6 +245,6 @@ const mp_obj_module_t mp_module_io = { .globals = (mp_obj_dict_t *)&mp_module_io_globals, }; -MP_REGISTER_MODULE(MP_QSTR_uio, mp_module_io); +MP_REGISTER_MODULE(MP_QSTR_io, mp_module_io); #endif diff --git a/py/modsys.c b/py/modsys.c index 63fb654f05..68d254641a 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -282,6 +282,6 @@ const mp_obj_module_t mp_module_sys = { .globals = (mp_obj_dict_t *)&mp_module_sys_globals, }; -MP_REGISTER_MODULE(MP_QSTR_usys, mp_module_sys); +MP_REGISTER_MODULE(MP_QSTR_sys, mp_module_sys); #endif diff --git a/py/moduerrno.c b/py/moduerrno.c index cf3cbe064f..a132474e4c 100644 --- a/py/moduerrno.c +++ b/py/moduerrno.c @@ -105,11 +105,7 @@ const mp_obj_module_t mp_module_uerrno = { .globals = (mp_obj_dict_t *)&mp_module_uerrno_globals, }; -#if defined(MICROPY_UNIX_COVERAGE) -MP_REGISTER_MODULE(MP_QSTR_uerrno, mp_module_uerrno); -#else MP_REGISTER_MODULE(MP_QSTR_errno, mp_module_uerrno); -#endif qstr mp_errno_to_str(mp_obj_t errno_val) { // Otherwise, return the Exxxx string for that error code diff --git a/py/py.mk b/py/py.mk index 81da81ba0f..d26b8752a4 100644 --- a/py/py.mk +++ b/py/py.mk @@ -195,7 +195,6 @@ PY_EXTMOD_O_BASENAME = \ extmod/modure.o \ extmod/moduzlib.o \ extmod/moduheapq.o \ - extmod/modutimeq.o \ extmod/moduhashlib.o \ extmod/modubinascii.o \ extmod/modurandom.o \ diff --git a/tests/basics/array1.py b/tests/basics/array1.py index f21ad4bd75..5c5d13a581 100644 --- a/tests/basics/array1.py +++ b/tests/basics/array1.py @@ -1,11 +1,8 @@ try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit a = array.array('B', [1, 2, 3]) print(a, len(a)) diff --git a/tests/basics/array_add.py b/tests/basics/array_add.py index 8335eb6b82..76ce59f761 100644 --- a/tests/basics/array_add.py +++ b/tests/basics/array_add.py @@ -1,12 +1,9 @@ # test array + array try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit a1 = array.array('I', [1]) a2 = array.array('I', [2]) diff --git a/tests/basics/array_micropython.py b/tests/basics/array_micropython.py index 44dc1d83d8..771a7d709c 100644 --- a/tests/basics/array_micropython.py +++ b/tests/basics/array_micropython.py @@ -1,12 +1,9 @@ # test MicroPython-specific features of array.array try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit # arrays of objects a = array.array('O') diff --git a/tests/basics/bytes_add_array.py b/tests/basics/bytes_add_array.py index c6382bed74..b17556d83c 100644 --- a/tests/basics/bytes_add_array.py +++ b/tests/basics/bytes_add_array.py @@ -1,12 +1,9 @@ # test bytes + other try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit # should be byteorder-neutral print(b"123" + array.array('h', [0x1515])) diff --git a/tests/basics/bytes_add_endian.py b/tests/basics/bytes_add_endian.py index 40b3de7d61..8cfffa7b6a 100644 --- a/tests/basics/bytes_add_endian.py +++ b/tests/basics/bytes_add_endian.py @@ -1,11 +1,8 @@ # test bytes + other try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit print(b"123" + array.array('i', [1])) diff --git a/tests/basics/bytes_compare_array.py b/tests/basics/bytes_compare_array.py index 6bad50b55a..ad378de70c 100644 --- a/tests/basics/bytes_compare_array.py +++ b/tests/basics/bytes_compare_array.py @@ -1,11 +1,8 @@ try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit print(array.array('b', [1, 2]) in b'\x01\x02\x03') # CPython gives False here diff --git a/tests/basics/dict_fixed.py b/tests/basics/dict_fixed.py index 4261a06557..cfd3b71f57 100644 --- a/tests/basics/dict_fixed.py +++ b/tests/basics/dict_fixed.py @@ -1,48 +1,48 @@ # test that fixed dictionaries cannot be modified try: - import uerrno + import errno except ImportError: print("SKIP") raise SystemExit -# Save a copy of uerrno.errorcode, so we can check later +# Save a copy of errno.errorcode, so we can check later # that it hasn't been modified. -errorcode_copy = uerrno.errorcode.copy() +errorcode_copy = errno.errorcode.copy() try: - uerrno.errorcode.popitem() + errno.errorcode.popitem() except TypeError: print("TypeError") try: - uerrno.errorcode.pop(0) + errno.errorcode.pop(0) except TypeError: print("TypeError") try: - uerrno.errorcode.setdefault(0, 0) + errno.errorcode.setdefault(0, 0) except TypeError: print("TypeError") try: - uerrno.errorcode.update([(1, 2)]) + errno.errorcode.update([(1, 2)]) except TypeError: print("TypeError") try: - del uerrno.errorcode[1] + del errno.errorcode[1] except TypeError: print("TypeError") try: - uerrno.errorcode[1] = 'foo' + errno.errorcode[1] = 'foo' except TypeError: print("TypeError") try: - uerrno.errorcode.clear() + errno.errorcode.clear() except TypeError: print("TypeError") -assert uerrno.errorcode == errorcode_copy +assert errno.errorcode == errorcode_copy diff --git a/tests/basics/errno1.py b/tests/basics/errno1.py index d9a895a972..0773c926fd 100644 --- a/tests/basics/errno1.py +++ b/tests/basics/errno1.py @@ -1,25 +1,25 @@ -# test errno's and uerrno module +# test errno's and errno module try: - import uerrno + import errno except ImportError: print("SKIP") raise SystemExit # check that constants exist and are integers -print(type(uerrno.EIO)) +print(type(errno.EIO)) # check that errors are rendered in a nice way -msg = str(OSError(uerrno.EIO)) +msg = str(OSError(errno.EIO)) print(msg[:7], msg[-5:]) -msg = str(OSError(uerrno.EIO, "details")) +msg = str(OSError(errno.EIO, "details")) print(msg[:7], msg[-14:]) -msg = str(OSError(uerrno.EIO, "details", "more details")) +msg = str(OSError(errno.EIO, "details", "more details")) print(msg[:1], msg[-28:]) # check that unknown errno is still rendered print(str(OSError(9999))) # this tests a failed constant lookup in errno -errno = uerrno +errno = errno print(errno.__name__) diff --git a/tests/basics/io_buffered_writer.py b/tests/basics/io_buffered_writer.py index 64e5fa1ee7..b3bab54900 100644 --- a/tests/basics/io_buffered_writer.py +++ b/tests/basics/io_buffered_writer.py @@ -1,4 +1,4 @@ -import uio as io +import io try: io.BytesIO diff --git a/tests/basics/io_bytesio_cow.py b/tests/basics/io_bytesio_cow.py index 92654a0003..543dd484ab 100644 --- a/tests/basics/io_bytesio_cow.py +++ b/tests/basics/io_bytesio_cow.py @@ -1,9 +1,6 @@ # Make sure that write operations on io.BytesIO don't # change original object it was constructed from. -try: - import uio as io -except ImportError: - import io +import io b = b"foobar" diff --git a/tests/basics/io_bytesio_ext.py b/tests/basics/io_bytesio_ext.py index e454b2fd9f..eee20baf3b 100644 --- a/tests/basics/io_bytesio_ext.py +++ b/tests/basics/io_bytesio_ext.py @@ -1,8 +1,5 @@ # Extended stream operations on io.BytesIO -try: - import uio as io -except ImportError: - import io +import io a = io.BytesIO(b"foobar") a.seek(10) diff --git a/tests/basics/io_bytesio_ext2.py b/tests/basics/io_bytesio_ext2.py index 8f624fd58c..5bede33f58 100644 --- a/tests/basics/io_bytesio_ext2.py +++ b/tests/basics/io_bytesio_ext2.py @@ -1,7 +1,4 @@ -try: - import uio as io -except ImportError: - import io +import io a = io.BytesIO(b"foobar") try: diff --git a/tests/basics/io_iobase.py b/tests/basics/io_iobase.py index 667e629858..6d27fe1e74 100644 --- a/tests/basics/io_iobase.py +++ b/tests/basics/io_iobase.py @@ -1,7 +1,4 @@ -try: - import uio as io -except: - import io +import io try: io.IOBase diff --git a/tests/basics/io_stringio1.py b/tests/basics/io_stringio1.py index c4ac9ec076..2174db00cd 100644 --- a/tests/basics/io_stringio1.py +++ b/tests/basics/io_stringio1.py @@ -1,7 +1,4 @@ -try: - import uio as io -except ImportError: - import io +import io a = io.StringIO() print("io.StringIO" in repr(a)) diff --git a/tests/basics/io_stringio_with.py b/tests/basics/io_stringio_with.py index c35975445d..b30395672c 100644 --- a/tests/basics/io_stringio_with.py +++ b/tests/basics/io_stringio_with.py @@ -1,7 +1,4 @@ -try: - import uio as io -except ImportError: - import io +import io # test __enter__/__exit__ with io.StringIO() as b: diff --git a/tests/basics/io_write_ext.py b/tests/basics/io_write_ext.py index 18cd75ddb6..79f7450954 100644 --- a/tests/basics/io_write_ext.py +++ b/tests/basics/io_write_ext.py @@ -1,14 +1,14 @@ # This tests extended (MicroPython-specific) form of write: # write(buf, len) and write(buf, offset, len) -import uio +import io try: - uio.BytesIO + io.BytesIO except AttributeError: print("SKIP") raise SystemExit -buf = uio.BytesIO() +buf = io.BytesIO() buf.write(b"foo", 2) print(buf.getvalue()) diff --git a/tests/basics/memoryview1.py b/tests/basics/memoryview1.py index 4c20c91f49..1ebfbc53b9 100644 --- a/tests/basics/memoryview1.py +++ b/tests/basics/memoryview1.py @@ -5,13 +5,10 @@ except: print("SKIP") raise SystemExit try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit # test reading from bytes b = b'1234' diff --git a/tests/basics/memoryview_slice_assign.py b/tests/basics/memoryview_slice_assign.py index 74f6fae6f7..94f8073f0a 100644 --- a/tests/basics/memoryview_slice_assign.py +++ b/tests/basics/memoryview_slice_assign.py @@ -7,13 +7,10 @@ except (NameError, TypeError): raise SystemExit try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit # test slice assignment between memoryviews b1 = bytearray(b'1234') diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py index 2ac900bbc7..f6c521d6ce 100644 --- a/tests/basics/struct1.py +++ b/tests/basics/struct1.py @@ -1,11 +1,8 @@ try: - import ustruct as struct -except: - try: - import struct - except ImportError: - print("SKIP") - raise SystemExit + import struct +except ImportError: + print("SKIP") + raise SystemExit print(struct.calcsize(">> # test changing ps1/ps2 ->>> import usys ->>> usys.ps1 = "PS1" -PS1usys.ps2 = "PS2" +>>> import sys +>>> sys.ps1 = "PS1" +PS1sys.ps2 = "PS2" PS1(1 + PS22) 3 diff --git a/tests/extmod/btree1.py b/tests/extmod/btree1.py deleted file mode 100644 index 1f4853eaa3..0000000000 --- a/tests/extmod/btree1.py +++ /dev/null @@ -1,89 +0,0 @@ -try: - import btree - import uio - import uerrno -except ImportError: - print("SKIP") - raise SystemExit - -# f = open("_test.db", "w+b") -f = uio.BytesIO() -db = btree.open(f, pagesize=512) - -db[b"foo3"] = b"bar3" -db[b"foo1"] = b"bar1" -db[b"foo2"] = b"bar2" -db[b"bar1"] = b"foo1" - -dbstr = str(db) -print(dbstr[:7], dbstr[-1:]) - -print(db[b"foo2"]) -try: - print(db[b"foo"]) -except KeyError: - print("KeyError") -print(db.get(b"foo")) -print(db.get(b"foo", b"dflt")) - -del db[b"foo2"] -try: - del db[b"foo"] -except KeyError: - print("KeyError") - -for k, v in db.items(): - print((k, v)) - -print("---") -for k, v in db.items(None, None): - print((k, v)) - -print("---") -for k, v in db.items(b"f"): - print((k, v)) - -print("---") -for k, v in db.items(b"f", b"foo3"): - print((k, v)) - -print("---") -for k, v in db.items(None, b"foo3"): - print((k, v)) - -print("---") -for k, v in db.items(b"f", b"foo3", btree.INCL): - print((k, v)) - -print("---") -for k, v in db.items(None, None, btree.DESC): - print((k, v)) - -print(db.seq(1, b"foo1")) -print(db.seq(1, b"qux")) - -try: - db.seq(b"foo1") -except OSError as e: - print(e.errno == uerrno.EINVAL) - -print(list(db.keys())) -print(list(db.values())) - -for k in db: - print(k) - -db.put(b"baz1", b"qux1") - -print("foo1", "foo1" in db) -print("foo2", "foo2" in db) -print("baz1", "baz1" in db) - -try: - print(db + db[b"foo1"]) -except TypeError: - print("TypeError") - -db.flush() -db.close() -f.close() diff --git a/tests/extmod/btree1.py.exp b/tests/extmod/btree1.py.exp deleted file mode 100644 index a467252300..0000000000 --- a/tests/extmod/btree1.py.exp +++ /dev/null @@ -1,40 +0,0 @@ - -b'bar2' -KeyError -None -b'dflt' -KeyError -(b'bar1', b'foo1') -(b'foo1', b'bar1') -(b'foo3', b'bar3') ---- -(b'bar1', b'foo1') -(b'foo1', b'bar1') -(b'foo3', b'bar3') ---- -(b'foo1', b'bar1') -(b'foo3', b'bar3') ---- -(b'foo1', b'bar1') ---- -(b'bar1', b'foo1') -(b'foo1', b'bar1') ---- -(b'foo1', b'bar1') -(b'foo3', b'bar3') ---- -(b'foo3', b'bar3') -(b'foo1', b'bar1') -(b'bar1', b'foo1') -(b'foo1', b'bar1') -None -True -[b'bar1', b'foo1', b'foo3'] -[b'foo1', b'bar1', b'bar3'] -b'bar1' -b'foo1' -b'foo3' -foo1 True -foo2 False -baz1 True -TypeError diff --git a/tests/extmod/btree_error.py b/tests/extmod/btree_error.py deleted file mode 100644 index b64769e884..0000000000 --- a/tests/extmod/btree_error.py +++ /dev/null @@ -1,42 +0,0 @@ -# Test that errno's propagate correctly through btree module. - -try: - import btree, uio, uerrno - - uio.IOBase -except (ImportError, AttributeError): - print("SKIP") - raise SystemExit - - -class Device(uio.IOBase): - def __init__(self, read_ret=0, ioctl_ret=0): - self.read_ret = read_ret - self.ioctl_ret = ioctl_ret - - def readinto(self, buf): - print("read", len(buf)) - return self.read_ret - - def ioctl(self, cmd, arg): - print("ioctl", cmd) - return self.ioctl_ret - - -# Invalid pagesize; errno comes from btree library -try: - db = btree.open(Device(), pagesize=511) -except OSError as er: - print("OSError", er.errno == uerrno.EINVAL) - -# Valid pagesize, device returns error on read; errno comes from Device.readinto -try: - db = btree.open(Device(-1000), pagesize=512) -except OSError as er: - print(repr(er)) - -# Valid pagesize, device returns error on seek; errno comes from Device.ioctl -try: - db = btree.open(Device(0, -1001), pagesize=512) -except OSError as er: - print(repr(er)) diff --git a/tests/extmod/btree_error.py.exp b/tests/extmod/btree_error.py.exp deleted file mode 100644 index 168adb80c5..0000000000 --- a/tests/extmod/btree_error.py.exp +++ /dev/null @@ -1,6 +0,0 @@ -OSError True -read 24 -OSError(1000,) -read 24 -ioctl 2 -OSError(1001,) diff --git a/tests/extmod/btree_gc.py b/tests/extmod/btree_gc.py deleted file mode 100644 index 1845aa0640..0000000000 --- a/tests/extmod/btree_gc.py +++ /dev/null @@ -1,26 +0,0 @@ -# Test btree interaction with the garbage collector. - -try: - import btree, uio, gc -except ImportError: - print("SKIP") - raise SystemExit - -N = 80 - -# Create a BytesIO but don't keep a reference to it. -db = btree.open(uio.BytesIO(), pagesize=512) - -# Overwrite lots of the Python stack to make sure no reference to the BytesIO remains. -x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - -# Write lots of key/value pairs, which fill up the DB and also allocate temporary heap -# memory due to the string addition, and do a GC collect to verify that the BytesIO -# is not collected. -for i in range(N): - db[b"thekey" + str(i)] = b"thelongvalue" + str(i) - print(db[b"thekey" + str(i)]) - gc.collect() - -# Reclaim memory allocated by the db object. -db.close() diff --git a/tests/extmod/btree_gc.py.exp b/tests/extmod/btree_gc.py.exp deleted file mode 100644 index e7b8d56729..0000000000 --- a/tests/extmod/btree_gc.py.exp +++ /dev/null @@ -1,80 +0,0 @@ -b'thelongvalue0' -b'thelongvalue1' -b'thelongvalue2' -b'thelongvalue3' -b'thelongvalue4' -b'thelongvalue5' -b'thelongvalue6' -b'thelongvalue7' -b'thelongvalue8' -b'thelongvalue9' -b'thelongvalue10' -b'thelongvalue11' -b'thelongvalue12' -b'thelongvalue13' -b'thelongvalue14' -b'thelongvalue15' -b'thelongvalue16' -b'thelongvalue17' -b'thelongvalue18' -b'thelongvalue19' -b'thelongvalue20' -b'thelongvalue21' -b'thelongvalue22' -b'thelongvalue23' -b'thelongvalue24' -b'thelongvalue25' -b'thelongvalue26' -b'thelongvalue27' -b'thelongvalue28' -b'thelongvalue29' -b'thelongvalue30' -b'thelongvalue31' -b'thelongvalue32' -b'thelongvalue33' -b'thelongvalue34' -b'thelongvalue35' -b'thelongvalue36' -b'thelongvalue37' -b'thelongvalue38' -b'thelongvalue39' -b'thelongvalue40' -b'thelongvalue41' -b'thelongvalue42' -b'thelongvalue43' -b'thelongvalue44' -b'thelongvalue45' -b'thelongvalue46' -b'thelongvalue47' -b'thelongvalue48' -b'thelongvalue49' -b'thelongvalue50' -b'thelongvalue51' -b'thelongvalue52' -b'thelongvalue53' -b'thelongvalue54' -b'thelongvalue55' -b'thelongvalue56' -b'thelongvalue57' -b'thelongvalue58' -b'thelongvalue59' -b'thelongvalue60' -b'thelongvalue61' -b'thelongvalue62' -b'thelongvalue63' -b'thelongvalue64' -b'thelongvalue65' -b'thelongvalue66' -b'thelongvalue67' -b'thelongvalue68' -b'thelongvalue69' -b'thelongvalue70' -b'thelongvalue71' -b'thelongvalue72' -b'thelongvalue73' -b'thelongvalue74' -b'thelongvalue75' -b'thelongvalue76' -b'thelongvalue77' -b'thelongvalue78' -b'thelongvalue79' diff --git a/tests/extmod/framebuf1.py b/tests/extmod/framebuf1.py deleted file mode 100644 index c8e0132265..0000000000 --- a/tests/extmod/framebuf1.py +++ /dev/null @@ -1,111 +0,0 @@ -try: - import framebuf -except ImportError: - print("SKIP") - raise SystemExit - -w = 5 -h = 16 -size = w * h // 8 -buf = bytearray(size) -maps = { - framebuf.MONO_VLSB: "MONO_VLSB", - framebuf.MONO_HLSB: "MONO_HLSB", - framebuf.MONO_HMSB: "MONO_HMSB", -} - -for mapping in maps.keys(): - for x in range(size): - buf[x] = 0 - fbuf = framebuf.FrameBuffer(buf, w, h, mapping) - print(maps[mapping]) - # access as buffer - print(memoryview(fbuf)[0]) - - # fill - fbuf.fill(1) - print(buf) - fbuf.fill(0) - print(buf) - - # put pixel - fbuf.pixel(0, 0, 1) - fbuf.pixel(4, 0, 1) - fbuf.pixel(0, 15, 1) - fbuf.pixel(4, 15, 1) - print(buf) - - # clear pixel - fbuf.pixel(4, 15, 0) - print(buf) - - # get pixel - print(fbuf.pixel(0, 0), fbuf.pixel(1, 1)) - - # hline - fbuf.fill(0) - fbuf.hline(0, 1, w, 1) - print("hline", buf) - - # vline - fbuf.fill(0) - fbuf.vline(1, 0, h, 1) - print("vline", buf) - - # rect - fbuf.fill(0) - fbuf.rect(1, 1, 3, 3, 1) - print("rect", buf) - - # fill rect - fbuf.fill(0) - fbuf.fill_rect(0, 0, 0, 3, 1) # zero width, no-operation - fbuf.fill_rect(1, 1, 3, 3, 1) - print("fill_rect", buf) - - # line - fbuf.fill(0) - fbuf.line(1, 1, 3, 3, 1) - print("line", buf) - - # line steep negative gradient - fbuf.fill(0) - fbuf.line(3, 3, 2, 1, 1) - print("line", buf) - - # scroll - fbuf.fill(0) - fbuf.pixel(2, 7, 1) - fbuf.scroll(0, 1) - print(buf) - fbuf.scroll(0, -2) - print(buf) - fbuf.scroll(1, 0) - print(buf) - fbuf.scroll(-1, 0) - print(buf) - fbuf.scroll(2, 2) - print(buf) - - # print text - fbuf.fill(0) - fbuf.text("hello", 0, 0, 1) - print(buf) - fbuf.text("hello", 0, 0, 0) # clear - print(buf) - - # char out of font range set to chr(127) - fbuf.text(str(chr(31)), 0, 0) - print(buf) - print() - -# test invalid constructor, and stride argument -try: - fbuf = framebuf.FrameBuffer(buf, w, h, -1, w) -except ValueError: - print("ValueError") - -# test legacy constructor -fbuf = framebuf.FrameBuffer1(buf, w, h) -fbuf = framebuf.FrameBuffer1(buf, w, h, w) -print(framebuf.MVLSB == framebuf.MONO_VLSB) diff --git a/tests/extmod/framebuf1.py.exp b/tests/extmod/framebuf1.py.exp deleted file mode 100644 index d954623dee..0000000000 --- a/tests/extmod/framebuf1.py.exp +++ /dev/null @@ -1,68 +0,0 @@ -MONO_VLSB -0 -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x01\x00\x00\x00\x01\x80\x00\x00\x00\x80') -bytearray(b'\x01\x00\x00\x00\x01\x80\x00\x00\x00\x00') -1 0 -hline bytearray(b'\x02\x02\x02\x02\x02\x00\x00\x00\x00\x00') -vline bytearray(b'\x00\xff\x00\x00\x00\x00\xff\x00\x00\x00') -rect bytearray(b'\x00\x0e\n\x0e\x00\x00\x00\x00\x00\x00') -fill_rect bytearray(b'\x00\x0e\x0e\x0e\x00\x00\x00\x00\x00\x00') -line bytearray(b'\x00\x02\x04\x08\x00\x00\x00\x00\x00\x00') -line bytearray(b'\x00\x00\x06\x08\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00') -bytearray(b'\x00\x00@\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00@\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00@\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01') -bytearray(b'\x00\x7f\x7f\x04\x04\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\xaaU\xaaU\xaa\x00\x00\x00\x00\x00') - -MONO_HLSB -0 -bytearray(b'\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8\xf8') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00') -1 0 -hline bytearray(b'\x00\xf8\x00\x00\x00\x00\x00\x00\x00\x00') -vline bytearray(b'@@@@@@@@@@') -rect bytearray(b'\x00pPp\x00\x00\x00\x00\x00\x00') -fill_rect bytearray(b'\x00ppp\x00\x00\x00\x00\x00\x00') -line bytearray(b'\x00@ \x10\x00\x00\x00\x00\x00\x00') -line bytearray(b'\x00 \x10\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00 \x00') -bytearray(b'\x00\x00\x00\x00\x00\x00 \x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00 \x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00') -bytearray(b'``x````\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'P\xa8P\xa8P\xa8P\xa8\x00\x00') - -MONO_HMSB -0 -bytearray(b'\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f\x1f') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00') -1 0 -hline bytearray(b'\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00') -vline bytearray(b'\x02\x02\x02\x02\x02\x02\x02\x02\x02\x02') -rect bytearray(b'\x00\x0e\n\x0e\x00\x00\x00\x00\x00\x00') -fill_rect bytearray(b'\x00\x0e\x0e\x0e\x00\x00\x00\x00\x00\x00') -line bytearray(b'\x00\x02\x04\x08\x00\x00\x00\x00\x00\x00') -line bytearray(b'\x00\x04\x04\x08\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x04\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00') -bytearray(b'\x06\x06\x1e\x06\x06\x06\x06\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\n\x15\n\x15\n\x15\n\x15\x00\x00') - -ValueError -True diff --git a/tests/extmod/framebuf16.py b/tests/extmod/framebuf16.py deleted file mode 100644 index cd7f5ec015..0000000000 --- a/tests/extmod/framebuf16.py +++ /dev/null @@ -1,66 +0,0 @@ -try: - import framebuf, usys -except ImportError: - print("SKIP") - raise SystemExit - -# This test and its .exp file is based on a little-endian architecture. -if usys.byteorder != "little": - print("SKIP") - raise SystemExit - - -def printbuf(): - print("--8<--") - for y in range(h): - print(buf[y * w * 2 : (y + 1) * w * 2]) - print("-->8--") - - -w = 4 -h = 5 -buf = bytearray(w * h * 2) -fbuf = framebuf.FrameBuffer(buf, w, h, framebuf.RGB565) - -# fill -fbuf.fill(0xFFFF) -printbuf() -fbuf.fill(0x0000) -printbuf() - -# put pixel -fbuf.pixel(0, 0, 0xEEEE) -fbuf.pixel(3, 0, 0xEE00) -fbuf.pixel(0, 4, 0x00EE) -fbuf.pixel(3, 4, 0x0EE0) -printbuf() - -# get pixel -print(fbuf.pixel(0, 4), fbuf.pixel(1, 1)) - -# scroll -fbuf.fill(0x0000) -fbuf.pixel(2, 2, 0xFFFF) -printbuf() -fbuf.scroll(0, 1) -printbuf() -fbuf.scroll(1, 0) -printbuf() -fbuf.scroll(-1, -2) -printbuf() - -w2 = 2 -h2 = 3 -buf2 = bytearray(w2 * h2 * 2) -fbuf2 = framebuf.FrameBuffer(buf2, w2, h2, framebuf.RGB565) - -fbuf2.fill(0x0000) -fbuf2.pixel(0, 0, 0x0EE0) -fbuf2.pixel(0, 2, 0xEE00) -fbuf2.pixel(1, 0, 0x00EE) -fbuf2.pixel(1, 2, 0xE00E) -fbuf.fill(0xFFFF) -fbuf.blit(fbuf2, 3, 3, 0x0000) -fbuf.blit(fbuf2, -1, -1, 0x0000) -fbuf.blit(fbuf2, 16, 16, 0x0000) -printbuf() diff --git a/tests/extmod/framebuf16.py.exp b/tests/extmod/framebuf16.py.exp deleted file mode 100644 index c41dc19d07..0000000000 --- a/tests/extmod/framebuf16.py.exp +++ /dev/null @@ -1,57 +0,0 @@ ---8<-- -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\xee\xee\x00\x00\x00\x00\x00\xee') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\xee\x00\x00\x00\x00\x00\xe0\x0e') --->8-- -238 0 ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\xff\xff\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\xff\xff\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\xff\xff') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\xff\xff\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\xff\xff') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\x0e\xe0\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xe0\x0e') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') --->8-- diff --git a/tests/extmod/framebuf2.py b/tests/extmod/framebuf2.py deleted file mode 100644 index 097057fe96..0000000000 --- a/tests/extmod/framebuf2.py +++ /dev/null @@ -1,64 +0,0 @@ -try: - import framebuf -except ImportError: - print("SKIP") - raise SystemExit - - -def printbuf(): - print("--8<--") - for y in range(h): - for x in range(w): - print("%u" % ((buf[(x + y * w) // 4] >> ((x & 3) << 1)) & 3), end="") - print() - print("-->8--") - - -w = 8 -h = 5 -buf = bytearray(w * h // 4) -fbuf = framebuf.FrameBuffer(buf, w, h, framebuf.GS2_HMSB) - -# fill -fbuf.fill(3) -printbuf() -fbuf.fill(0) -printbuf() - -# put pixel -fbuf.pixel(0, 0, 1) -fbuf.pixel(3, 0, 2) -fbuf.pixel(0, 4, 3) -fbuf.pixel(3, 4, 2) -printbuf() - -# get pixel -print(fbuf.pixel(0, 4), fbuf.pixel(1, 1)) - -# scroll -fbuf.fill(0) -fbuf.pixel(2, 2, 3) -printbuf() -fbuf.scroll(0, 1) -printbuf() -fbuf.scroll(1, 0) -printbuf() -fbuf.scroll(-1, -2) -printbuf() - -w2 = 2 -h2 = 3 -buf2 = bytearray(w2 * h2 // 4) -fbuf2 = framebuf.FrameBuffer(buf2, w2, h2, framebuf.GS2_HMSB) - -# blit -fbuf2.fill(0) -fbuf2.pixel(0, 0, 1) -fbuf2.pixel(0, 2, 2) -fbuf2.pixel(1, 0, 1) -fbuf2.pixel(1, 2, 2) -fbuf.fill(3) -fbuf.blit(fbuf2, 3, 3, 0) -fbuf.blit(fbuf2, -1, -1, 0) -fbuf.blit(fbuf2, 16, 16, 0) -printbuf() diff --git a/tests/extmod/framebuf2.py.exp b/tests/extmod/framebuf2.py.exp deleted file mode 100644 index c53e518a6e..0000000000 --- a/tests/extmod/framebuf2.py.exp +++ /dev/null @@ -1,57 +0,0 @@ ---8<-- -33333333 -33333333 -33333333 -33333333 -33333333 --->8-- ---8<-- -00000000 -00000000 -00000000 -00000000 -00000000 --->8-- ---8<-- -10020000 -00000000 -00000000 -00000000 -30020000 --->8-- -3 0 ---8<-- -00000000 -00000000 -00300000 -00000000 -00000000 --->8-- ---8<-- -00000000 -00000000 -00000000 -00300000 -00000000 --->8-- ---8<-- -00000000 -00000000 -00000000 -00030000 -00000000 --->8-- ---8<-- -00000000 -00300000 -00000000 -00030000 -00000000 --->8-- ---8<-- -33333333 -23333333 -33333333 -33311333 -33333333 --->8-- diff --git a/tests/extmod/framebuf4.py b/tests/extmod/framebuf4.py deleted file mode 100644 index 56593ee155..0000000000 --- a/tests/extmod/framebuf4.py +++ /dev/null @@ -1,55 +0,0 @@ -try: - import framebuf -except ImportError: - print("SKIP") - raise SystemExit - - -def printbuf(): - print("--8<--") - for y in range(h): - print(buf[y * w // 2 : (y + 1) * w // 2]) - print("-->8--") - - -w = 16 -h = 8 -buf = bytearray(w * h // 2) -fbuf = framebuf.FrameBuffer(buf, w, h, framebuf.GS4_HMSB) - -# fill -fbuf.fill(0x0F) -printbuf() -fbuf.fill(0xA0) -printbuf() - -# put pixel -fbuf.pixel(0, 0, 0x01) -printbuf() -fbuf.pixel(w - 1, 0, 0x02) -printbuf() -fbuf.pixel(w - 1, h - 1, 0x03) -printbuf() -fbuf.pixel(0, h - 1, 0x04) -printbuf() - -# get pixel -print(fbuf.pixel(0, 0), fbuf.pixel(w - 1, 0), fbuf.pixel(w - 1, h - 1), fbuf.pixel(0, h - 1)) -print(fbuf.pixel(1, 0), fbuf.pixel(w - 2, 0), fbuf.pixel(w - 2, h - 1), fbuf.pixel(1, h - 1)) - -# fill rect -fbuf.fill_rect(0, 0, w, h, 0x0F) -printbuf() -fbuf.fill_rect(0, 0, w, h, 0xF0) -fbuf.fill_rect(1, 0, w // 2 + 1, 1, 0xF1) -printbuf() -fbuf.fill_rect(1, 0, w // 2 + 1, 1, 0x10) -fbuf.fill_rect(1, 0, w // 2, 1, 0xF1) -printbuf() -fbuf.fill_rect(1, 0, w // 2, 1, 0x10) -fbuf.fill_rect(0, h - 4, w // 2 + 1, 4, 0xAF) -printbuf() -fbuf.fill_rect(0, h - 4, w // 2 + 1, 4, 0xB0) -fbuf.fill_rect(0, h - 4, w // 2, 4, 0xAF) -printbuf() -fbuf.fill_rect(0, h - 4, w // 2, 4, 0xB0) diff --git a/tests/extmod/framebuf4.py.exp b/tests/extmod/framebuf4.py.exp deleted file mode 100644 index 0865470a07..0000000000 --- a/tests/extmod/framebuf4.py.exp +++ /dev/null @@ -1,112 +0,0 @@ ---8<-- -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x10\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x10\x00\x00\x00\x00\x00\x00\x02') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x10\x00\x00\x00\x00\x00\x00\x02') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x03') --->8-- ---8<-- -bytearray(b'\x10\x00\x00\x00\x00\x00\x00\x02') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'@\x00\x00\x00\x00\x00\x00\x03') --->8-- -1 2 3 4 -0 0 0 0 ---8<-- -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') -bytearray(b'\xff\xff\xff\xff\xff\xff\xff\xff') --->8-- ---8<-- -bytearray(b'\x01\x11\x11\x11\x11\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x01\x11\x11\x11\x10\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\xf0\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\xf0\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\xf0\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\xf0\x00\x00\x00') --->8-- ---8<-- -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\x00\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\x00\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\x00\x00\x00\x00') -bytearray(b'\xff\xff\xff\xff\x00\x00\x00\x00') --->8-- diff --git a/tests/extmod/framebuf8.py b/tests/extmod/framebuf8.py deleted file mode 100644 index a3ca6fcd4f..0000000000 --- a/tests/extmod/framebuf8.py +++ /dev/null @@ -1,34 +0,0 @@ -try: - import framebuf -except ImportError: - print("SKIP") - raise SystemExit - - -def printbuf(): - print("--8<--") - for y in range(h): - for x in range(w): - print("%02x" % buf[(x + y * w)], end="") - print() - print("-->8--") - - -w = 8 -h = 5 -buf = bytearray(w * h) -fbuf = framebuf.FrameBuffer(buf, w, h, framebuf.GS8) - -# fill -fbuf.fill(0x55) -printbuf() - -# put pixel -fbuf.pixel(0, 0, 0x11) -fbuf.pixel(w - 1, 0, 0x22) -fbuf.pixel(0, h - 1, 0x33) -fbuf.pixel(w - 1, h - 1, 0xFF) -printbuf() - -# get pixel -print(hex(fbuf.pixel(0, h - 1)), hex(fbuf.pixel(1, 1))) diff --git a/tests/extmod/framebuf8.py.exp b/tests/extmod/framebuf8.py.exp deleted file mode 100644 index 01d8976fec..0000000000 --- a/tests/extmod/framebuf8.py.exp +++ /dev/null @@ -1,15 +0,0 @@ ---8<-- -5555555555555555 -5555555555555555 -5555555555555555 -5555555555555555 -5555555555555555 --->8-- ---8<-- -1155555555555522 -5555555555555555 -5555555555555555 -5555555555555555 -33555555555555ff --->8-- -0x33 0x55 diff --git a/tests/extmod/framebuf_palette.py b/tests/extmod/framebuf_palette.py deleted file mode 100644 index f5b15fda73..0000000000 --- a/tests/extmod/framebuf_palette.py +++ /dev/null @@ -1,35 +0,0 @@ -# Test blit between different color spaces -try: - import framebuf, usys -except ImportError: - print("SKIP") - raise SystemExit - -# Monochrome glyph/icon -w = 8 -h = 8 -cbuf = bytearray(w * h // 8) -fbc = framebuf.FrameBuffer(cbuf, w, h, framebuf.MONO_HLSB) -fbc.line(0, 0, 7, 7, 1) - -# RGB565 destination -wd = 16 -hd = 16 -dest = bytearray(wd * hd * 2) -fbd = framebuf.FrameBuffer(dest, wd, hd, framebuf.RGB565) - -wp = 2 -bg = 0x1234 -fg = 0xF800 -pal = bytearray(wp * 2) -palette = framebuf.FrameBuffer(pal, wp, 1, framebuf.RGB565) -palette.pixel(0, 0, bg) -palette.pixel(1, 0, fg) - -fbd.blit(fbc, 0, 0, -1, palette) - -print(fbd.pixel(0, 0) == fg) -print(fbd.pixel(7, 7) == fg) -print(fbd.pixel(8, 8) == 0) # Outside blit -print(fbd.pixel(0, 1) == bg) -print(fbd.pixel(1, 0) == bg) diff --git a/tests/extmod/framebuf_palette.py.exp b/tests/extmod/framebuf_palette.py.exp deleted file mode 100644 index 2e883c51de..0000000000 --- a/tests/extmod/framebuf_palette.py.exp +++ /dev/null @@ -1,5 +0,0 @@ -True -True -True -True -True diff --git a/tests/extmod/framebuf_subclass.py b/tests/extmod/framebuf_subclass.py deleted file mode 100644 index 4cd9ea4eb5..0000000000 --- a/tests/extmod/framebuf_subclass.py +++ /dev/null @@ -1,51 +0,0 @@ -# test subclassing framebuf.FrameBuffer - -try: - import framebuf, usys -except ImportError: - print("SKIP") - raise SystemExit - -# This test and its .exp file is based on a little-endian architecture. -if usys.byteorder != "little": - print("SKIP") - raise SystemExit - - -class FB(framebuf.FrameBuffer): - def __init__(self, n): - self.n = n - super().__init__(bytearray(2 * n * n), n, n, framebuf.RGB565) - - def foo(self): - self.hline(0, 2, self.n, 0x0304) - - -fb = FB(n=3) -fb.pixel(0, 0, 0x0102) -fb.foo() -print(bytes(fb)) - -# Test that blitting a subclass works. -fb2 = framebuf.FrameBuffer(bytearray(2 * 3 * 3), 3, 3, framebuf.RGB565) -fb.fill(0) -fb.pixel(0, 0, 0x0506) -fb.pixel(2, 2, 0x0708) -fb2.blit(fb, 0, 0) -print(bytes(fb2)) - - -# Test that blitting something that isn't a subclass fails with TypeError. -class NotAFrameBuf: - pass - - -try: - fb.blit(NotAFrameBuf(), 0, 0) -except TypeError: - print("TypeError") - -try: - fb.blit(None, 0, 0) -except TypeError: - print("TypeError") diff --git a/tests/extmod/framebuf_subclass.py.exp b/tests/extmod/framebuf_subclass.py.exp deleted file mode 100644 index 58e311fee5..0000000000 --- a/tests/extmod/framebuf_subclass.py.exp +++ /dev/null @@ -1,4 +0,0 @@ -b'\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x03\x04\x03\x04\x03' -b'\x06\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x07' -TypeError -TypeError diff --git a/tests/extmod/ticks_diff.py b/tests/extmod/ticks_diff.py index de45a557af..b2445f0d62 100644 --- a/tests/extmod/ticks_diff.py +++ b/tests/extmod/ticks_diff.py @@ -1,5 +1,5 @@ try: - from utime import ticks_diff, ticks_add + from time import ticks_diff, ticks_add except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/time_ms_us.py b/tests/extmod/time_ms_us.py index ac2ed8be27..67c469d0a3 100644 --- a/tests/extmod/time_ms_us.py +++ b/tests/extmod/time_ms_us.py @@ -1,23 +1,23 @@ try: - import utime + import time - utime.sleep_ms, utime.sleep_us, utime.ticks_diff, utime.ticks_ms, utime.ticks_us, utime.ticks_cpu + time.sleep_ms, time.sleep_us, time.ticks_diff, time.ticks_ms, time.ticks_us, time.ticks_cpu except (ImportError, AttributeError): print("SKIP") raise SystemExit -utime.sleep_ms(1) -utime.sleep_us(1) +time.sleep_ms(1) +time.sleep_us(1) -t0 = utime.ticks_ms() -t1 = utime.ticks_ms() -print(0 <= utime.ticks_diff(t1, t0) <= 1) +t0 = time.ticks_ms() +t1 = time.ticks_ms() +print(0 <= time.ticks_diff(t1, t0) <= 1) -t0 = utime.ticks_us() -t1 = utime.ticks_us() -print(0 <= utime.ticks_diff(t1, t0) <= 500) +t0 = time.ticks_us() +t1 = time.ticks_us() +print(0 <= time.ticks_diff(t1, t0) <= 500) -# ticks_cpu may not be implemented, at least make sure it doesn't decrease -t0 = utime.ticks_cpu() -t1 = utime.ticks_cpu() -print(utime.ticks_diff(t1, t0) >= 0) +# ticks_cpu may not be implemented, at least make sre it doesn't decrease +t0 = time.ticks_cpu() +t1 = time.ticks_cpu() +print(time.ticks_diff(t1, t0) >= 0) diff --git a/tests/extmod/uasyncio_await_return.py b/tests/extmod/uasyncio_await_return.py index 4a45d9b9c0..8042b5488d 100644 --- a/tests/extmod/uasyncio_await_return.py +++ b/tests/extmod/uasyncio_await_return.py @@ -1,13 +1,10 @@ # Test that tasks return their value correctly to the caller try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_basic.py b/tests/extmod/uasyncio_basic.py index baf9d193fe..148a361b4b 100644 --- a/tests/extmod/uasyncio_basic.py +++ b/tests/extmod/uasyncio_basic.py @@ -1,11 +1,8 @@ try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): @@ -19,10 +16,10 @@ except AttributeError: raise SystemExit try: - import utime + import time - ticks = utime.ticks_ms - ticks_diff = utime.ticks_diff + ticks = time.ticks_ms + ticks_diff = time.ticks_diff except: import time diff --git a/tests/extmod/uasyncio_basic2.py b/tests/extmod/uasyncio_basic2.py index a2167e48ee..3040b6aa51 100644 --- a/tests/extmod/uasyncio_basic2.py +++ b/tests/extmod/uasyncio_basic2.py @@ -1,11 +1,8 @@ try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def forever(): diff --git a/tests/extmod/uasyncio_cancel_fair.py b/tests/extmod/uasyncio_cancel_fair.py index 9a7b35c161..a1e35f82ba 100644 --- a/tests/extmod/uasyncio_cancel_fair.py +++ b/tests/extmod/uasyncio_cancel_fair.py @@ -2,13 +2,10 @@ # That tasks which continuously cancel each other don't take over the scheduler try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, other): diff --git a/tests/extmod/uasyncio_cancel_fair2.py b/tests/extmod/uasyncio_cancel_fair2.py index 46e40f71b1..577823204f 100644 --- a/tests/extmod/uasyncio_cancel_fair2.py +++ b/tests/extmod/uasyncio_cancel_fair2.py @@ -2,13 +2,10 @@ # That tasks which keeps being cancelled by multiple other tasks gets a chance to run try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task_a(): diff --git a/tests/extmod/uasyncio_cancel_self.py b/tests/extmod/uasyncio_cancel_self.py index 660ae66389..a437edb540 100644 --- a/tests/extmod/uasyncio_cancel_self.py +++ b/tests/extmod/uasyncio_cancel_self.py @@ -1,13 +1,10 @@ # Test a task cancelling itself (currently unsupported) try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(): diff --git a/tests/extmod/uasyncio_cancel_task.py b/tests/extmod/uasyncio_cancel_task.py index ec60d85545..9250f46b51 100644 --- a/tests/extmod/uasyncio_cancel_task.py +++ b/tests/extmod/uasyncio_cancel_task.py @@ -1,13 +1,10 @@ # Test cancelling a task try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(s, allow_cancel): diff --git a/tests/extmod/uasyncio_cancel_wait_on_finished.py b/tests/extmod/uasyncio_cancel_wait_on_finished.py index 66b36dd60d..c3529b8d7a 100644 --- a/tests/extmod/uasyncio_cancel_wait_on_finished.py +++ b/tests/extmod/uasyncio_cancel_wait_on_finished.py @@ -1,13 +1,10 @@ # Test cancelling a task that is waiting on a task that just finishes. try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def sleep_task(): diff --git a/tests/extmod/uasyncio_current_task.py b/tests/extmod/uasyncio_current_task.py index 3165a2cf16..18058230f2 100644 --- a/tests/extmod/uasyncio_current_task.py +++ b/tests/extmod/uasyncio_current_task.py @@ -1,13 +1,10 @@ # Test current_task() function try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(result): diff --git a/tests/extmod/uasyncio_event.py b/tests/extmod/uasyncio_event.py index fb8eb9ffa4..290323a7de 100644 --- a/tests/extmod/uasyncio_event.py +++ b/tests/extmod/uasyncio_event.py @@ -1,13 +1,10 @@ # Test Event class try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, ev): diff --git a/tests/extmod/uasyncio_event_fair.py b/tests/extmod/uasyncio_event_fair.py index 1eee0bd7e8..1029b54c5f 100644 --- a/tests/extmod/uasyncio_event_fair.py +++ b/tests/extmod/uasyncio_event_fair.py @@ -2,13 +2,10 @@ # That tasks which continuously wait on events don't take over the scheduler try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_exception.py b/tests/extmod/uasyncio_exception.py index 4e4f978dc2..6f19509bac 100644 --- a/tests/extmod/uasyncio_exception.py +++ b/tests/extmod/uasyncio_exception.py @@ -1,13 +1,10 @@ # Test general exception handling try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit # main task raising an exception diff --git a/tests/extmod/uasyncio_fair.py b/tests/extmod/uasyncio_fair.py index e225706054..43076fef1d 100644 --- a/tests/extmod/uasyncio_fair.py +++ b/tests/extmod/uasyncio_fair.py @@ -1,13 +1,10 @@ # Test fairness of scheduler try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, t): diff --git a/tests/extmod/uasyncio_gather.py b/tests/extmod/uasyncio_gather.py index e34176a31d..c666ff6b17 100644 --- a/tests/extmod/uasyncio_gather.py +++ b/tests/extmod/uasyncio_gather.py @@ -1,13 +1,10 @@ -# test uasyncio.gather() function +# test asyncio.gather() function try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_gather_notimpl.py b/tests/extmod/uasyncio_gather_notimpl.py index 63ba645d24..0b12bb804b 100644 --- a/tests/extmod/uasyncio_gather_notimpl.py +++ b/tests/extmod/uasyncio_gather_notimpl.py @@ -1,13 +1,10 @@ -# Test uasyncio.gather() function, features that are not implemented. +# Test asyncio.gather() function, featres that are not implemented. try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_get_event_loop.py b/tests/extmod/uasyncio_get_event_loop.py index 8ccbd6814e..b2d50e3cba 100644 --- a/tests/extmod/uasyncio_get_event_loop.py +++ b/tests/extmod/uasyncio_get_event_loop.py @@ -1,13 +1,10 @@ # Test get_event_loop() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def main(): diff --git a/tests/extmod/uasyncio_heaplock.py b/tests/extmod/uasyncio_heaplock.py index 34a51cd370..482e7319ff 100644 --- a/tests/extmod/uasyncio_heaplock.py +++ b/tests/extmod/uasyncio_heaplock.py @@ -1,4 +1,4 @@ -# test that basic scheduling of tasks, and uasyncio.sleep_ms, does not use the heap +# test that basic scheduling of tasks, and asyncio.sleep_ms, does not use the heap import micropython @@ -13,13 +13,10 @@ except RuntimeError: raise SystemExit try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, n, t): diff --git a/tests/extmod/uasyncio_lock.py b/tests/extmod/uasyncio_lock.py index 096a8c82be..f565adb03f 100644 --- a/tests/extmod/uasyncio_lock.py +++ b/tests/extmod/uasyncio_lock.py @@ -1,13 +1,10 @@ # Test Lock class try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task_loop(id, lock): diff --git a/tests/extmod/uasyncio_lock_cancel.py b/tests/extmod/uasyncio_lock_cancel.py index 27428da80b..a501185e90 100644 --- a/tests/extmod/uasyncio_lock_cancel.py +++ b/tests/extmod/uasyncio_lock_cancel.py @@ -1,13 +1,10 @@ # Test that locks work when cancelling multiple waiters on the lock try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_loop_stop.py b/tests/extmod/uasyncio_loop_stop.py index 23507f9a7e..b4bd0c74ad 100644 --- a/tests/extmod/uasyncio_loop_stop.py +++ b/tests/extmod/uasyncio_loop_stop.py @@ -1,13 +1,10 @@ # Test Loop.stop() to stop the event loop try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(): diff --git a/tests/extmod/uasyncio_micropython.py b/tests/extmod/uasyncio_micropython.py index 69e5fa3224..c27a134cd9 100644 --- a/tests/extmod/uasyncio_micropython.py +++ b/tests/extmod/uasyncio_micropython.py @@ -3,7 +3,7 @@ # - wait_for_ms try: - import utime, uasyncio + import time, asyncio except ImportError: print("SKIP") raise SystemExit @@ -11,27 +11,27 @@ except ImportError: async def task(id, t): print("task start", id) - await uasyncio.sleep_ms(t) + await asyncio.sleep_ms(t) print("task end", id) return id * 2 async def main(): # Simple sleep_ms - t0 = utime.ticks_ms() - await uasyncio.sleep_ms(1) - print(utime.ticks_diff(utime.ticks_ms(), t0) < 100) + t0 = time.ticks_ms() + await asyncio.sleep_ms(1) + print(time.ticks_diff(time.ticks_ms(), t0) < 100) # When task finished before the timeout - print(await uasyncio.wait_for_ms(task(1, 5), 50)) + print(await asyncio.wait_for_ms(task(1, 5), 50)) # When timeout passes and task is cancelled try: - print(await uasyncio.wait_for_ms(task(2, 50), 5)) - except uasyncio.TimeoutError: + print(await asyncio.wait_for_ms(task(2, 50), 5)) + except asyncio.TimeoutError: print("timeout") print("finish") -uasyncio.run(main()) +asyncio.run(main()) diff --git a/tests/extmod/uasyncio_new_event_loop.py b/tests/extmod/uasyncio_new_event_loop.py index b711befba9..a3feb02126 100644 --- a/tests/extmod/uasyncio_new_event_loop.py +++ b/tests/extmod/uasyncio_new_event_loop.py @@ -1,13 +1,10 @@ # Test Loop.new_event_loop() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(): diff --git a/tests/extmod/uasyncio_set_exception_handler.py b/tests/extmod/uasyncio_set_exception_handler.py index fe7b83eb4d..5935f0f4eb 100644 --- a/tests/extmod/uasyncio_set_exception_handler.py +++ b/tests/extmod/uasyncio_set_exception_handler.py @@ -1,13 +1,10 @@ # Test that tasks return their value correctly to the caller try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def custom_handler(loop, context): diff --git a/tests/extmod/uasyncio_task_done.py b/tests/extmod/uasyncio_task_done.py index 2700da8c34..7cc493a122 100644 --- a/tests/extmod/uasyncio_task_done.py +++ b/tests/extmod/uasyncio_task_done.py @@ -1,13 +1,10 @@ # Test the Task.done() method try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(t, exc=None): diff --git a/tests/extmod/uasyncio_task_exception.py b/tests/extmod/uasyncio_task_exception.py index 6bf99dc93c..9fb26857b5 100644 --- a/tests/extmod/uasyncio_task_exception.py +++ b/tests/extmod/uasyncio_task_exception.py @@ -8,13 +8,10 @@ # raising. try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def custom_handler(loop, context): diff --git a/tests/extmod/uasyncio_threadsafeflag.py b/tests/extmod/uasyncio_threadsafeflag.py index 4e002a3d2a..32eafae8bc 100644 --- a/tests/extmod/uasyncio_threadsafeflag.py +++ b/tests/extmod/uasyncio_threadsafeflag.py @@ -1,7 +1,7 @@ # Test Event class try: - import uasyncio as asyncio + import asyncio except ImportError: print("SKIP") raise SystemExit @@ -11,6 +11,7 @@ import micropython try: micropython.schedule + asyncio.ThreadSafeFlag except AttributeError: print("SKIP") raise SystemExit @@ -18,7 +19,7 @@ except AttributeError: try: # Unix port can't select/poll on user-defined types. - import uselect as select + import select poller = select.poll() poller.register(asyncio.ThreadSafeFlag()) diff --git a/tests/extmod/uasyncio_wait_for.py b/tests/extmod/uasyncio_wait_for.py index c636c7dd74..f973e46f4c 100644 --- a/tests/extmod/uasyncio_wait_for.py +++ b/tests/extmod/uasyncio_wait_for.py @@ -1,13 +1,10 @@ # Test asyncio.wait_for try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, t): diff --git a/tests/extmod/uasyncio_wait_for_fwd.py b/tests/extmod/uasyncio_wait_for_fwd.py index e608f63f6b..fd74ed01d5 100644 --- a/tests/extmod/uasyncio_wait_for_fwd.py +++ b/tests/extmod/uasyncio_wait_for_fwd.py @@ -1,13 +1,10 @@ # Test asyncio.wait_for, with forwarding cancellation try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_wait_task.py b/tests/extmod/uasyncio_wait_task.py index e19e29903c..1b1762befe 100644 --- a/tests/extmod/uasyncio_wait_task.py +++ b/tests/extmod/uasyncio_wait_task.py @@ -1,20 +1,17 @@ # Test waiting on a task try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: - import utime + import time - ticks = utime.ticks_ms - ticks_diff = utime.ticks_diff + ticks = time.ticks_ms + ticks_diff = time.ticks_diff except: import time diff --git a/tests/extmod/ubinascii_a2b_base64.py b/tests/extmod/ubinascii_a2b_base64.py index c65d69ddbe..f29330b6fc 100644 --- a/tests/extmod/ubinascii_a2b_base64.py +++ b/tests/extmod/ubinascii_a2b_base64.py @@ -1,8 +1,5 @@ try: - try: - import ubinascii as binascii - except ImportError: - import binascii + import binascii except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ubinascii_b2a_base64.py b/tests/extmod/ubinascii_b2a_base64.py index 34f2f57055..a6072d50ec 100644 --- a/tests/extmod/ubinascii_b2a_base64.py +++ b/tests/extmod/ubinascii_b2a_base64.py @@ -1,8 +1,5 @@ try: - try: - import ubinascii as binascii - except ImportError: - import binascii + import binascii except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ubinascii_crc32.py b/tests/extmod/ubinascii_crc32.py index 186bd699ae..b2f73d9475 100644 --- a/tests/extmod/ubinascii_crc32.py +++ b/tests/extmod/ubinascii_crc32.py @@ -1,8 +1,5 @@ try: - try: - import ubinascii as binascii - except ImportError: - import binascii + import binascii except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ubinascii_hexlify.py b/tests/extmod/ubinascii_hexlify.py index 3dcf0c4271..260010237c 100644 --- a/tests/extmod/ubinascii_hexlify.py +++ b/tests/extmod/ubinascii_hexlify.py @@ -1,8 +1,5 @@ try: - try: - import ubinascii as binascii - except ImportError: - import binascii + import binascii except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ubinascii_micropython.py b/tests/extmod/ubinascii_micropython.py index 94e8daa557..87c69b5838 100644 --- a/tests/extmod/ubinascii_micropython.py +++ b/tests/extmod/ubinascii_micropython.py @@ -1,8 +1,5 @@ try: - try: - import ubinascii as binascii - except ImportError: - import binascii + import binascii except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ubinascii_unhexlify.py b/tests/extmod/ubinascii_unhexlify.py index f656bcd758..63994c11f1 100644 --- a/tests/extmod/ubinascii_unhexlify.py +++ b/tests/extmod/ubinascii_unhexlify.py @@ -1,8 +1,5 @@ try: - try: - import ubinascii as binascii - except ImportError: - import binascii + import binascii except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ucryptolib_aes128_cbc.py b/tests/extmod/ucryptolib_aes128_cbc.py deleted file mode 100644 index d861d2c6bf..0000000000 --- a/tests/extmod/ucryptolib_aes128_cbc.py +++ /dev/null @@ -1,16 +0,0 @@ -try: - from Crypto.Cipher import AES - - aes = AES.new -except ImportError: - try: - from ucryptolib import aes - except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 4, 2, b"5678" * 4) -enc = crypto.encrypt(bytes(range(32))) -print(enc) -crypto = aes(b"1234" * 4, 2, b"5678" * 4) -print(crypto.decrypt(enc)) diff --git a/tests/extmod/ucryptolib_aes128_cbc.py.exp b/tests/extmod/ucryptolib_aes128_cbc.py.exp deleted file mode 100644 index cc73553b2a..0000000000 --- a/tests/extmod/ucryptolib_aes128_cbc.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -b'\x1d\x84\xfa\xaa%\x0e9\x143\x8b6\xf8\xdf^yh\xd0\x94g\xf4\xcf\x1d\xa0I)\x8a\xa0\x00u0+C' -b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' diff --git a/tests/extmod/ucryptolib_aes128_ctr.py b/tests/extmod/ucryptolib_aes128_ctr.py deleted file mode 100644 index 538d9606e9..0000000000 --- a/tests/extmod/ucryptolib_aes128_ctr.py +++ /dev/null @@ -1,28 +0,0 @@ -try: - from ucryptolib import aes -except ImportError: - print("SKIP") - raise SystemExit - - -def _new(k, ctr_initial): - return aes(k, 6, ctr_initial) - - -try: - _new(b"x" * 16, b"x" * 16) -except ValueError as e: - # is CTR support disabled? - if e.args[0] == "mode": - print("SKIP") - raise SystemExit - raise e - -crypto = _new(b"1234" * 4, b"5678" * 4) -enc = crypto.encrypt(b"a") -print(enc) -enc += crypto.encrypt(b"b" * 1000) -print(enc) - -crypto = _new(b"1234" * 4, b"5678" * 4) -print(crypto.decrypt(enc)) diff --git a/tests/extmod/ucryptolib_aes128_ctr.py.exp b/tests/extmod/ucryptolib_aes128_ctr.py.exp deleted file mode 100644 index 92e090fd39..0000000000 --- a/tests/extmod/ucryptolib_aes128_ctr.py.exp +++ /dev/null @@ -1,3 +0,0 @@ -b'\x06' -b'\x06(F\x08\xc3hB\xfdO\x05;\xf6\x96\xfe\xad\xe0\xca\xe6\xd1\xa2m\t\x91v>|\xee\xe0q\xbc]\x9a`\xfal\x87\xa6e\xfb\x8a\xf4\xb2-\xc4x,\xfc@=,\x90\xf4\xe9h\xf0\xfc\xfb\xe6\x03\xf0d\xb6\xcdObZ\xde\x1b\xe2\x84-%=\xa9\xe4\x05\xab\xd7\x044\xf4$\xd0)\xfd\xd6\xdbL\xdd\xe6\x0cp\xca^p\xaaA\x8b\xb3!\xe3\x13\xfa\x7f#\xfa0\xbd\x0b\x9cX\xec\xed\x1c\xbc\x06\xa4\xa8\x17\xbfg\x98dW\xb9~\x04\xec\xe6lZ\xb0\xab\xd5\xc6v\xe4\x8f\x98G\xff\x9b\x8a\xae\xfd\xe5\xed\x96\x1b\xe2\x99u3\xeb\x9faYr;\xf0g\xf2\x9cq\x8dI\x1cL\xc9\xa8\xb0\xdeD\xd5\x06\x87u=\xcd\x10\x1c\xab\x14\x06n\x99\x13\x89\x9f5\xea\xd2\x08\x9e\xef$?\xb9\xdeQ\x0b\x90CH\xea@V\x94\x1a\xdd\x7f\x1dz\x82\xaay\xea$Lv\x07\x8e\xce\xb8oN\x15\xf8,\x05\x00\xd9H\xf4\xbe\xb8\xee\x0e\xd6Hjh\xc6\x11\xf8:\xfe\xed\xba_\xaf\x8e\'\x0c\x7fZ\xd5\xb7\xbc\xba\xd3+\xf1\x98i\xab\x0c-\xd9\xe6>\x9e\xd0\xe6>\x9f\xebn\xf0\x15\xd9:\xec\xf7aXa\xb2,CAB7\x18g\xcc#\xbc\xb8\xf9\xa7\xf4V\xba\x0baN\x88\xb1\xea\x94\x05\x0cV\x99_\xc4\xe6\xb2\xd1|\x92\x05*@U\xe4\\\x8dR\x98\xdf\xbfS\x97\x12^\tr\x1f\x12\x8f\xdfi\x8e=\xc4I\xfcB\r\x99f\xe3\xe31\xee\xa9\xcd\x91\x1a\x1ei\xfd\xf4\x84\xc6\xda\x9e\xf3\x8aKn\xaa\xf7\x9eS\xcc\xbaXZ\x0cpbk\x18\x1f\x9aAl>y\xad\xcb\xcf\xe1Wm\xe7\xdd\xcc\x10eW\xe4h\x1dY\xb5Zs\xf1\xe7\x16_\xdc:I1R\xd3\xfe\xb1)\t\xddE\xbax\x06R\xdc\x1dSdlu\xd1\x9c\x00\xaf\x87\x8d1\xbf$\x08\xc6/y\xdf\x1f\x97z(\xff\xb9\xcb\xf2,\x91\xd7\xa0W\xfc\xe3\xe2\x905\x17O\xaf\x18\xc7\xb8?\x94^\xf5@\x80\x8d\xaa*p\xbeR0i\x17\x1e\'-\xfa\xd9\xb2\x03\xb8\x1fY\x13\xc1{\x7f\xa9\x86\t\x99\xee\xa2\xba\xab\xc1\xbb\x07a\xa5J\x01\x98\xe8\x8e\xa1\x8aV\xc1)^A\xd9\xe7\xfej`\xb4\xe9\xd3C\xab\xd4\xdb\xb1\x8c\x83\xaa&\xf1\xe2\xfc\xa1Lb\xa8\xbb\xd6\x83\xb7\xd8\xc5\x9e\xb5\xed\x1b\xe6\x91\x90\xe4\xfa\xfdD\xc2\xcb\xb7U\xb3|?(\x86=\xc2\xff\xd3P\xd2\xc5y\x93\x13r\xcd>5\x80\xde\xdaJ\xdd\x8b\xfa\x14\xd1\x85\xa8P\x06(F\xb3?\xefm\x8e\xe5C\xfe\x98\xaf\xed\xd1!(\x1f.\xc6M\xba\x00\xcb\xbfg5\xc8\x9d\x97+\x14\x87\xf5\x9d4\xb4l\xd5\xc5>\x90\xf2\x06\xa2\xc1R\x89\xf0P\xb4\xe5\x97\xdb\x07\xd3\xc6q\x08\xb9\xe7\r\xf9\x13\x8215\xcb\x92\xed\x99\xc7"\x1e\xe3Zsh\x0e\xe7\xae\x10Xs&)\x1d\xe5\xd5\xbc\x95\x8e\xa3\xd6k[k\x9c\xa0%\xd4\x83%\x88}\x90\xf0\xa7\xc7\xa4(\xdaE\xb9~\xae\x05\xbd}\xe2\xd0\xa5Y\xc1aV[\xab\x93S\xa6\xacg\r\x14\xc6\xe2J\xd6\xcck"\xcc\xfb\xb3\x97\x14\x13\x0b\xd1\xf5\xe7)_\x1e\x0b\xbb\x01\xf7\x11u\x85b\xdf\xab\xe3\xbb:\x84zF\x14u\xfe\x89\x90\xbc\xcaF\x15y\xa3\xa4[\xce\xcf-\xae\x18\x97N\xaa\xed\x84A\xfc\x9e\xeb\xb3\xfcH\x8ej\xcc\x9f \x1b\xc1\x1f}\'q.\xc0^\xd99\x1e\x91b-\xf9\xed\xfd\x9a\x7f\xb6\rO\xea\xc8\x94\xea\xf6\xb4\xdb\xf5\xc7\xb3\xef\xf6D\x12>5\xf3\x9d*\xc9\xf8\x9f]\xb01{d\xe7\'\x8f\xc0\xfbKB\x8dd\xb1\x84\x804\xbe\xe2?AT\x14\xdb4eJ\x96\xc5\xb9%\xe5\x1c\xc0L\xae\xd6O\xde\x1fjJIRD\x96\xa2\xdb\xfc\xc6t\xce\xe6\xe8"\x81\xe6\xc7\x7fuz\xb3\x91\'D\xac\xb2\x93O\xee\x14\xaa7yT\xcf\x81p\x0b(\xa1d\xda\xf8\xcb\x01\x98\x07\'\xfe/\xe4\xca\xab\x03uR"zY\xfb\x1f\x02\xc5\x9c\xa0\'\x89\xffO\x88cK\xac\xb1+S0]%E\x1a\xeb\x04\xf7\x0b\xba\xa0\xbb\xbd|\x06@T\xee\xe7\x17\xa1T\xe3"\x07\x07q' -b'abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' diff --git a/tests/extmod/ucryptolib_aes128_ecb.py b/tests/extmod/ucryptolib_aes128_ecb.py deleted file mode 100644 index 5c0e179986..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb.py +++ /dev/null @@ -1,16 +0,0 @@ -try: - from Crypto.Cipher import AES - - aes = AES.new -except ImportError: - try: - from ucryptolib import aes - except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 4, 1) -enc = crypto.encrypt(bytes(range(32))) -print(enc) -crypto = aes(b"1234" * 4, 1) -print(crypto.decrypt(enc)) diff --git a/tests/extmod/ucryptolib_aes128_ecb.py.exp b/tests/extmod/ucryptolib_aes128_ecb.py.exp deleted file mode 100644 index b0fd15b447..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -b'Iz\xfe9\x17\xac\xa4X\x12\x04\x10\xf5K~#\xc7\xac;\xf9\xc6E\xa8\xca~\xf1\xee\xd3f%\xf1\x8d\xfe' -b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' diff --git a/tests/extmod/ucryptolib_aes128_ecb_enc.py b/tests/extmod/ucryptolib_aes128_ecb_enc.py deleted file mode 100644 index 1d4484b0bc..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb_enc.py +++ /dev/null @@ -1,17 +0,0 @@ -# This tests minimal configuration of ucrypto module, which is -# AES128 encryption (anything else, including AES128 decryption, -# is optional). -try: - from Crypto.Cipher import AES - - aes = AES.new -except ImportError: - try: - from ucryptolib import aes - except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 4, 1) -enc = crypto.encrypt(bytes(range(32))) -print(enc) diff --git a/tests/extmod/ucryptolib_aes128_ecb_enc.py.exp b/tests/extmod/ucryptolib_aes128_ecb_enc.py.exp deleted file mode 100644 index 9921d4b83a..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb_enc.py.exp +++ /dev/null @@ -1 +0,0 @@ -b'Iz\xfe9\x17\xac\xa4X\x12\x04\x10\xf5K~#\xc7\xac;\xf9\xc6E\xa8\xca~\xf1\xee\xd3f%\xf1\x8d\xfe' diff --git a/tests/extmod/ucryptolib_aes128_ecb_inpl.py b/tests/extmod/ucryptolib_aes128_ecb_inpl.py deleted file mode 100644 index 88ccb02daf..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb_inpl.py +++ /dev/null @@ -1,15 +0,0 @@ -# Inplace operations (input and output buffer is the same) -try: - from ucryptolib import aes -except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 4, 1) -buf = bytearray(bytes(range(32))) -crypto.encrypt(buf, buf) -print(buf) - -crypto = aes(b"1234" * 4, 1) -crypto.decrypt(buf, buf) -print(buf) diff --git a/tests/extmod/ucryptolib_aes128_ecb_inpl.py.exp b/tests/extmod/ucryptolib_aes128_ecb_inpl.py.exp deleted file mode 100644 index b7f7bf5409..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb_inpl.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -bytearray(b'Iz\xfe9\x17\xac\xa4X\x12\x04\x10\xf5K~#\xc7\xac;\xf9\xc6E\xa8\xca~\xf1\xee\xd3f%\xf1\x8d\xfe') -bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f') diff --git a/tests/extmod/ucryptolib_aes128_ecb_into.py b/tests/extmod/ucryptolib_aes128_ecb_into.py deleted file mode 100644 index ff832d7ef3..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb_into.py +++ /dev/null @@ -1,16 +0,0 @@ -# Operations with pre-allocated output buffer -try: - from ucryptolib import aes -except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 4, 1) -enc = bytearray(32) -crypto.encrypt(bytes(range(32)), enc) -print(enc) - -crypto = aes(b"1234" * 4, 1) -dec = bytearray(32) -crypto.decrypt(enc, dec) -print(dec) diff --git a/tests/extmod/ucryptolib_aes128_ecb_into.py.exp b/tests/extmod/ucryptolib_aes128_ecb_into.py.exp deleted file mode 100644 index b7f7bf5409..0000000000 --- a/tests/extmod/ucryptolib_aes128_ecb_into.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -bytearray(b'Iz\xfe9\x17\xac\xa4X\x12\x04\x10\xf5K~#\xc7\xac;\xf9\xc6E\xa8\xca~\xf1\xee\xd3f%\xf1\x8d\xfe') -bytearray(b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f') diff --git a/tests/extmod/ucryptolib_aes256_cbc.py b/tests/extmod/ucryptolib_aes256_cbc.py deleted file mode 100644 index c01846f199..0000000000 --- a/tests/extmod/ucryptolib_aes256_cbc.py +++ /dev/null @@ -1,16 +0,0 @@ -try: - from Crypto.Cipher import AES - - aes = AES.new -except ImportError: - try: - from ucryptolib import aes - except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 8, 2, b"5678" * 4) -enc = crypto.encrypt(bytes(range(32))) -print(enc) -crypto = aes(b"1234" * 8, 2, b"5678" * 4) -print(crypto.decrypt(enc)) diff --git a/tests/extmod/ucryptolib_aes256_cbc.py.exp b/tests/extmod/ucryptolib_aes256_cbc.py.exp deleted file mode 100644 index 51262db9c6..0000000000 --- a/tests/extmod/ucryptolib_aes256_cbc.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -b'\xb4\x0b\xff\xdd\xfc\xb5\x03\x88[m\xc1\x01+:\x03M\x18\xb03\x0f\x971g\x10\xb1\x98>\x9b\x17\xb7-\xb2' -b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' diff --git a/tests/extmod/ucryptolib_aes256_ecb.py b/tests/extmod/ucryptolib_aes256_ecb.py deleted file mode 100644 index 0760063c14..0000000000 --- a/tests/extmod/ucryptolib_aes256_ecb.py +++ /dev/null @@ -1,16 +0,0 @@ -try: - from Crypto.Cipher import AES - - aes = AES.new -except ImportError: - try: - from ucryptolib import aes - except ImportError: - print("SKIP") - raise SystemExit - -crypto = aes(b"1234" * 8, 1) -enc = crypto.encrypt(bytes(range(32))) -print(enc) -crypto = aes(b"1234" * 8, 1) -print(crypto.decrypt(enc)) diff --git a/tests/extmod/ucryptolib_aes256_ecb.py.exp b/tests/extmod/ucryptolib_aes256_ecb.py.exp deleted file mode 100644 index a00a4eb2f5..0000000000 --- a/tests/extmod/ucryptolib_aes256_ecb.py.exp +++ /dev/null @@ -1,2 +0,0 @@ -b'\xe2\xe0\xdd\xef\xc3\xcd\x88/!>\xf6\xa2\xef/\xd15z+`\xb2\xb2\xd7}!:V>\xeb\x19\xbf|\xea' -b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f' diff --git a/tests/extmod/uctypes_sizeof_od.py b/tests/extmod/uctypes_sizeof_od.py index 2f070095b5..375f05f5e2 100644 --- a/tests/extmod/uctypes_sizeof_od.py +++ b/tests/extmod/uctypes_sizeof_od.py @@ -1,5 +1,5 @@ try: - from ucollections import OrderedDict + from collections import OrderedDict import uctypes except ImportError: print("SKIP") diff --git a/tests/extmod/uhashlib_final.py b/tests/extmod/uhashlib_final.py index f562cc1780..c8fdac9234 100644 --- a/tests/extmod/uhashlib_final.py +++ b/tests/extmod/uhashlib_final.py @@ -1,12 +1,12 @@ try: - import uhashlib + import hashlib except ImportError: print("SKIP") raise SystemExit for algo_name in ("md5", "sha1", "sha256"): - algo = getattr(uhashlib, algo_name, None) + algo = getattr(hashlib, algo_name, None) if not algo: continue diff --git a/tests/extmod/uhashlib_md5.py b/tests/extmod/uhashlib_md5.py index 07d5f31692..5f925fc97d 100644 --- a/tests/extmod/uhashlib_md5.py +++ b/tests/extmod/uhashlib_md5.py @@ -1,13 +1,10 @@ try: - import uhashlib as hashlib + import hashlib except ImportError: - try: - import hashlib - except ImportError: - # This is neither uPy, nor cPy, so must be uPy with - # uhashlib module disabled. - print("SKIP") - raise SystemExit + # This is neither uPy, nor cPy, so must be uPy with + # hashlib module disabled. + print("SKIP") + raise SystemExit try: hashlib.md5 diff --git a/tests/extmod/uhashlib_sha1.py b/tests/extmod/uhashlib_sha1.py index e6e6e30dc1..882f570843 100644 --- a/tests/extmod/uhashlib_sha1.py +++ b/tests/extmod/uhashlib_sha1.py @@ -1,13 +1,10 @@ try: - import uhashlib as hashlib + import hashlib except ImportError: - try: - import hashlib - except ImportError: - # This is neither uPy, nor cPy, so must be uPy with - # uhashlib module disabled. - print("SKIP") - raise SystemExit + # This is neither uPy, nor cPy, so must be uPy with + # hashlib module disabled. + print("SKIP") + raise SystemExit try: hashlib.sha1 diff --git a/tests/extmod/uhashlib_sha256.py b/tests/extmod/uhashlib_sha256.py index 5c6dfd0a75..a0629dbc47 100644 --- a/tests/extmod/uhashlib_sha256.py +++ b/tests/extmod/uhashlib_sha256.py @@ -1,13 +1,10 @@ try: - import uhashlib as hashlib + import hashlib except ImportError: - try: - import hashlib - except ImportError: - # This is neither uPy, nor cPy, so must be uPy with - # uhashlib module disabled. - print("SKIP") - raise SystemExit + # This is neither uPy, nor cPy, so must be uPy with + # hashlib module disabled. + print("SKIP") + raise SystemExit h = hashlib.sha256() diff --git a/tests/extmod/uheapq1.py b/tests/extmod/uheapq1.py index a470bb6f71..efe208dac3 100644 --- a/tests/extmod/uheapq1.py +++ b/tests/extmod/uheapq1.py @@ -1,11 +1,8 @@ try: - import uheapq as heapq -except: - try: - import heapq - except ImportError: - print("SKIP") - raise SystemExit + import heapq +except ImportError: + print("SKIP") + raise SystemExit try: heapq.heappop([]) diff --git a/tests/extmod/ujson_dump.py b/tests/extmod/ujson_dump.py index feda8a47dd..897d33cc81 100644 --- a/tests/extmod/ujson_dump.py +++ b/tests/extmod/ujson_dump.py @@ -1,13 +1,9 @@ try: - from uio import StringIO - import ujson as json -except: - try: - from io import StringIO - import json - except ImportError: - print("SKIP") - raise SystemExit + from io import StringIO + import json +except ImportError: + print("SKIP") + raise SystemExit s = StringIO() json.dump(False, s) diff --git a/tests/extmod/ujson_dump_iobase.py b/tests/extmod/ujson_dump_iobase.py index 7ecf23afb6..94d317b879 100644 --- a/tests/extmod/ujson_dump_iobase.py +++ b/tests/extmod/ujson_dump_iobase.py @@ -1,14 +1,10 @@ -# test ujson.dump in combination with uio.IOBase +# test json.dump in combination with io.IOBase try: - import uio as io - import ujson as json + import io, json except ImportError: - try: - import io, json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit if not hasattr(io, "IOBase"): print("SKIP") diff --git a/tests/extmod/ujson_dump_separators.py b/tests/extmod/ujson_dump_separators.py index e19b99a26d..4f8e56dceb 100644 --- a/tests/extmod/ujson_dump_separators.py +++ b/tests/extmod/ujson_dump_separators.py @@ -1,13 +1,9 @@ try: - from uio import StringIO - import ujson as json -except: - try: - from io import StringIO - import json - except ImportError: - print("SKIP") - raise SystemExit + from io import StringIO + import json +except ImportError: + print("SKIP") + raise SystemExit for sep in [ None, diff --git a/tests/extmod/ujson_dumps.py b/tests/extmod/ujson_dumps.py index 251b268755..16f144e44f 100644 --- a/tests/extmod/ujson_dumps.py +++ b/tests/extmod/ujson_dumps.py @@ -1,11 +1,8 @@ try: - import ujson as json + import json except ImportError: - try: - import json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit print(json.dumps(False)) print(json.dumps(True)) diff --git a/tests/extmod/ujson_dumps_extra.py b/tests/extmod/ujson_dumps_extra.py index f2aa7f249f..9074416a99 100644 --- a/tests/extmod/ujson_dumps_extra.py +++ b/tests/extmod/ujson_dumps_extra.py @@ -1,9 +1,9 @@ -# test uPy ujson behaviour that's not valid in CPy +# test uPy json behaviour that's not valid in CPy try: - import ujson + import json except ImportError: print("SKIP") raise SystemExit -print(ujson.dumps(b"1234")) +print(json.dumps(b"1234")) diff --git a/tests/extmod/ujson_dumps_float.py b/tests/extmod/ujson_dumps_float.py index 25681d0c23..25fbc5c512 100644 --- a/tests/extmod/ujson_dumps_float.py +++ b/tests/extmod/ujson_dumps_float.py @@ -1,11 +1,8 @@ try: - import ujson as json + import json except ImportError: - try: - import json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit print(json.dumps(1.2)) print(json.dumps({1.5: "hi"})) diff --git a/tests/extmod/ujson_dumps_ordereddict.py b/tests/extmod/ujson_dumps_ordereddict.py index c6f4a8fcb7..e1fa2a659c 100644 --- a/tests/extmod/ujson_dumps_ordereddict.py +++ b/tests/extmod/ujson_dumps_ordereddict.py @@ -1,12 +1,8 @@ try: - import ujson as json - from ucollections import OrderedDict + import json + from collections import OrderedDict except ImportError: - try: - import json - from collections import OrderedDict - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit print(json.dumps(OrderedDict(((1, 2), (3, 4))))) diff --git a/tests/extmod/ujson_dumps_separators.py b/tests/extmod/ujson_dumps_separators.py index efb541fe8b..a3a9ec308f 100644 --- a/tests/extmod/ujson_dumps_separators.py +++ b/tests/extmod/ujson_dumps_separators.py @@ -1,11 +1,8 @@ try: - import ujson as json + import json except ImportError: - try: - import json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit for sep in [ None, diff --git a/tests/extmod/ujson_load.py b/tests/extmod/ujson_load.py index 7cec9246b8..b2c7733282 100644 --- a/tests/extmod/ujson_load.py +++ b/tests/extmod/ujson_load.py @@ -1,13 +1,9 @@ try: - from uio import StringIO - import ujson as json -except: - try: - from io import StringIO - import json - except ImportError: - print("SKIP") - raise SystemExit + from io import StringIO + import json +except ImportError: + print("SKIP") + raise SystemExit print(json.load(StringIO("null"))) print(json.load(StringIO('"abc\\u0064e"'))) diff --git a/tests/extmod/ujson_load_readinto.py b/tests/extmod/ujson_load_readinto.py index 001aa4fb2c..25e5c6cc0c 100644 --- a/tests/extmod/ujson_load_readinto.py +++ b/tests/extmod/ujson_load_readinto.py @@ -1,4 +1,4 @@ -import ujson as json +import json # Test that json can load from any object with readinto diff --git a/tests/extmod/ujson_loads.py b/tests/extmod/ujson_loads.py index 2de9cdcbc1..f9073c121e 100644 --- a/tests/extmod/ujson_loads.py +++ b/tests/extmod/ujson_loads.py @@ -1,11 +1,8 @@ try: - import ujson as json + import json except ImportError: - try: - import json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def my_print(o): diff --git a/tests/extmod/ujson_loads_bytes.py b/tests/extmod/ujson_loads_bytes.py index 3ee87bbcd5..45cd0a35c5 100644 --- a/tests/extmod/ujson_loads_bytes.py +++ b/tests/extmod/ujson_loads_bytes.py @@ -1,13 +1,10 @@ # test loading from bytes and bytearray (introduced in Python 3.6) try: - import ujson as json + import json except ImportError: - try: - import json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit print(json.loads(b"[1,2]")) print(json.loads(bytearray(b"[null]"))) diff --git a/tests/extmod/ujson_loads_float.py b/tests/extmod/ujson_loads_float.py index 842718f37d..2a8402dc6a 100644 --- a/tests/extmod/ujson_loads_float.py +++ b/tests/extmod/ujson_loads_float.py @@ -1,11 +1,8 @@ try: - import ujson as json + import json except ImportError: - try: - import json - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def my_print(o): diff --git a/tests/extmod/umsgpack_pack.py b/tests/extmod/umsgpack_pack.py index 7ea5ae8d6a..511ee642dd 100644 --- a/tests/extmod/umsgpack_pack.py +++ b/tests/extmod/umsgpack_pack.py @@ -1,13 +1,9 @@ try: - from uio import BytesIO - import umsgpack as msgpack -except: - try: - from io import BytesIO - import msgpack - except ImportError: - print("SKIP") - raise SystemExit + from io import BytesIO + import msgpack +except ImportError: + print("SKIP") + raise SystemExit b = BytesIO() msgpack.pack(False, s) diff --git a/tests/extmod/urandom_basic.py b/tests/extmod/urandom_basic.py index f7f5a6d691..e42373e30d 100644 --- a/tests/extmod/urandom_basic.py +++ b/tests/extmod/urandom_basic.py @@ -1,5 +1,5 @@ try: - import urandom as random + import random except ImportError: try: import random diff --git a/tests/extmod/urandom_extra.py b/tests/extmod/urandom_extra.py index 78e17379dc..aa05053377 100644 --- a/tests/extmod/urandom_extra.py +++ b/tests/extmod/urandom_extra.py @@ -1,11 +1,8 @@ try: - import urandom as random + import random except ImportError: - try: - import random - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: random.randint diff --git a/tests/extmod/urandom_extra_float.py b/tests/extmod/urandom_extra_float.py index 65918da136..3b37ed8dce 100644 --- a/tests/extmod/urandom_extra_float.py +++ b/tests/extmod/urandom_extra_float.py @@ -1,11 +1,8 @@ try: - import urandom as random + import random except ImportError: - try: - import random - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: random.randint diff --git a/tests/extmod/urandom_seed_default.py b/tests/extmod/urandom_seed_default.py index a032b9362b..241649c14b 100644 --- a/tests/extmod/urandom_seed_default.py +++ b/tests/extmod/urandom_seed_default.py @@ -1,13 +1,10 @@ # test urandom.seed() without any arguments try: - import urandom as random + import random except ImportError: - try: - import random - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: random.seed() diff --git a/tests/extmod/ure1.py b/tests/extmod/ure1.py index a75b2e8b70..32a71acc21 100644 --- a/tests/extmod/ure1.py +++ b/tests/extmod/ure1.py @@ -1,11 +1,8 @@ try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit r = re.compile(".+") m = r.match("abc") diff --git a/tests/extmod/ure_debug.py b/tests/extmod/ure_debug.py index 7a07ede2d4..0f4c95551f 100644 --- a/tests/extmod/ure_debug.py +++ b/tests/extmod/ure_debug.py @@ -1,10 +1,10 @@ # test printing debugging info when compiling try: - import ure + import re - ure.DEBUG + re.DEBUG except (ImportError, AttributeError): print("SKIP") raise SystemExit -ure.compile("^a|b[0-9]\w$", ure.DEBUG) +re.compile("^a|b[0-9]\w$", re.DEBUG) diff --git a/tests/extmod/ure_error.py b/tests/extmod/ure_error.py index 52a96b7c03..f61d091328 100644 --- a/tests/extmod/ure_error.py +++ b/tests/extmod/ure_error.py @@ -1,13 +1,10 @@ # test errors in regex try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def test_re(r): diff --git a/tests/extmod/ure_group.py b/tests/extmod/ure_group.py index 41425dd623..06c9ccfb2d 100644 --- a/tests/extmod/ure_group.py +++ b/tests/extmod/ure_group.py @@ -1,13 +1,10 @@ # test groups, and nested groups try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def print_groups(match): diff --git a/tests/extmod/ure_groups.py b/tests/extmod/ure_groups.py index 7da072a920..840a4b1af1 100644 --- a/tests/extmod/ure_groups.py +++ b/tests/extmod/ure_groups.py @@ -1,13 +1,10 @@ # test match.groups() try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: m = re.match(".", "a") diff --git a/tests/extmod/ure_limit.py b/tests/extmod/ure_limit.py index 99c6a818e8..e0531afbdc 100644 --- a/tests/extmod/ure_limit.py +++ b/tests/extmod/ure_limit.py @@ -1,7 +1,7 @@ -# Test overflow in ure.compile output code. +# Test overflow in re.compile output code. try: - import ure as re + import re except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ure_namedclass.py b/tests/extmod/ure_namedclass.py index 00d58ad98a..d2df7f23af 100644 --- a/tests/extmod/ure_namedclass.py +++ b/tests/extmod/ure_namedclass.py @@ -1,13 +1,10 @@ # test named char classes try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def print_groups(match): diff --git a/tests/extmod/ure_span.py b/tests/extmod/ure_span.py index 03a3fef9f3..d00ef957a1 100644 --- a/tests/extmod/ure_span.py +++ b/tests/extmod/ure_span.py @@ -1,13 +1,10 @@ # test match.span(), and nested spans try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: m = re.match(".", "a") diff --git a/tests/extmod/ure_split.py b/tests/extmod/ure_split.py index 7e6ef3990f..7769e1a121 100644 --- a/tests/extmod/ure_split.py +++ b/tests/extmod/ure_split.py @@ -1,11 +1,8 @@ try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit r = re.compile(" ") s = r.split("a b c foobar") diff --git a/tests/extmod/ure_split_empty.py b/tests/extmod/ure_split_empty.py index 76ce97ea67..d386672308 100644 --- a/tests/extmod/ure_split_empty.py +++ b/tests/extmod/ure_split_empty.py @@ -1,11 +1,11 @@ # test splitting with pattern matches that can be empty # -# CPython 3.5 issues a FutureWarning for these tests because their -# behaviour will change in a future version. MicroPython just stops +# CPython 3.5 issues a FutreWarning for these tests because their +# behaviour will change in a futre version. MicroPython just stops # splitting as soon as an empty match is found. try: - import ure as re + import re except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ure_split_notimpl.py b/tests/extmod/ure_split_notimpl.py index 51bad791ef..7ddec9fa03 100644 --- a/tests/extmod/ure_split_notimpl.py +++ b/tests/extmod/ure_split_notimpl.py @@ -1,5 +1,5 @@ try: - import ure as re + import re except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/ure_stack_overflow.py b/tests/extmod/ure_stack_overflow.py index d3ce0c5a7b..90fb8296b1 100644 --- a/tests/extmod/ure_stack_overflow.py +++ b/tests/extmod/ure_stack_overflow.py @@ -1,11 +1,8 @@ try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: re.match("(a*)*", "aaa") diff --git a/tests/extmod/ure_sub.py b/tests/extmod/ure_sub.py index 806c389576..253b2dc482 100644 --- a/tests/extmod/ure_sub.py +++ b/tests/extmod/ure_sub.py @@ -1,11 +1,8 @@ try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: re.sub @@ -76,6 +73,6 @@ except TypeError: # Include \ in the sub replacement print(re.sub("b", "\\\\b", "abc")) -# Using ^, make sure it doesn't repeatedly match +# Using ^, make sre it doesn't repeatedly match print(re.sub("^ab", "*", "abababcabab")) print(re.sub("^ab|cab", "*", "abababcabab")) diff --git a/tests/extmod/ure_sub_unmatched.py b/tests/extmod/ure_sub_unmatched.py index d6312bfc2c..c238a7ed64 100644 --- a/tests/extmod/ure_sub_unmatched.py +++ b/tests/extmod/ure_sub_unmatched.py @@ -1,13 +1,10 @@ # test re.sub with unmatched groups, behaviour changed in CPython 3.5 try: - import ure as re + import re except ImportError: - try: - import re - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: re.sub diff --git a/tests/extmod/uselect_poll_basic.py b/tests/extmod/uselect_poll_basic.py deleted file mode 100644 index 97fbd6fd15..0000000000 --- a/tests/extmod/uselect_poll_basic.py +++ /dev/null @@ -1,42 +0,0 @@ -try: - import usocket as socket, uselect as select, uerrno as errno -except ImportError: - try: - import socket, select, errno - - select.poll # Raises AttributeError for CPython implementations without poll() - except (ImportError, AttributeError): - print("SKIP") - raise SystemExit - - -poller = select.poll() - -s = socket.socket() - -poller.register(s) -# https://docs.python.org/3/library/select.html#select.poll.register -# "Registering a file descriptor that’s already registered is not an error, -# and has the same effect as registering the descriptor exactly once." -poller.register(s) - -# 2 args are mandatory unlike register() -try: - poller.modify(s) -except TypeError: - print("modify:TypeError") - -poller.modify(s, select.POLLIN) - -poller.unregister(s) - -try: - poller.modify(s, select.POLLIN) -except OSError as e: - assert e.errno == errno.ENOENT - -# poll after closing the socket, should return POLLNVAL -poller.register(s) -s.close() -p = poller.poll(0) -print(len(p), p[0][-1]) diff --git a/tests/extmod/uselect_poll_udp.py b/tests/extmod/uselect_poll_udp.py deleted file mode 100644 index 2a56a122b5..0000000000 --- a/tests/extmod/uselect_poll_udp.py +++ /dev/null @@ -1,30 +0,0 @@ -# test select.poll on UDP sockets - -try: - import usocket as socket, uselect as select -except ImportError: - try: - import socket, select - - select.poll # Raises AttributeError for CPython implementations without poll() - except (ImportError, AttributeError): - print("SKIP") - raise SystemExit - - -s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) -s.bind(socket.getaddrinfo("127.0.0.1", 8000)[0][-1]) -poll = select.poll() - -# UDP socket should not be readable -poll.register(s, select.POLLIN) -print(len(poll.poll(0))) - -# UDP socket should be writable -poll.modify(s, select.POLLOUT) -print(poll.poll(0)[0][1] == select.POLLOUT) - -# same test for select.select, but just skip it if the function isn't available -if hasattr(select, "select"): - r, w, e = select.select([s], [], [], 0) - assert not r and not w and not e diff --git a/tests/extmod/usocket_tcp_basic.py b/tests/extmod/usocket_tcp_basic.py deleted file mode 100644 index c2fe8cd14c..0000000000 --- a/tests/extmod/usocket_tcp_basic.py +++ /dev/null @@ -1,17 +0,0 @@ -# Test basic, stand-alone TCP socket functionality - -try: - import usocket as socket, uerrno as errno -except ImportError: - try: - import socket, errno - except ImportError: - print("SKIP") - raise SystemExit - -# recv() on a fresh socket should raise ENOTCONN -s = socket.socket() -try: - s.recv(1) -except OSError as er: - print("ENOTCONN:", er.errno == errno.ENOTCONN) diff --git a/tests/extmod/usocket_udp_nonblock.py b/tests/extmod/usocket_udp_nonblock.py deleted file mode 100644 index bc560de142..0000000000 --- a/tests/extmod/usocket_udp_nonblock.py +++ /dev/null @@ -1,20 +0,0 @@ -# test non-blocking UDP sockets - -try: - import usocket as socket, uerrno as errno -except ImportError: - try: - import socket, errno - except ImportError: - print("SKIP") - raise SystemExit - - -s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) -s.bind(socket.getaddrinfo("127.0.0.1", 8000)[0][-1]) -s.settimeout(0) - -try: - s.recv(1) -except OSError as er: - print("EAGAIN:", er.errno == errno.EAGAIN) diff --git a/tests/extmod/ussl_basic.py b/tests/extmod/ussl_basic.py deleted file mode 100644 index 9e1821dca9..0000000000 --- a/tests/extmod/ussl_basic.py +++ /dev/null @@ -1,60 +0,0 @@ -# very basic test of ssl module, just to test the methods exist - -try: - import uio as io - import ussl as ssl -except ImportError: - print("SKIP") - raise SystemExit - -# create in client mode -try: - ss = ssl.wrap_socket(io.BytesIO(), server_hostname="test.example.com") -except OSError as er: - print("wrap_socket:", repr(er)) - -# create in server mode (can use this object for further tests) -socket = io.BytesIO() -ss = ssl.wrap_socket(socket, server_side=1) - -# print -print(repr(ss)[:12]) - -# setblocking() propagates call to the underlying stream object, and -# io.BytesIO doesn't have setblocking() (in CPython too). -# try: -# ss.setblocking(False) -# except NotImplementedError: -# print('setblocking: NotImplementedError') -# ss.setblocking(True) - -# write -print(ss.write(b"aaaa")) - -# read (underlying socket has no data) -print(ss.read(8)) - -# read (underlying socket has data, but it's bad data) -socket.write(b"aaaaaaaaaaaaaaaa") -socket.seek(0) -try: - ss.read(8) -except OSError as er: - print("read:", repr(er)) - -# close -ss.close() -# close 2nd time -ss.close() - -# read on closed socket -try: - ss.read(10) -except OSError as er: - print("read:", repr(er)) - -# write on closed socket -try: - ss.write(b"aaaa") -except OSError as er: - print("write:", repr(er)) diff --git a/tests/extmod/ussl_basic.py.exp b/tests/extmod/ussl_basic.py.exp deleted file mode 100644 index eb7df855aa..0000000000 --- a/tests/extmod/ussl_basic.py.exp +++ /dev/null @@ -1,7 +0,0 @@ -wrap_socket: OSError(-256, 'CONN_LOST') -<_SSLSocket -4 -b'' -read: OSError(-261,) -read: OSError(9,) -write: OSError(9,) diff --git a/tests/extmod/ussl_keycert.py b/tests/extmod/ussl_keycert.py deleted file mode 100644 index 87a40a1e55..0000000000 --- a/tests/extmod/ussl_keycert.py +++ /dev/null @@ -1,28 +0,0 @@ -# Test ussl with key/cert passed in - -try: - import uio as io - import ussl as ssl -except ImportError: - print("SKIP") - raise SystemExit - -key = b"0\x82\x019\x02\x01\x00\x02A\x00\xf9\xe0}\xbd\xd7\x9cI\x18\x06\xc3\xcb\xb5\xec@r\xfbD\x18\x80\xaaWoZ{\xcc\xa3\xeb!\"\x0fY\x9e]-\xee\xe4\t!BY\x9f{7\xf3\xf2\x8f}}\r|.\xa8<\ta\xb2\xd7W\xb3\xc9\x19A\xc39\x02\x03\x01\x00\x01\x02@\x07:\x9fh\xa6\x9c6\xe1#\x10\xf7\x0b\xc4Q\xf9\x01\x9b\xee\xb9\x8a4\r\\\xa8\xc8:\xd5\xca\x97\x99\xaa\x16\x04)\xa8\xf9\x13\xdeq\x0ev`\xa7\x83\xc5\x8b`\xdb\xef \x9d\x93\xe8g\x84\x96\xfaV\\\xf4R\xda\xd0\xa1\x02!\x00\xfeR\xbf\n\x91Su\x87L\x98{\xeb%\xed\xfb\x06u)@\xfe\x1b\xde\xa0\xc6@\xab\xc5\xedg\x8e\x10[\x02!\x00\xfb\x86=\x85\xa4'\xde\x85\xb5L\xe0)\x99\xfaL\x8c3A\x02\xa8<\xdew\xad\x00\xe3\x1d\x05\xd8\xb4N\xfb\x02 \x08\xb0M\x04\x90hx\x88q\xcew\xd5U\xcbf\x9b\x16\xdf\x9c\xef\xd1\x85\xee\x9a7Ug\x02\xb0Z\x03'\x02 9\xa0D\xe2$|\xf9\xefz]5\x92rs\xb5+\xfd\xe6,\x1c\xadmn\xcf\xd5?3|\x0em)\x17\x02 5Z\xcc/\xa5?\n\x04%\x9b{N\x9dX\xddI\xbe\xd2\xb0\xa0\x03BQ\x02\x82\xc2\xe0u)\xbd\xb8\xaf" - -# Invalid key -try: - ssl.wrap_socket(io.BytesIO(), key=b"!") -except ValueError as er: - print(repr(er)) - -# Valid key, no cert -try: - ssl.wrap_socket(io.BytesIO(), key=key) -except TypeError as er: - print(repr(er)) - -# Valid key, invalid cert -try: - ssl.wrap_socket(io.BytesIO(), key=key, cert=b"!") -except ValueError as er: - print(repr(er)) diff --git a/tests/extmod/ussl_keycert.py.exp b/tests/extmod/ussl_keycert.py.exp deleted file mode 100644 index b72d319c6a..0000000000 --- a/tests/extmod/ussl_keycert.py.exp +++ /dev/null @@ -1,3 +0,0 @@ -ValueError('invalid key',) -TypeError("can't convert 'NoneType' object to str implicitly",) -ValueError('invalid cert',) diff --git a/tests/extmod/utime_res.py b/tests/extmod/utime_res.py index 4b62433483..548bef1f17 100644 --- a/tests/extmod/utime_res.py +++ b/tests/extmod/utime_res.py @@ -1,18 +1,18 @@ -# test utime resolutions +# test time resolutions try: - import utime + import time except ImportError: print("SKIP") raise SystemExit def gmtime_time(): - return utime.gmtime(utime.time()) + return time.gmtime(time.time()) def localtime_time(): - return utime.localtime(utime.time()) + return time.localtime(time.time()) def test(): @@ -32,12 +32,12 @@ def test(): # call time functions results_map = {} - end_time = utime.ticks_ms() + TEST_TIME - while utime.ticks_diff(end_time, utime.ticks_ms()) > 0: - utime.sleep_ms(100) + end_time = time.ticks_ms() + TEST_TIME + while time.ticks_diff(end_time, time.ticks_ms()) > 0: + time.sleep_ms(100) for func_name, _ in EXPECTED_MAP: try: - time_func = getattr(utime, func_name, None) or globals()[func_name] + time_func = getattr(time, func_name, None) or globals()[func_name] now = time_func() # may raise AttributeError except (KeyError, AttributeError): continue diff --git a/tests/extmod/utime_time_ns.py b/tests/extmod/utime_time_ns.py index 0d13f839d4..3ef58e56a9 100644 --- a/tests/extmod/utime_time_ns.py +++ b/tests/extmod/utime_time_ns.py @@ -1,18 +1,18 @@ -# test utime.time_ns() +# test time.time_ns() try: - import utime + import time - utime.sleep_us - utime.time_ns + time.sleep_us + time.time_ns except (ImportError, AttributeError): print("SKIP") raise SystemExit -t0 = utime.time_ns() -utime.sleep_us(5000) -t1 = utime.time_ns() +t0 = time.time_ns() +time.sleep_us(5000) +t1 = time.time_ns() # Check that time_ns increases. print(t0 < t1) diff --git a/tests/extmod/utimeq1.py b/tests/extmod/utimeq1.py deleted file mode 100644 index 688e5b834f..0000000000 --- a/tests/extmod/utimeq1.py +++ /dev/null @@ -1,146 +0,0 @@ -# Test for utimeq module which implements task queue with support for -# wraparound time (utime.ticks_ms() style). -try: - from utime import ticks_add, ticks_diff - from utimeq import utimeq -except ImportError: - print("SKIP") - raise SystemExit - -DEBUG = 0 - -MAX = ticks_add(0, -1) -MODULO_HALF = MAX // 2 + 1 - -if DEBUG: - - def dprint(*v): - print(*v) - -else: - - def dprint(*v): - pass - - -# Try not to crash on invalid data -h = utimeq(10) -try: - h.push(1) - assert False -except TypeError: - pass - -try: - h.pop(1) - assert False -except IndexError: - pass - -# unsupported unary op -try: - ~h - assert False -except TypeError: - pass - -# pushing on full queue -h = utimeq(1) -h.push(1, 0, 0) -try: - h.push(2, 0, 0) - assert False -except IndexError: - pass - -# popping into invalid type -try: - h.pop([]) - assert False -except TypeError: - pass - -# length -assert len(h) == 1 - -# peektime -assert h.peektime() == 1 - -# peektime with empty queue -try: - utimeq(1).peektime() - assert False -except IndexError: - pass - - -def pop_all(h): - l = [] - while h: - item = [0, 0, 0] - h.pop(item) - # print("!", item) - l.append(tuple(item)) - dprint(l) - return l - - -def add(h, v): - h.push(v, 0, 0) - dprint("-----") - # h.dump() - dprint("-----") - - -h = utimeq(10) -add(h, 0) -add(h, MAX) -add(h, MAX - 1) -add(h, 101) -add(h, 100) -add(h, MAX - 2) -dprint(h) -l = pop_all(h) -for i in range(len(l) - 1): - diff = ticks_diff(l[i + 1][0], l[i][0]) - assert diff > 0 - - -def edge_case(edge, offset): - h = utimeq(10) - add(h, ticks_add(0, offset)) - add(h, ticks_add(edge, offset)) - dprint(h) - l = pop_all(h) - diff = ticks_diff(l[1][0], l[0][0]) - dprint(diff, diff > 0) - return diff - - -dprint("===") -diff = edge_case(MODULO_HALF - 1, 0) -assert diff == MODULO_HALF - 1 -assert edge_case(MODULO_HALF - 1, 100) == diff -assert edge_case(MODULO_HALF - 1, -100) == diff - -# We expect diff to be always positive, per the definition of heappop() which should return -# the smallest value. -# This is the edge case where this invariant breaks, due to asymmetry of two's-complement -# range - there's one more negative integer than positive, so heappushing values like below -# will then make ticks_diff() return the minimum negative value. We could make heappop -# return them in a different order, but ticks_diff() result would be the same. Conclusion: -# never add to a heap values where (a - b) == MODULO_HALF (and which are >= MODULO_HALF -# ticks apart in real time of course). -dprint("===") -diff = edge_case(MODULO_HALF, 0) -assert diff == -MODULO_HALF -assert edge_case(MODULO_HALF, 100) == diff -assert edge_case(MODULO_HALF, -100) == diff - -dprint("===") -diff = edge_case(MODULO_HALF + 1, 0) -assert diff == MODULO_HALF - 1 -assert edge_case(MODULO_HALF + 1, 100) == diff -assert edge_case(MODULO_HALF + 1, -100) == diff - -print("OK") diff --git a/tests/extmod/utimeq1.py.exp b/tests/extmod/utimeq1.py.exp deleted file mode 100644 index d86bac9de5..0000000000 --- a/tests/extmod/utimeq1.py.exp +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/tests/extmod/utimeq_stable.py b/tests/extmod/utimeq_stable.py deleted file mode 100644 index 9fb522d514..0000000000 --- a/tests/extmod/utimeq_stable.py +++ /dev/null @@ -1,22 +0,0 @@ -try: - from utimeq import utimeq -except ImportError: - print("SKIP") - raise SystemExit - -h = utimeq(10) - -# Check that for 2 same-key items, the queue is stable (pops items -# in the same order they were pushed). Unfortunately, this no longer -# holds for more same-key values, as the underlying heap structure -# is not stable itself. -h.push(100, 20, 0) -h.push(100, 10, 0) - -res = [0, 0, 0] -h.pop(res) -assert res == [100, 20, 0] -h.pop(res) -assert res == [100, 10, 0] - -print("OK") diff --git a/tests/extmod/utimeq_stable.py.exp b/tests/extmod/utimeq_stable.py.exp deleted file mode 100644 index d86bac9de5..0000000000 --- a/tests/extmod/utimeq_stable.py.exp +++ /dev/null @@ -1 +0,0 @@ -OK diff --git a/tests/extmod/uzlib_decompio.py b/tests/extmod/uzlib_decompio.py index 6a0aae8bcd..ce3b7f4a99 100644 --- a/tests/extmod/uzlib_decompio.py +++ b/tests/extmod/uzlib_decompio.py @@ -1,10 +1,16 @@ try: - import uzlib as zlib - import uio as io + import zlib + import io except ImportError: print("SKIP") raise SystemExit +try: + zlib.decompIO +except AttributeError: + print("SKIP") + raise SystemExit + # Raw DEFLATE bitstream buf = io.BytesIO(b"\xcbH\xcd\xc9\xc9\x07\x00") diff --git a/tests/extmod/uzlib_decompio_gz.py b/tests/extmod/uzlib_decompio_gz.py index 1bc8ba885b..348bf2678d 100644 --- a/tests/extmod/uzlib_decompio_gz.py +++ b/tests/extmod/uzlib_decompio_gz.py @@ -1,10 +1,16 @@ try: - import uzlib as zlib - import uio as io + import zlib + import io except ImportError: print("SKIP") raise SystemExit +try: + zlib.decompIO +except AttributeError: + print("SKIP") + raise SystemExit + # gzip bitstream buf = io.BytesIO( diff --git a/tests/extmod/uzlib_decompress.py b/tests/extmod/uzlib_decompress.py index 8d4a9640b4..b72ee96ea8 100644 --- a/tests/extmod/uzlib_decompress.py +++ b/tests/extmod/uzlib_decompress.py @@ -1,11 +1,8 @@ try: import zlib except ImportError: - try: - import uzlib as zlib - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit PATTERNS = [ # Packed results produced by CPy's zlib.compress() diff --git a/tests/extmod/vfs_basic.py b/tests/extmod/vfs_basic.py index 9a9ef2ca61..028846406a 100644 --- a/tests/extmod/vfs_basic.py +++ b/tests/extmod/vfs_basic.py @@ -1,9 +1,9 @@ # test VFS functionality without any particular filesystem type try: - import uos + import os - uos.mount + os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -59,35 +59,35 @@ class Filesystem: # first we umount any existing mount points the target may have try: - uos.umount("/") + os.umount("/") except OSError: pass -for path in uos.listdir("/"): - uos.umount("/" + path) +for path in os.listdir("/"): + os.umount("/" + path) # stat root dir -print(uos.stat("/")) +print(os.stat("/")) # statvfs root dir; verify that f_namemax has a sensible size -print(uos.statvfs("/")[9] >= 32) +print(os.statvfs("/")[9] >= 32) # getcwd when in root dir -print(uos.getcwd()) +print(os.getcwd()) # test operations on the root directory with nothing mounted, they should all fail for func in ("chdir", "listdir", "mkdir", "remove", "rmdir", "stat"): for arg in ("x", "/x"): try: - getattr(uos, func)(arg) + getattr(os, func)(arg) except OSError: print(func, arg, "OSError") # basic mounting and listdir -uos.mount(Filesystem(1), "/test_mnt") -print(uos.listdir()) +os.mount(Filesystem(1), "/test_mnt") +print(os.listdir()) # ilistdir -i = uos.ilistdir() +i = os.ilistdir() print(next(i)) try: next(i) @@ -99,88 +99,88 @@ except StopIteration: print("StopIteration") # referencing the mount point in different ways -print(uos.listdir("test_mnt")) -print(uos.listdir("/test_mnt")) +print(os.listdir("test_mnt")) +print(os.listdir("/test_mnt")) # mounting another filesystem -uos.mount(Filesystem(2), "/test_mnt2", readonly=True) -print(uos.listdir()) -print(uos.listdir("/test_mnt2")) +os.mount(Filesystem(2), "/test_mnt2", readonly=True) +print(os.listdir()) +print(os.listdir("/test_mnt2")) # mounting over an existing mount point try: - uos.mount(Filesystem(3), "/test_mnt2") + os.mount(Filesystem(3), "/test_mnt2") except OSError: print("OSError") # mkdir of a mount point try: - uos.mkdir("/test_mnt") + os.mkdir("/test_mnt") except OSError: print("OSError") # rename across a filesystem try: - uos.rename("/test_mnt/a", "/test_mnt2/b") + os.rename("/test_mnt/a", "/test_mnt2/b") except OSError: print("OSError") # delegating to mounted filesystem -uos.chdir("test_mnt") -print(uos.listdir()) -print(uos.getcwd()) -uos.mkdir("test_dir") -uos.remove("test_file") -uos.rename("test_file", "test_file2") -uos.rmdir("test_dir") -print(uos.stat("test_file")) -print(uos.statvfs("/test_mnt")) +os.chdir("test_mnt") +print(os.listdir()) +print(os.getcwd()) +os.mkdir("test_dir") +os.remove("test_file") +os.rename("test_file", "test_file2") +os.rmdir("test_dir") +print(os.stat("test_file")) +print(os.statvfs("/test_mnt")) open("test_file") open("test_file", "wb") # umount -uos.umount("/test_mnt") -uos.umount("/test_mnt2") +os.umount("/test_mnt") +os.umount("/test_mnt2") # umount a non-existent mount point try: - uos.umount("/test_mnt") + os.umount("/test_mnt") except OSError: print("OSError") # root dir -uos.mount(Filesystem(3), "/") -print(uos.stat("/")) -print(uos.statvfs("/")) -print(uos.listdir()) +os.mount(Filesystem(3), "/") +print(os.stat("/")) +print(os.statvfs("/")) +print(os.listdir()) open("test") -uos.mount(Filesystem(4), "/mnt") -print(uos.listdir()) -print(uos.listdir("/mnt")) -uos.chdir("/mnt") -print(uos.listdir()) +os.mount(Filesystem(4), "/mnt") +print(os.listdir()) +print(os.listdir("/mnt")) +os.chdir("/mnt") +print(os.listdir()) # chdir to a subdir within root-mounted vfs, and then listdir -uos.chdir("/subdir") -print(uos.listdir()) -uos.chdir("/") +os.chdir("/subdir") +print(os.listdir()) +os.chdir("/") -uos.umount("/") -print(uos.listdir("/")) -uos.umount("/mnt") +os.umount("/") +print(os.listdir("/")) +os.umount("/mnt") # chdir to a non-existent mount point (current directory should remain unchanged) try: - uos.chdir("/foo") + os.chdir("/foo") except OSError: print("OSError") -print(uos.getcwd()) +print(os.getcwd()) # chdir to a non-existent subdirectory in a mounted filesystem -uos.mount(Filesystem(5, 1), "/mnt") +os.mount(Filesystem(5, 1), "/mnt") try: - uos.chdir("/mnt/subdir") + os.chdir("/mnt/subdir") except OSError: print("OSError") -print(uos.getcwd()) +print(os.getcwd()) diff --git a/tests/extmod/vfs_blockdev.py b/tests/extmod/vfs_blockdev.py index e24169ba93..333ac7f183 100644 --- a/tests/extmod/vfs_blockdev.py +++ b/tests/extmod/vfs_blockdev.py @@ -1,10 +1,10 @@ # Test for behaviour of combined standard and extended block device try: - import uos + import os - uos.VfsFat - uos.VfsLfs2 + os.VfsFat + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -70,5 +70,5 @@ except MemoryError: print("SKIP") raise SystemExit -test(bdev, uos.VfsFat) -test(bdev, uos.VfsLfs2) +test(bdev, os.VfsFat) +test(bdev, os.VfsLfs2) diff --git a/tests/extmod/vfs_fat_case.py b/tests/extmod/vfs_fat_case.py index cb02264dcb..bf2c18ea69 100644 --- a/tests/extmod/vfs_fat_case.py +++ b/tests/extmod/vfs_fat_case.py @@ -1,8 +1,8 @@ -import errno as uerrno -import os as uos +import errno +import os as os try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -40,10 +40,10 @@ except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) -vfs = uos.VfsFat(bdev) -uos.mount(vfs, "/ramdisk") -uos.chdir("/ramdisk") +os.VfsFat.mkfs(bdev) +vfs = os.VfsFat(bdev) +os.mount(vfs, "/ramdisk") +os.chdir("/ramdisk") vfs.label = "labelæ" # This label would normally be LABELÆ but our limited upper casing does "LABELæ" @@ -51,22 +51,22 @@ print(vfs.label) # Check ASCII case-insensitivity vfs.mkdir("fooaz") -print(uos.listdir("")) +print(os.listdir("")) vfs.rmdir("fOOAZ") # Check ASCII case-insensitivity for long names (8+ characters) vfs.mkdir("123456789fooaz") -print(uos.listdir("")) +print(os.listdir("")) vfs.rmdir("123456789fOOAZ") # Characters outside of a-z are case sensitive. vfs.mkdir("extended_æ") -print(uos.listdir("")) +print(os.listdir("")) # Normally this would work ok. With our limited uppercasing, it won't. try: vfs.rmdir("extended_Æ") except OSError as e: - print(e.errno == uerrno.ENOENT) + print(e.errno == errno.ENOENT) vfs.rmdir("extended_æ") diff --git a/tests/extmod/vfs_fat_fileio1.py b/tests/extmod/vfs_fat_fileio1.py index 935f01d24f..3bc85af9f8 100644 --- a/tests/extmod/vfs_fat_fileio1.py +++ b/tests/extmod/vfs_fat_fileio1.py @@ -1,12 +1,12 @@ try: - import uerrno - import uos + import errno + import os except ImportError: print("SKIP") raise SystemExit try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -43,10 +43,10 @@ except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) -vfs = uos.VfsFat(bdev) -uos.mount(vfs, "/ramdisk") -uos.chdir("/ramdisk") +os.VfsFat.mkfs(bdev) +vfs = os.VfsFat(bdev) +os.mount(vfs, "/ramdisk") +os.chdir("/ramdisk") # file IO f = open("foo_file.txt", "w") @@ -58,22 +58,22 @@ f.close() # allowed try: f.write("world!") except OSError as e: - print(e.errno == uerrno.EINVAL) + print(e.errno == errno.EINVAL) try: f.read() except OSError as e: - print(e.errno == uerrno.EINVAL) + print(e.errno == errno.EINVAL) try: f.flush() except OSError as e: - print(e.errno == uerrno.EINVAL) + print(e.errno == errno.EINVAL) try: open("foo_file.txt", "x") except OSError as e: - print(e.errno == uerrno.EEXIST) + print(e.errno == errno.EEXIST) with open("foo_file.txt", "a") as f: f.write("world!") @@ -105,7 +105,7 @@ vfs.mkdir("foo_dir") try: vfs.rmdir("foo_file.txt") except OSError as e: - print(e.errno == 20) # uerrno.ENOTDIR + print(e.errno == 20) # errno.ENOTDIR vfs.remove("foo_file.txt") print(list(vfs.ilistdir())) diff --git a/tests/extmod/vfs_fat_fileio2.py b/tests/extmod/vfs_fat_fileio2.py index 6094b5a6f1..e243f2839b 100644 --- a/tests/extmod/vfs_fat_fileio2.py +++ b/tests/extmod/vfs_fat_fileio2.py @@ -1,12 +1,12 @@ try: - import uerrno - import uos + import errno + import os except ImportError: print("SKIP") raise SystemExit try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -44,35 +44,35 @@ except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) -vfs = uos.VfsFat(bdev) -uos.mount(vfs, "/ramdisk") -uos.chdir("/ramdisk") +os.VfsFat.mkfs(bdev) +vfs = os.VfsFat(bdev) +os.mount(vfs, "/ramdisk") +os.chdir("/ramdisk") try: vfs.mkdir("foo_dir") except OSError as e: - print(e.errno == uerrno.EEXIST) + print(e.errno == errno.EEXIST) try: vfs.remove("foo_dir") except OSError as e: - print(e.errno == uerrno.EISDIR) + print(e.errno == errno.EISDIR) try: vfs.remove("no_file.txt") except OSError as e: - print(e.errno == uerrno.ENOENT) + print(e.errno == errno.ENOENT) try: vfs.rename("foo_dir", "/null/file") except OSError as e: - print(e.errno == uerrno.ENOENT) + print(e.errno == errno.ENOENT) try: vfs.rename("foo_dir", "foo_dir/inside_itself") except OSError as e: - print(e.errno == uerrno.EINVAL) + print(e.errno == errno.EINVAL) # file in dir with open("foo_dir/file-in-dir.txt", "w+t") as f: @@ -88,7 +88,7 @@ with open("foo_dir/sub_file.txt", "w") as f: try: vfs.rmdir("foo_dir") except OSError as e: - print(e.errno == uerrno.EACCES) + print(e.errno == errno.EACCES) # trim full path vfs.rename("foo_dir/file-in-dir.txt", "foo_dir/file.txt") @@ -117,5 +117,5 @@ try: f = open("large_file.txt", "wb") f.write(bytearray(bsize * free)) except OSError as e: - print("ENOSPC:", e.errno == 28) # uerrno.ENOSPC + print("ENOSPC:", e.errno == 28) # errno.ENOSPC f.close() diff --git a/tests/extmod/vfs_fat_finaliser.py b/tests/extmod/vfs_fat_finaliser.py index 91cce2c95b..37929fd1e3 100644 --- a/tests/extmod/vfs_fat_finaliser.py +++ b/tests/extmod/vfs_fat_finaliser.py @@ -1,9 +1,9 @@ # Test VfsFat class and its finaliser try: - import uerrno, uos + import errno, os - uos.VfsFat + os.VfsFat except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -37,8 +37,8 @@ except MemoryError: raise SystemExit # Format block device and create VFS object -uos.VfsFat.mkfs(bdev) -vfs = uos.VfsFat(bdev) +os.VfsFat.mkfs(bdev) +vfs = os.VfsFat(bdev) # Here we test that opening a file with the heap locked fails correctly. This # is a special case because file objects use a finaliser and allocating with a diff --git a/tests/extmod/vfs_fat_more.py b/tests/extmod/vfs_fat_more.py index f5de729402..9096024c4a 100644 --- a/tests/extmod/vfs_fat_more.py +++ b/tests/extmod/vfs_fat_more.py @@ -1,11 +1,11 @@ try: - import uos + import os except ImportError: print("SKIP") raise SystemExit try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -46,70 +46,70 @@ except MemoryError: # first we umount any existing mount points the target may have try: - uos.umount("/") + os.umount("/") except OSError: pass -for path in uos.listdir("/"): - uos.umount("/" + path) +for path in os.listdir("/"): + os.umount("/" + path) -uos.VfsFat.mkfs(bdev) -uos.mount(bdev, "/") +os.VfsFat.mkfs(bdev) +os.mount(bdev, "/") -print(uos.getcwd()) +print(os.getcwd()) f = open("test.txt", "w") f.write("hello") f.close() -print(uos.listdir()) -print(uos.listdir("/")) -print(uos.stat("")[:-3]) -print(uos.stat("/")[:-3]) -print(uos.stat("test.txt")[:-3]) -print(uos.stat("/test.txt")[:-3]) +print(os.listdir()) +print(os.listdir("/")) +print(os.stat("")[:-3]) +print(os.stat("/")[:-3]) +print(os.stat("test.txt")[:-3]) +print(os.stat("/test.txt")[:-3]) f = open("/test.txt") print(f.read()) f.close() -uos.rename("test.txt", "test2.txt") -print(uos.listdir()) -uos.rename("test2.txt", "/test3.txt") -print(uos.listdir()) -uos.rename("/test3.txt", "test4.txt") -print(uos.listdir()) -uos.rename("/test4.txt", "/test5.txt") -print(uos.listdir()) +os.rename("test.txt", "test2.txt") +print(os.listdir()) +os.rename("test2.txt", "/test3.txt") +print(os.listdir()) +os.rename("/test3.txt", "test4.txt") +print(os.listdir()) +os.rename("/test4.txt", "/test5.txt") +print(os.listdir()) -uos.mkdir("dir") -print(uos.listdir()) -uos.mkdir("/dir2") -print(uos.listdir()) -uos.mkdir("dir/subdir") -print(uos.listdir("dir")) +os.mkdir("dir") +print(os.listdir()) +os.mkdir("/dir2") +print(os.listdir()) +os.mkdir("dir/subdir") +print(os.listdir("dir")) for exist in ("", "/", "dir", "/dir", "dir/subdir"): try: - uos.mkdir(exist) + os.mkdir(exist) except OSError as er: print("mkdir OSError", er.errno == 17) # EEXIST -uos.chdir("/") -print(uos.stat("test5.txt")[:-3]) +os.chdir("/") +print(os.stat("test5.txt")[:-3]) -uos.VfsFat.mkfs(bdev2) -uos.mount(bdev2, "/sys") -print(uos.listdir()) -print(uos.listdir("sys")) -print(uos.listdir("/sys")) +os.VfsFat.mkfs(bdev2) +os.mount(bdev2, "/sys") +print(os.listdir()) +print(os.listdir("sys")) +print(os.listdir("/sys")) -uos.rmdir("dir2") -uos.remove("test5.txt") -print(uos.listdir()) +os.rmdir("dir2") +os.remove("test5.txt") +print(os.listdir()) -uos.umount("/") -print(uos.getcwd()) -print(uos.listdir()) -print(uos.listdir("sys")) +os.umount("/") +print(os.getcwd()) +print(os.listdir()) +print(os.listdir("sys")) # test importing a file from a mounted FS import sys diff --git a/tests/extmod/vfs_fat_mtime.py b/tests/extmod/vfs_fat_mtime.py index d8fd66b75f..1ceb611364 100644 --- a/tests/extmod/vfs_fat_mtime.py +++ b/tests/extmod/vfs_fat_mtime.py @@ -1,11 +1,11 @@ # Test for VfsFat using a RAM device, mtime feature try: - import utime, uos + import time, os - utime.time - utime.sleep - uos.VfsFat + time.time + time.sleep + os.VfsFat except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -44,11 +44,11 @@ def test(bdev, vfs_class): vfs = vfs_class(bdev) # Create an empty file, should have a timestamp. - current_time = int(utime.time()) + current_time = int(time.time()) vfs.open("test1", "wt").close() # Wait 2 seconds so mtime will increase (FAT has 2 second resolution). - utime.sleep(2) + time.sleep(2) # Create another empty file, should have a timestamp. vfs.open("test2", "wt").close() @@ -71,4 +71,4 @@ def test(bdev, vfs_class): bdev = RAMBlockDevice(50) -test(bdev, uos.VfsFat) +test(bdev, os.VfsFat) diff --git a/tests/extmod/vfs_fat_oldproto.py b/tests/extmod/vfs_fat_oldproto.py index 1998319dbe..df8a13c96e 100644 --- a/tests/extmod/vfs_fat_oldproto.py +++ b/tests/extmod/vfs_fat_oldproto.py @@ -1,12 +1,12 @@ try: - import uerrno - import uos + import errno + import os except ImportError: print("SKIP") raise SystemExit try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -43,9 +43,9 @@ except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) -vfs = uos.VfsFat(bdev) -uos.mount(vfs, "/ramdisk") +os.VfsFat.mkfs(bdev) +vfs = os.VfsFat(bdev) +os.mount(vfs, "/ramdisk") # file io with vfs.open("file.txt", "w") as f: diff --git a/tests/extmod/vfs_fat_ramdisk.py b/tests/extmod/vfs_fat_ramdisk.py index a22d480dfd..9a5c49a6cc 100644 --- a/tests/extmod/vfs_fat_ramdisk.py +++ b/tests/extmod/vfs_fat_ramdisk.py @@ -1,12 +1,12 @@ try: - import uerrno - import uos + import errno + import os except ImportError: print("SKIP") raise SystemExit try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -44,13 +44,13 @@ except MemoryError: print("SKIP") raise SystemExit -uos.VfsFat.mkfs(bdev) +os.VfsFat.mkfs(bdev) print(b"FOO_FILETXT" not in bdev.data) print(b"hello!" not in bdev.data) -vfs = uos.VfsFat(bdev) -uos.mount(vfs, "/ramdisk") +vfs = os.VfsFat(bdev) +os.mount(vfs, "/ramdisk") vfs.label = "label test" print("label:", vfs.label) @@ -60,7 +60,7 @@ print("getcwd:", vfs.getcwd()) try: vfs.stat("no_file.txt") except OSError as e: - print(e.errno == uerrno.ENOENT) + print(e.errno == errno.ENOENT) with vfs.open("foo_file.txt", "w") as f: f.write("hello!") @@ -83,18 +83,18 @@ with vfs.open("sub_file.txt", "w") as f: try: vfs.chdir("sub_file.txt") except OSError as e: - print(e.errno == uerrno.ENOENT) + print(e.errno == errno.ENOENT) vfs.chdir("..") print("getcwd:", vfs.getcwd()) -uos.umount(vfs) +os.umount(vfs) -vfs = uos.VfsFat(bdev) +vfs = os.VfsFat(bdev) print(list(vfs.ilistdir(b""))) # list a non-existent directory try: vfs.ilistdir(b"no_exist") except OSError as e: - print("ENOENT:", e.errno == uerrno.ENOENT) + print("ENOENT:", e.errno == errno.ENOENT) diff --git a/tests/extmod/vfs_fat_ramdisklarge.py b/tests/extmod/vfs_fat_ramdisklarge.py index 649a53db14..40cba9ee43 100644 --- a/tests/extmod/vfs_fat_ramdisklarge.py +++ b/tests/extmod/vfs_fat_ramdisklarge.py @@ -1,13 +1,13 @@ # test making a FAT filesystem on a very large block device try: - import uos + import os except ImportError: print("SKIP") raise SystemExit try: - uos.VfsFat + os.VfsFat except AttributeError: print("SKIP") raise SystemExit @@ -46,13 +46,13 @@ class RAMBDevSparse: try: bdev = RAMBDevSparse(4 * 1024 * 1024 * 1024 // RAMBDevSparse.SEC_SIZE) - uos.VfsFat.mkfs(bdev) + os.VfsFat.mkfs(bdev) except MemoryError: print("SKIP") raise SystemExit -vfs = uos.VfsFat(bdev) -uos.mount(vfs, "/ramdisk") +vfs = os.VfsFat(bdev) +os.mount(vfs, "/ramdisk") print("statvfs:", vfs.statvfs("/ramdisk")) @@ -66,4 +66,4 @@ f = open("/ramdisk/test.txt") print(f.read()) f.close() -uos.umount(vfs) +os.umount(vfs) diff --git a/tests/extmod/vfs_lfs.py b/tests/extmod/vfs_lfs.py index 8e56400df3..f555e00b8c 100644 --- a/tests/extmod/vfs_lfs.py +++ b/tests/extmod/vfs_lfs.py @@ -1,10 +1,10 @@ # Test for VfsLittle using a RAM device try: - import uos + import os - uos.VfsLfs1 - uos.VfsLfs2 + os.VfsLfs1 + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -115,7 +115,7 @@ def test(bdev, vfs_class): vfs.chdir("/testdir") print(vfs.getcwd()) - # create file in directory to make sure paths are relative + # create file in directory to make sre paths are relative vfs.open("test2", "w").close() print_stat(vfs.stat("test2")) print_stat(vfs.stat("/testdir/test2")) @@ -150,5 +150,5 @@ def test(bdev, vfs_class): bdev = RAMBlockDevice(30) -test(bdev, uos.VfsLfs1) -test(bdev, uos.VfsLfs2) +test(bdev, os.VfsLfs1) +test(bdev, os.VfsLfs2) diff --git a/tests/extmod/vfs_lfs_corrupt.py b/tests/extmod/vfs_lfs_corrupt.py index 330458709a..c49dcad92b 100644 --- a/tests/extmod/vfs_lfs_corrupt.py +++ b/tests/extmod/vfs_lfs_corrupt.py @@ -1,10 +1,10 @@ # Test for VfsLittle using a RAM device, testing error handling from corrupt block device try: - import uos + import os - uos.VfsLfs1 - uos.VfsLfs2 + os.VfsLfs1 + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -108,5 +108,5 @@ def test(bdev, vfs_class): bdev = RAMBlockDevice(30) -test(bdev, uos.VfsLfs1) -test(bdev, uos.VfsLfs2) +test(bdev, os.VfsLfs1) +test(bdev, os.VfsLfs2) diff --git a/tests/extmod/vfs_lfs_error.py b/tests/extmod/vfs_lfs_error.py index 717284ea01..32b76b2821 100644 --- a/tests/extmod/vfs_lfs_error.py +++ b/tests/extmod/vfs_lfs_error.py @@ -1,10 +1,10 @@ # Test for VfsLittle using a RAM device, testing error handling try: - import uos + import os - uos.VfsLfs1 - uos.VfsLfs2 + os.VfsLfs1 + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -117,5 +117,5 @@ def test(bdev, vfs_class): bdev = RAMBlockDevice(30) -test(bdev, uos.VfsLfs1) -test(bdev, uos.VfsLfs2) +test(bdev, os.VfsLfs1) +test(bdev, os.VfsLfs2) diff --git a/tests/extmod/vfs_lfs_file.py b/tests/extmod/vfs_lfs_file.py index 0920173200..574ce1eecb 100644 --- a/tests/extmod/vfs_lfs_file.py +++ b/tests/extmod/vfs_lfs_file.py @@ -1,10 +1,10 @@ # Test for VfsLittle using a RAM device, file IO try: - import uos + import os - uos.VfsLfs1 - uos.VfsLfs2 + os.VfsLfs1 + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -117,5 +117,5 @@ def test(bdev, vfs_class): bdev = RAMBlockDevice(30) -test(bdev, uos.VfsLfs1) -test(bdev, uos.VfsLfs2) +test(bdev, os.VfsLfs1) +test(bdev, os.VfsLfs2) diff --git a/tests/extmod/vfs_lfs_mount.py b/tests/extmod/vfs_lfs_mount.py index c9926708c6..4ebd9ac623 100644 --- a/tests/extmod/vfs_lfs_mount.py +++ b/tests/extmod/vfs_lfs_mount.py @@ -1,10 +1,10 @@ # Test for VfsLittle using a RAM device, with mount/umount try: - import uos + import os - uos.VfsLfs1 - uos.VfsLfs2 + os.VfsLfs1 + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -42,7 +42,7 @@ def test(vfs_class): # mount bdev unformatted try: - uos.mount(bdev, "/lfs") + os.mount(bdev, "/lfs") except Exception as er: print(repr(er)) @@ -53,7 +53,7 @@ def test(vfs_class): vfs = vfs_class(bdev) # mount - uos.mount(vfs, "/lfs") + os.mount(vfs, "/lfs") # import with open("/lfs/lfsmod.py", "w") as f: @@ -61,23 +61,23 @@ def test(vfs_class): import lfsmod # import package - uos.mkdir("/lfs/lfspkg") + os.mkdir("/lfs/lfspkg") with open("/lfs/lfspkg/__init__.py", "w") as f: f.write('print("package")\n') import lfspkg # chdir and import module from current directory (needs "" in sys.path) - uos.mkdir("/lfs/subdir") - uos.chdir("/lfs/subdir") - uos.rename("/lfs/lfsmod.py", "/lfs/subdir/lfsmod2.py") + os.mkdir("/lfs/subdir") + os.chdir("/lfs/subdir") + os.rename("/lfs/lfsmod.py", "/lfs/subdir/lfsmod2.py") import lfsmod2 # umount - uos.umount("/lfs") + os.umount("/lfs") # mount read-only vfs = vfs_class(bdev) - uos.mount(vfs, "/lfs", readonly=True) + os.mount(vfs, "/lfs", readonly=True) # test reading works with open("/lfs/subdir/lfsmod2.py") as f: @@ -90,13 +90,13 @@ def test(vfs_class): print(repr(er)) # umount - uos.umount("/lfs") + os.umount("/lfs") # mount bdev again - uos.mount(bdev, "/lfs") + os.mount(bdev, "/lfs") # umount - uos.umount("/lfs") + os.umount("/lfs") # clear imported modules sys.modules.clear() @@ -110,5 +110,5 @@ sys.path.append("/lfs") sys.path.append("") # run tests -test(uos.VfsLfs1) -test(uos.VfsLfs2) +test(os.VfsLfs1) +test(os.VfsLfs2) diff --git a/tests/extmod/vfs_lfs_mtime.py b/tests/extmod/vfs_lfs_mtime.py index bacdd2246c..bd8ae7b2a2 100644 --- a/tests/extmod/vfs_lfs_mtime.py +++ b/tests/extmod/vfs_lfs_mtime.py @@ -1,11 +1,11 @@ # Test for VfsLfs using a RAM device, mtime feature try: - import utime, uos + import time, os - utime.time - utime.sleep - uos.VfsLfs2 + time.time + time.sleep + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -47,11 +47,11 @@ def test(bdev, vfs_class): vfs = vfs_class(bdev, mtime=True) # Create an empty file, should have a timestamp. - current_time = int(utime.time()) + current_time = int(time.time()) vfs.open("test1", "wt").close() # Wait 1 second so mtime will increase by at least 1. - utime.sleep(1) + time.sleep(1) # Create another empty file, should have a timestamp. vfs.open("test2", "wt").close() @@ -68,13 +68,13 @@ def test(bdev, vfs_class): print(stat1[8] < stat2[8]) # Wait 1 second so mtime will increase by at least 1. - utime.sleep(1) + time.sleep(1) - # Open test1 for reading and ensure mtime did not change. + # Open test1 for reading and ensre mtime did not change. vfs.open("test1", "rt").close() print(vfs.stat("test1") == stat1) - # Open test1 for writing and ensure mtime increased from the previous value. + # Open test1 for writing and ensre mtime increased from the previous value. vfs.open("test1", "wt").close() stat1_old = stat1 stat1 = vfs.stat("test1") @@ -102,4 +102,4 @@ def test(bdev, vfs_class): bdev = RAMBlockDevice(30) -test(bdev, uos.VfsLfs2) +test(bdev, os.VfsLfs2) diff --git a/tests/extmod/vfs_lfs_superblock.py b/tests/extmod/vfs_lfs_superblock.py index 1ac5675554..b8a8ec60b9 100644 --- a/tests/extmod/vfs_lfs_superblock.py +++ b/tests/extmod/vfs_lfs_superblock.py @@ -1,9 +1,9 @@ # Test for VfsLfs using a RAM device, when the first superblock does not exist try: - import uos + import os - uos.VfsLfs2 + os.VfsLfs2 except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -36,12 +36,12 @@ lfs2_data = b"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x bdev = RAMBlockDevice(64, lfs2_data) # Create the VFS explicitly, no auto-detection is needed for this. -vfs = uos.VfsLfs2(bdev) +vfs = os.VfsLfs2(bdev) print(list(vfs.ilistdir())) # Mount the block device directly; this relies on auto-detection. -uos.mount(bdev, "/userfs") -print(uos.listdir("/userfs")) +os.mount(bdev, "/userfs") +print(os.listdir("/userfs")) # Clean up. -uos.umount("/userfs") +os.umount("/userfs") diff --git a/tests/extmod/vfs_posix.py b/tests/extmod/vfs_posix.py index 2a14fc2076..61c948cf5b 100644 --- a/tests/extmod/vfs_posix.py +++ b/tests/extmod/vfs_posix.py @@ -1,9 +1,9 @@ # Test for VfsPosix try: - import uos + import os - uos.VfsPosix + os.VfsPosix except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -12,27 +12,27 @@ except (ImportError, AttributeError): # Skip the test if it does exist. temp_dir = "micropy_test_dir" try: - uos.stat(temp_dir) + os.stat(temp_dir) print("SKIP") raise SystemExit except OSError: pass # getcwd and chdir -curdir = uos.getcwd() -uos.chdir("/") -print(uos.getcwd()) -uos.chdir(curdir) -print(uos.getcwd() == curdir) +curdir = os.getcwd() +os.chdir("/") +print(os.getcwd()) +os.chdir(curdir) +print(os.getcwd() == curdir) # stat -print(type(uos.stat("/"))) +print(type(os.stat("/"))) # listdir and ilistdir -print(type(uos.listdir("/"))) +print(type(os.listdir("/"))) # mkdir -uos.mkdir(temp_dir) +os.mkdir(temp_dir) # file create f = open(temp_dir + "/test", "w") @@ -52,11 +52,11 @@ print(f.read()) f.close() # rename -uos.rename(temp_dir + "/test", temp_dir + "/test2") -print(uos.listdir(temp_dir)) +os.rename(temp_dir + "/test", temp_dir + "/test2") +print(os.listdir(temp_dir)) # construct new VfsPosix with path argument -vfs = uos.VfsPosix(temp_dir) +vfs = os.VfsPosix(temp_dir) print(list(i[0] for i in vfs.ilistdir("."))) # stat, statvfs (statvfs may not exist) @@ -69,21 +69,21 @@ print(type(list(vfs.ilistdir("."))[0][0])) print(type(list(vfs.ilistdir(b"."))[0][0])) # remove -uos.remove(temp_dir + "/test2") -print(uos.listdir(temp_dir)) +os.remove(temp_dir + "/test2") +print(os.listdir(temp_dir)) # remove with error try: - uos.remove(temp_dir + "/test2") + os.remove(temp_dir + "/test2") except OSError: print("remove OSError") # rmdir -uos.rmdir(temp_dir) -print(temp_dir in uos.listdir()) +os.rmdir(temp_dir) +print(temp_dir in os.listdir()) # rmdir with error try: - uos.rmdir(temp_dir) + os.rmdir(temp_dir) except OSError: print("rmdir OSError") diff --git a/tests/extmod/vfs_userfs.py b/tests/extmod/vfs_userfs.py index 3cdfe82eea..518373c70a 100644 --- a/tests/extmod/vfs_userfs.py +++ b/tests/extmod/vfs_userfs.py @@ -1,21 +1,21 @@ # test VFS functionality with a user-defined filesystem -# also tests parts of uio.IOBase implementation +# also tests parts of io.IOBase implementation import sys try: - import uio + import io - uio.IOBase - import uos + io.IOBase + import os - uos.mount + os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit -class UserFile(uio.IOBase): +class UserFile(io.IOBase): def __init__(self, mode, data): assert isinstance(data, bytes) self.is_text = mode.find("b") == -1 @@ -69,7 +69,7 @@ user_files = { "/usermod1.py": b"print('in usermod1')\nimport usermod2", "/usermod2.py": b"print('in usermod2')", } -uos.mount(UserFS(user_files), "/userfs") +os.mount(UserFS(user_files), "/userfs") # open and read a file f = open("/userfs/data.txt") @@ -80,5 +80,5 @@ sys.path.append("/userfs") import usermod1 # unmount and undo path addition -uos.umount("/userfs") +os.umount("/userfs") sys.path.pop() diff --git a/tests/feature_check/uio_module.py b/tests/feature_check/io_module.py similarity index 56% rename from tests/feature_check/uio_module.py rename to tests/feature_check/io_module.py index bad8d7c95b..9094e60531 100644 --- a/tests/feature_check/uio_module.py +++ b/tests/feature_check/io_module.py @@ -1,6 +1,6 @@ try: - import uio + import io - print("uio") + print("io") except ImportError: print("no") diff --git a/tests/feature_check/uio_module.py.exp b/tests/feature_check/io_module.py.exp similarity index 100% rename from tests/feature_check/uio_module.py.exp rename to tests/feature_check/io_module.py.exp diff --git a/tests/float/float2int_doubleprec_intbig.py b/tests/float/float2int_doubleprec_intbig.py index 1226b39ca9..e2876f5d7c 100644 --- a/tests/float/float2int_doubleprec_intbig.py +++ b/tests/float/float2int_doubleprec_intbig.py @@ -1,9 +1,6 @@ # check cases converting float to int, requiring double precision float -try: - import ustruct as struct -except: - import struct +import struct import sys diff --git a/tests/float/float2int_fp30_intbig.py b/tests/float/float2int_fp30_intbig.py index a1bfe67046..3d3795f94d 100644 --- a/tests/float/float2int_fp30_intbig.py +++ b/tests/float/float2int_fp30_intbig.py @@ -1,9 +1,6 @@ # check cases converting float to int, relying only on single precision float -try: - import ustruct as struct -except: - import struct +import struct import sys diff --git a/tests/float/float2int_intbig.py b/tests/float/float2int_intbig.py index 06b651bb72..a9d7b57211 100644 --- a/tests/float/float2int_intbig.py +++ b/tests/float/float2int_intbig.py @@ -1,9 +1,6 @@ # check cases converting float to int, relying only on single precision float -try: - import ustruct as struct -except: - import struct +import struct import sys diff --git a/tests/float/float_struct.py b/tests/float/float_struct.py index 18893af0e0..47fe405018 100644 --- a/tests/float/float_struct.py +++ b/tests/float/float_struct.py @@ -1,9 +1,6 @@ # test struct package with floats try: - try: - import ustruct as struct - except: - import struct + import struct except ImportError: print("SKIP") raise SystemExit diff --git a/tests/inlineasm/asmsum.py b/tests/inlineasm/asmsum.py index 208709a25f..51613ef6ac 100644 --- a/tests/inlineasm/asmsum.py +++ b/tests/inlineasm/asmsum.py @@ -46,7 +46,7 @@ def asm_sum_bytes(r0, r1): mov(r0, r2) -import uarray as array +import array b = array.array("l", (100, 200, 300, 400)) n = asm_sum_words(len(b), b) diff --git a/tests/io/open_append.py b/tests/io/open_append.py index 49cdd094b3..80a9422d81 100644 --- a/tests/io/open_append.py +++ b/tests/io/open_append.py @@ -1,7 +1,4 @@ -try: - import uos as os -except ImportError: - import os +import os if not hasattr(os, "remove"): print("SKIP") diff --git a/tests/io/open_plus.py b/tests/io/open_plus.py index 3cb2330eed..5199861a4e 100644 --- a/tests/io/open_plus.py +++ b/tests/io/open_plus.py @@ -1,7 +1,4 @@ -try: - import uos as os -except ImportError: - import os +import os if not hasattr(os, "remove"): print("SKIP") diff --git a/tests/micropython/emg_exc.py b/tests/micropython/emg_exc.py index acc39c5dc9..e26fd62e49 100644 --- a/tests/micropython/emg_exc.py +++ b/tests/micropython/emg_exc.py @@ -4,7 +4,7 @@ import micropython import sys try: - import uio + import io except ImportError: print("SKIP") raise SystemExit diff --git a/tests/micropython/heapalloc_bytesio2.py b/tests/micropython/heapalloc_bytesio2.py index 3b9f141270..05c384a516 100644 --- a/tests/micropython/heapalloc_bytesio2.py +++ b/tests/micropython/heapalloc_bytesio2.py @@ -1,7 +1,7 @@ # Creating BytesIO from immutable object should not immediately # copy its content. try: - import uio + import io import micropython micropython.mem_total @@ -14,7 +14,7 @@ data = b"1234" * 256 before = micropython.mem_total() -buf = uio.BytesIO(data) +buf = io.BytesIO(data) after = micropython.mem_total() diff --git a/tests/micropython/heapalloc_iter.py b/tests/micropython/heapalloc_iter.py index 18f5322ee1..bd1ba4db79 100644 --- a/tests/micropython/heapalloc_iter.py +++ b/tests/micropython/heapalloc_iter.py @@ -5,13 +5,10 @@ except NameError: print("SKIP") raise SystemExit try: - import uarray as array + import array except ImportError: - try: - import array - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: from micropython import heap_lock, heap_unlock diff --git a/tests/micropython/import_mpy_invalid.py b/tests/micropython/import_mpy_invalid.py index 894fc582ce..d2f0c9db28 100644 --- a/tests/micropython/import_mpy_invalid.py +++ b/tests/micropython/import_mpy_invalid.py @@ -1,16 +1,16 @@ # test importing of invalid .mpy files try: - import sys, uio, uos + import sys, io, os - uio.IOBase - uos.mount + io.IOBase + os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit -class UserFile(uio.IOBase): +class UserFile(io.IOBase): def __init__(self, data): self.data = memoryview(data) self.pos = 0 @@ -55,7 +55,7 @@ user_files = { } # create and mount a user filesystem -uos.mount(UserFS(user_files), "/userfs") +os.mount(UserFS(user_files), "/userfs") sys.path.append("/userfs") # import .mpy files from the user filesystem @@ -67,5 +67,5 @@ for i in range(len(user_files)): print(mod, type(e).__name__, e) # unmount and undo path addition -uos.umount("/userfs") +os.umount("/userfs") sys.path.pop() diff --git a/tests/micropython/import_mpy_native.py b/tests/micropython/import_mpy_native.py index 0dfbca9086..2829de47aa 100644 --- a/tests/micropython/import_mpy_native.py +++ b/tests/micropython/import_mpy_native.py @@ -1,10 +1,10 @@ # test importing of .mpy files with native code (x64 only) try: - import sys, uio, uos + import sys, io, os - uio.IOBase - uos.mount + io.IOBase + os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit @@ -15,7 +15,7 @@ if mpy_arch == 0: raise SystemExit -class UserFile(uio.IOBase): +class UserFile(io.IOBase): def __init__(self, data): self.data = memoryview(data) self.pos = 0 @@ -108,7 +108,7 @@ user_files = { # fmt: on # create and mount a user filesystem -uos.mount(UserFS(user_files), "/userfs") +os.mount(UserFS(user_files), "/userfs") sys.path.append("/userfs") # import .mpy files from the user filesystem @@ -121,5 +121,5 @@ for i in range(len(user_files)): print(mod, "ValueError", er) # unmount and undo path addition -uos.umount("/userfs") +os.umount("/userfs") sys.path.pop() diff --git a/tests/micropython/import_mpy_native_gc.py b/tests/micropython/import_mpy_native_gc.py index 1234184aed..39d7740216 100644 --- a/tests/micropython/import_mpy_native_gc.py +++ b/tests/micropython/import_mpy_native_gc.py @@ -1,17 +1,17 @@ # Test that native code loaded from a .mpy file is retained after a GC. try: - import gc, sys, uio, uos + import gc, sys, io, os sys.implementation._mpy - uio.IOBase - uos.mount + io.IOBase + os.mount except (ImportError, AttributeError): print("SKIP") raise SystemExit -class UserFile(uio.IOBase): +class UserFile(io.IOBase): def __init__(self, data): self.data = memoryview(data) self.pos = 0 @@ -66,7 +66,7 @@ if sys.implementation._mpy not in features0_file_contents: user_files = {"/features0.mpy": features0_file_contents[sys.implementation._mpy]} # Create and mount a user filesystem. -uos.mount(UserFS(user_files), "/userfs") +os.mount(UserFS(user_files), "/userfs") sys.path.append("/userfs") # Import the native function. @@ -87,5 +87,5 @@ for i in range(1000): print(factorial(10)) # Unmount and undo path addition. -uos.umount("/userfs") +os.umount("/userfs") sys.path.pop() diff --git a/tests/micropython/opt_level.py b/tests/micropython/opt_level.py index dd5493a7a3..8ba7b3a228 100644 --- a/tests/micropython/opt_level.py +++ b/tests/micropython/opt_level.py @@ -1,4 +1,4 @@ -import micropython as micropython +import micropython # check we can get and set the level micropython.opt_level(0) diff --git a/tests/perf_bench/bm_hexiom.py b/tests/perf_bench/bm_hexiom.py index 84eda9a909..e36fc234cd 100644 --- a/tests/perf_bench/bm_hexiom.py +++ b/tests/perf_bench/bm_hexiom.py @@ -632,10 +632,7 @@ bm_params = { def bm_setup(params): - try: - import uio as io - except ImportError: - import io + import io loops, level, order, strategy = params diff --git a/tests/perf_bench/core_import_mpy_multi.py b/tests/perf_bench/core_import_mpy_multi.py index 682c36328a..4e098eef81 100644 --- a/tests/perf_bench/core_import_mpy_multi.py +++ b/tests/perf_bench/core_import_mpy_multi.py @@ -1,8 +1,8 @@ # Test performance of importing an .mpy file many times. -import usys, uio, uos +import usys, io, os -if not (hasattr(uio, "IOBase") and hasattr(uos, "mount")): +if not (hasattr(io, "IOBase") and hasattr(os, "mount")): print("SKIP") raise SystemExit @@ -26,7 +26,7 @@ result = 123 file_data = b'M\x06\x00\x1f\x14\x03\x0etest.py\x00\x0f\x02A\x00\x02f\x00\x0cresult\x00/-5#\x82I\x81{\x81w\x82/\x81\x05\x81\x17Iom\x82\x13\x06arg\x00\x05\x1cthis will be a string object\x00\x06\x1bthis will be a bytes object\x00\n\x07\x05\x0bconst tuple\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\x81\\\x10\n\x01\x89\x07d`T2\x00\x10\x024\x02\x16\x022\x01\x16\x03"\x80{\x16\x04Qc\x02\x81d\x00\x08\x02(DD\x11\x05\x16\x06\x10\x02\x16\x072\x00\x16\x082\x01\x16\t2\x02\x16\nQc\x03`\x1a\x08\x08\x12\x13@\xb1\xb0\x18\x13Qc@\t\x08\t\x12` Qc@\t\x08\n\x12``Qc\x82@ \x0e\x03\x80\x08+)##\x12\x0b\x12\x0c\x12\r\x12\x0e*\x04Y\x12\x0f\x12\x10\x12\x11*\x03Y#\x00\xc0#\x01\xc0#\x02\xc0Qc' -class File(uio.IOBase): +class File(io.IOBase): def __init__(self): self.off = 0 @@ -57,8 +57,8 @@ class FS: def mount(): - uos.mount(FS(), "/__remote") - uos.chdir("/__remote") + os.mount(FS(), "/__remote") + os.chdir("/__remote") def test(r): diff --git a/tests/perf_bench/core_import_mpy_single.py b/tests/perf_bench/core_import_mpy_single.py index af3f4a29b2..1b411fc3fb 100644 --- a/tests/perf_bench/core_import_mpy_single.py +++ b/tests/perf_bench/core_import_mpy_single.py @@ -2,9 +2,9 @@ # The first import of a module will intern strings that don't already exist, and # this test should be representative of what happens in a real application. -import uio, uos +import io, os -if not (hasattr(uio, "IOBase") and hasattr(uos, "mount")): +if not (hasattr(io, "IOBase") and hasattr(os, "mount")): print("SKIP") raise SystemExit @@ -81,7 +81,7 @@ result = 123 file_data = b"M\x06\x00\x1f\x81=\x1e\x0etest.py\x00\x0f\x04A0\x00\x04A1\x00\x04f0\x00\x04f1\x00\x0cresult\x00/-5\x04a0\x00\x04a1\x00\x04a2\x00\x04a3\x00\x13\x15\x17\x19\x1b\x1d\x1f!#%')+1379;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}\x7f\x81\x01\x81\x03\x81\x05\x81\x07\x81\t\x81\x0b\x81\r\x81\x0f\x81\x11\x81\x13\x81\x15\x81\x17\x81\x19\x81\x1b\x81\x1d\x81\x1f\x81!\x81#\x81%\x81'\x81)\x81+\x81-\x81/\x811\x813\x815\x817\x819\x81;\x81=\x81?\x81A\x81C\x81E\x81G\x81I\x81K\x81M\x81O\x81Q\x81S\x81U\x81W\x81Y\x81[\x81]\x81_\x81a\x81c\x81e\x81g\x81i\x81k\x81m\x81o\x81q\x81s\x81u\x81w\x81y\x81{\x81}\x81\x7f\x82\x01\x82\x03\x82\x05\x82\x07\x82\t\x82\x0b\x82\r\x82\x0f\x82\x11\x82\x13\x82\x15\x82\x17\x82\x19\x82\x1b\x82\x1d\x82\x1f\x82!\x82#\x82%\x82'\x82)\x82+\x82-\x82/\x821\x823\x825\x827\x829\x82;\x82=\x82?\x82A\x82E\x82G\x82I\x82K\nname0\x00\nname1\x00\nname2\x00\nname3\x00\nname4\x00\nname5\x00\nname6\x00\nname7\x00\nname8\x00\nname9\x00$quite_a_long_name0\x00$quite_a_long_name1\x00$quite_a_long_name2\x00$quite_a_long_name3\x00$quite_a_long_name4\x00$quite_a_long_name5\x00$quite_a_long_name6\x00$quite_a_long_name7\x00$quite_a_long_name8\x00$quite_a_long_name9\x00&quite_a_long_name10\x00&quite_a_long_name11\x00\x05\x1ethis will be a string object 0\x00\x05\x1ethis will be a string object 1\x00\x05\x1ethis will be a string object 2\x00\x05\x1ethis will be a string object 3\x00\x05\x1ethis will be a string object 4\x00\x05\x1ethis will be a string object 5\x00\x05\x1ethis will be a string object 6\x00\x05\x1ethis will be a string object 7\x00\x05\x1ethis will be a string object 8\x00\x05\x1ethis will be a string object 9\x00\x06\x1dthis will be a bytes object 0\x00\x06\x1dthis will be a bytes object 1\x00\x06\x1dthis will be a bytes object 2\x00\x06\x1dthis will be a bytes object 3\x00\x06\x1dthis will be a bytes object 4\x00\x06\x1dthis will be a bytes object 5\x00\x06\x1dthis will be a bytes object 6\x00\x06\x1dthis will be a bytes object 7\x00\x06\x1dthis will be a bytes object 8\x00\x06\x1dthis will be a bytes object 9\x00\n\x07\x05\rconst tuple 0\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 1\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 2\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 3\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 4\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 5\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 6\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 7\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 8\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\n\x07\x05\rconst tuple 9\x00\x01\x02\x03\x07\x011\x07\x012\x07\x013\x82d\x10\x12\x01i@i@\x84\x18\x84\x1fT2\x00\x10\x024\x02\x16\x02T2\x01\x10\x034\x02\x16\x032\x02\x16\x042\x03\x16\x05\"\x80{\x16\x06Qc\x04\x82\x0c\x00\n\x02($$$\x11\x07\x16\x08\x10\x02\x16\t2\x00\x16\n2\x01\x16\x0b2\x02\x16\x0c2\x03\x16\rQc\x04@\t\x08\n\x81\x0b Qc@\t\x08\x0b\x81\x0b@Qc@\t\x08\x0c\x81\x0b`QcH\t\n\r\x81\x0b` Qc\x82\x14\x00\x0c\x03h`$$$\x11\x07\x16\x08\x10\x03\x16\t2\x00\x16\n2\x01\x16\x0b2\x02\x16\x0c2\x03\x16\rQc\x04H\t\n\n\x81\x0b``QcH\t\n\x0b\x81\x0b\x80\x07QcH\t\n\x0c\x81\x0b\x80\x08QcH\t\n\r\x81\x0b\x80\tQc\xa08P:\x04\x80\x0b13///---997799<\x1f%\x1f\"\x1f%)\x1f\"//\x12\x0e\x12\x0f\x12\x10\x12\x11\x12\x12\x12\x13\x12\x14*\x07Y\x12\x15\x12\x16\x12\x17\x12\x18\x12\x19\x12\x1a\x12\x08\x12\x07*\x08Y\x12\x1b\x12\x1c\x12\t\x12\x1d\x12\x1e\x12\x1f*\x06Y\x12 \x12!\x12\"\x12#\x12$\x12%*\x06Y\x12&\x12'\x12(\x12)\x12*\x12+*\x06Y\x12,\x12-\x12.\x12/\x120*\x05Y\x121\x122\x123\x124\x125*\x05Y\x126\x127\x128\x129\x12:*\x05Y\x12;\x12<\x12=\x12>\x12?\x12@\x12A\x12B\x12C\x12D\x12E*\x0bY\x12F\x12G\x12H\x12I\x12J\x12K\x12L\x12M\x12N\x12O\x12P*\x0bY\x12Q\x12R\x12S\x12T\x12U\x12V\x12W\x12X\x12Y\x12Z*\nY\x12[\x12\\\x12]\x12^\x12_\x12`\x12a\x12b\x12c\x12d*\nY\x12e\x12f\x12g\x12h\x12i\x12j\x12k\x12l\x12m\x12n\x12o*\x0bY\x12p\x12q\x12r\x12s\x12t\x12u\x12v\x12w\x12x\x12y\x12z*\x0bY\x12{\x12|\x12}\x12~\x12\x7f\x12\x81\x00\x12\x81\x01\x12\x81\x02\x12\x81\x03\x12\x81\x04*\nY\x12\x81\x05\x12\x81\x06\x12\x81\x07\x12\x81\x08\x12\x81\t\x12\x81\n\x12\x81\x0b\x12\x81\x0c\x12\x81\r\x12\x81\x0e\x12\x81\x0f*\x0bY\x12\x81\x10\x12\x81\x11\x12\x81\x12\x12\x81\x13\x12\x81\x14\x12\x81\x15\x12\x81\x16\x12\x81\x17\x12\x81\x18\x12\x81\x19*\nY\x12\x81\x1a\x12\x81\x1b\x12\x81\x1c\x12\x81\x1d\x12\x81\x1e\x12\x81\x1f\x12\x81 \x12\x81!\x12\x81\"\x12\x81#\x12\x81$*\x0bY\x12\x81%\x12\x81&*\x02Y\x12\x81'\x12\x81(\x12\x81)\x12\x81*\x12\x81+\x12\x81,\x12\x81-\x12\x81.\x12\x81/\x12\x810*\nY\x12\x811\x12\x812\x12\x813\x12\x814*\x04Y\x12\x815\x12\x816\x12\x817\x12\x818*\x04Y\x12\x819\x12\x81:\x12\x81;\x12\x81<*\x04YQc\x87p\x08@\x05\x80###############################\x00\xc0#\x01\xc0#\x02\xc0#\x03\xc0#\x04\xc0#\x05\xc0#\x06\xc0#\x07\xc0#\x08\xc0#\t\xc0#\n\xc0#\x0b\xc0#\x0c\xc0#\r\xc0#\x0e\xc0#\x0f\xc0#\x10\xc0#\x11\xc0#\x12\xc0#\x13\xc0#\x14\xc0#\x15\xc0#\x16\xc0#\x17\xc0#\x18\xc0#\x19\xc0#\x1a\xc0#\x1b\xc0#\x1c\xc0#\x1d\xc0Qc" -class File(uio.IOBase): +class File(io.IOBase): def __init__(self): self.off = 0 @@ -112,8 +112,8 @@ class FS: def mount(): - uos.mount(FS(), "/__remote") - uos.chdir("/__remote") + os.mount(FS(), "/__remote") + os.chdir("/__remote") def test(): diff --git a/tests/run-natmodtests.py b/tests/run-natmodtests.py index a957fbb6b6..2a0997c185 100755 --- a/tests/run-natmodtests.py +++ b/tests/run-natmodtests.py @@ -22,13 +22,13 @@ TEST_MAPPINGS = { "uheapq": "uheapq/uheapq_$(ARCH).mpy", "urandom": "urandom/urandom_$(ARCH).mpy", "ure": "ure/ure_$(ARCH).mpy", - "uzlib": "uzlib/uzlib_$(ARCH).mpy", + "zlib": "zlib/zlib_$(ARCH).mpy", } # Code to allow a target MicroPython to import an .mpy from RAM injected_import_hook_code = """\ -import sys, uos, uio -class __File(uio.IOBase): +import sys, os, io +class __File(io.IOBase): def __init__(self): self.off = 0 def ioctl(self, request, arg): @@ -49,8 +49,8 @@ class __FS: raise OSError(-2) # ENOENT def open(self, path, mode): return __File() -uos.mount(__FS(), '/__remote') -uos.chdir('/__remote') +os.mount(__FS(), '/__remote') +os.chdir('/__remote') sys.modules['{}'] = __import__('__injected') """ diff --git a/tests/run-tests-exp.py b/tests/run-tests-exp.py index bf8ce32ea8..bbb057f4ce 100644 --- a/tests/run-tests-exp.py +++ b/tests/run-tests-exp.py @@ -6,7 +6,7 @@ # which is to be tested, so should use minimal language functionality. # import sys -import uos as os +import os tests = ["basics", "micropython", "float", "import", "io", " misc", "unicode", "extmod", "unix"] diff --git a/tests/run-tests.py b/tests/run-tests.py index 45b4ebf536..9f55f0ebab 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -355,9 +355,9 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): if output == b"TypeError\n": skip_revops = True - # Check if uio module exists, and skip such tests if it doesn't - output = run_feature_check(pyb, args, base_path, "uio_module.py") - if output != b"uio\n": + # Check if io module exists, and skip such tests if it doesn't + output = run_feature_check(pyb, args, base_path, "io_module.py") + if output != b"io\n": skip_io_module = True # Check if fstring feature is enabled, and skip such tests if it doesn't diff --git a/tests/stress/recursive_data.py b/tests/stress/recursive_data.py index 3b7fa50952..6e01319ed3 100644 --- a/tests/stress/recursive_data.py +++ b/tests/stress/recursive_data.py @@ -1,6 +1,6 @@ # This tests that printing recursive data structure doesn't lead to segfault. try: - import uio as io + import io except ImportError: print("SKIP") raise SystemExit diff --git a/tests/thread/stress_aes.py b/tests/thread/stress_aes.py index 0ff5544aa8..319087c487 100644 --- a/tests/thread/stress_aes.py +++ b/tests/thread/stress_aes.py @@ -218,10 +218,7 @@ class AES: ################################################################## # test code -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/stress_heap.py b/tests/thread/stress_heap.py index 41dfa5f376..9487b310ac 100644 --- a/tests/thread/stress_heap.py +++ b/tests/thread/stress_heap.py @@ -5,10 +5,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/thread_exit1.py b/tests/thread/thread_exit1.py index a6b00ca1f7..8e405c0d0f 100644 --- a/tests/thread/thread_exit1.py +++ b/tests/thread/thread_exit1.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/thread_exit2.py b/tests/thread/thread_exit2.py index 2381fa5ebc..842eabf895 100644 --- a/tests/thread/thread_exit2.py +++ b/tests/thread/thread_exit2.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/thread_lock2.py b/tests/thread/thread_lock2.py index c43b4b18d1..b476de2f7c 100644 --- a/tests/thread/thread_lock2.py +++ b/tests/thread/thread_lock2.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread lock = _thread.allocate_lock() diff --git a/tests/thread/thread_lock4.py b/tests/thread/thread_lock4.py index 7637d10b96..faa1fd724a 100644 --- a/tests/thread/thread_lock4.py +++ b/tests/thread/thread_lock4.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/thread_qstr1.py b/tests/thread/thread_qstr1.py index 9e7d7f0326..97783bd090 100644 --- a/tests/thread/thread_qstr1.py +++ b/tests/thread/thread_qstr1.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/thread_start1.py b/tests/thread/thread_start1.py index 6f08a135e4..673e46261b 100644 --- a/tests/thread/thread_start1.py +++ b/tests/thread/thread_start1.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/thread/thread_start2.py b/tests/thread/thread_start2.py index 40f8a05227..114a1025e2 100644 --- a/tests/thread/thread_start2.py +++ b/tests/thread/thread_start2.py @@ -4,10 +4,7 @@ # # SPDX-License-Identifier: MIT -try: - import utime as time -except ImportError: - import time +import time import _thread diff --git a/tests/unix/extra_coverage.py b/tests/unix/extra_coverage.py index bb22485026..32b8d90892 100644 --- a/tests/unix/extra_coverage.py +++ b/tests/unix/extra_coverage.py @@ -4,8 +4,8 @@ except NameError: print("SKIP") raise SystemExit -import uerrno -import uio +import errno +import io data = extra_coverage() @@ -18,7 +18,7 @@ print(hash(str(data[1], "utf8"))) # test streams stream = data[2] # has set_error and set_buf. Write always returns error -stream.set_error(uerrno.EAGAIN) # non-blocking error +stream.set_error(errno.EAGAIN) # non-blocking error print(stream.read()) # read all encounters non-blocking error print(stream.read(1)) # read 1 byte encounters non-blocking error print(stream.readline()) # readline encounters non-blocking error @@ -42,8 +42,8 @@ stream2 = data[3] # is textio print(stream2.read(1)) # read 1 byte encounters non-blocking error with textio stream # test BufferedWriter with stream errors -stream.set_error(uerrno.EAGAIN) -buf = uio.BufferedWriter(stream, 8) +stream.set_error(errno.EAGAIN) +buf = io.BufferedWriter(stream, 8) print(buf.write(bytearray(16))) # function defined in C++ code diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index b9742461e4..f91b64db3e 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -46,25 +46,25 @@ RuntimeError: RuntimeError: # repl ame__ -mport +port -builtins micropython __future__ _thread -_uasyncio aesio array audiocore -audiomixer bitmaptools cexample cmath -collections cppexample displayio gc -math qrio rainbowio struct -synthio termios traceback ubinascii -uctypes uerrno uhashlib uheapq -uio ujson ulab ulab.numpy -ulab.numpy.fft ulab.numpy.linalg ulab.scipy +builtins micropython __future__ _asyncio +_thread aesio array audiocore +audiomixer binascii bitmaptools cexample +cmath collections cppexample displayio +errno gc hashlib heapq +io json math os +qrio rainbowio random re +select struct synthio sys +termios time traceback uctypes +ulab ulab.numpy ulab.numpy.fft +ulab.numpy.linalg ulab.scipy ulab.scipy.linalg ulab.scipy.optimize ulab.scipy.signal ulab.scipy.special -ulab.utils uos urandom ure -uselect usys utime utimeq -uzlib zlib -ime +ulab.utils zlib +me -utime utimeq +rainbowio random argv atexit byteorder exc_info exit getsizeof implementation maxsize diff --git a/tests/unix/time.py b/tests/unix/time.py index 55a4b18aae..d1c03c103d 100644 --- a/tests/unix/time.py +++ b/tests/unix/time.py @@ -1,7 +1,4 @@ -try: - import utime as time -except ImportError: - import time +import time DAYS_PER_MONTH = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] From 4a6266517529c76a3363be8fd8b372104b04f061 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 22 Aug 2023 12:57:42 -0400 Subject: [PATCH 088/291] fix native tests --- .github/workflows/run-tests.yml | 2 +- tests/run-natmodtests.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 76422b1c3d..71f10339f3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -61,5 +61,5 @@ jobs: make -C examples/natmod/uzlib - name: Test native modules if: matrix.test == 'all' - run: ./run-natmodtests.py extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py + run: ./run-natmodtests.py extmod/{uheapq*,ure*,uzlib*}.py working-directory: tests diff --git a/tests/run-natmodtests.py b/tests/run-natmodtests.py index 2a0997c185..0942918d90 100755 --- a/tests/run-natmodtests.py +++ b/tests/run-natmodtests.py @@ -17,8 +17,6 @@ NATMOD_EXAMPLE_DIR = "../examples/natmod/" # Supported tests and their corresponding mpy module TEST_MAPPINGS = { - "btree": "btree/btree_$(ARCH).mpy", - "framebuf": "framebuf/framebuf_$(ARCH).mpy", "uheapq": "uheapq/uheapq_$(ARCH).mpy", "urandom": "urandom/urandom_$(ARCH).mpy", "ure": "ure/ure_$(ARCH).mpy", From e9208b9c2315ece4351801245f4f25852d5b3430 Mon Sep 17 00:00:00 2001 From: Jozsef Kiraly Date: Tue, 22 Aug 2023 18:00:18 +0100 Subject: [PATCH 089/291] fix: Allow duplicate PID for 4MB and 16MB variant --- tools/ci_check_duplicate_usb_vid_pid.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index f20630e886..e8cdb2d443 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -63,6 +63,7 @@ DEFAULT_CLUSTERLIST = { ], "0x239A:0x102E": ["weact_studio_pico", "weact_studio_pico_16mb"], "0x303A:0x8166": ["yd_esp32_s3_n8r8", "yd_esp32_s3_n16r8"], + "0x2E8A:0x1020": [ "waveshare_rp2040_plus_4mb", "waveshare_rp2040_plus_16mb"], } cli_parser = argparse.ArgumentParser( From ac5cb716fa680ecde0d3df382c733be23e52c484 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 22 Aug 2023 07:39:57 +0000 Subject: [PATCH 090/291] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1003 of 1003 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 22d4ff7e78..d0a815cd11 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-10 23:51+0000\n" +"PO-Revision-Date: 2023-08-22 21:28+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -440,7 +440,7 @@ msgstr "função externa 'yield'" #: py/compile.c msgid "* arg after **" -msgstr "" +msgstr "* arg após **" #: py/compile.c msgid "*x must be assignment target" @@ -2575,7 +2575,7 @@ msgstr "matriz/bytes são necessários no lado direito" #: py/asmxtensa.c msgid "asm overflow" -msgstr "" +msgstr "estouro asm" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" @@ -2668,7 +2668,7 @@ msgstr "o buffer é pequeno demais para os bytes requisitados" #: py/emitbc.c msgid "bytecode overflow" -msgstr "" +msgstr "estouro bytecode" #: py/objarray.c msgid "bytes length not a multiple of item size" @@ -2829,7 +2829,7 @@ msgstr "" #: extmod/moduasyncio.c msgid "can't wait" -msgstr "" +msgstr "não vejo a hora" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" @@ -3271,7 +3271,7 @@ msgstr "importação * não está no nível do módulo" #: py/persistentcode.c msgid "incompatible .mpy arch" -msgstr "" +msgstr "é incompatível com arquivo .mpy" #: py/persistentcode.c msgid "incompatible .mpy file" @@ -3745,7 +3745,7 @@ msgstr "não é um UUID com 128 bits" #: py/parse.c msgid "not a constant" -msgstr "" +msgstr "não é uma constante" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -3992,11 +3992,11 @@ msgstr "a porta deve ser > = 0" #: py/compile.c msgid "positional arg after **" -msgstr "" +msgstr "arg posicional após **" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "" +msgstr "arg posicional após o arg de palavra-chave" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -4227,7 +4227,7 @@ msgstr "os tobytes podem ser invocados apenas nas matrizes densas" #: py/compile.c msgid "too many args" -msgstr "" +msgstr "args demais" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" From eeb524edbeb05fd9bb7d5deda511d388ea7502d2 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 22 Aug 2023 08:03:15 +0000 Subject: [PATCH 091/291] Translated using Weblate (Swedish) Currently translated at 100.0% (1003 of 1003 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 6507055f56..3fe6408229 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-10 23:51+0000\n" +"PO-Revision-Date: 2023-08-22 21:28+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -437,7 +437,7 @@ msgstr "'yield' utanför funktion" #: py/compile.c msgid "* arg after **" -msgstr "" +msgstr "* arg efter **" #: py/compile.c msgid "*x must be assignment target" @@ -2546,7 +2546,7 @@ msgstr "array/bytes krävs på höger sida" #: 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" @@ -2639,7 +2639,7 @@ msgstr "buffert för liten för begärd längd" #: py/emitbc.c msgid "bytecode overflow" -msgstr "" +msgstr "bytecode overflow" #: py/objarray.c msgid "bytes length not a multiple of item size" @@ -2798,7 +2798,7 @@ msgstr "" #: extmod/moduasyncio.c msgid "can't wait" -msgstr "" +msgstr "kan inte vänta" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" @@ -3238,7 +3238,7 @@ msgstr "import * inte på modulnivå" #: py/persistentcode.c msgid "incompatible .mpy arch" -msgstr "" +msgstr "inkompatibel .mpy-arkitektur" #: py/persistentcode.c msgid "incompatible .mpy file" @@ -3709,7 +3709,7 @@ msgstr "inte en 128-bitars UUID" #: py/parse.c msgid "not a constant" -msgstr "" +msgstr "inte en konstant" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -3952,11 +3952,11 @@ msgstr "port måste vara >= 0" #: py/compile.c msgid "positional arg after **" -msgstr "" +msgstr "positionsargument efter **" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "" +msgstr "positionsargument efter nyckelord arg" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -4187,7 +4187,7 @@ msgstr "tobyte kan enbart anropas för täta matriser" #: py/compile.c msgid "too many args" -msgstr "" +msgstr "för mpnga argument" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" From cb3badc9960d52951c95a29415a2d120cceb4029 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Tue, 22 Aug 2023 23:28:42 +0200 Subject: [PATCH 092/291] 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 | 47 +++++++++++-------------- locale/cs.po | 50 +++++++++++++------------- locale/de_DE.po | 76 ++++++++++++++++++++++++---------------- locale/el.po | 63 ++++++++++++++++++--------------- locale/en_GB.po | 71 ++++++++++++++++++++++--------------- locale/es.po | 73 ++++++++++++++++++++++---------------- locale/fil.po | 47 +++++++++++-------------- locale/fr.po | 71 +++++++++++++++++++++---------------- locale/hi.po | 44 ++++++++++------------- locale/it_IT.po | 54 ++++++++++++++-------------- locale/ja.po | 57 +++++++++++++++--------------- locale/ko.po | 44 ++++++++++------------- locale/nl.po | 54 ++++++++++++++-------------- locale/pl.po | 52 +++++++++++++-------------- locale/pt_BR.po | 74 ++++++++++++++++++++++---------------- locale/ru.po | 50 +++++++++++++------------- locale/sv.po | 73 ++++++++++++++++++++++---------------- locale/tr.po | 50 +++++++++++++------------- locale/zh_Latn_pinyin.po | 72 ++++++++++++++++++++++--------------- 19 files changed, 595 insertions(+), 527 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index c1c0f13d5b..742939386f 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -33,8 +33,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -396,10 +396,6 @@ msgstr "'break' diluar loop" msgid "'continue' outside loop" msgstr "'continue' diluar loop" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' membutuhkan setidaknya 2 argumen" @@ -669,11 +665,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "Buffer bukan bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Buffer terlalu kecil" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -693,6 +684,12 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "Buffer terlalu pendek untuk %d byte" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1040,10 +1037,6 @@ msgstr "Gagal melepaskan mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Gagal menulis flash internal." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "File sudah ada" @@ -1119,6 +1112,10 @@ msgstr "Grup sudah digunakan" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1775,6 +1772,10 @@ msgstr "Tambahkan module apapun pada filesystem\n" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Buffer awalan harus ada di heap" @@ -2010,10 +2011,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "Sampel bits_per_sampel tidak cocok dengan mixer" @@ -2606,8 +2603,7 @@ msgstr "ukuran buffer harus sesuai dengan format" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3893,10 +3889,6 @@ msgstr "parameter harus menjadi register dalam urutan r0 sampai r3" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4208,7 +4200,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" @@ -4405,6 +4397,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "Buffer is too small" +#~ msgstr "Buffer terlalu kecil" + #~ msgid "Corrupt .mpy file" #~ msgstr "File .mpy rusak" diff --git a/locale/cs.po b/locale/cs.po index 6fb252a268..372fb71e74 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -35,8 +35,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -397,10 +397,6 @@ msgstr "'break' je volán vně cyklu" msgid "'continue' outside loop" msgstr "'continue' je volán vně cyklu" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "Objekt 'coroutine' není iterátor" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' vyžaduje nejméně 2 argumenty" @@ -670,11 +666,6 @@ msgstr "Prvky bufferu musí být 4 bajty dlouhé nebo méně" msgid "Buffer is not a bytearray." msgstr "Buffer není bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Vyrovnávací paměť je příliš malá" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -694,6 +685,12 @@ msgstr "Buffer musí být násobkem 512 bajtů" msgid "Buffer too short by %d bytes" msgstr "Buffer je příliš krátký o %d bajtů" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Buffery musí mít stejnou velikost" @@ -1038,10 +1035,6 @@ msgstr "" msgid "Failed to write internal flash." msgstr "Nepodařilo se zapsat do interní paměti." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "soubor existuje" @@ -1119,6 +1112,10 @@ msgstr "Skupina již byla použita" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1766,6 +1763,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1999,10 +2000,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2593,8 +2590,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3879,10 +3875,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4194,7 +4186,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" @@ -4391,6 +4383,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "Objekt 'coroutine' není iterátor" + +#~ msgid "Buffer is too small" +#~ msgstr "Vyrovnávací paměť je příliš malá" + #~ msgid "Corrupt .mpy file" #~ msgstr "Poškozený soubor .mpy" diff --git a/locale/de_DE.po b/locale/de_DE.po index 5b59af8741..b6bbdaa773 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -34,12 +34,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"Bitte erstellen Sie ein Problem (Issue) für Ihr Programm unter https://" -"github.com/adafruit/circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -407,10 +404,6 @@ msgstr "'break' außerhalb einer Schleife" msgid "'continue' outside loop" msgstr "'continue' außerhalb einer Schleife" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' Objekt ist kein Iterator" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' erfordert mindestens zwei Argumente" @@ -680,11 +673,6 @@ msgstr "Puffer-Elemente müssen 4 Bytes lang oder kürzer sein" msgid "Buffer is not a bytearray." msgstr "Der Buffer ist kein Byte-Array." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Der Puffer ist zu klein" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -704,6 +692,12 @@ msgstr "Der Puffer muss ein vielfaches von 512 bytes sein" msgid "Buffer too short by %d bytes" msgstr "Puffer um %d Bytes zu kurz" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Buffers müssen gleiche Größe haben" @@ -1055,10 +1049,6 @@ msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x" msgid "Failed to write internal flash." msgstr "Interner Flash konnte nicht geschrieben werden." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "Hardware hat Fehler festgestellt." - #: py/moduerrno.c msgid "File exists" msgstr "Datei existiert" @@ -1138,6 +1128,10 @@ msgstr "Gruppe schon benutzt" msgid "Half duplex SPI is not implemented" msgstr "Hald-Duplex SPI is tnicht implementiert" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1799,6 +1793,10 @@ msgstr "und alle Module im Dateisystem\n" msgid "Polygon needs at least 3 points" msgstr "Polygone brauchen mindestens 3 Punkte" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Präfix-Puffer muss sich auf dem Heap befinden" @@ -2036,12 +2034,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Die Länge von rgb_pins muss 6, 12, 18, 24 oder 30 betragen" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" -"Die Spannung ist eingebrochen. Stelle sicher, dass genügend Leistung " -"verfügbar ist." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2650,8 +2642,7 @@ msgstr "Die Puffergröße muss zum Format passen" msgid "buffer slices must be of equal length" msgstr "Puffersegmente müssen gleich lang sein" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "Puffer zu klein" @@ -3964,10 +3955,6 @@ msgstr "Parameter müssen Register im Bereich von r0 bis r3 sein" msgid "pixel coordinates out of bounds" msgstr "Pixelkoordinaten außerhalb der Grenzen" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader muss displayio.Palette oder displayio.ColorConverter sein" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "Abfrage der Datei unter Win32 nicht verfügbar" @@ -4279,7 +4266,7 @@ msgstr "Typ '%q' ist kein akzeptierter Basis-Typ" msgid "type is not an acceptable base type" msgstr "Typ ist kein akzeptierter Basis-Typ" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "Typ-Objekt '%q' hat kein Attribut '%q'" @@ -4478,6 +4465,33 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Bitte erstellen Sie ein Problem (Issue) für Ihr Programm unter https://" +#~ "github.com/adafruit/circuitpython/issues." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "'coroutine' Objekt ist kein Iterator" + +#~ msgid "Buffer is too small" +#~ msgstr "Der Puffer ist zu klein" + +#~ msgid "Fault detected by hardware." +#~ msgstr "Hardware hat Fehler festgestellt." + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "" +#~ "Die Spannung ist eingebrochen. Stelle sicher, dass genügend Leistung " +#~ "verfügbar ist." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader muss displayio.Palette oder displayio.ColorConverter sein" + #~ msgid "Corrupt .mpy file" #~ msgstr "Beschädigte .mpy Datei" diff --git a/locale/el.po b/locale/el.po index 9a15d4af5c..8ecc871685 100644 --- a/locale/el.po +++ b/locale/el.po @@ -38,12 +38,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"Παρακαλώ δημιουργήστε ένα πρόβλημα στο https://github.com/adafruit/" -"circuitpython/issues με το πρόγραμμά σας." #: supervisor/shared/safe_mode.c msgid "" @@ -408,10 +405,6 @@ msgstr "'break' εκτός επανάληψης" msgid "'continue' outside loop" msgstr "'continue' εκτός επανάληψης" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' αντικείμενο δεν μπορεί να χρησιμοποιηθεί σαν επαναλήπτης" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' απαιτεί τουλάχιστον 2 παραμέτρους" @@ -681,11 +674,6 @@ msgstr "Στοιχεία του buffer πρέπει να είναι το πολ msgid "Buffer is not a bytearray." msgstr "Το buffer δεν είναι ένα bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Πολύ μικρό buffer" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -705,6 +693,12 @@ msgstr "Buffer πρέπει να είναι πολλαπλάσιο των 512 by msgid "Buffer too short by %d bytes" msgstr "Buffer πολύ μικρό κατα %d bytes" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Τα Buffers πρέπει να είναι του ιδίου μεγέθους" @@ -1057,10 +1051,6 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1136,6 +1126,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1782,6 +1776,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2015,10 +2013,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2609,8 +2603,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3895,10 +3888,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4210,7 +4199,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" @@ -4407,6 +4396,22 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Παρακαλώ δημιουργήστε ένα πρόβλημα στο https://github.com/adafruit/" +#~ "circuitpython/issues με το πρόγραμμά σας." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "" +#~ "'coroutine' αντικείμενο δεν μπορεί να χρησιμοποιηθεί σαν επαναλήπτης" + +#~ msgid "Buffer is too small" +#~ msgstr "Πολύ μικρό buffer" + #~ msgid "Corrupt .mpy file" #~ msgstr "Κατεστραμένο .mpy αρχείο" diff --git a/locale/en_GB.po b/locale/en_GB.po index 6801196cb8..d48bbffe5b 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -36,12 +36,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -406,10 +403,6 @@ msgstr "'break' outside loop" msgid "'continue' outside loop" msgstr "'continue' outside loop" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' object is not an iterator" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' requires at least 2 arguments" @@ -679,11 +672,6 @@ msgstr "Buffer elements must be 4 bytes long or less" msgid "Buffer is not a bytearray." msgstr "Buffer is not a bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Buffer is too small" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -703,6 +691,12 @@ msgstr "Buffer must be a multiple of 512 bytes" msgid "Buffer too short by %d bytes" msgstr "Buffer too short by %d bytes" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Buffers must be same size" @@ -1047,10 +1041,6 @@ msgstr "Failed to release mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Failed to write internal flash." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "Fault detected by hardware." - #: py/moduerrno.c msgid "File exists" msgstr "File exists" @@ -1127,6 +1117,10 @@ msgstr "Group already used" msgid "Half duplex SPI is not implemented" msgstr "Half duplex SPI is not implemented" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1782,6 +1776,10 @@ msgstr "Plus any modules on the filesystem\n" msgid "Polygon needs at least 3 points" msgstr "Polygon needs at least 3 points" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefix buffer must be on the heap" @@ -2013,10 +2011,6 @@ msgstr "The above exception was the direct cause of the following exception:" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "The length of rgb_pins must be 6, 12, 18, 24, or 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "The power dipped. Make sure you are providing enough power." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "The sample's bits_per_sample does not match the mixer's" @@ -2616,8 +2610,7 @@ msgstr "Buffer size must match format" msgid "buffer slices must be of equal length" msgstr "Buffer slices must be of equal length" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "Buffer too small" @@ -3907,10 +3900,6 @@ msgstr "parameters must be registers in sequence r0 to r3" msgid "pixel coordinates out of bounds" msgstr "pixel coordinates out of bounds" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader must be displayio.Palette or displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "poll on file not available on win32" @@ -4222,7 +4211,7 @@ msgstr "type '%q' is not an acceptable base type" msgid "type is not an acceptable base type" msgstr "type is not an acceptable base type" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "type object '%q' has no attribute '%q'" @@ -4419,6 +4408,30 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "'coroutine' object is not an iterator" + +#~ msgid "Buffer is too small" +#~ msgstr "Buffer is too small" + +#~ msgid "Fault detected by hardware." +#~ msgstr "Fault detected by hardware." + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "The power dipped. Make sure you are providing enough power." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "pixel_shader must be displayio.Palette or displayio.ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "Corrupt .mpy file" diff --git a/locale/es.po b/locale/es.po index 650c063651..31fea47431 100644 --- a/locale/es.po +++ b/locale/es.po @@ -37,12 +37,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." -msgstr "" -"\n" -"Por favor describa su problema en https://github.com/adafruit/circuitpython/" +"Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -408,10 +405,6 @@ msgstr "'break' fuera de un bucle" msgid "'continue' outside loop" msgstr "'continue' fuera de un bucle" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "el objeto 'coroutine' no es un iterador" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' requiere como mínimo 2 argumentos" @@ -683,11 +676,6 @@ msgstr "Los elementos del buffer deben tener una longitud de 4 bytes o menos" msgid "Buffer is not a bytearray." msgstr "Buffer no es un bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Buffer es muy pequeño" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -708,6 +696,12 @@ msgstr "El buffer deber ser un múltiplo de 512 bytes" msgid "Buffer too short by %d bytes" msgstr "Buffer muy corto por %d bytes" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Los buffers deben ser del mismo tamaño" @@ -1059,10 +1053,6 @@ msgstr "No se puede liberar el mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Error al escribir el flash interno." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "Falló detectado por el hardware." - #: py/moduerrno.c msgid "File exists" msgstr "El archivo ya existe" @@ -1144,6 +1134,10 @@ msgstr "Grupo ya está siendo utilizado" msgid "Half duplex SPI is not implemented" msgstr "SPI Half Duplex no está implementado" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1809,6 +1803,10 @@ msgstr "Además de cualquier módulo en el sistema de archivos\n" msgid "Polygon needs at least 3 points" msgstr "El polígono necesita al menos 3 puntos" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "El prefijo del buffer debe estar en el heap" @@ -2045,11 +2043,6 @@ msgstr "La excepción fue la causa directa de la excepción siguiente:" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "La longitud de rgb_pins debe ser 6, 12, 18, 24, o 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" -"La potencia calló. Asegúrese que está suministrando suficiente energía." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "Los bits_per_sample del sample no igualan a los del mixer" @@ -2656,8 +2649,7 @@ msgstr "el tamaño del buffer debe de coincidir con el formato" msgid "buffer slices must be of equal length" msgstr "Las secciones del buffer necesitan tener longitud igual" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "buffer demasiado pequeño" @@ -3956,10 +3948,6 @@ msgstr "los parametros deben ser registros en secuencia del r0 al r3" msgid "pixel coordinates out of bounds" msgstr "coordenadas del pixel fuera de límites" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "el sondeo del archivo no esta disponible en win32" @@ -4272,7 +4260,7 @@ msgstr "type '%q' no es un tipo de base aceptable" msgid "type is not an acceptable base type" msgstr "type no es un tipo de base aceptable" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "objeto de tipo '%q' no tiene atributo '%q'" @@ -4469,6 +4457,31 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Por favor describa su problema en https://github.com/adafruit/" +#~ "circuitpython/issues." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "el objeto 'coroutine' no es un iterador" + +#~ msgid "Buffer is too small" +#~ msgstr "Buffer es muy pequeño" + +#~ msgid "Fault detected by hardware." +#~ msgstr "Falló detectado por el hardware." + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "" +#~ "La potencia calló. Asegúrese que está suministrando suficiente energía." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "pixel_shader debe ser displayio.Palette o displayio.ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "Archivo .mpy corrupto" diff --git a/locale/fil.po b/locale/fil.po index f38a83830d..fc3e801581 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -32,8 +32,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -395,10 +395,6 @@ msgstr "'break' sa labas ng loop" msgid "'continue' outside loop" msgstr "'continue' sa labas ng loop" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' kailangan ng hindi bababa sa 2 argument" @@ -669,11 +665,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "" -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -693,6 +684,12 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1040,10 +1037,6 @@ msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" msgid "Failed to write internal flash." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "Mayroong file" @@ -1119,6 +1112,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1769,6 +1766,10 @@ msgstr "Kasama ang kung ano pang modules na sa filesystem\n" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2000,10 +2001,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "Ang bits_per_sample ng sample ay hindi tugma sa mixer" @@ -2597,8 +2594,7 @@ msgstr "aarehas na haba dapat ang buffer slices" msgid "buffer slices must be of equal length" msgstr "aarehas na haba dapat ang buffer slices" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "masyadong maliit ang buffer" @@ -3900,10 +3896,6 @@ msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence r0 hanggang r3" msgid "pixel coordinates out of bounds" msgstr "wala sa sakop ang address" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4215,7 +4207,7 @@ msgstr "hindi maari ang type na '%q' para sa base type" msgid "type is not an acceptable base type" msgstr "hindi puede ang type para sa base type" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "type object '%q' ay walang attribute '%q'" @@ -4412,6 +4404,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "pixel_shader ay dapat displayio.Palette o displayio.ColorConverter" + #~ msgid "" #~ "Incompatible .mpy file. Please update all .mpy files. See http://adafru." #~ "it/mpy-update for more info." diff --git a/locale/fr.po b/locale/fr.po index 297cc5b800..1d246a9de0 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -37,12 +37,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"Veuillez signaler un problème avec votre programme sur https://github.com/" -"adafruit/circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -410,10 +407,6 @@ msgstr "'break' dehors d'une boucle" msgid "'continue' outside loop" msgstr "'continue' dehors d'une boucle" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "L'objet \"coroutine\" n'est pas un itérateur" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' nécessite au moins 2 paramètres" @@ -685,11 +678,6 @@ msgstr "Les éléments du tampon doivent faire 4 octets ou moins" msgid "Buffer is not a bytearray." msgstr "Le tampon n'est pas un 'bytearray'." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Le tampon est trop petit" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -709,6 +697,12 @@ msgstr "La mémoire tampon doit être un multiple de 512" msgid "Buffer too short by %d bytes" msgstr "Tampon trop court de %d octets" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Les tampons doivent avoir la même taille" @@ -1068,10 +1062,6 @@ msgstr "Impossible de libérer mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Échec de l'écriture vers flash interne." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "Le fichier existe" @@ -1154,6 +1144,10 @@ msgstr "Groupe déjà utilisé" msgid "Half duplex SPI is not implemented" msgstr "Le half duplex du SPI n'est pas implémenté" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1819,6 +1813,10 @@ msgstr "Ainsi que tout autres modules présents sur le système de fichiers\n" msgid "Polygon needs at least 3 points" msgstr "Polygon a besoin d'au moins 3 points" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Le tampon de préfixe doit être sur la pile" @@ -2054,10 +2052,6 @@ msgstr "L'exception précédente est la cause directe de l'exception suivante:" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "La taille de rgb_pins doit être 6, 12, 18, 24 ou 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "La puissance a chu. Assurez vous de fournir assez de puissance." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2667,8 +2661,7 @@ msgstr "la taille du tampon doit correspondre au format" msgid "buffer slices must be of equal length" msgstr "les tranches de tampon doivent être de longueurs égales" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "tampon trop petit" @@ -3979,11 +3972,6 @@ msgstr "les paramètres doivent être des registres dans la séquence r0 à r3" msgid "pixel coordinates out of bounds" msgstr "coordonnées de pixel hors limites" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" -"pixel_shader doit être un objet displayio.Palette ou displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "le polling sur un fichier n'est pas disponible sous win32" @@ -4296,7 +4284,7 @@ msgstr "le type '%q' n'est pas un type de base accepté" msgid "type is not an acceptable base type" msgstr "le type n'est pas un type de base accepté" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "l'objet de type '%q' n'a pas d'attribut '%q'" @@ -4493,6 +4481,29 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Veuillez signaler un problème avec votre programme sur https://github.com/" +#~ "adafruit/circuitpython/issues." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "L'objet \"coroutine\" n'est pas un itérateur" + +#~ msgid "Buffer is too small" +#~ msgstr "Le tampon est trop petit" + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "La puissance a chu. Assurez vous de fournir assez de puissance." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader doit être un objet displayio.Palette ou displayio." +#~ "ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "Fichier .mpy corrompu" diff --git a/locale/hi.po b/locale/hi.po index d0c8e3e366..f3633dbd78 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -31,8 +31,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -393,10 +393,6 @@ msgstr "" msgid "'continue' outside loop" msgstr "" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "" @@ -664,11 +660,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "" -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -688,6 +679,12 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1030,10 +1027,6 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1109,6 +1102,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1755,6 +1752,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1986,10 +1987,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2580,8 +2577,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3866,10 +3862,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4181,7 +4173,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index ceacac5e81..f865aee666 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -34,8 +34,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -398,10 +398,6 @@ msgstr "'break' fuori del ciclo" msgid "'continue' outside loop" msgstr "'continue' fuori del ciclo" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "L'oggetto 'coroutine' non è un iteratore" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' richiede almeno 2 argomenti" @@ -673,11 +669,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "Buffer non è un array di bites." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Buffer troppo piccolo" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -697,6 +688,12 @@ msgstr "Il buffer deve essere un multiplo di 512 bytes" msgid "Buffer too short by %d bytes" msgstr "Buffer troppo piccolo di %d bytes" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1042,10 +1039,6 @@ msgstr "Impossibile rilasciare il mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "File esistente" @@ -1121,6 +1114,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1776,6 +1773,10 @@ msgstr "Imposssibile rimontare il filesystem" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2007,10 +2008,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2606,8 +2603,7 @@ msgstr "slice del buffer devono essere della stessa lunghezza" msgid "buffer slices must be of equal length" msgstr "slice del buffer devono essere della stessa lunghezza" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "buffer troppo piccolo" @@ -3910,10 +3906,6 @@ msgstr "parametri devono essere i registri in sequenza da a2 a a5" msgid "pixel coordinates out of bounds" msgstr "indirizzo fuori limite" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4225,7 +4217,7 @@ msgstr "il tipo '%q' non è un tipo di base accettabile" msgid "type is not an acceptable base type" msgstr "il tipo non è un tipo di base accettabile" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "l'oggetto di tipo '%q' non ha l'attributo '%q'" @@ -4422,6 +4414,16 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "L'oggetto 'coroutine' non è un iteratore" + +#~ msgid "Buffer is too small" +#~ msgstr "Buffer troppo piccolo" + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader deve essere displayio.Palette o displayio.ColorConverter" + #~ msgid "" #~ "Incompatible .mpy file. Please update all .mpy files. See http://adafru." #~ "it/mpy-update for more info." diff --git a/locale/ja.po b/locale/ja.po index 72fca62efd..c74f672a03 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -37,8 +37,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -400,10 +400,6 @@ msgstr "ループ外でのbreak" msgid "'continue' outside loop" msgstr "ループ外でのcontinue" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' オブジェクトはイテレータではありません" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data'には少なくとも2つの引数が必要" @@ -673,11 +669,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "バッファがbytearrayではありません" -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "バッファが小さすぎます" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -697,6 +688,12 @@ msgstr "バッファは512の倍数でなければなりません" msgid "Buffer too short by %d bytes" msgstr "バッファが %d バイト足りません" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1041,10 +1038,6 @@ msgstr "ミューテックスの開放に失敗。エラー 0x%04x" msgid "Failed to write internal flash." msgstr "内部フラッシュ書き込みに失敗" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "ファイルが存在します" @@ -1120,6 +1113,10 @@ msgstr "グループはすでに使われています" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1768,6 +1765,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "ポリゴンには少なくとも3つの点が必要" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefixバッファはヒープ上になければなりません" @@ -2000,10 +2001,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "サンプルのbits_per_sampleがミキサーのそれと一致しません" @@ -2595,8 +2592,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "バッファのスライスは同じ長さでなければなりません" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3886,12 +3882,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" -"pixel_shaderはdisplayio.Paletteかdisplayio.ColorConverterのどちらかでなければ" -"なりません" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4203,7 +4193,7 @@ msgstr "型'%q'はベース型として使えません" msgid "type is not an acceptable base type" msgstr "この型はベース型にできません" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" @@ -4400,6 +4390,17 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "'coroutine' オブジェクトはイテレータではありません" + +#~ msgid "Buffer is too small" +#~ msgstr "バッファが小さすぎます" + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shaderはdisplayio.Paletteかdisplayio.ColorConverterのどちらかでなけ" +#~ "ればなりません" + #~ msgid "Corrupt .mpy file" #~ msgstr "破損した .mpy ファイル" diff --git a/locale/ko.po b/locale/ko.po index 3440a5263b..09ae2f0120 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -32,8 +32,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -394,10 +394,6 @@ msgstr "'break' 는 루프 외부에 있습니다" msgid "'continue' outside loop" msgstr "'continue' 는 루프 외부에 있습니다" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' 에는 >=2 개의 독립변수가 필요합니다" @@ -667,11 +663,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "" -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -691,6 +682,12 @@ msgstr "" msgid "Buffer too short by %d bytes" msgstr "" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1033,10 +1030,6 @@ msgstr "" msgid "Failed to write internal flash." msgstr "" -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "" @@ -1112,6 +1105,10 @@ msgstr "" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1758,6 +1755,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1989,10 +1990,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2584,8 +2581,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3870,10 +3866,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4185,7 +4177,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index c7ef29adab..befcd1f2c3 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -31,8 +31,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -393,10 +393,6 @@ msgstr "'break' buiten de loop" msgid "'continue' outside loop" msgstr "'continue' buiten de loop" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' object is geen iterator" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' vereist op zijn minst 2 argumenten" @@ -666,11 +662,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "Buffer is geen bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Buffer is te klein" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -690,6 +681,12 @@ msgstr "Buffer moet een veelvoud van 512 bytes zijn" msgid "Buffer too short by %d bytes" msgstr "Buffer is %d bytes te klein" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1035,10 +1032,6 @@ msgstr "Mislukt mutex los te laten, err 0x%04x" msgid "Failed to write internal flash." msgstr "Schrijven naar interne flash mislukt." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "Bestand bestaat" @@ -1115,6 +1108,10 @@ msgstr "Groep al gebruikt" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1772,6 +1769,10 @@ msgstr "En iedere module in het bestandssysteem\n" msgid "Polygon needs at least 3 points" msgstr "Polygon heeft op zijn minst 3 punten nodig" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefix buffer moet op de heap zijn" @@ -2005,10 +2006,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "De lengte van rgb_pins moet 6, 12, 18, 24 of 30 zijn" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "De sample's bits_per_sample komen niet overeen met die van de mixer" @@ -2605,8 +2602,7 @@ msgstr "grootte van de buffer moet overeenkomen met het formaat" msgid "buffer slices must be of equal length" msgstr "buffer slices moeten van gelijke grootte zijn" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "buffer te klein" @@ -3898,10 +3894,6 @@ msgstr "parameters moeten registers zijn in de volgorde r0 tot r3" msgid "pixel coordinates out of bounds" msgstr "pixel coördinaten buiten bereik" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader moet displayio.Palette of displayio.ColorConverter zijn" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4213,7 +4205,7 @@ msgstr "type '%q' is geen aanvaardbaar basistype" msgid "type is not an acceptable base type" msgstr "type is geen aanvaardbaar basistype" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "objecttype '%q' heeft geen attribuut '%q'" @@ -4410,6 +4402,16 @@ 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 "'coroutine' object is not an iterator" +#~ msgstr "'coroutine' object is geen iterator" + +#~ msgid "Buffer is too small" +#~ msgstr "Buffer is te klein" + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader moet displayio.Palette of displayio.ColorConverter zijn" + #~ msgid "Corrupt .mpy file" #~ msgstr "Corrupt .mpy bestand" diff --git a/locale/pl.po b/locale/pl.po index 35929938e0..a58820be9d 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -33,8 +33,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -395,10 +395,6 @@ msgstr "'break' poza pętlą" msgid "'continue' outside loop" msgstr "'continue' poza pętlą" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' wymaga 2 lub więcej argumentów" @@ -668,11 +664,6 @@ msgstr "" msgid "Buffer is not a bytearray." msgstr "" -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Bufor jest za mały" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -692,6 +683,12 @@ msgstr "Bufor musi być wielokrotnością 512 bajtów" msgid "Buffer too short by %d bytes" msgstr "Bufor za krótki o %d bajtów" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "" @@ -1036,10 +1033,6 @@ msgstr "Nie udało się zwolnić blokady, błąd 0x%04x" msgid "Failed to write internal flash." msgstr "Nie udało się zapisać wewnętrznej pamięci flash." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "Plik istnieje" @@ -1115,6 +1108,10 @@ msgstr "Grupa już używana" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1761,6 +1758,10 @@ msgstr "Oraz moduły w systemie plików\n" msgid "Polygon needs at least 3 points" msgstr "Wielokąt musi mieć co najmniej 3 punkty" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -1992,10 +1993,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "Wartość bits_per_sample nie pasuje do miksera" @@ -2586,8 +2583,7 @@ msgstr "wielkość bufora musi pasować do formatu" msgid "buffer slices must be of equal length" msgstr "fragmenty bufora muszą mieć tę samą długość" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "zbyt mały bufor" @@ -3873,11 +3869,6 @@ msgstr "parametry muszą być rejestrami w kolejności r0 do r3" msgid "pixel coordinates out of bounds" msgstr "współrzędne piksela poza zakresem" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" -"pixel_shader musi być typu displayio.Palette lub dispalyio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4189,7 +4180,7 @@ msgstr "typ '%q' nie może być bazowy" msgid "type is not an acceptable base type" msgstr "typ nie może być bazowy" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "typ '%q' nie ma atrybutu '%q'" @@ -4386,6 +4377,13 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Buffer is too small" +#~ msgstr "Bufor jest za mały" + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader musi być typu displayio.Palette lub dispalyio.ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "Uszkodzony plik .mpy" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index d0a815cd11..258a06738c 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -35,12 +35,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"Relate o problema com seu programa em https://github.com/adafruit/" -"circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -410,10 +407,6 @@ msgstr "'break' fora do loop" msgid "'continue' outside loop" msgstr "'continue' fora do loop" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "O objeto 'corrotina' não é um iterador" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' exige pelo menos 2 argumentos" @@ -685,11 +678,6 @@ msgstr "Os elementos do buffer devem ter 4 bytes de comprimento ou menos" msgid "Buffer is not a bytearray." msgstr "O buffer não é um bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "O buffer é muito pequeno" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -709,6 +697,12 @@ msgstr "O buffer deve ser um múltiplo de 512 bytes" msgid "Buffer too short by %d bytes" msgstr "O buffer é muito curto em %d bytes" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Os buffers devem ter o mesmo tamanho" @@ -1058,10 +1052,6 @@ msgstr "Houve uma falha ao liberar o mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Falha ao gravar o flash interno." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "Falha detectada pelo hardware." - #: py/moduerrno.c msgid "File exists" msgstr "Arquivo já existe" @@ -1141,6 +1131,10 @@ msgstr "O grupo já está em uso" msgid "Half duplex SPI is not implemented" msgstr "O SPI half duplex ainda não está implementado" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1807,6 +1801,10 @@ msgstr "Além de quaisquer módulos no sistema de arquivos\n" msgid "Polygon needs at least 3 points" msgstr "O Polígono precisa de pelo menos 3 pontos" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2044,11 +2042,6 @@ msgstr "A exceção acima foi a causa direta da seguinte exceção:" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "O comprimento dos rgb_pins devem ser 6, 12, 18, 24, ou 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" -"A alimentação foi reduzida. Certifique-se de fornecer energia suficiente." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "A amostragem bits_per_sample não coincide com a do mixer" @@ -2657,8 +2650,7 @@ msgstr "o tamanho do buffer deve coincidir com o formato" msgid "buffer slices must be of equal length" msgstr "as fatias do buffer devem ter o mesmo comprimento" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "o buffer é muito pequeno" @@ -3965,10 +3957,6 @@ msgstr "os parâmetros devem ser registradores na sequência r0 até r3" msgid "pixel coordinates out of bounds" msgstr "as coordenadas do pixel estão fora dos limites" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "o pixel_shader deve ser displayio.Palette ou displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "a sondagem no arquivo não está disponível no win32" @@ -4280,7 +4268,7 @@ msgstr "o tipo '%q' não é um tipo base aceitável" msgid "type is not an acceptable base type" msgstr "tipo não é um tipo base aceitável" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "o objeto tipo '%q' não possuí atributo '%q'" @@ -4477,6 +4465,32 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Relate o problema com seu programa em https://github.com/adafruit/" +#~ "circuitpython/issues." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "O objeto 'corrotina' não é um iterador" + +#~ msgid "Buffer is too small" +#~ msgstr "O buffer é muito pequeno" + +#~ msgid "Fault detected by hardware." +#~ msgstr "Falha detectada pelo hardware." + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "" +#~ "A alimentação foi reduzida. Certifique-se de fornecer energia suficiente." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "o pixel_shader deve ser displayio.Palette ou displayio.ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "Arquivo .mpy corrompido" diff --git a/locale/ru.po b/locale/ru.po index ee512bdd65..789dc004de 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -37,8 +37,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -400,10 +400,6 @@ msgstr "'break' вне цикла" msgid "'continue' outside loop" msgstr "'continue' вне цикла" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "Объект 'coroutine' не является итератором" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' требует как минимум 2 аргумента" @@ -677,11 +673,6 @@ msgstr "Элементы буфера должны иметь длину не б msgid "Buffer is not a bytearray." msgstr "Буфер не является байтовым массивом (bytearray)." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Буфер слишком мал" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -701,6 +692,12 @@ msgstr "Буфер должен быть кратен 512" msgid "Buffer too short by %d bytes" msgstr "Буфер слишком короткий на %d байт" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Буферы должны быть одинакового размера" @@ -1059,10 +1056,6 @@ msgstr "Не удалось освободить mutex, ошибка 0x%04x" msgid "Failed to write internal flash." msgstr "Не удалось записать внутреннюю флэш-память." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "Файл существует" @@ -1146,6 +1139,10 @@ msgstr "Группа уже используется" msgid "Half duplex SPI is not implemented" msgstr "Полудуплексный SPI не реализован" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1808,6 +1805,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2041,10 +2042,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Длина rgb_pins должна быть 6, 12, 18, 24 или 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2637,8 +2634,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3923,10 +3919,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4238,7 +4230,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" @@ -4435,6 +4427,12 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "Объект 'coroutine' не является итератором" + +#~ msgid "Buffer is too small" +#~ msgstr "Буфер слишком мал" + #~ msgid "Corrupt .mpy file" #~ msgstr "Файл .mpy поврежден" diff --git a/locale/sv.po b/locale/sv.po index 3fe6408229..fea4e31f55 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -35,12 +35,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"Skicka in ett ärende med ditt program till https://github.com/adafruit/" -"circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -407,10 +404,6 @@ msgstr "'break' utanför loop" msgid "'continue' outside loop" msgstr "'continue' utanför loop" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "objektet 'coroutine\" är inte en iterator" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' kräver minst 2 argument" @@ -680,11 +673,6 @@ msgstr "Buffertelement måste vara fyra byte långa eller mindre" msgid "Buffer is not a bytearray." msgstr "Buffert är inte en bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Bufferten är för liten" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -704,6 +692,12 @@ msgstr "Bufferten måste vara en multipel av 512 byte" msgid "Buffer too short by %d bytes" msgstr "Buffert är %d bytes för kort" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Buffertarna måste ha samma storlek" @@ -1051,10 +1045,6 @@ msgstr "Det gick inte att frigöra mutex, fel 0x%04x" msgid "Failed to write internal flash." msgstr "Det gick inte att skriva till intern flash." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "Fel upptäckt av hårdvara." - #: py/moduerrno.c msgid "File exists" msgstr "Filen finns redan" @@ -1132,6 +1122,10 @@ msgstr "Grupp används redan" msgid "Half duplex SPI is not implemented" msgstr "Halvduplex SPI är inte implementerat" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1791,6 +1785,10 @@ msgstr "Plus eventuella moduler i filsystemet\n" msgid "Polygon needs at least 3 points" msgstr "Polygonen behöver minst 3 punkter" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Prefixbufferten måste finnas på heap" @@ -2024,10 +2022,6 @@ msgstr "Ovanstående undantag var den direkta orsaken till följande undantag:" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Längden på rgb_pins vara 6, 12, 18, 24 eller 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "Spänningen sjönk. Se till att du ger tillräckligt med ström." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "Samplingens bits_per_sample matchar inte mixerns" @@ -2628,8 +2622,7 @@ msgstr "buffertstorleken måste matcha formatet" msgid "buffer slices must be of equal length" msgstr "buffertsegmenten måste vara lika långa" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "buffert för liten" @@ -3924,11 +3917,6 @@ msgstr "parametrarna måste registreras i följd r0-r3" msgid "pixel coordinates out of bounds" msgstr "pixelkoordinater utanför gränserna" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" -"pixel_shader måste vara displayio.Palette eller displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "filbevakning är inte tillgänglig på win32" @@ -4240,7 +4228,7 @@ msgstr "typ '%q' är inte en acceptabel bastyp" msgid "type is not an acceptable base type" msgstr "typ är inte en acceptabel bastyp" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "typobjektet '%q' har inget attribut '%q'" @@ -4437,6 +4425,31 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "Skicka in ett ärende med ditt program till https://github.com/adafruit/" +#~ "circuitpython/issues." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "objektet 'coroutine\" är inte en iterator" + +#~ msgid "Buffer is too small" +#~ msgstr "Bufferten är för liten" + +#~ msgid "Fault detected by hardware." +#~ msgstr "Fel upptäckt av hårdvara." + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "Spänningen sjönk. Se till att du ger tillräckligt med ström." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader måste vara displayio.Palette eller displayio.ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "Skadad .mpy-fil" diff --git a/locale/tr.po b/locale/tr.po index e0d4a32179..919e433e85 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -37,8 +37,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" #: supervisor/shared/safe_mode.c @@ -402,10 +402,6 @@ msgstr "döngü dışında 'break'" msgid "'continue' outside loop" msgstr "döngü dışında 'continue'" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' nesnesi bir iteratör değildir" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' en az 2 argümana ihtiyaç duyar" @@ -675,11 +671,6 @@ msgstr "Buffer elementleri 4 bit olmak zorunda" msgid "Buffer is not a bytearray." msgstr "Buffer bir bytearray değil." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Arabellek çok küçük" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -699,6 +690,12 @@ msgstr "Buffer 512 bitin katı olmalı" msgid "Buffer too short by %d bytes" msgstr "Buffer bitten %d daha az" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "Arabellek boyutları aynı olmalı" @@ -1042,10 +1039,6 @@ msgstr "Muteks serbest bırakılamadı, err 0x%04x" msgid "Failed to write internal flash." msgstr "Dahili flaş yazılamadı." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "" - #: py/moduerrno.c msgid "File exists" msgstr "Dosya var" @@ -1125,6 +1118,10 @@ msgstr "Grup zaten kullanılıyor" msgid "Half duplex SPI is not implemented" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1772,6 +1769,10 @@ msgstr "" msgid "Polygon needs at least 3 points" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "" @@ -2006,10 +2007,6 @@ msgstr "" msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "" - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "" @@ -2600,8 +2597,7 @@ msgstr "" msgid "buffer slices must be of equal length" msgstr "" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "" @@ -3886,10 +3882,6 @@ msgstr "" msgid "pixel coordinates out of bounds" msgstr "" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "" @@ -4201,7 +4193,7 @@ msgstr "" msgid "type is not an acceptable base type" msgstr "" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "" @@ -4398,6 +4390,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "'coroutine' nesnesi bir iteratör değildir" + +#~ msgid "Buffer is too small" +#~ msgstr "Arabellek çok küçük" + #~ msgid "Corrupt .mpy file" #~ msgstr "Bozuk .mpy dosyası" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 3ec08ea439..9bcd6a4fbc 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -37,12 +37,9 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "\n" -"Please file an issue with your program at https://github.com/adafruit/" -"circuitpython/issues." +"Please file an issue with your program at github.com/adafruit/circuitpython/" +"issues." msgstr "" -"\n" -"qǐng zài https://github.com/adafruit/circuitpython/issues tí jiāo nín de " -"chéng xù wèn tí." #: supervisor/shared/safe_mode.c msgid "" @@ -409,10 +406,6 @@ msgstr "'break' wèiyú xúnhuán zhīwài" msgid "'continue' outside loop" msgstr "'continue' wèiyú xúnhuán zhīwài" -#: py/objgenerator.c -msgid "'coroutine' object is not an iterator" -msgstr "'coroutine' duìxiàng búshì yígè diédàiqì" - #: py/compile.c msgid "'data' requires at least 2 arguments" msgstr "'data' xūyào zhìshǎo 2 gè cānshù" @@ -682,11 +675,6 @@ msgstr "huǎnchōngqū de yuánsù bìxū wéi 4 zìjié cháng huò gèngshǎo" msgid "Buffer is not a bytearray." msgstr "Huǎnchōng qū bùshì bytearray." -#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c -#: shared-bindings/framebufferio/FramebufferDisplay.c -msgid "Buffer is too small" -msgstr "Huǎnchōng qū tài xiǎo" - #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c #, c-format msgid "Buffer length %d too big. It must be less than %d" @@ -706,6 +694,12 @@ msgstr "Huǎnchōngqū bìxū shì 512 zìjié de bèishù" msgid "Buffer too short by %d bytes" msgstr "Huǎnchōngqū tàiduǎn , mùqián zhǐyǒu %d zìjié" +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c +msgid "Buffer too small" +msgstr "" + #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" msgstr "huǎnchōng qū bìxū dàxiǎo xiāngtóng" @@ -1053,10 +1047,6 @@ msgstr "Wúfǎ shìfàng mutex, err 0x%04x" msgid "Failed to write internal flash." msgstr "Wúfǎ xiě rù nèibù shǎncún." -#: supervisor/shared/safe_mode.c -msgid "Fault detected by hardware." -msgstr "yìng jiàn jiǎn cè dào gù zhàng." - #: py/moduerrno.c msgid "File exists" msgstr "Wénjiàn cúnzài" @@ -1136,6 +1126,10 @@ msgstr "Jítuán yǐjīng shǐyòngguò" msgid "Half duplex SPI is not implemented" msgstr "wèi shí xiàn bàn shuāng gōng SPI" +#: supervisor/shared/safe_mode.c +msgid "Hard fault: memory access or instruction error." +msgstr "" + #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/busio/UART.c @@ -1795,6 +1789,10 @@ msgstr "Zài wénjiàn xìtǒng shàng tiānjiā rènhé mókuài\n" msgid "Polygon needs at least 3 points" msgstr "Duōbiānxíng zhìshǎo xūyào 3 diǎn" +#: supervisor/shared/safe_mode.c +msgid "Power dipped. Make sure you are providing enough power." +msgstr "" + #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" msgstr "Qiánzhuì huǎnchōng qū bìxū zài duī shàng" @@ -2028,10 +2026,6 @@ msgstr "shàng shù yì cháng shì yǐ xià yì cháng de zhí jiē yuán yīn: msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Rgb_pins de chángdù bìxū wèi 6,12,18,24 huò 30" -#: supervisor/shared/safe_mode.c -msgid "The power dipped. Make sure you are providing enough power." -msgstr "lì liàng xià jiàng le. què bǎo nín tí gòng zú gòu de diàn lì." - #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" msgstr "Yàngběn de bits_per_sample yǔ hǔn yīn qì bù pǐpèi" @@ -2632,8 +2626,7 @@ msgstr "huǎnchōng qū dàxiǎo bìxū pǐpèi géshì" msgid "buffer slices must be of equal length" msgstr "huǎnchōng qū qiēpiàn bìxū chángdù xiāngděng" -#: py/modstruct.c shared-bindings/struct/__init__.c -#: shared-module/struct/__init__.c +#: py/modstruct.c shared-module/struct/__init__.c msgid "buffer too small" msgstr "huǎnchōng qū tài xiǎo" @@ -3927,10 +3920,6 @@ msgstr "cānshù bìxū shì xùliè r0 zhì r3 de dēngjì qì" msgid "pixel coordinates out of bounds" msgstr "xiàngsù zuòbiāo chāochū biānjiè" -#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c -msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" -msgstr "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter" - #: extmod/vfs_posix_file.c msgid "poll on file not available on win32" msgstr "zài win32 shàng bù tí gōng wén jiàn tóu piào" @@ -4245,7 +4234,7 @@ msgstr "lèixíng '%q' bùshì kě jiēshòu de jīchǔ lèixíng" msgid "type is not an acceptable base type" msgstr "lèixíng bùshì kě jiēshòu de jīchǔ lèixíng" -#: py/objgenerator.c py/runtime.c +#: py/runtime.c msgid "type object '%q' has no attribute '%q'" msgstr "lèixíng duìxiàng '%q' méiyǒu shǔxìng '%q'" @@ -4442,6 +4431,31 @@ 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 "" +#~ "\n" +#~ "Please file an issue with your program at https://github.com/adafruit/" +#~ "circuitpython/issues." +#~ msgstr "" +#~ "\n" +#~ "qǐng zài https://github.com/adafruit/circuitpython/issues tí jiāo nín de " +#~ "chéng xù wèn tí." + +#~ msgid "'coroutine' object is not an iterator" +#~ msgstr "'coroutine' duìxiàng búshì yígè diédàiqì" + +#~ msgid "Buffer is too small" +#~ msgstr "Huǎnchōng qū tài xiǎo" + +#~ msgid "Fault detected by hardware." +#~ msgstr "yìng jiàn jiǎn cè dào gù zhàng." + +#~ msgid "The power dipped. Make sure you are providing enough power." +#~ msgstr "lì liàng xià jiàng le. què bǎo nín tí gòng zú gòu de diàn lì." + +#~ msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +#~ msgstr "" +#~ "pixel_shader bìxū shì displayio.Palette huò displayio.ColorConverter" + #~ msgid "Corrupt .mpy file" #~ msgstr "sǔnhuài de .mpy wénjiàn" From 96a3b884f62b745c481259e201ecfcb49120586a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 22 Aug 2023 21:04:49 -0500 Subject: [PATCH 093/291] Unconditionally use sphinx_rtd_theme when building docs This is a speculative fix for the latest build failure on RTD, https://readthedocs.org/projects/circuitpython/builds/21689508/ which appears to be due to a change in RTD's "conf.py.tmpl" https://github.com/readthedocs/readthedocs.org/commit/2066e3486a25bbd76431e1f8c20be3da0043f03a ``` Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/circuitpython/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 358, in eval_config_file exec(code, namespace) # NoQA: S102 ^^^^^^^^^^^^^^^^^^^^^ File "/home/docs/checkouts/readthedocs.org/user_builds/circuitpython/checkouts/latest/conf.py", line 600, in 'html_theme': html_theme, ^^^^^^^^^^ NameError: name 'html_theme' is not defined ``` --- conf.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/conf.py b/conf.py index e14c6ace83..dd2de7b899 100644 --- a/conf.py +++ b/conf.py @@ -265,19 +265,9 @@ rst_epilog = """ # -- Options for HTML output ---------------------------------------------- -# on_rtd is whether we are on readthedocs.org -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: # only import and set the theme if we're building docs locally - try: - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] - except: - html_theme = 'default' - html_theme_path = ['.'] -else: - html_theme_path = ['.'] +import sphinx_rtd_theme +html_theme = 'sphinx_rtd_theme' +html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.'] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From 6eccdd9e7d39e21974161969f80466c9b3e790ff Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Tue, 22 Aug 2023 23:10:07 -0400 Subject: [PATCH 094/291] Pimoroni PICO DV Base w/Pico W (network disabled) --- .../boards/pimoroni_pico_dv_base_w/board.c | 52 ++++++++++++ .../boards/pimoroni_pico_dv_base_w/link.ld | 1 + .../pimoroni_pico_dv_base_w/mpconfigboard.h | 9 ++ .../pimoroni_pico_dv_base_w/mpconfigboard.mk | 18 ++++ .../pico-sdk-configboard.h | 4 + .../boards/pimoroni_pico_dv_base_w/pins.c | 82 +++++++++++++++++++ 6 files changed, 166 insertions(+) create mode 100644 ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c create mode 100644 ports/raspberrypi/boards/pimoroni_pico_dv_base_w/link.ld create mode 100644 ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c new file mode 100644 index 0000000000..ee86bb3651 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "bindings/picodvi/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + picodvi_framebuffer_obj_t *fb = &allocate_display_bus()->picodvi; + fb->base.type = &picodvi_framebuffer_type; + common_hal_picodvi_framebuffer_construct(fb, 320, 240, + &pin_GPIO7, &pin_GPIO6, + &pin_GPIO9, &pin_GPIO8, + &pin_GPIO11, &pin_GPIO10, + &pin_GPIO13, &pin_GPIO12, + 8); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/link.ld b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/link.ld new file mode 100644 index 0000000000..e814bead4c --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/link.ld @@ -0,0 +1 @@ +firmware_size = 1532k; diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h new file mode 100644 index 0000000000..50e8c0ca9d --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h @@ -0,0 +1,9 @@ +#define MICROPY_HW_BOARD_NAME "Pimoroni Pico DV Base W" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_DIGITALIO_HAVE_INVALID_PULL (1) +#define CIRCUITPY_DIGITALIO_HAVE_INVALID_DRIVE_MODE (1) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) + diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk new file mode 100644 index 0000000000..66cee41e07 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk @@ -0,0 +1,18 @@ +USB_VID = 0x2E8A +USB_PID = 0x105A +USB_PRODUCT = "Pimoroni Pico DV Demo Base for Pico W" +USB_MANUFACTURER = "Pimoroni" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 +CIRCUITPY_PICODVI = 1 + +# Must be accompanied by a linker script change +CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)' + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c new file mode 100644 index 0000000000..98a593310f --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c @@ -0,0 +1,82 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON_A), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON_B), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON_C), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + + // SD Card + { MP_ROM_QSTR(MP_QSTR_SD_SCK), MP_ROM_PTR(&pin_GPIO5)}, + { MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO18)}, + { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO19)}, + { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO22)}, + + { MP_ROM_QSTR(MP_QSTR_I2S_WORD_SELECT), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_I2S_BIT_CLOCK), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2S_DATA), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, + + // DVI VIDEO + { MP_ROM_QSTR(MP_QSTR_DV_CEC), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_DV_SCL), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_DV_SDA), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_CKN), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_CKP), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D0N), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D0P), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D1N), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D1P), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D2N), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D2P), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_DV_HPD), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].framebuffer_display)}, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From d333ae9f5d673d61bb2db47e81ee518532a438eb Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Tue, 22 Aug 2023 23:46:43 -0400 Subject: [PATCH 095/291] Local pre-commit run changes --- ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h index 50e8c0ca9d..917fa85ab7 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h @@ -6,4 +6,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) - From 9064c6e7cb163e0b310827285c2dbe56076db8da Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 23 Aug 2023 07:22:28 -0500 Subject: [PATCH 096/291] ci_set_matrix: changing conf.py should not rebuild all boards --- tools/ci_set_matrix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index f549b6f6f1..51876d9b2b 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -45,6 +45,7 @@ from shared_bindings_matrix import ( # Files that never influence board builds IGNORE_BOARD = { ".devcontainer", + "conf.py", "docs", "tests", "tools/ci_changes_per_commit.py", From 2cc05f7ac8e95863286e3bd92e0275a6d2508b52 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 23 Aug 2023 20:04:51 +0300 Subject: [PATCH 097/291] Picow-ap wifi improvements --- locale/circuitpython.pot | 16 ++---- ports/raspberrypi/common-hal/wifi/Radio.c | 64 ++++++++++++++--------- 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index e0e3149866..8f55044e81 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -447,6 +447,10 @@ msgstr "" msgid "ADC2 is being used by WiFi" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1959,10 +1963,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2337,14 +2337,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 7ccb41c0d6..1508b764a2 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -157,11 +157,6 @@ void common_hal_wifi_radio_start_station(wifi_radio_obj_t *self) { void common_hal_wifi_radio_stop_station(wifi_radio_obj_t *self) { cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA); - // This is wrong, but without this call the state of ITF_STA is still - // reported as CYW43_LINK_JOIN (by wifi_link_status) and CYW43_LINK_UP - // (by tcpip_link_status). However since ap disconnection isn't working - // either, this is not an issue. - cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP); const size_t timeout_ms = 500; uint64_t start = port_get_raw_ticks(NULL); uint64_t deadline = start + timeout_ms; @@ -179,9 +174,15 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_ mp_raise_RuntimeError(translate("Wifi is not enabled")); } - if (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_STA) != CYW43_LINK_DOWN) { - mp_raise_RuntimeError(translate("Wifi is in station mode.")); - } + /* TODO: If the AP is stopped once it cannot be restarted. + * This means that if if the user does: + * + * wifi.radio.start_ap(...) + * wifi.radio.stop_ap() + * wifi.radio.start_ap(...) + * + * The second start_ap will fail. + */ common_hal_wifi_radio_stop_ap(self); @@ -189,10 +190,29 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_ // Defaults to 1 if not set or invalid (i.e. 13) cyw43_wifi_ap_set_channel(&cyw43_state, (const uint32_t)channel); - cyw43_arch_enable_ap_mode((const char *)ssid, (const char *)password, CYW43_AUTH_WPA2_AES_PSK); + if (password_len) { + cyw43_arch_enable_ap_mode((const char *)ssid, (const char *)password, CYW43_AUTH_WPA2_AES_PSK); + } else { + cyw43_arch_enable_ap_mode((const char *)ssid, NULL, CYW43_AUTH_OPEN); + } // TODO: Implement authmode check like in espressif bindings_cyw43_wifi_enforce_pm(); + + const size_t timeout_ms = 500; + uint64_t start = port_get_raw_ticks(NULL); + uint64_t deadline = start + timeout_ms; + while (port_get_raw_ticks(NULL) < deadline && (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) != CYW43_LINK_UP)) { + RUN_BACKGROUND_TASKS; + if (mp_hal_is_interrupted()) { + break; + } + } + if (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) != CYW43_LINK_UP) { + common_hal_wifi_radio_stop_ap(self); + // This is needed since it leaves a broken AP up. + mp_raise_RuntimeError(translate("AP could not be started")); + } } bool common_hal_wifi_radio_get_ap_active(wifi_radio_obj_t *self) { @@ -204,19 +224,19 @@ void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self) { mp_raise_RuntimeError(translate("wifi is not enabled")); } - if (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) != CYW43_LINK_DOWN) { - mp_raise_NotImplementedError(translate("Stopping AP is not supported.")); + cyw43_arch_disable_ap_mode(); + + const size_t timeout_ms = 500; + uint64_t start = port_get_raw_ticks(NULL); + uint64_t deadline = start + timeout_ms; + while (port_get_raw_ticks(NULL) < deadline && (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) != CYW43_LINK_DOWN)) { + RUN_BACKGROUND_TASKS; + if (mp_hal_is_interrupted()) { + break; + } } - /* - * AP cannot be disconnected. cyw43_wifi_leave is broken. - * This code snippet should work, but doesn't. - * - * cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP); - * cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA); - * - * bindings_cyw43_wifi_enforce_pm(); - */ + bindings_cyw43_wifi_enforce_pm(); } static bool connection_unchanged(wifi_radio_obj_t *self, const uint8_t *ssid, size_t ssid_len) { @@ -237,10 +257,6 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t mp_raise_RuntimeError(translate("Wifi is not enabled")); } - if (cyw43_tcpip_link_status(&cyw43_state, CYW43_ITF_AP) != CYW43_LINK_DOWN) { - mp_raise_RuntimeError(translate("Wifi is in access point mode.")); - } - if (ssid_len > 32) { return WIFI_RADIO_ERROR_CONNECTION_FAIL; } From e3314ef7a6507bb406ae06e3f7df1c99e9acf30e Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 23 Aug 2023 22:12:19 +0300 Subject: [PATCH 098/291] Add new picow doc notes --- shared-bindings/wifi/Radio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index 495e7fd13b..798c7c6d2e 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -332,8 +332,9 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_radio_stop_station_obj, wifi_radio_stop_station); //| //| **Limitations:** On Espressif, ``authmode`` with a non-empty password must include //| `wifi.AuthMode.PSK`, and one or both of `wifi.AuthMode.WPA` and `wifi.AuthMode.WPA2`. -//| On Pi Pico W, ``authmode`` is ignored; it is always ``(wifi.AuthMode.WPA2, wifi.AuthMode.PSK)` -//| with a non-empty password, or ``(wifi.AuthMode.OPEN,)`` when no password is given. +//| On Pi Pico W, ``authmode`` is ignored; it is always ``(wifi.AuthMode.WPA2, wifi.AuthMode.PSK)`` +//| with a non-empty password, or ``(wifi.AuthMode.OPEN)``, when no password is given. +//| On Pi Pico W, the AP can be started and stopped only once per reboot. //| //| The length of ``password`` must be 8-63 characters if it is ASCII, //| or exactly 64 hexadecimal characters if it is the hex form of the 256-bit key. From 4d8b354c131632fe49aa5f8123d80fb80b81aea6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 23 Aug 2023 14:01:02 -0500 Subject: [PATCH 099/291] Use qstrs to improve compression any qstr of >= 3 chars long is a candidate for use; the input byte value (1) is used to indicate a fixed-length qstr number follows. Before accounting for the code size changes, this saves ~100 bytes on trinket m0, but it may end up being a wash due to added code. A cutoff of length>2 is slightly better for ja and ru and worse for others. This has to do with the relative frequency of latin characters vs non-latin characters, is my guess. lang after before change (- = more free space) en_US 3132 2996 -134 fr 2136 2060 -76 ja 1916 1724 -232 ru 2196 2000 -196 --- py/maketranslationdata.py | 188 +++++++++++++----------- py/py.mk | 2 +- supervisor/shared/translate/translate.c | 54 +++++-- 3 files changed, 144 insertions(+), 100 deletions(-) diff --git a/py/maketranslationdata.py b/py/maketranslationdata.py index a07f70265c..9b75e06996 100644 --- a/py/maketranslationdata.py +++ b/py/maketranslationdata.py @@ -1,7 +1,9 @@ """ Process raw qstr file and output qstr data with length, hash and data bytes. -This script works with Python 2.7, 3.3 and 3.4. +This script is only regularly tested with the same version of Python used +during CI, typically the latest "3.x". However, incompatibilities with any +supported CPython version are unintended. For documentation about the format of compressed translated strings, see supervisor/shared/translate/translate.h @@ -16,31 +18,16 @@ import sys import collections import gettext -import os.path +import pathlib if hasattr(sys.stdout, "reconfigure"): sys.stdout.reconfigure(encoding="utf-8") sys.stderr.reconfigure(errors="backslashreplace") -py = os.path.dirname(sys.argv[0]) -top = os.path.dirname(py) - -sys.path.append(os.path.join(top, "tools/huffman")) +sys.path.append(str(pathlib.Path(__file__).parent.parent / "tools/huffman")) import huffman - -# Python 2/3 compatibility: -# - iterating through bytes is different -# - codepoint2name lives in a different module -import platform - -if platform.python_version_tuple()[0] == "2": - bytes_cons = lambda val, enc=None: bytearray(val) - from htmlentitydefs import codepoint2name -elif platform.python_version_tuple()[0] == "3": - bytes_cons = bytes - from html.entities import codepoint2name -# end compatibility code +from html.entities import codepoint2name codepoint2name[ord("-")] = "hyphen" @@ -182,9 +169,15 @@ class EncodingTable: extractor: object apply_offset: object remove_offset: object + translation_qstr_bits: int + qstrs: object + qstrs_inv: object -def compute_huffman_coding(translation_name, translations, f): +def compute_huffman_coding(qstrs, translation_name, translations, f): + # possible future improvement: some languages are better when consider len(k) > 2. try both? + qstrs = dict((k, v) for k, v in qstrs.items() if len(k) > 3) + qstr_strs = list(qstrs.keys()) texts = [t[1] for t in translations] words = [] @@ -234,10 +227,12 @@ def compute_huffman_coding(translation_name, translations, f): # if "the" is in words then not only will "the" not be considered # again, neither will "there" or "wither", since they have "the" # as substrings. - extractor = TextSplitter(words) + extractor = TextSplitter(words + qstr_strs) counter = collections.Counter() for t in texts: for atom in extractor.iter(t): + if atom in qstrs: + atom = "\1" counter[atom] += 1 cb = huffman.codebook(counter.items()) lengths = sorted(dict((v, len(cb[k])) for k, v in counter.items()).items()) @@ -304,10 +299,14 @@ def compute_huffman_coding(translation_name, translations, f): words.append(word) words.sort(key=len) - extractor = TextSplitter(words) + extractor = TextSplitter(words + qstr_strs) counter = collections.Counter() + used_qstr = 0 for t in texts: for atom in extractor.iter(t): + if atom in qstrs: + used_qstr = max(used_qstr, qstrs[atom]) + atom = "\1" counter[atom] += 1 cb = huffman.codebook(counter.items()) @@ -322,6 +321,8 @@ def compute_huffman_coding(translation_name, translations, f): last_length = None canonical = {} for atom, code in sorted(cb.items(), key=lambda x: (len(x[1]), x[0])): + if atom in qstr_strs: + atom = "\1" values.append(atom) length = len(code) if length not in length_count: @@ -359,6 +360,8 @@ def compute_huffman_coding(translation_name, translations, f): minlen = len(words[0]) wlencount = [len([None for w in words if len(w) == l]) for l in range(minlen, maxlen + 1)] + translation_qstr_bits = used_qstr.bit_length() + f.write("typedef {} mchar_t;\n".format(values_type)) f.write("const uint8_t lengths[] = {{ {} }};\n".format(", ".join(map(str, lengths)))) f.write( @@ -383,34 +386,44 @@ def compute_huffman_coding(translation_name, translations, f): f.write("#define maxlen {}\n".format(maxlen)) f.write("#define translation_offstart {}\n".format(offstart)) f.write("#define translation_offset {}\n".format(offset)) + f.write("#define translation_qstr_bits {}\n".format(translation_qstr_bits)) - return EncodingTable(values, lengths, words, canonical, extractor, apply_offset, remove_offset) + qstrs_inv = dict((v, k) for k, v in qstrs.items()) + return EncodingTable( + values, + lengths, + words, + canonical, + extractor, + apply_offset, + remove_offset, + translation_qstr_bits, + qstrs, + qstrs_inv, + ) def decompress(encoding_table, encoded, encoded_length_bits): + qstrs_inv = encoding_table.qstrs_inv values = encoding_table.values lengths = encoding_table.lengths words = encoding_table.words - dec = [] - this_byte = 0 - this_bit = 7 - b = encoded[this_byte] - bits = 0 - for i in range(encoded_length_bits): - bits <<= 1 - if 0x80 & b: - bits |= 1 + def bititer(): + for byte in encoded: + for bit in (0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1): + yield bool(byte & bit) - b <<= 1 - if this_bit == 0: - this_bit = 7 - this_byte += 1 - if this_byte < len(encoded): - b = encoded[this_byte] - else: - this_bit -= 1 - length = bits + nextbit = bititer().__next__ + + def getnbits(n): + bits = 0 + for i in range(n): + bits = (bits << 1) | nextbit() + return bits + + dec = [] + length = getnbits(encoded_length_bits) i = 0 while i < length: @@ -419,19 +432,8 @@ def decompress(encoding_table, encoded, encoded_length_bits): max_code = lengths[0] searched_length = lengths[0] while True: - bits <<= 1 - if 0x80 & b: - bits |= 1 - - b <<= 1 + bits = (bits << 1) | nextbit() bit_length += 1 - if this_bit == 0: - this_bit = 7 - this_byte += 1 - if this_byte < len(encoded): - b = encoded[this_byte] - else: - this_bit -= 1 if max_code > 0 and bits < max_code: # print('{0:0{width}b}'.format(bits, width=bit_length)) break @@ -439,7 +441,10 @@ def decompress(encoding_table, encoded, encoded_length_bits): searched_length += lengths[bit_length] v = values[searched_length + bits - max_code] - if v >= chr(0x80) and v < chr(0x80 + len(words)): + if v == chr(1): + qstr_idx = getnbits(encoding_table.translation_qstr_bits) + v = qstrs_inv[qstr_idx] + elif v >= chr(0x80) and v < chr(0x80 + len(words)): v = words[ord(v) - 0x80] i += len(v.encode("utf-8")) dec.append(v) @@ -449,36 +454,37 @@ def decompress(encoding_table, encoded, encoded_length_bits): def compress(encoding_table, decompressed, encoded_length_bits, len_translation_encoded): if not isinstance(decompressed, str): raise TypeError() + qstrs = encoding_table.qstrs canonical = encoding_table.canonical extractor = encoding_table.extractor - enc = bytearray(len(decompressed) * 3) - current_bit = 7 - current_byte = 0 + enc = 1 - bits = encoded_length_bits + 1 - for i in range(bits - 1, 0, -1): - if len_translation_encoded & (1 << (i - 1)): - enc[current_byte] |= 1 << current_bit - if current_bit == 0: - current_bit = 7 - current_byte += 1 - else: - current_bit -= 1 + def put_bit(enc, b): + return (enc << 1) | bool(b) + + def put_bits(enc, b, n): + for i in range(n - 1, -1, -1): + enc = put_bit(enc, b & (1 << i)) + return enc + + enc = put_bits(enc, len_translation_encoded, encoded_length_bits) for atom in extractor.iter(decompressed): - for b in canonical[atom]: - if b == "1": - enc[current_byte] |= 1 << current_bit - if current_bit == 0: - current_bit = 7 - current_byte += 1 - else: - current_bit -= 1 + if atom in qstrs: + can = canonical["\1"] + else: + can = canonical[atom] + for b in can: + enc = put_bit(enc, b == "1") + if atom in qstrs: + enc = put_bits(enc, qstrs[atom], encoding_table.translation_qstr_bits) - if current_bit != 7: - current_byte += 1 - return enc[:current_byte] + while enc.bit_length() % 8 != 1: + enc = put_bit(enc, 0) + + r = enc.to_bytes((enc.bit_length() + 7) // 8, "big") + return r[1:] def qstr_escape(qst): @@ -493,10 +499,20 @@ def qstr_escape(qst): return re.sub(r"[^A-Za-z0-9_]", esc_char, qst) +def parse_qstrs(infile): + r = {} + rx = re.compile(r'QDEF\([A-Za-z0-9_]+,\s*\d+,\s*\d+,\s*(?P"(?:[^"\\\\]*|\\.)")\)') + content = infile.read() + for i, mat in enumerate(rx.findall(content, re.M)): + mat = eval(mat) + r[mat] = i + return r + + def parse_input_headers(infiles): i18ns = set() - # read the qstrs in from the input files + # read the TRANSLATE strings in from the input files for infile in infiles: with open(infile, "rt") as f: for line in f: @@ -516,12 +532,12 @@ def escape_bytes(qstr): return qstr else: # qstr contains non-printable codes so render entire thing as hex pairs - qbytes = bytes_cons(qstr, "utf8") + qbytes = bytes(qstr, "utf8") return "".join(("\\x%02x" % b) for b in qbytes) def make_bytes(cfg_bytes_len, cfg_bytes_hash, qstr): - qbytes = bytes_cons(qstr, "utf8") + qbytes = bytes(qstr, "utf8") qlen = len(qbytes) qhash = compute_hash(qbytes, cfg_bytes_hash) if qlen >= (1 << (8 * cfg_bytes_len)): @@ -551,7 +567,7 @@ def output_translation_data(encoding_table, i18ns, out): ) total_text_compressed_size += len(compressed) decompressed = decompress(encoding_table, compressed, encoded_length_bits) - assert decompressed == translation + assert decompressed == translation, (decompressed, translation) for c in C_ESCAPES: decompressed = decompressed.replace(c, C_ESCAPES[c]) formatted = ["{:d}".format(x) for x in compressed] @@ -572,7 +588,7 @@ if __name__ == "__main__": import argparse parser = argparse.ArgumentParser( - description="Process QSTR definitions into headers for compilation" + description="Process TRANSLATE strings into headers for compilation" ) parser.add_argument( "infiles", metavar="N", type=str, nargs="+", help="an integer for the accumulator" @@ -590,13 +606,19 @@ if __name__ == "__main__": type=argparse.FileType("w", encoding="UTF-8"), help="c file for translation data", ) + parser.add_argument( + "--qstrdefs_filename", + type=argparse.FileType("r", encoding="UTF-8"), + help="", + ) args = parser.parse_args() + qstrs = parse_qstrs(args.qstrdefs_filename) i18ns = parse_input_headers(args.infiles) i18ns = sorted(i18ns) translations = translate(args.translation, i18ns) encoding_table = compute_huffman_coding( - args.translation, translations, args.compression_filename + qstrs, args.translation, translations, args.compression_filename ) output_translation_data(encoding_table, translations, args.translation_filename) diff --git a/py/py.mk b/py/py.mk index d26b8752a4..5cbc213414 100644 --- a/py/py.mk +++ b/py/py.mk @@ -270,7 +270,7 @@ $(PY_BUILD)/translations-$(TRANSLATION).c: $(HEADER_BUILD)/compressed_translatio $(HEADER_BUILD)/compressed_translations.generated.h: $(PY_SRC)/maketranslationdata.py $(HEADER_BUILD)/$(TRANSLATION).mo $(HEADER_BUILD)/qstrdefs.generated.h $(STEPECHO) "GEN $@" $(Q)mkdir -p $(PY_BUILD) - $(Q)$(PYTHON) $(PY_SRC)/maketranslationdata.py --compression_filename $(HEADER_BUILD)/compressed_translations.generated.h --translation $(HEADER_BUILD)/$(TRANSLATION).mo --translation_filename $(PY_BUILD)/translations-$(TRANSLATION).c $(HEADER_BUILD)/qstrdefs.preprocessed.h + $(Q)$(PYTHON) $(PY_SRC)/maketranslationdata.py --compression_filename $(HEADER_BUILD)/compressed_translations.generated.h --translation $(HEADER_BUILD)/$(TRANSLATION).mo --translation_filename $(PY_BUILD)/translations-$(TRANSLATION).c --qstrdefs_filename $(HEADER_BUILD)/qstrdefs.generated.h $(HEADER_BUILD)/qstrdefs.preprocessed.h PY_CORE_O += $(PY_BUILD)/translations-$(TRANSLATION).o diff --git a/supervisor/shared/translate/translate.c b/supervisor/shared/translate/translate.c index fced90f058..7d57ab3bf2 100644 --- a/supervisor/shared/translate/translate.c +++ b/supervisor/shared/translate/translate.c @@ -25,6 +25,7 @@ */ #include "supervisor/shared/translate/translate.h" +#include "py/qstr.h" #include #include @@ -99,10 +100,34 @@ uint16_t decompress_length(const compressed_string_t *compressed) { #endif } +typedef struct { + const uint8_t *ptr; + uint8_t bit; +} bitstream_state_t; + +static bool next_bit(bitstream_state_t *st) { + bool r = *st->ptr & st->bit; + st->bit >>= 1; + if (!st->bit) { + st->bit = 0x80; + st->ptr++; + } + return r; +} + +static int get_nbits(bitstream_state_t *st, int n) { + int r = 0; + while (n--) { + r = (r << 1) | next_bit(st); + } + return r; +} + char *decompress(const compressed_string_t *compressed, char *decompressed) { - uint8_t this_byte = compress_max_length_bits / 8; - uint8_t this_bit = 7 - compress_max_length_bits % 8; - uint8_t b = (&compressed->data)[this_byte] << (compress_max_length_bits % 8); + bitstream_state_t b = { + .ptr = &(compressed->data) + (compress_max_length_bits >> 3), + .bit = 1 << (7 - ((compress_max_length_bits) & 0x7)), + }; uint16_t length = decompress_length(compressed); // Stop one early because the last byte is always NULL. @@ -112,26 +137,23 @@ char *decompress(const compressed_string_t *compressed, char *decompressed) { uint32_t max_code = lengths[0]; uint32_t searched_length = lengths[0]; while (true) { - bits <<= 1; - if ((0x80 & b) != 0) { - bits |= 1; - } - b <<= 1; + bits = (bits << 1) | next_bit(&b); bit_length += 1; - if (this_bit == 0) { - this_bit = 7; - this_byte += 1; - b = (&compressed->data)[this_byte]; // This may read past the end but its never used. - } else { - this_bit -= 1; - } if (max_code > 0 && bits < max_code) { break; } max_code = (max_code << 1) + lengths[bit_length]; searched_length += lengths[bit_length]; } - i += put_utf8(decompressed + i, values[searched_length + bits - max_code]); + int v = values[searched_length + bits - max_code]; + if (v == 1) { + qstr q = get_nbits(&b, translation_qstr_bits) + 1; // honestly no idea why "+1"... + for (const char *qc = qstr_str(q); *qc;) { + decompressed[i++] = *qc++; + } + } else { + i += put_utf8(decompressed + i, v); + } } decompressed[length - 1] = '\0'; From 2991cc4174cb5e370bcb128ebc8ae16091009a45 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 23 Aug 2023 10:21:12 +0000 Subject: [PATCH 100/291] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (1001 of 1001 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 258a06738c..53b11b70c5 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-22 21:28+0000\n" +"PO-Revision-Date: 2023-08-24 15:48+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,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\n" #: main.c msgid "" @@ -38,6 +38,9 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Registre um problema com o seu programa em github.com/adafruit/circuitpython/" +"issues." #: supervisor/shared/safe_mode.c msgid "" @@ -701,7 +704,7 @@ msgstr "O buffer é muito curto em %d bytes" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Buffer pequeno demais" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -1133,7 +1136,7 @@ msgstr "O SPI half duplex ainda não está implementado" #: supervisor/shared/safe_mode.c msgid "Hard fault: memory access or instruction error." -msgstr "" +msgstr "Falha grave: acesso à memória ou erro de instrução." #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c @@ -1803,7 +1806,7 @@ msgstr "O Polígono precisa de pelo menos 3 pontos" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "" +msgstr "Falta de energia. Certifique-se que está fornecendo energia suficiente." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" From 499951b675ef38275fe477e0145cecaf0390787a Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Wed, 23 Aug 2023 15:36:22 +0000 Subject: [PATCH 101/291] Translated using Weblate (Swedish) Currently translated at 99.9% (1000 of 1001 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index fea4e31f55..80f5342a58 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-22 21:28+0000\n" +"PO-Revision-Date: 2023-08-24 15:48+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,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\n" #: main.c msgid "" @@ -38,6 +38,9 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Skapa ett ärende med ditt program på https://github.com/adafruit/" +"circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -696,7 +699,7 @@ msgstr "Buffert är %d bytes för kort" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Buffert för liten" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -1124,7 +1127,7 @@ msgstr "Halvduplex SPI är inte implementerat" #: supervisor/shared/safe_mode.c msgid "Hard fault: memory access or instruction error." -msgstr "" +msgstr "Hårt fel: minnesåtkomst eller instruktionsfel." #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c @@ -1786,8 +1789,9 @@ msgid "Polygon needs at least 3 points" msgstr "Polygonen behöver minst 3 punkter" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Power dipped. Make sure you are providing enough power." -msgstr "" +msgstr "Spänningen sjönk. Se till att du ger tillräckligt med ström." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" From 8fbde14286a6dd0433136ee1396f23797e964de8 Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Thu, 24 Aug 2023 14:50:23 -0400 Subject: [PATCH 102/291] utilize CIRCUITPY_CONSOLE_UART_BAUDRATE parameter --- supervisor/shared/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/shared/serial.c b/supervisor/shared/serial.c index 7bf10ae530..a78ed77f1f 100644 --- a/supervisor/shared/serial.c +++ b/supervisor/shared/serial.c @@ -140,7 +140,7 @@ void serial_early_init(void) { const mcu_pin_obj_t *console_tx = MP_OBJ_TO_PTR(CIRCUITPY_CONSOLE_UART_TX); common_hal_busio_uart_construct(&console_uart, console_tx, console_rx, NULL, NULL, NULL, - false, 115200, 8, BUSIO_UART_PARITY_NONE, 1, 1.0f, sizeof(console_uart_rx_buf), + false, CIRCUITPY_CONSOLE_UART_BAUDRATE, 8, BUSIO_UART_PARITY_NONE, 1, 1.0f, sizeof(console_uart_rx_buf), console_uart_rx_buf, true); common_hal_busio_uart_never_reset(&console_uart); From a6f2615c75deef0ca04fcb69a334e07c2b10084a Mon Sep 17 00:00:00 2001 From: Pablo Martinez Bernal Date: Thu, 24 Aug 2023 17:07:42 +0000 Subject: [PATCH 103/291] Translated using Weblate (Spanish) Currently translated at 100.0% (1001 of 1001 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 53 +++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/locale/es.po b/locale/es.po index 31fea47431..c5bc279dba 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2023-08-06 17:45+0000\n" +"PO-Revision-Date: 2023-08-24 22:46+0000\n" "Last-Translator: Pablo Martinez Bernal \n" "Language-Team: \n" "Language: es\n" @@ -16,7 +16,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\n" #: main.c msgid "" @@ -40,6 +40,9 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Por favor abre una issue con tu programa en github.com/adafruit/" +"circuitpython/issues." #: supervisor/shared/safe_mode.c msgid "" @@ -269,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] lee mas bits que la cantidad de pines" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" -msgstr "" +msgstr "%q[%u] escribe mas bits que la cantidad de pines" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" -msgstr "" +msgstr "%q[%u] usa un pin extra" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] waits on input outside of count" -msgstr "" +msgstr "%q[%u] espera entrada fuera del contador" #: ports/espressif/common-hal/espidf/__init__.c #, c-format @@ -431,7 +434,7 @@ msgstr "'yield' fuera de una función" #: py/compile.c msgid "* arg after **" -msgstr "" +msgstr "* argumento tras **" #: py/compile.c msgid "*x must be assignment target" @@ -700,7 +703,7 @@ msgstr "Buffer muy corto por %d bytes" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Buffer demasiado pequeño" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -1136,7 +1139,7 @@ msgstr "SPI Half Duplex no está implementado" #: supervisor/shared/safe_mode.c msgid "Hard fault: memory access or instruction error." -msgstr "" +msgstr "Fallo grave: error de acceso a memoria o de instrucción." #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c @@ -1384,31 +1387,31 @@ msgstr "Inconsistencia en el flag de recambio" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] reads pin(s)" -msgstr "" +msgstr "Falta first_in_pin. %q[%u] lee pin(es)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] shifts in from pin(s)" -msgstr "" +msgstr "Falta first_in_pin. %q[%u] mueve desde pin(es)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] waits based on pin" -msgstr "" +msgstr "Falta first_in_pin. %q[%u] espera basado en un pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] shifts out to pin(s)" -msgstr "" +msgstr "Falta first_out_pin. %q[%u] mueve hacia pin(es)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] writes pin(s)" -msgstr "" +msgstr "Falta first_out_pin. %q[%u] escribe en pin(es)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_set_pin. %q[%u] sets pin(s)" -msgstr "" +msgstr "Falta first_set_pin. %q[%u] configura pin(es)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing jmp_pin. %q[%u] jumps on pin" -msgstr "" +msgstr "Falta jmp_pin. %q[%u] salta en pin" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." @@ -1805,7 +1808,7 @@ msgstr "El polígono necesita al menos 3 puntos" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "" +msgstr "Falta de potencia. Asegura que estás suministrando suficiente potencia." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -2567,7 +2570,7 @@ msgstr "array/bytes requeridos en el lado derecho" #: py/asmxtensa.c msgid "asm overflow" -msgstr "" +msgstr "desborde de asm" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" @@ -2659,7 +2662,7 @@ msgstr "búfer muy pequeño para los bytes solicitados" #: py/emitbc.c msgid "bytecode overflow" -msgstr "" +msgstr "desborde de bytecode" #: py/objarray.c msgid "bytes length not a multiple of item size" @@ -2821,7 +2824,7 @@ msgstr "" #: extmod/moduasyncio.c msgid "can't wait" -msgstr "" +msgstr "no se puede esperar" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" @@ -3260,7 +3263,7 @@ msgstr "import * no a nivel de módulo" #: py/persistentcode.c msgid "incompatible .mpy arch" -msgstr "" +msgstr "arquitectura de .mpy incompatible" #: py/persistentcode.c msgid "incompatible .mpy file" @@ -3732,7 +3735,7 @@ msgstr "no es 128-bit UUID" #: py/parse.c msgid "not a constant" -msgstr "" +msgstr "no es una constante" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -3971,11 +3974,11 @@ msgstr "port debe ser be >= 0" #: py/compile.c msgid "positional arg after **" -msgstr "" +msgstr "argumento posicional tras **" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "" +msgstr "argumento posicional tras argumento con nombre" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -4207,7 +4210,7 @@ msgstr "tobytes solo pueden ser invocados por arrays densos" #: py/compile.c msgid "too many args" -msgstr "" +msgstr "demasiados argumentos" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" From 74fc5faf8897fc0efe8baab846f2b27392d94f71 Mon Sep 17 00:00:00 2001 From: hexthat Date: Fri, 25 Aug 2023 16:10:48 +0000 Subject: [PATCH 104/291] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (1001 of 1001 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 52 +++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9bcd6a4fbc..d528bea8c0 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-07 14:52+0000\n" +"PO-Revision-Date: 2023-08-25 16:38+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -15,7 +15,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 5.0-dev\n" +"X-Generator: Weblate 5.0.1-dev\n" #: main.c msgid "" @@ -40,6 +40,8 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"qǐngzài github.com/adafruit/circuitpython/issues tíjiāo nínde chéngxù wèntí." #: supervisor/shared/safe_mode.c msgid "" @@ -270,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] piānyí de wèishù duōyú yǐnjiǎo shù" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" -msgstr "" +msgstr "%q[%u] yíchū de wèishù duōyú yǐnjiǎo shù" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" -msgstr "" +msgstr "%q[%u] shǐyòng éwài de yǐnjiǎo" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] waits on input outside of count" -msgstr "" +msgstr "%q[%u] děngdài jìshù zhīwài de shūrù" #: ports/espressif/common-hal/espidf/__init__.c #, c-format @@ -432,7 +434,7 @@ msgstr "'yield' wèiyú hánshù zhīwài" #: py/compile.c msgid "* arg after **" -msgstr "" +msgstr "* cānshùhòu **" #: py/compile.c msgid "*x must be assignment target" @@ -698,7 +700,7 @@ msgstr "Huǎnchōngqū tàiduǎn , mùqián zhǐyǒu %d zìjié" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "huǎnchōngqū tàixiǎo" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -1128,7 +1130,7 @@ msgstr "wèi shí xiàn bàn shuāng gōng SPI" #: supervisor/shared/safe_mode.c msgid "Hard fault: memory access or instruction error." -msgstr "" +msgstr "yìng gùzhàng: nèicún fǎngwèn huò zhǐlìng cuòwù." #: ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c @@ -1373,31 +1375,31 @@ msgstr "jiāohuàn biāozhì bù pǐpèi" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] reads pin(s)" -msgstr "" +msgstr "quēshǎo first_in_pin. %q[%u] dúqǔ yǐnjiǎo" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] shifts in from pin(s)" -msgstr "" +msgstr "quēshǎo first_in_pin. %q[%u] cóng yǐnjiǎo yírù" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_in_pin. %q[%u] waits based on pin" -msgstr "" +msgstr "quēshǎo first_in_pin. %q[%u] jīyú yǐnjiǎo děngdài" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] shifts out to pin(s)" -msgstr "" +msgstr "quēshǎo first_out_pin. %q[%u] yí chūdào yǐnjiǎo" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_out_pin. %q[%u] writes pin(s)" -msgstr "" +msgstr "quēshǎo first_out_pin. %q[%u] xiěrù yǐnjiǎo" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing first_set_pin. %q[%u] sets pin(s)" -msgstr "" +msgstr "quēshǎo first_set_pin. %q[%u] shèzhì yǐnjiǎo" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Missing jmp_pin. %q[%u] jumps on pin" -msgstr "" +msgstr "quēshǎo jmp_pin. %q[%u] tiàodào yǐn jiǎoshàng" #: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c msgid "Must be a %q subclass." @@ -1791,7 +1793,7 @@ msgstr "Duōbiānxíng zhìshǎo xūyào 3 diǎn" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "" +msgstr "gōnglǜ xiàjiàng. quèbǎo nín tígòng zúgòu de diànlì." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -2544,7 +2546,7 @@ msgstr "yòu cè xūyào shùzǔ/zì jié" #: py/asmxtensa.c msgid "asm overflow" -msgstr "" +msgstr "gètǐ hé xiǎoxíng cāngkù guǎnlǐjú yìchū" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get (arg)min/(arg)max of empty sequence" @@ -2636,7 +2638,7 @@ msgstr "huǎn chōng qū tài xiǎo, duì yú qǐng qiú de zì jié" #: py/emitbc.c msgid "bytecode overflow" -msgstr "" +msgstr "zìjiémǎ yìchū" #: py/objarray.c msgid "bytes length not a multiple of item size" @@ -2793,7 +2795,7 @@ msgstr "wúfǎ cóng shǒudòng zìduàn guīgé qiēhuàn dào zìdòng zìduà #: extmod/moduasyncio.c msgid "can't wait" -msgstr "" +msgstr "děngbùjí" #: extmod/ulab/code/ndarray.c msgid "cannot assign new shape" @@ -3236,7 +3238,7 @@ msgstr "dǎo rù * bú zài mó kuài jí bié" #: py/persistentcode.c msgid "incompatible .mpy arch" -msgstr "" +msgstr "bù jiānróng de .mpy gǒngmén" #: py/persistentcode.c msgid "incompatible .mpy file" @@ -3705,7 +3707,7 @@ msgstr "bùshì 128 wèi UUID" #: py/parse.c msgid "not a constant" -msgstr "" +msgstr "búshì chángshù" #: py/objstr.c msgid "not all arguments converted during string formatting" @@ -3943,11 +3945,11 @@ msgstr "duān kǒu bì xū wéi >= 0" #: py/compile.c msgid "positional arg after **" -msgstr "" +msgstr "** zhīhòu de wèizhì cānshù" #: py/compile.c msgid "positional arg after keyword arg" -msgstr "" +msgstr "guānjiànzì cānshù hòude wèizhì cānshù" #: py/objint_mpz.c msgid "pow() 3rd argument cannot be 0" @@ -4181,7 +4183,7 @@ msgstr "tobytes zhǐ néng duì mì jí shù zǔ diào yòng" #: py/compile.c msgid "too many args" -msgstr "" +msgstr "cānshù tàiduō" #: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" From f2d38099f1c9108b6f06cb49ffa8594cb9f858a9 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 25 Aug 2023 18:49:11 +0200 Subject: [PATCH 105/291] 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 | 16 ++++------------ locale/cs.po | 16 ++++------------ locale/de_DE.po | 25 +++++++++++++------------ locale/el.po | 16 ++++------------ locale/en_GB.po | 25 +++++++++++++------------ locale/es.po | 28 +++++++++++++++------------- locale/fil.po | 16 ++++------------ locale/fr.po | 25 +++++++++++++------------ locale/hi.po | 16 ++++------------ locale/it_IT.po | 16 ++++------------ locale/ja.po | 16 ++++------------ locale/ko.po | 16 ++++------------ locale/nl.po | 16 ++++------------ locale/pl.po | 16 ++++------------ locale/pt_BR.po | 28 +++++++++++++++------------- locale/ru.po | 16 ++++------------ locale/sv.po | 25 +++++++++++++------------ locale/tr.po | 16 ++++------------ locale/zh_Latn_pinyin.po | 25 +++++++++++++------------ 19 files changed, 143 insertions(+), 230 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 742939386f..f573a4faa2 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -450,6 +450,10 @@ msgstr "Sebuah channel hardware interrupt sedang digunakan" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1983,10 +1987,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2363,14 +2363,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 372fb71e74..17478d6e82 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -451,6 +451,10 @@ msgstr "Kanál hardwarového přerušení je již používán" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1972,10 +1976,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2350,14 +2350,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index b6bbdaa773..e5dc6c7c35 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -458,6 +458,10 @@ msgstr "Ein Hardware Interrupt Kanal wird schon benutzt" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -2003,10 +2007,6 @@ msgstr "Stereo links muss sich auf PWM-Kanal A befinden" msgid "Stereo right must be on PWM channel B" msgstr "Stereo rechts muss sich auf PWM-Kanal B befinden" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "Das Stoppen des AP wird nicht unterstützt." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Gib entweder monotonic_time oder epoch_time an" @@ -2402,14 +2402,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi: " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "Das Wifi ist im Accesspoint-Modus." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "Das Wifi ist im Station-Modus." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "WLAN ist nicht aktiviert" @@ -4465,6 +4457,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "Das Stoppen des AP wird nicht unterstützt." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "Das Wifi ist im Accesspoint-Modus." + +#~ msgid "Wifi is in station mode." +#~ msgstr "Das Wifi ist im Station-Modus." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/el.po b/locale/el.po index 8ecc871685..face200222 100644 --- a/locale/el.po +++ b/locale/el.po @@ -459,6 +459,10 @@ msgstr "Ένα κανάλι interrupt υλικού είναι ήδη σε χρή msgid "ADC2 is being used by WiFi" msgstr "Το ADC2 χρησιμοποιείται απο το WIFI" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1985,10 +1989,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2363,14 +2363,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index d48bbffe5b..107d911124 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -457,6 +457,10 @@ msgstr "A hardware interrupt channel is already in use" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1983,10 +1987,6 @@ msgstr "Stereo left must be on PWM channel A" msgid "Stereo right must be on PWM channel B" msgstr "Stereo right must be on PWM channel B" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "Stopping AP is not supported." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Supply one of monotonic_time or epoch_time" @@ -2370,14 +2370,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi: " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "Wifi is in access point mode." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "Wifi is in station mode." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "Wifi is not enabled" @@ -4408,6 +4400,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "Stopping AP is not supported." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "Wifi is in access point mode." + +#~ msgid "Wifi is in station mode." +#~ msgstr "Wifi is in station mode." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/es.po b/locale/es.po index c5bc279dba..4a2ac848ff 100644 --- a/locale/es.po +++ b/locale/es.po @@ -462,6 +462,10 @@ msgstr "Un canal de interrupción por hardware ya está en uso" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1808,7 +1812,8 @@ msgstr "El polígono necesita al menos 3 puntos" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "Falta de potencia. Asegura que estás suministrando suficiente potencia." +msgstr "" +"Falta de potencia. Asegura que estás suministrando suficiente potencia." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -2017,10 +2022,6 @@ msgstr "Estéreo izquierdo debe estar en el canal PWM A" msgid "Stereo right must be on PWM channel B" msgstr "Estéreo derecho debe estar en el canal PWM B" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "Parar el AP no esta soportado." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Suministre monotonic_time o epoch_time" @@ -2412,14 +2413,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi: " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "Wifi est en modo de access point." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "Wifi esta en modo station." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "Wifi no esta activado" @@ -4460,6 +4453,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "Parar el AP no esta soportado." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "Wifi est en modo de access point." + +#~ msgid "Wifi is in station mode." +#~ msgstr "Wifi esta en modo station." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/fil.po b/locale/fil.po index fc3e801581..da5152e69e 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -449,6 +449,10 @@ msgstr "Isang channel ng hardware interrupt ay ginagamit na" msgid "ADC2 is being used by WiFi" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, fuzzy, c-format msgid "Address must be %d bytes long" @@ -1973,10 +1977,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2353,14 +2353,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index 1d246a9de0..d530b5e12b 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -461,6 +461,10 @@ msgstr "Un canal d'interruptions matériel est déjà utilisé" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -2024,10 +2028,6 @@ msgstr "Canal stéréo gauche doit être sur le canal PWM A" msgid "Stereo right must be on PWM channel B" msgstr "Canal stéréo droit doit être sur le canal PWM B" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "Stopper n'est pas supporté." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Fournissez l'un de monotonic_time ou epoch_time" @@ -2421,14 +2421,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi : " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "Wifi en mode point d'accès." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "Wifi en mode station." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "Le wifi n'est pas activé" @@ -4481,6 +4473,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "Stopper n'est pas supporté." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "Wifi en mode point d'accès." + +#~ msgid "Wifi is in station mode." +#~ msgstr "Wifi en mode station." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/hi.po b/locale/hi.po index f3633dbd78..3be12ce751 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -447,6 +447,10 @@ msgstr "" msgid "ADC2 is being used by WiFi" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1959,10 +1963,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2337,14 +2337,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index f865aee666..438f0a7c0b 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -452,6 +452,10 @@ msgstr "Un canale di interruzione hardware è già in uso" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1980,10 +1984,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2360,14 +2360,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index c74f672a03..c22d0fb3d4 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -454,6 +454,10 @@ msgstr "ハードウェア割り込みチャネルは使用中" msgid "ADC2 is being used by WiFi" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1973,10 +1977,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2352,14 +2352,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 09ae2f0120..0fe6441d4c 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -448,6 +448,10 @@ msgstr "" msgid "ADC2 is being used by WiFi" msgstr "" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1962,10 +1966,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2341,14 +2341,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index befcd1f2c3..7ea1ba3821 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -447,6 +447,10 @@ msgstr "Een hardware interrupt kanaal is al in gebruik" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1978,10 +1982,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Geef monotonic_time of epoch_time" @@ -2362,14 +2362,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index a58820be9d..a18fd1c8af 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -449,6 +449,10 @@ msgstr "Kanał przerwań sprzętowych w użyciu" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1965,10 +1969,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2343,14 +2343,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 53b11b70c5..b1a6417d4d 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -464,6 +464,10 @@ msgstr "Um canal de interrupção de hardware já está em uso" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1806,7 +1810,8 @@ msgstr "O Polígono precisa de pelo menos 3 pontos" #: supervisor/shared/safe_mode.c msgid "Power dipped. Make sure you are providing enough power." -msgstr "Falta de energia. Certifique-se que está fornecendo energia suficiente." +msgstr "" +"Falta de energia. Certifique-se que está fornecendo energia suficiente." #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" @@ -2016,10 +2021,6 @@ msgstr "O estéreo à esquerda deve estar no canal PWM A" msgid "Stereo right must be on PWM channel B" msgstr "O estéreo à direita deve estar no canal PWM B" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "Não há suporte para a interrupção do AP." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Forneça um de monotonic_time ou de epoch_time" @@ -2413,14 +2414,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi: " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "O Wi-Fi está em modo de ponto de acesso." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "O Wi-Fi está em modo estação." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "O Wi-Fi não está ativado" @@ -4468,6 +4461,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "Não há suporte para a interrupção do AP." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "O Wi-Fi está em modo de ponto de acesso." + +#~ msgid "Wifi is in station mode." +#~ msgstr "O Wi-Fi está em modo estação." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/ru.po b/locale/ru.po index 789dc004de..dc946a1bf3 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -454,6 +454,10 @@ msgstr "Канал аппаратного прерывания уже испол msgid "ADC2 is being used by WiFi" msgstr "ADC2 используется WiFi" +#: ports/raspberrypi/common-hal/wifi/Radio.c +msgid "AP could not be started" +msgstr "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -2014,10 +2018,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2394,14 +2394,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 80f5342a58..0ef02f77f1 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -461,6 +461,10 @@ msgstr "En kanal för hårdvaruavbrott används redan" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1998,10 +2002,6 @@ msgstr "Vänster stereokanal måste använda PWM kanal A" msgid "Stereo right must be on PWM channel B" msgstr "Höger stereokanal måste använda PWM kanal B" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "Stoppa AP stöds inte." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "Ange en av monotonic_time eller epoch_time" @@ -2386,14 +2386,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi: " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "WiFi är i accesspunktläge." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "WiFi är i stationsläge." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "WiFi är inte aktiverat" @@ -4429,6 +4421,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "Stoppa AP stöds inte." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "WiFi är i accesspunktläge." + +#~ msgid "Wifi is in station mode." +#~ msgstr "WiFi är i stationsläge." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" diff --git a/locale/tr.po b/locale/tr.po index 919e433e85..388413d570 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -456,6 +456,10 @@ msgstr "Bir donanım kesme kanalı halihazırda kullanılmaktadır" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -1979,10 +1983,6 @@ msgstr "" msgid "Stereo right must be on PWM channel B" msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "" - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "" @@ -2357,14 +2357,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "" - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "" - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index d528bea8c0..db626a4b8c 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -462,6 +462,10 @@ msgstr "Yìngjiàn zhōngduàn tōngdào yǐ zài shǐyòng zhōng" 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 "" + #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format msgid "Address must be %d bytes long" @@ -2000,10 +2004,6 @@ msgstr "lì tǐ shēng zuǒ bì xū shì zài PWM tōng dào A" msgid "Stereo right must be on PWM channel B" msgstr "lì tǐ shēng yòu cè bì xū zài PWM tōng dào B shàng" -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Stopping AP is not supported." -msgstr "bù zhī chí tíng zhǐ AP." - #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" msgstr "tí gòng qí zhōng yī monotonic_time huò epoch_time" @@ -2388,14 +2388,6 @@ msgstr "" msgid "Wi-Fi: " msgstr "Wi-Fi: " -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in access point mode." -msgstr "Wú xiàn wǎng luò chǔ yú jiē rù diǎn mó shì." - -#: ports/raspberrypi/common-hal/wifi/Radio.c -msgid "Wifi is in station mode." -msgstr "Wú xiàn wǎng luò chǔ yú gōng zuò zhàn mó shì." - #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "Wifi is not enabled" msgstr "wú xiàn wǎng luò wèi qǐ yòng" @@ -4433,6 +4425,15 @@ 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 "Stopping AP is not supported." +#~ msgstr "bù zhī chí tíng zhǐ AP." + +#~ msgid "Wifi is in access point mode." +#~ msgstr "Wú xiàn wǎng luò chǔ yú jiē rù diǎn mó shì." + +#~ msgid "Wifi is in station mode." +#~ msgstr "Wú xiàn wǎng luò chǔ yú gōng zuò zhàn mó shì." + #~ msgid "" #~ "\n" #~ "Please file an issue with your program at https://github.com/adafruit/" From b9b04fcefa610efd7309bb7e8c6f48f2e06c9b81 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 20 Aug 2023 14:21:56 +0200 Subject: [PATCH 106/291] Add new board uGame22 Information about the board: https://hackaday.io/project/186921-game-22 Hardware design repository: https://github.com/python-ugame/ugame-22 --- data/nvm.toml | 2 +- frozen/circuitpython-stage | 2 +- ports/raspberrypi/boards/ugame22/board.c | 122 ++++++++++++++++++ .../boards/ugame22/mpconfigboard.h | 5 + .../boards/ugame22/mpconfigboard.mk | 16 +++ .../boards/ugame22/pico-sdk-configboard.h | 4 + ports/raspberrypi/boards/ugame22/pins.c | 32 +++++ 7 files changed, 181 insertions(+), 2 deletions(-) create mode 100644 ports/raspberrypi/boards/ugame22/board.c create mode 100644 ports/raspberrypi/boards/ugame22/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/ugame22/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/ugame22/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/ugame22/pins.c diff --git a/data/nvm.toml b/data/nvm.toml index 427cc92397..d17b999f46 160000 --- a/data/nvm.toml +++ b/data/nvm.toml @@ -1 +1 @@ -Subproject commit 427cc923976229bcb981ca6f218ebe8efd636df6 +Subproject commit d17b999f46fd148ac192ad692b8a4639f81add38 diff --git a/frozen/circuitpython-stage b/frozen/circuitpython-stage index 4124dfbdaa..25e35a8620 160000 --- a/frozen/circuitpython-stage +++ b/frozen/circuitpython-stage @@ -1 +1 @@ -Subproject commit 4124dfbdaadce1966f457d7d6c6984e9832999bf +Subproject commit 25e35a8620bfab08ff4ec30bf89667dca0b05fcf diff --git a/ports/raspberrypi/boards/ugame22/board.c b/ports/raspberrypi/boards/ugame22/board.c new file mode 100644 index 0000000000..e816c5e100 --- /dev/null +++ b/ports/raspberrypi/boards/ugame22/board.c @@ -0,0 +1,122 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + + +uint8_t display_init_sequence[] = { + 0x01, 0x80, 0x80, // Software reset then delay 0x80 (128ms) + 0xEF, 0x03, 0x03, 0x80, 0x02, + 0xCF, 0x03, 0x00, 0xC1, 0x30, + 0xED, 0x04, 0x64, 0x03, 0x12, 0x81, + 0xE8, 0x03, 0x85, 0x00, 0x78, + 0xCB, 0x05, 0x39, 0x2C, 0x00, 0x34, 0x02, + 0xF7, 0x01, 0x20, + 0xEA, 0x02, 0x00, 0x00, + 0xc0, 0x01, 0x23, // Power control VRH[5:0] + 0xc1, 0x01, 0x10, // Power control SAP[2:0];BT[3:0] + 0xc5, 0x02, 0x3e, 0x28, // VCM control + 0xc7, 0x01, 0x86, // VCM control2 + 0x36, 0x01, 0x38, // Memory Access Control + 0x37, 0x01, 0x00, // Vertical scroll zero + 0x3a, 0x01, 0x55, // COLMOD: Pixel Format Set + 0xb1, 0x02, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors) + 0xb6, 0x03, 0x08, 0x82, 0x27, // Display Function Control + 0xF2, 0x01, 0x00, // 3Gamma Function Disable + 0x26, 0x01, 0x01, // Gamma curve selected + 0xe0, 0x0f, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, 0x4E, 0xF1, 0x37, 0x07, + 0x10, 0x03, 0x0E, 0x09, 0x00, // Set Gamma + 0xe1, 0x0f, 0x00, 0x0E, 0x14, 0x03, 0x11, 0x07, 0x31, 0xC1, 0x48, 0x08, + 0x0F, 0x0C, 0x31, 0x36, 0x0F, // Set Gamma + 0x11, 0x80, 0x78, // Exit Sleep then delay 0x78 (120ms) + 0x29, 0x80, 0x78, // Display on then delay 0x78 (120ms) +}; + +void board_init(void) { + 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_GPIO2, &pin_GPIO3, NULL, false); + common_hal_busio_spi_never_reset(spi); + + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_GPIO4, // TFT_DC Command or data + &pin_GPIO5, // TFT_CS Chip select + &pin_GPIO1, // TFT_RST Reset + 80000000L, // Baudrate + 0, // Polarity + 0); // Phase + + displayio_display_obj_t *display = &allocate_display()->display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 320, // Width (after rotation) + 240, // Height (after rotation) + 0, // column start + 0, // row start + 0, // rotation + 16, // Color depth + false, // grayscale + false, // pixels in byte share row. only used for depth < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + display_init_sequence, + sizeof(display_init_sequence), + NULL, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness + false, // single_byte_bounds + false, // data_as_commands + false, // auto_refresh + 20, // native_frames_per_second + true, // backlight_on_high + false, // SH1107_addressing + 50000); // backlight pwm frequency +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/ugame22/mpconfigboard.h b/ports/raspberrypi/boards/ugame22/mpconfigboard.h new file mode 100644 index 0000000000..8f52b7f461 --- /dev/null +++ b/ports/raspberrypi/boards/ugame22/mpconfigboard.h @@ -0,0 +1,5 @@ +#define MICROPY_HW_BOARD_NAME "uGame22" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO14) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO15) diff --git a/ports/raspberrypi/boards/ugame22/mpconfigboard.mk b/ports/raspberrypi/boards/ugame22/mpconfigboard.mk new file mode 100644 index 0000000000..f3aa21adff --- /dev/null +++ b/ports/raspberrypi/boards/ugame22/mpconfigboard.mk @@ -0,0 +1,16 @@ +USB_VID = 0x1209 +USB_PID = 0xD1B6 +USB_PRODUCT = "uGame22" +USB_MANUFACTURER = "Radomir Dopieralski" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxM" + +CIRCUITPY_STAGE = 1 +CIRCUITPY_AUDIOIO = 1 +CIRCUITPY_AUDIOPWMIO = 1 +CIRCUITPY_KEYPAD = 1 + +FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/ugame22 diff --git a/ports/raspberrypi/boards/ugame22/pico-sdk-configboard.h b/ports/raspberrypi/boards/ugame22/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/ugame22/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/ugame22/pins.c b/ports/raspberrypi/boards/ugame22/pins.c new file mode 100644 index 0000000000..19385b97bc --- /dev/null +++ b/ports/raspberrypi/boards/ugame22/pins.c @@ -0,0 +1,32 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT_RST), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON_Z), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_X), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_DOWN), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_O), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_RIGHT), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_UP), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON_LEFT), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_GAIN), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_I2S_DIN), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_I2S_BCLK), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_I2S_LRCLK), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO14) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 8d25faf30af18435279942361b99c08b6bb0f511 Mon Sep 17 00:00:00 2001 From: Michael Bishop Date: Mon, 21 Aug 2023 17:47:10 -0300 Subject: [PATCH 107/291] raise kernel load addr and slip stack under kernel on both 32bit and 64bit --- ports/broadcom/Makefile | 9 +++++++++ ports/broadcom/config.txt | 1 + ports/broadcom/peripherals | 2 +- ports/broadcom/supervisor/port.c | 14 +------------- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/ports/broadcom/Makefile b/ports/broadcom/Makefile index 9af0503fbb..57d3aca029 100644 --- a/ports/broadcom/Makefile +++ b/ports/broadcom/Makefile @@ -171,6 +171,15 @@ $(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel$(SUFFIX).img $(Q)zip $@ $(BUILD)/circuitpython-disk.img $(Q)rm $(BUILD)/circuitpython-disk.img +.PHONY: $(BUILD)/rpiboot rpiboot +rpiboot: $(BUILD)/rpiboot +$(BUILD)/rpiboot: $(BUILD)/kernel$(SUFFIX).img + mkdir -vp $@ + cp -vf $(BUILD)/kernel$(SUFFIX).img $@/ + cp -vfr config.txt firmware/bootcode.bin firmware/fixup* firmware/start* firmware/*.dtb $@/ + #sed -i -e "s/BOOT_UART=0/BOOT_UART=1/" $@/bootcode.bin $@/bootcode.bin + echo uart_2ndstage=1 >> $@/config.txt + include $(TOP)/py/mkrules.mk diff --git a/ports/broadcom/config.txt b/ports/broadcom/config.txt index 36fd6308cf..1c12196b98 100644 --- a/ports/broadcom/config.txt +++ b/ports/broadcom/config.txt @@ -7,3 +7,4 @@ enable_jtag_gpio=1 # hdmi_group=1 # hdmi_mode=16 gpu_mem=16 +kernel_address=0x100000 diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index d3a6b50a21..ec1043800f 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit d3a6b50a21e7dd49ba4bfa0374da3407594caa50 +Subproject commit ec1043800fc987f7067fc07615193439843695d6 diff --git a/ports/broadcom/supervisor/port.c b/ports/broadcom/supervisor/port.c index ec6feb8703..d12b96aa5e 100644 --- a/ports/broadcom/supervisor/port.c +++ b/ports/broadcom/supervisor/port.c @@ -124,30 +124,18 @@ void reset_cpu(void) { } bool port_has_fixed_stack(void) { - #ifdef __aarch64__ return true; - #else - return false; - #endif } // From the linker script extern uint32_t __bss_end; extern uint32_t _ld_ram_end; uint32_t *port_stack_get_limit(void) { - #ifdef __aarch64__ return (uint32_t *)0x4; - #else - return &__bss_end; - #endif } uint32_t *port_stack_get_top(void) { - #ifdef __aarch64__ - return (uint32_t *)0x80000; - #else - return &_ld_ram_end; - #endif + return (uint32_t *)0x100000; } uint32_t *port_heap_get_bottom(void) { From 9eb61ef6675ed8348c062a8c3d51cfd6f73bdf1a Mon Sep 17 00:00:00 2001 From: RetiredWizard Date: Sat, 26 Aug 2023 11:00:37 -0400 Subject: [PATCH 108/291] Enable WiFi, leave DV enable to usercode --- .../boards/pimoroni_pico_dv_base_w/board.c | 23 ------------------- .../pimoroni_pico_dv_base_w/mpconfigboard.h | 2 ++ .../pimoroni_pico_dv_base_w/mpconfigboard.mk | 11 +++++++++ .../pico-sdk-configboard.h | 3 --- .../boards/pimoroni_pico_dv_base_w/pins.c | 8 +++++-- 5 files changed, 19 insertions(+), 28 deletions(-) diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c index ee86bb3651..331653173e 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/board.c @@ -26,27 +26,4 @@ #include "supervisor/board.h" -#include "bindings/picodvi/Framebuffer.h" -#include "shared-module/displayio/__init__.h" -#include "shared-bindings/framebufferio/FramebufferDisplay.h" - -void board_init(void) { - picodvi_framebuffer_obj_t *fb = &allocate_display_bus()->picodvi; - fb->base.type = &picodvi_framebuffer_type; - common_hal_picodvi_framebuffer_construct(fb, 320, 240, - &pin_GPIO7, &pin_GPIO6, - &pin_GPIO9, &pin_GPIO8, - &pin_GPIO11, &pin_GPIO10, - &pin_GPIO13, &pin_GPIO12, - 8); - - framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; - display->base.type = &framebufferio_framebufferdisplay_type; - common_hal_framebufferio_framebufferdisplay_construct( - display, - MP_OBJ_FROM_PTR(fb), - 0, - true); -} - // Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h index 917fa85ab7..648b3529f5 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.h @@ -6,3 +6,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) + +#define MICROPY_HW_LED_STATUS (&pin_CYW0) diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk index 66cee41e07..b7919a1847 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/mpconfigboard.mk @@ -9,8 +9,19 @@ CHIP_FAMILY = rp2 EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" CIRCUITPY__EVE = 1 + +CIRCUITPY_CYW43 = 1 +CIRCUITPY_SSL = 1 +CIRCUITPY_SSL_MBEDTLS = 1 +CIRCUITPY_HASHLIB = 1 +CIRCUITPY_WEB_WORKFLOW = 1 +CIRCUITPY_MDNS = 1 +CIRCUITPY_SOCKETPOOL = 1 +CIRCUITPY_WIFI = 1 + CIRCUITPY_PICODVI = 1 +CFLAGS += -DCYW43_PIN_WL_HOST_WAKE=24 -DCYW43_PIN_WL_REG_ON=23 -DCYW43_WL_GPIO_COUNT=3 -DCYW43_WL_GPIO_LED_PIN=0 # Must be accompanied by a linker script change CFLAGS += -DCIRCUITPY_FIRMWARE_SIZE='(1536 * 1024)' diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h index a41131dd22..36da55d457 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pico-sdk-configboard.h @@ -1,4 +1 @@ // Put board-specific pico-sdk definitions here. This file must exist. - -// Allow extra time for xosc to start. -#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c index 98a593310f..8e0545b689 100644 --- a/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c +++ b/ports/raspberrypi/boards/pimoroni_pico_dv_base_w/pins.c @@ -44,6 +44,12 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO19)}, { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO22)}, + { MP_ROM_QSTR(MP_QSTR_SMPS_MODE), MP_ROM_PTR(&pin_CYW1) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_CYW0) }, + + { MP_ROM_QSTR(MP_QSTR_VBUS_SENSE), MP_ROM_PTR(&pin_CYW2) }, + { MP_ROM_QSTR(MP_QSTR_I2S_WORD_SELECT), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, @@ -75,8 +81,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D2N), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_D2P), MP_ROM_PTR(&pin_GPIO13) }, { MP_ROM_QSTR(MP_QSTR_DV_HPD), MP_ROM_PTR(&pin_GPIO17) }, - - { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].framebuffer_display)}, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 36c0d81af84b5af3b1ebef95323fd406b68e91de Mon Sep 17 00:00:00 2001 From: Bobby Jap Date: Sat, 26 Aug 2023 18:50:35 -0700 Subject: [PATCH 109/291] Fix gzip Decompression Support --- extmod/moduzlib.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c index b2f5b5af33..4276c366cd 100644 --- a/extmod/moduzlib.c +++ b/extmod/moduzlib.c @@ -175,13 +175,18 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) { decomp->source_limit = (byte *)bufinfo.buf + bufinfo.len; int st; - bool is_zlib = true; + mp_int_t wbits = 0; - if (n_args > 1 && MP_OBJ_SMALL_INT_VALUE(args[1]) < 0) { - is_zlib = false; + if (n_args > 1) { + wbits = MP_OBJ_SMALL_INT_VALUE(args[1]); } - if (is_zlib) { + if (wbits >= 16) { + st = uzlib_gzip_parse_header(decomp); + if (st < 0) { + goto error; + } + } else if (wbits >= 0) { st = uzlib_zlib_parse_header(decomp); if (st < 0) { goto error; From 296dd12624964f710d0f3cb4823ddf20aa8e1a63 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 25 Aug 2023 21:16:35 +0000 Subject: [PATCH 110/291] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (999 of 999 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index b1a6417d4d..07d07b2397 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-24 15:48+0000\n" +"PO-Revision-Date: 2023-08-27 15:54+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,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\n" +"X-Generator: Weblate 5.0.1-dev\n" #: main.c msgid "" @@ -466,7 +466,7 @@ msgstr "O ADC2 está sendo usado pelo WiFi" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" -msgstr "" +msgstr "Não foi possível iniciar o AP" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format From 80d132fc955d974693c4ef85d86af655e5903e94 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 25 Aug 2023 19:16:03 +0000 Subject: [PATCH 111/291] Translated using Weblate (Swedish) Currently translated at 100.0% (999 of 999 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 0ef02f77f1..4286d0af98 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-24 15:48+0000\n" +"PO-Revision-Date: 2023-08-27 15:54+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,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\n" +"X-Generator: Weblate 5.0.1-dev\n" #: main.c msgid "" @@ -463,7 +463,7 @@ msgstr "ADC2 används av WiFi" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" -msgstr "" +msgstr "Kunde inte starta AP" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -1793,7 +1793,6 @@ msgid "Polygon needs at least 3 points" msgstr "Polygonen behöver minst 3 punkter" #: supervisor/shared/safe_mode.c -#, fuzzy msgid "Power dipped. Make sure you are providing enough power." msgstr "Spänningen sjönk. Se till att du ger tillräckligt med ström." From 8723cbf4322b43ea7148087d9eab26500e5ccf86 Mon Sep 17 00:00:00 2001 From: hexthat Date: Sat, 26 Aug 2023 15:06:38 +0000 Subject: [PATCH 112/291] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (999 of 999 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index db626a4b8c..abf4a02857 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-25 16:38+0000\n" +"PO-Revision-Date: 2023-08-27 15:54+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -464,7 +464,7 @@ 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 "" +msgstr "wúfǎ qǐdòng AP" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format From 55fbbdcb52592db702099de3a05a88c5dbcfa632 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 27 Aug 2023 19:28:44 +0200 Subject: [PATCH 113/291] Allow enabling async on samd21 It was just disabled, possibly because of size considerations, but it's useful to be able to enable it explicitly for selected boards. This requires some of the settings to use ?= instead of =, and fixing a bug in the traceback module, where the chain variable is unused if exception chaining is not enabled. --- ports/atmel-samd/mpconfigport.mk | 4 ++-- shared-bindings/traceback/__init__.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 032e49ce36..3cdca9a4eb 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -48,7 +48,7 @@ CIRCUITPY_RE ?= 0 CIRCUITPY_SDCARDIO ?= 0 CIRCUITPY_SYNTHIO ?= 0 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 -CIRCUITPY_TRACEBACK = 0 +CIRCUITPY_TRACEBACK ?= 0 CIRCUITPY_ULAB = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_ZLIB = 0 @@ -61,7 +61,7 @@ CIRCUITPY_SAFEMODE_PY ?= 0 CIRCUITPY_USB_IDENTIFICATION ?= 0 endif -MICROPY_PY_ASYNC_AWAIT = 0 +MICROPY_PY_ASYNC_AWAIT ?= 0 # We don't have room for the fonts for terminalio for certain languages, # so turn off terminalio, and if it's off and displayio is on, diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index 3ad601eb39..ca5c54716a 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -59,7 +59,6 @@ STATIC void traceback_exception_common(bool is_print_exception, mp_print_t *prin } mp_obj_t tb_obj = args[ARG_tb].u_obj; mp_obj_t limit_obj = args[ARG_limit].u_obj; - bool chain = args[ARG_chain].u_bool; if (args[ARG_file].u_obj != mp_const_none) { if (!is_print_exception) { @@ -93,6 +92,8 @@ STATIC void traceback_exception_common(bool is_print_exception, mp_print_t *prin mp_obj_exception_t *exc = mp_obj_exception_get_native(value); mp_obj_traceback_t *trace_backup = exc->traceback; #if MICROPY_CPYTHON_EXCEPTION_CHAIN + bool chain = args[ARG_chain].u_bool; + mp_obj_exception_t *context_backup = exc->context; mp_obj_exception_t *cause_backup = exc->cause; From fc17e9ef391259ad738b462b18cecbbe7c28c3f8 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Sun, 27 Aug 2023 19:34:06 +0200 Subject: [PATCH 114/291] Update __init__.c --- shared-bindings/traceback/__init__.c | 1 - 1 file changed, 1 deletion(-) diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index a1a9556bdc..ca34161842 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -95,7 +95,6 @@ STATIC void traceback_exception_common(bool is_print_exception, mp_print_t *prin mp_obj_exception_t *exc = mp_obj_exception_get_native(value); mp_obj_traceback_t *trace_backup = exc->traceback; #if MICROPY_CPYTHON_EXCEPTION_CHAIN - mp_obj_exception_t *context_backup = exc->context; mp_obj_exception_t *cause_backup = exc->cause; From 57ac916ccd6c923c9dae7b6ae5be5886e0fbc440 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Sun, 27 Aug 2023 23:29:08 +0300 Subject: [PATCH 115/291] .Trash-1000 on filesystem creation --- supervisor/shared/filesystem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index 345f55f2f1..d70505531b 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -129,6 +129,7 @@ bool filesystem_init(bool create_allowed, bool force_create) { } make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); make_empty_file(&vfs_fat->fatfs, "/.Trashes"); + make_empty_file(&vfs_fat->fatfs, "/.Trash-1000"); make_empty_file(&vfs_fat->fatfs, "/.fseventsd/no_log"); #if CIRCUITPY_OS_GETENV make_empty_file(&vfs_fat->fatfs, "/settings.toml"); From b0967cb1a4867a386c4e2116a77d89df81dd7ba3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 27 Aug 2023 16:09:17 -0500 Subject: [PATCH 116/291] Use QSTR_GLOBAL_REQUIREMENTS to give explicit dependency for qstr generation I investigated and found that this seems to be the best way to specify a file that must be generated before "qstr processing" can occur. Closes #8337 --- ports/atmel-samd/Makefile | 2 +- ports/espressif/Makefile | 5 +---- ports/raspberrypi/Makefile | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 0f01c789c6..9457486959 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -352,7 +352,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_CIRCUITPY_COMMON:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) -SRC_QSTR += $(HEADER_BUILD)/sdiodata.h +QSTR_GLOBAL_REQUIREMENTS += $(HEADER_BUILD)/sdiodata.h OBJ_EXTRA_ORDER_DEPS += $(HEADER_BUILD)/sioddata.h $(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD) $(Q)$(PYTHON) $< > $@ diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index ed4b95828b..320fda78fc 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -353,7 +353,7 @@ endif # create the config headers .PHONY: do-sdkconfig do-sdkconfig: $(BUILD)/esp-idf/config/sdkconfig.h -$(BUILD)/genhdr/qstr.i.last: $(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) @@ -378,9 +378,6 @@ menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h # We should use that when available. For now, we sort out everything. python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) -# qstr builds include headers so we need to make sure they are up to date -$(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h - 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/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 2e5d69dabf..1a9cd35f55 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -424,7 +424,8 @@ $(BUILD)/stage2.c: stage2.c.jinja gen_stage2.py | $(BUILD)/ $(STEPECHO) "GEN $<" $(Q)$(PYTHON) gen_stage2.py $< $@ $(EXTERNAL_FLASH_DEVICES) -$(HEADER_BUILD)/flash_info.h: flash_info.h.jinja gen_stage2.py | $(HEADER_BUILD)/ +QSTR_GLOBAL_REQUIREMENTS += $(HEADER_BUILD)/flash_info.h +$(HEADER_BUILD)/flash_info.h: flash_info.h.jinja gen_stage2.py $(STEPECHO) "GEN $<" $(Q)$(PYTHON) gen_stage2.py $< $@ $(EXTERNAL_FLASH_DEVICES) From 029c912bf0f19062426922962deaf12d9785c5bc Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 28 Aug 2023 17:03:32 +0300 Subject: [PATCH 117/291] Comment and reorder the files creation. --- supervisor/shared/filesystem.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index d70505531b..f6ade7cbba 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -127,10 +127,15 @@ bool filesystem_init(bool create_allowed, bool force_create) { if (res != FR_OK) { return false; } - make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); - make_empty_file(&vfs_fat->fatfs, "/.Trashes"); - make_empty_file(&vfs_fat->fatfs, "/.Trash-1000"); make_empty_file(&vfs_fat->fatfs, "/.fseventsd/no_log"); + make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); + + // Prevent storing trash on all OSes. + make_empty_file(&vfs_fat->fatfs, "/.Trashes"); // MacOS + make_empty_file(&vfs_fat->fatfs, "/.Trash-1000"); // Linux, XDG trash spec: + // https://specifications.freedesktop.org/trash-spec/trashspec-latest.html + + #if CIRCUITPY_OS_GETENV make_empty_file(&vfs_fat->fatfs, "/settings.toml"); #endif 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 118/291] 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 119/291] 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 adfd90f022e23ba6eb546b563c4eb824f6e8296e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 28 Aug 2023 13:57:44 -0500 Subject: [PATCH 120/291] add missing space --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index c07591ef3b..f9717dd691 100644 --- a/README.rst +++ b/README.rst @@ -155,7 +155,7 @@ Behavior - Re-runs ``code.py`` or other main file after file system writes by a workflow. (Disable with ``supervisor.disable_autoreload()``) - Autoreload is disabled while the REPL is active. -- ``code.py`` may also be named``code.txt``, ``main.py``, or ``main.txt``. +- ``code.py`` may also be named ``code.txt``, ``main.py``, or ``main.txt``. - ``boot.py`` may also be named ``boot.txt``. - ``safemode.py`` may also be named ``safemode.txt``. From d7cf11d3ef736ceb56b950279163d889bf83040d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 28 Aug 2023 13:59:34 -0500 Subject: [PATCH 121/291] Add repl.py support --- README.rst | 2 ++ main.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/README.rst b/README.rst index f9717dd691..fb0518bfbd 100644 --- a/README.rst +++ b/README.rst @@ -133,6 +133,8 @@ Behavior ``code.py`` **in the REPL anymore, as the REPL is a fresh vm.** CircuitPython's goal for this change includes reducing confusion about pins and memory being used. - After the main code is finished the REPL can be entered by pressing any key. + - If the file ``repl.py`` exists, it is executed before the REPL Prompt is shown + - In safe mode this functionality is disabled, to ensure the REPL Prompt can always be reached - Autoreload state will be maintained across reload. - Adds a safe mode that does not run user code after a hard crash or brown out. This makes it diff --git a/main.c b/main.c index 122f079129..af9f664672 100644 --- a/main.c +++ b/main.c @@ -929,6 +929,11 @@ STATIC int run_repl(safe_mode_t safe_mode) { autoreload_suspend(AUTORELOAD_SUSPEND_REPL); + if (get_safe_mode() == SAFE_MODE_NONE) { + const char *const filenames[] = { "repl.py" }; + (void)maybe_run_list(filenames, MP_ARRAY_SIZE(filenames)); + } + // Set the status LED to the REPL color before running the REPL. For // NeoPixels and DotStars this will be sticky but for PWM or single LED it // won't. This simplifies pin sharing because they won't be in use when From 5188166949cd017890d27b10d366ed89cac9971e Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 28 Aug 2023 21:53:45 +0200 Subject: [PATCH 122/291] 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 | 4 ++++ locale/cs.po | 4 ++++ locale/de_DE.po | 4 ++++ locale/el.po | 4 ++++ locale/en_GB.po | 4 ++++ locale/es.po | 4 ++++ locale/fil.po | 4 ++++ locale/fr.po | 4 ++++ locale/hi.po | 4 ++++ locale/it_IT.po | 4 ++++ locale/ja.po | 4 ++++ locale/ko.po | 4 ++++ locale/nl.po | 4 ++++ locale/pl.po | 4 ++++ locale/pt_BR.po | 4 ++++ locale/ru.po | 4 ++++ locale/sv.po | 4 ++++ locale/tr.po | 4 ++++ locale/zh_Latn_pinyin.po | 4 ++++ 19 files changed, 76 insertions(+) diff --git a/locale/ID.po b/locale/ID.po index f573a4faa2..19484df074 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -2390,6 +2390,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 17478d6e82..0c22cfffbe 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -2377,6 +2377,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index e5dc6c7c35..26ab1022ce 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -2429,6 +2429,10 @@ msgstr "Beide Knöpfe wurden beim Starten gedrückt." msgid "You pressed button A at start up." msgstr "Knopf A wurde beim Starten gedrückt." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "Der BOOT-Knopf wurde beim Starten gedrückt" diff --git a/locale/el.po b/locale/el.po index face200222..657ab83f20 100644 --- a/locale/el.po +++ b/locale/el.po @@ -2390,6 +2390,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 107d911124..73b5028849 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -2397,6 +2397,10 @@ msgstr "You pressed both buttons at start up." msgid "You pressed button A at start up." msgstr "You pressed button A at start up." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "You pressed the BOOT button at start up" diff --git a/locale/es.po b/locale/es.po index 4a2ac848ff..8066a3bba5 100644 --- a/locale/es.po +++ b/locale/es.po @@ -2440,6 +2440,10 @@ msgstr "Usted presionó ambos botones al iniciar." msgid "You pressed button A at start up." msgstr "Usted presionó el botón A al iniciar." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "Usted presionó el botón BOOT al iniciar" diff --git a/locale/fil.po b/locale/fil.po index da5152e69e..226de0e449 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -2380,6 +2380,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index d530b5e12b..55e1cad427 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -2448,6 +2448,10 @@ msgstr "Vous avez appuyé les deux boutons au démarrage." msgid "You pressed button A at start up." msgstr "Vous avez appuyé le bouton A au démarrage." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "Vous avez appuyé le bouton BOOT au démarrage" diff --git a/locale/hi.po b/locale/hi.po index 3be12ce751..8b6daab54f 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -2364,6 +2364,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 438f0a7c0b..e0f719cb5a 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -2387,6 +2387,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index c22d0fb3d4..90608bca7e 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -2379,6 +2379,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 0fe6441d4c..0f1329a029 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -2368,6 +2368,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 7ea1ba3821..424b229068 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -2389,6 +2389,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index a18fd1c8af..80067e391b 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -2370,6 +2370,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 07d07b2397..0b1e0aeac6 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -2441,6 +2441,10 @@ msgstr "Você pressionou os dois botões durante a inicialização." msgid "You pressed button A at start up." msgstr "Você pressionou o botão A na inicialização." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "Você pressionou o botão BOOT na inicialização" diff --git a/locale/ru.po b/locale/ru.po index dc946a1bf3..1ae155ffdf 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -2421,6 +2421,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 4286d0af98..ecf245428d 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -2412,6 +2412,10 @@ msgstr "Du tryckte ner båda knapparna vid start." msgid "You pressed button A at start up." msgstr "Du tryckte ner knapp A vid start." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "Du tryckte ner BOOT-knappen vid start" diff --git a/locale/tr.po b/locale/tr.po index 388413d570..6f245c9862 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -2384,6 +2384,10 @@ msgstr "" msgid "You pressed button A at start up." msgstr "" +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index abf4a02857..a601c3d0f2 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -2415,6 +2415,10 @@ msgstr "nín zài qǐ dòng shí àn xià le liǎng gè àn niǔ." msgid "You pressed button A at start up." msgstr "nín zài qǐ dòng shí àn xià le àn niǔ A." +#: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h +msgid "You pressed button DOWN at start up." +msgstr "" + #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" msgstr "nín zài qǐ dòng shí àn xià le qǐ dòng àn niǔ" From 9daccc08c5f8ef26c9ef537875e4c2bee800cbbd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 28 Aug 2023 15:43:45 -0700 Subject: [PATCH 123/291] 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 ae181d69afcc34ff88e9e82952cdf28e5488615f Mon Sep 17 00:00:00 2001 From: Bobby Jap Date: Mon, 28 Aug 2023 21:36:32 -0700 Subject: [PATCH 124/291] Update wrappers to use new gzip changes --- shared-bindings/zlib/__init__.c | 8 ++++---- shared-bindings/zlib/__init__.h | 2 +- shared-module/zlib/__init__.c | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/shared-bindings/zlib/__init__.c b/shared-bindings/zlib/__init__.c index d0fd803d3a..1b38d59ff4 100644 --- a/shared-bindings/zlib/__init__.c +++ b/shared-bindings/zlib/__init__.c @@ -71,12 +71,12 @@ //| ... //| STATIC mp_obj_t zlib_decompress(size_t n_args, const mp_obj_t *args) { - bool is_zlib = true; - if (n_args > 1 && MP_OBJ_SMALL_INT_VALUE(args[1]) < 0) { - is_zlib = false; + mp_int_t wbits = 0; + if (n_args > 1) { + wbits = MP_OBJ_SMALL_INT_VALUE(args[1]); } - return common_hal_zlib_decompress(args[0], is_zlib); + return common_hal_zlib_decompress(args[0], wbits); } STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(zlib_decompress_obj, 1, 3, zlib_decompress); diff --git a/shared-bindings/zlib/__init__.h b/shared-bindings/zlib/__init__.h index 232d08e294..06ffb4aef6 100644 --- a/shared-bindings/zlib/__init__.h +++ b/shared-bindings/zlib/__init__.h @@ -27,6 +27,6 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ZLIB___INIT___H #define MICROPY_INCLUDED_SHARED_BINDINGS_ZLIB___INIT___H -mp_obj_t common_hal_zlib_decompress(mp_obj_t data, bool is_zlib); +mp_obj_t common_hal_zlib_decompress(mp_obj_t data, mp_int_t wbits); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_ZLIB___INIT___H diff --git a/shared-module/zlib/__init__.c b/shared-module/zlib/__init__.c index a057e6e2f7..082464fad2 100644 --- a/shared-module/zlib/__init__.c +++ b/shared-module/zlib/__init__.c @@ -48,7 +48,7 @@ #define DEBUG_printf(...) (void)0 #endif -mp_obj_t common_hal_zlib_decompress(mp_obj_t data, bool is_zlib) { +mp_obj_t common_hal_zlib_decompress(mp_obj_t data, mp_int_t wbits) { mp_buffer_info_t bufinfo; mp_get_buffer_raise(data, &bufinfo, MP_BUFFER_READ); @@ -66,7 +66,12 @@ mp_obj_t common_hal_zlib_decompress(mp_obj_t data, bool is_zlib) { decomp->source_limit = (unsigned char *)bufinfo.buf + bufinfo.len; int st; - if (is_zlib) { + if (wbits >= 16) { + st = uzlib_gzip_parse_header(decomp); + if (st < 0) { + goto error; + } + } else if (wbits >= 0) { st = uzlib_zlib_parse_header(decomp); if (st < 0) { goto error; From f204b1716450eb6ffce68f9f5891706e1d332a23 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 29 Aug 2023 17:23:17 +0300 Subject: [PATCH 125/291] Disable dotfiles on boards without native usb --- supervisor/shared/filesystem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index f6ade7cbba..2eff0b47aa 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -122,6 +122,7 @@ bool filesystem_init(bool create_allowed, bool force_create) { return false; } + #if CIRCUITPY_USB // inhibit file indexing on MacOS res = f_mkdir(&vfs_fat->fatfs, "/.fseventsd"); if (res != FR_OK) { @@ -134,7 +135,7 @@ bool filesystem_init(bool create_allowed, bool force_create) { make_empty_file(&vfs_fat->fatfs, "/.Trashes"); // MacOS make_empty_file(&vfs_fat->fatfs, "/.Trash-1000"); // Linux, XDG trash spec: // https://specifications.freedesktop.org/trash-spec/trashspec-latest.html - + #endif #if CIRCUITPY_OS_GETENV make_empty_file(&vfs_fat->fatfs, "/settings.toml"); From b1504f79b77cbc74a433fdbdad21a97a5309b528 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Mon, 28 Aug 2023 20:22:06 +0000 Subject: [PATCH 126/291] 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 0b1e0aeac6..18dfbc65ce 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-27 15:54+0000\n" +"PO-Revision-Date: 2023-08-29 18:34+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -2443,7 +2443,7 @@ msgstr "Você pressionou o botão A na inicialização." #: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h msgid "You pressed button DOWN at start up." -msgstr "" +msgstr "Você pressionou o botão DOWN na inicialização." #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" From 0d75bee3cf32d5f79fd241b91b4e075cbc45030c Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 29 Aug 2023 06:50:33 +0000 Subject: [PATCH 127/291] 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 ecf245428d..10ff982bad 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-27 15:54+0000\n" +"PO-Revision-Date: 2023-08-29 18:34+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -2414,7 +2414,7 @@ msgstr "Du tryckte ner knapp A vid start." #: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h msgid "You pressed button DOWN at start up." -msgstr "" +msgstr "Du tryckte ner knapp NER vid start." #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" From a76be7cfa532aee2a77bd3cdb02b19ef387132e6 Mon Sep 17 00:00:00 2001 From: hexthat Date: Mon, 28 Aug 2023 22:57:09 +0000 Subject: [PATCH 128/291] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (1000 of 1000 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index a601c3d0f2..245a4cc759 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-27 15:54+0000\n" +"PO-Revision-Date: 2023-08-29 18:34+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -2417,7 +2417,7 @@ msgstr "nín zài qǐ dòng shí àn xià le àn niǔ A." #: ports/espressif/boards/m5stack_m5paper/mpconfigboard.h msgid "You pressed button DOWN at start up." -msgstr "" +msgstr "Nínzài qǐdòngshí ànxià le ànniǔ." #: supervisor/shared/safe_mode.c msgid "You pressed the BOOT button at start up" From b08b8876f9a0ddf9447ba1b0e1193f174a45f1cb Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 29 Aug 2023 11:38:12 -0700 Subject: [PATCH 129/291] Update tools/ci_check_duplicate_usb_vid_pid.py Co-authored-by: RetiredWizard --- tools/ci_check_duplicate_usb_vid_pid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index e8cdb2d443..2f66076086 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -63,7 +63,7 @@ DEFAULT_CLUSTERLIST = { ], "0x239A:0x102E": ["weact_studio_pico", "weact_studio_pico_16mb"], "0x303A:0x8166": ["yd_esp32_s3_n8r8", "yd_esp32_s3_n16r8"], - "0x2E8A:0x1020": [ "waveshare_rp2040_plus_4mb", "waveshare_rp2040_plus_16mb"], + "0x2E8A:0x1020": ["waveshare_rp2040_plus_4mb", "waveshare_rp2040_plus_16mb"], } cli_parser = argparse.ArgumentParser( From 17015b48ad8e04ad7466f8b58263b86731dfe14c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 10 Aug 2023 09:22:10 -0500 Subject: [PATCH 130/291] 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 131/291] 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 132/291] 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 133/291] 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 134/291] 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 135/291] 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 136/291] 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 137/291] 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 138/291] 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 da3dfd7b5addc73b339eb29891cba88a012bf03a Mon Sep 17 00:00:00 2001 From: Tirtharaj Sinha Date: Thu, 31 Aug 2023 04:15:25 +0530 Subject: [PATCH 139/291] added new board - esp32 s3 pico --- locale/circuitpython.pot | 12 ++--- .../boards/waveshare_esp32_s3_pico/board.c | 40 +++++++++++++++ .../waveshare_esp32_s3_pico/mpconfigboard.h | 37 ++++++++++++++ .../waveshare_esp32_s3_pico/mpconfigboard.mk | 10 ++++ .../boards/waveshare_esp32_s3_pico/pins.c | 51 +++++++++++++++++++ .../boards/waveshare_esp32_s3_pico/sdkconfig | 47 +++++++++++++++++ 6 files changed, 191 insertions(+), 6 deletions(-) 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/locale/circuitpython.pot b/locale/circuitpython.pot index c744c6d3cb..b61c7b0f4c 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 @@ -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/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..5031686be4 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/board.c @@ -0,0 +1,40 @@ +/* + * 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..dfec09b8aa --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h @@ -0,0 +1,37 @@ +/* + * 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 "Waveshare ESP32-S3-Pico" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO21) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO12) +#define DEFAULT_UART_BUS_TX (&pin_GPIO11) 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..116a998b74 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.mk @@ -0,0 +1,10 @@ +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..884f4cf9e5 --- /dev/null +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c @@ -0,0 +1,51 @@ +#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 06ccd41294730566c4f3a924702c0fca22c2c399 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Tue, 29 Aug 2023 14:34:01 -0700 Subject: [PATCH 140/291] 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 5c23e28208646fc16be335cd23c0759f314348eb Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 31 Aug 2023 13:27:16 -0500 Subject: [PATCH 141/291] add explanation for newer compression features --- supervisor/shared/translate/compressed_string.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/supervisor/shared/translate/compressed_string.h b/supervisor/shared/translate/compressed_string.h index f524010db5..ac7517b9f6 100644 --- a/supervisor/shared/translate/compressed_string.h +++ b/supervisor/shared/translate/compressed_string.h @@ -53,6 +53,13 @@ // speaking, words. They're just spans of code points that frequently // occur together. They are ordered shortest to longest. // +// - If the translation uses a lot of code points or widely spaced code points, +// then the huffman table entries are UTF-16 code points. But if the translation +// uses only ASCII 7-bit code points plus a SMALL range of higher code points that +// still fit in 8 bits, translation_offset and translation_offstart are used to +// renumber the code points so that they still fit within 8 bits. (it's very beneficial +// for mchar_t to be 8 bits instead of 16!) +// // - dictionary entries are non-overlapping, and the _ending_ index of each // entry is stored in an array. A count of words of each length, from // minlen to maxlen, is given in the array called wlencount. From @@ -60,6 +67,14 @@ // calculated by an efficient, small loop. (A bit of time is traded // to reduce the size of this table indicating lengths) // +// - Value 1 ('\1') is used to indicate that a QSTR number follows. the +// QSTR is encoded as a fixed number of bits (translation_qstr_bits), e.g., +// 10 bits if the highest core qstr is from 512 to 1023 inclusive. +// (maketranslationdata uses a simple heuristic where any qstr >= 3 +// characters long is encoded in this way; this is simple but probably not +// optimal. In fact, the rule of >= 2 characters is better for SOME languages +// on SOME boards.) +// // The "data" / "tail" construct is so that the struct's last member is a // "flexible array". However, the _only_ member is not permitted to be // a flexible member, so we have to declare the first byte as a separate From 80a1d1a20a59aba9beb4d76251864453ed85025b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 31 Aug 2023 14:52:26 -0500 Subject: [PATCH 142/291] 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 143/291] 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 144/291] 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 145/291] 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 146/291] 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 147/291] 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 148/291] 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 149/291] 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 150/291] 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 5eb18d3a7a4b268331b62cfb72d3f5f9a230ed84 Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 1 Sep 2023 14:35:14 -0700 Subject: [PATCH 151/291] Merge conflict resolved --- tools/ci_check_duplicate_usb_vid_pid.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 5232f6dc7c..f22225007b 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -64,6 +64,7 @@ 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 7fe6cf5ed6469d6aa528551d59eb994f68fb0e2e Mon Sep 17 00:00:00 2001 From: Melissa LeBlanc-Williams Date: Fri, 1 Sep 2023 15:03:08 -0700 Subject: [PATCH 152/291] Set D13 to input with Pulldown --- ports/espressif/boards/arduino_nano_esp32s3/board.c | 5 +++-- .../boards/arduino_nano_esp32s3_inverted_statusled/board.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ports/espressif/boards/arduino_nano_esp32s3/board.c b/ports/espressif/boards/arduino_nano_esp32s3/board.c index 0fc5bd1426..8952a19c5d 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3/board.c @@ -39,8 +39,9 @@ void board_init(void) { bool espressif_board_reset_pin_number(gpio_num_t pin_number) { if (pin_number == 13) { - // Set D13 LED to output by default. - gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); + // 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; } 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 0fc5bd1426..8952a19c5d 100644 --- a/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c +++ b/ports/espressif/boards/arduino_nano_esp32s3_inverted_statusled/board.c @@ -39,8 +39,9 @@ void board_init(void) { bool espressif_board_reset_pin_number(gpio_num_t pin_number) { if (pin_number == 13) { - // Set D13 LED to output by default. - gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); + // 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; } From b8c6fce6f28489cf23edbfae6257d83c3c0c3ef1 Mon Sep 17 00:00:00 2001 From: xXx Date: Fri, 1 Sep 2023 14:16:15 +0000 Subject: [PATCH 153/291] 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 9eaae37dfc79459a6de1929e4597d6ae4d265b2f Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 5 Sep 2023 19:31:18 +0300 Subject: [PATCH 154/291] When no password is passed, connect to wifi but do not init web_workflow. --- supervisor/shared/web_workflow/web_workflow.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 3e61eee360..15c60a1cbf 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -315,6 +315,15 @@ bool supervisor_start_web_workflow(void) { // (leaves new_port unchanged on any failure) (void)common_hal_os_getenv_int("CIRCUITPY_WEB_API_PORT", &web_api_port); + const size_t api_password_len = sizeof(_api_password) - 1; + result = common_hal_os_getenv_str("CIRCUITPY_WEB_API_PASSWORD", _api_password + 1, api_password_len); + if (result == GETENV_OK) { + _api_password[0] = ':'; + _base64_in_place(_api_password, strlen(_api_password), sizeof(_api_password) - 1); + } else { + return false; + } + bool first_start = pool.base.type != &socketpool_socketpool_type; if (first_start) { @@ -346,13 +355,6 @@ bool supervisor_start_web_workflow(void) { } #endif - const size_t api_password_len = sizeof(_api_password) - 1; - result = common_hal_os_getenv_str("CIRCUITPY_WEB_API_PASSWORD", _api_password + 1, api_password_len); - if (result == GETENV_OK) { - _api_password[0] = ':'; - _base64_in_place(_api_password, strlen(_api_password), sizeof(_api_password) - 1); - } - if (common_hal_socketpool_socket_get_closed(&listening)) { socketpool_socket(&pool, SOCKETPOOL_AF_INET, SOCKETPOOL_SOCK_STREAM, &listening); common_hal_socketpool_socket_settimeout(&listening, 0); From 6784e0e720d2e59e6bb08ae18b86ebb2b0619f14 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 5 Sep 2023 11:59:35 -0500 Subject: [PATCH 155/291] 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 156/291] 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 157/291] 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 5869af395e45d61e19b4602c159d81fee2a9420d Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 5 Sep 2023 22:39:41 +0300 Subject: [PATCH 158/291] Wifi fully seperate from web-workflow --- docs/workflows.md | 14 ++- supervisor/shared/web_workflow/web_workflow.c | 113 ++++++++++-------- supervisor/shared/web_workflow/web_workflow.h | 2 +- supervisor/shared/workflow.c | 5 +- 4 files changed, 72 insertions(+), 62 deletions(-) diff --git a/docs/workflows.md b/docs/workflows.md index 10d2897870..30fa07df9f 100644 --- a/docs/workflows.md +++ b/docs/workflows.md @@ -68,12 +68,14 @@ conflicts with user created NUS services. Read-only characteristic that returns the UTF-8 encoded version string. ## Web +If the keys `CIRCUITPY_WIFI_SSID` and `CIRCUITPY_WIFI_PASSWORD` are set in `settings.toml`, +CircuitPython will automatically connect to the given Wi-Fi network on boot and upon reload. -The web workflow is depends on adding Wi-Fi credentials into the `settings.toml` file. The keys are -`CIRCUITPY_WIFI_SSID` and `CIRCUITPY_WIFI_PASSWORD`. Once these are defined, CircuitPython will -automatically connect to the network and start the webserver used for the workflow. The webserver -is on port 80 unless overridden by `CIRCUITPY_WEB_API_PORT`. It also enables MDNS. The name -of the board as advertised to the network can be overridden by `CIRCUITPY_WEB_INSTANCE_NAME`. +If `CIRCUITPY_WEB_API_PASSWORD` is also set, the web workflow will also start. +The web workflow will only be enabled if the Wi-Fi connection succeeds upon boot. + +The webserver is on port 80 unless overridden by `CIRCUITPY_WEB_API_PORT`. It also enables MDNS. +The name of the board as advertised to the network can be overridden by `CIRCUITPY_WEB_INSTANCE_NAME`. Here is an example `/settings.toml`: @@ -82,7 +84,7 @@ Here is an example `/settings.toml`: CIRCUITPY_WIFI_SSID="scottswifi" CIRCUITPY_WIFI_PASSWORD="secretpassword" -# To enable modifying files from the web. Change this too! +# To enable the the webserver. Change this too! # Leave the User field blank in the browser. CIRCUITPY_WEB_API_PASSWORD="passw0rd" diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 15c60a1cbf..2a8133a562 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -258,19 +258,9 @@ void supervisor_web_workflow_status(void) { } #endif -bool supervisor_start_web_workflow(void) { +bool supervisor_start_web_workflow(bool reload) { #if CIRCUITPY_WEB_WORKFLOW && CIRCUITPY_WIFI && CIRCUITPY_OS_GETENV - // Skip starting the workflow if we're not starting from power on or reset. - const mcu_reset_reason_t reset_reason = common_hal_mcu_processor_get_reset_reason(); - if (reset_reason != RESET_REASON_POWER_ON && - reset_reason != RESET_REASON_RESET_PIN && - reset_reason != RESET_REASON_DEEP_SLEEP_ALARM && - reset_reason != RESET_REASON_UNKNOWN && - reset_reason != RESET_REASON_SOFTWARE) { - return false; - } - char ssid[33]; char password[64]; @@ -287,11 +277,6 @@ bool supervisor_start_web_workflow(void) { return false; } - result = common_hal_os_getenv_str("CIRCUITPY_WEB_INSTANCE_NAME", web_instance_name, sizeof(web_instance_name)); - if (result != GETENV_OK || web_instance_name[0] == '\0') { - strcpy(web_instance_name, MICROPY_HW_BOARD_NAME); - } - if (!common_hal_wifi_radio_get_enabled(&common_hal_wifi_radio_obj)) { common_hal_wifi_init(false); common_hal_wifi_radio_set_enabled(&common_hal_wifi_radio_obj, true); @@ -303,6 +288,7 @@ bool supervisor_start_web_workflow(void) { // We can all connect again because it will return early if we're already connected to the // network. If we are connected to a different network, then it will disconnect before // attempting to connect to the given network. + _wifi_status = common_hal_wifi_radio_connect( &common_hal_wifi_radio_obj, (uint8_t *)ssid, strlen(ssid), (uint8_t *)password, strlen(password), 0, 8, NULL, 0); @@ -312,21 +298,36 @@ bool supervisor_start_web_workflow(void) { return false; } - // (leaves new_port unchanged on any failure) - (void)common_hal_os_getenv_int("CIRCUITPY_WEB_API_PORT", &web_api_port); - - const size_t api_password_len = sizeof(_api_password) - 1; - result = common_hal_os_getenv_str("CIRCUITPY_WEB_API_PASSWORD", _api_password + 1, api_password_len); - if (result == GETENV_OK) { - _api_password[0] = ':'; - _base64_in_place(_api_password, strlen(_api_password), sizeof(_api_password) - 1); - } else { + // Skip starting the workflow if we're not starting from power on or reset. + const mcu_reset_reason_t reset_reason = common_hal_mcu_processor_get_reset_reason(); + if (reset_reason != RESET_REASON_POWER_ON && + reset_reason != RESET_REASON_RESET_PIN && + reset_reason != RESET_REASON_DEEP_SLEEP_ALARM && + reset_reason != RESET_REASON_UNKNOWN && + reset_reason != RESET_REASON_SOFTWARE) { return false; } - bool first_start = pool.base.type != &socketpool_socketpool_type; + bool initialized = pool.base.type == &socketpool_socketpool_type; + + if (!initialized && !reload) { + result = common_hal_os_getenv_str("CIRCUITPY_WEB_INSTANCE_NAME", web_instance_name, sizeof(web_instance_name)); + if (result != GETENV_OK || web_instance_name[0] == '\0') { + strcpy(web_instance_name, MICROPY_HW_BOARD_NAME); + } + + // (leaves new_port unchanged on any failure) + (void)common_hal_os_getenv_int("CIRCUITPY_WEB_API_PORT", &web_api_port); + + const size_t api_password_len = sizeof(_api_password) - 1; + result = common_hal_os_getenv_str("CIRCUITPY_WEB_API_PASSWORD", _api_password + 1, api_password_len); + if (result == GETENV_OK) { + _api_password[0] = ':'; + _base64_in_place(_api_password, strlen(_api_password), sizeof(_api_password) - 1); + } else { // Skip starting web-workflow when no password is passed. + return false; + } - if (first_start) { pool.base.type = &socketpool_socketpool_type; common_hal_socketpool_socketpool_construct(&pool, &common_hal_wifi_radio_obj); @@ -336,36 +337,42 @@ bool supervisor_start_web_workflow(void) { websocket_init(); } - if (!common_hal_socketpool_socket_get_closed(&active)) { - common_hal_socketpool_socket_close(&active); - } + initialized = pool.base.type == &socketpool_socketpool_type; - #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)) { - mdns_server_construct(&mdns, true); - mdns.base.type = &mdns_server_type; - if (!common_hal_mdns_server_deinited(&mdns)) { - common_hal_mdns_server_set_instance_name(&mdns, web_instance_name); + if (initialized){ + if (!common_hal_socketpool_socket_get_closed(&active)) { + common_hal_socketpool_socket_close(&active); } - } - if (!common_hal_mdns_server_deinited(&mdns)) { - common_hal_mdns_server_advertise_service(&mdns, "_circuitpython", "_tcp", web_api_port); - } - #endif - if (common_hal_socketpool_socket_get_closed(&listening)) { - socketpool_socket(&pool, SOCKETPOOL_AF_INET, SOCKETPOOL_SOCK_STREAM, &listening); - common_hal_socketpool_socket_settimeout(&listening, 0); - // Bind to any ip. (Not checking for failures) - common_hal_socketpool_socket_bind(&listening, "", 0, web_api_port); - common_hal_socketpool_socket_listen(&listening, 1); + #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. + mdns_server_construct(&mdns, true); + mdns.base.type = &mdns_server_type; + if (!common_hal_mdns_server_deinited(&mdns)) { + common_hal_mdns_server_set_instance_name(&mdns, web_instance_name); + } + } + if (!common_hal_mdns_server_deinited(&mdns)) { + common_hal_mdns_server_advertise_service(&mdns, "_circuitpython", "_tcp", web_api_port); + } + #endif + + if (common_hal_socketpool_socket_get_closed(&listening)) { + socketpool_socket(&pool, SOCKETPOOL_AF_INET, SOCKETPOOL_SOCK_STREAM, &listening); + common_hal_socketpool_socket_settimeout(&listening, 0); + // Bind to any ip. (Not checking for failures) + common_hal_socketpool_socket_bind(&listening, "", 0, web_api_port); + common_hal_socketpool_socket_listen(&listening, 1); + } + // Wake polling thread (maybe) + socketpool_socket_poll_resume(); + #endif + return true; } - // Wake polling thread (maybe) - socketpool_socket_poll_resume(); - #endif - return true; + return false; } void web_workflow_send_raw(socketpool_socket_obj_t *socket, const uint8_t *buf, int len) { diff --git a/supervisor/shared/web_workflow/web_workflow.h b/supervisor/shared/web_workflow/web_workflow.h index c325c0ff5d..a3b8f45c20 100644 --- a/supervisor/shared/web_workflow/web_workflow.h +++ b/supervisor/shared/web_workflow/web_workflow.h @@ -36,7 +36,7 @@ void supervisor_web_workflow_background(void *data); bool supervisor_web_workflow_status_dirty(void); void supervisor_web_workflow_status(void); -bool supervisor_start_web_workflow(void); +bool supervisor_start_web_workflow(bool); void supervisor_stop_web_workflow(void); // Share the MDNS object with user code. diff --git a/supervisor/shared/workflow.c b/supervisor/shared/workflow.c index b4e7852b2a..10af20f0cf 100644 --- a/supervisor/shared/workflow.c +++ b/supervisor/shared/workflow.c @@ -56,8 +56,9 @@ void supervisor_workflow_reset(void) { #endif #if CIRCUITPY_WEB_WORKFLOW + bool result = supervisor_start_web_workflow(true); if (workflow_background_cb.fun) { - if (supervisor_start_web_workflow()) { + if (result) { supervisor_workflow_request_background(); } } @@ -105,7 +106,7 @@ void supervisor_workflow_start(void) { #endif #if CIRCUITPY_WEB_WORKFLOW - if (supervisor_start_web_workflow()) { + if (supervisor_start_web_workflow(false)) { // Enable background callbacks if web_workflow startup successful memset(&workflow_background_cb, 0, sizeof(workflow_background_cb)); workflow_background_cb.fun = supervisor_web_workflow_background; From 9d191b52232959309e83981b7d7ccce2979a6fac Mon Sep 17 00:00:00 2001 From: xXx Date: Mon, 4 Sep 2023 08:44:23 +0000 Subject: [PATCH 159/291] 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 160/291] 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 161/291] 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 162/291] 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 7588abad321ecb609096b1361688fb68e78d8492 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 6 Sep 2023 16:58:12 +0300 Subject: [PATCH 163/291] stop_station when no wifi-reconnect --- supervisor/shared/web_workflow/web_workflow.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 2a8133a562..33e72aa08d 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -266,6 +266,9 @@ bool supervisor_start_web_workflow(bool reload) { os_getenv_err_t result = common_hal_os_getenv_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid)); if (result != GETENV_OK) { + #if CIRCUITPY_CYW43 + common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj); + #endif return false; } @@ -274,6 +277,10 @@ bool supervisor_start_web_workflow(bool reload) { // if password is unspecified, assume an open network password[0] = '\0'; } else if (result != GETENV_OK) { + #if CIRCUITPY_CYW43 + common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj); + #endif + return false; } From ed4c510d8f0baa219a2cb4c153d6b233b37a7458 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Wed, 6 Sep 2023 17:00:06 +0300 Subject: [PATCH 164/291] Remove a space --- supervisor/shared/web_workflow/web_workflow.c | 1 - 1 file changed, 1 deletion(-) diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 33e72aa08d..04a02b8628 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -280,7 +280,6 @@ bool supervisor_start_web_workflow(bool reload) { #if CIRCUITPY_CYW43 common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj); #endif - return false; } From 0c0b927843de46cca2c12557aec149efb1d186e8 Mon Sep 17 00:00:00 2001 From: Tirtharaj Sinha Date: Wed, 6 Sep 2023 21:48:41 +0530 Subject: [PATCH 165/291] 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 166/291] 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 167/291] 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 168/291] 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 169/291] 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 170/291] 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 171/291] 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 172/291] 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 173/291] 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 174/291] 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 175/291] 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 176/291] 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 177/291] 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 178/291] 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 179/291] 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 180/291] 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 181/291] 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 182/291] 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 183/291] 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 184/291] 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 185/291] 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 186/291] 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 187/291] 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 188/291] 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 189/291] 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 190/291] 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 191/291] 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 192/291] 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 193/291] 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 194/291] 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 195/291] 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 196/291] 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 197/291] 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 198/291] 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 199/291] 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 200/291] 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 201/291] 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 202/291] 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 203/291] 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 204/291] 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 205/291] 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 206/291] 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 207/291] 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 208/291] 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 209/291] 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 210/291] 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 211/291] 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 212/291] 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 213/291] 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 214/291] 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 215/291] 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 216/291] 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 217/291] 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 218/291] 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 219/291] 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 220/291] 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 221/291] 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 222/291] 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 223/291] 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 224/291] 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 225/291] 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 226/291] 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 227/291] 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 228/291] 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 229/291] 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 230/291] 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 231/291] 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 232/291] 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 233/291] 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 234/291] 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 235/291] 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 236/291] 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 237/291] 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 238/291] 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 239/291] 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 240/291] 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 241/291] 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 242/291] 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 243/291] 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 244/291] 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 245/291] 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 246/291] 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 247/291] 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 27fd60d73962901d29e3f7fd9fd06b90cd934379 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+microdev1@users.noreply.github.com> Date: Sun, 24 Sep 2023 15:23:38 +0000 Subject: [PATCH 248/291] implement suggested changes - update the docs - split out common `watchdog_reset` - revert to using `None` instead of `WatchDogMode.NONE` --- locale/circuitpython.pot | 15 +++--- .../common-hal/watchdog/WatchDogTimer.c | 15 ------ .../common-hal/watchdog/WatchDogTimer.h | 6 +-- .../common-hal/watchdog/WatchDogTimer.c | 15 ------ .../common-hal/watchdog/WatchDogTimer.h | 6 +-- ports/nrf/common-hal/watchdog/WatchDogTimer.c | 15 ------ ports/nrf/common-hal/watchdog/WatchDogTimer.h | 7 ++- .../common-hal/watchdog/WatchDogTimer.c | 15 ------ .../common-hal/watchdog/WatchDogTimer.h | 6 +-- .../common-hal/watchdog/WatchDogTimer.c | 4 -- .../common-hal/watchdog/WatchDogTimer.h | 6 +-- ports/silabs/supervisor/port.c | 4 ++ py/circuitpy_defns.mk | 1 + shared-bindings/watchdog/WatchDogMode.c | 5 -- shared-bindings/watchdog/WatchDogTimer.c | 18 +++---- shared-bindings/watchdog/WatchDogTimer.h | 4 +- shared-module/watchdog/__init__.c | 47 +++++++++++++++++++ shared-module/watchdog/__init__.h | 32 +++++++++++++ 18 files changed, 117 insertions(+), 104 deletions(-) create mode 100644 shared-module/watchdog/__init__.c create mode 100644 shared-module/watchdog/__init__.h diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 768d353b27..f40ef66999 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -200,6 +200,10 @@ msgstr "" msgid "%q must be <= %u" msgstr "" +#: py/argcheck.c +msgid "%q must be >= %d" +msgstr "" + #: shared-bindings/analogbufio/BufferedIn.c msgid "%q must be a bytearray or array of type 'H' or 'B'" msgstr "" @@ -447,10 +451,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 "" @@ -4185,7 +4185,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 "" @@ -4279,10 +4280,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c index 15683a1275..435cfd6731 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c @@ -28,8 +28,6 @@ #include "py/runtime.h" -#include "shared/runtime/pyexec.h" - #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/watchdog/WatchDogTimer.h" #include "shared-bindings/microcontroller/__init__.h" @@ -82,19 +80,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { self->mode = WATCHDOGMODE_NONE; } -void watchdog_reset(void) { - watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; - if (self->mode == WATCHDOGMODE_RESET) { - mp_obj_t exception = pyexec_result()->exception; - if (exception != MP_OBJ_NULL && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { - return; - } - } - common_hal_watchdog_deinit(self); -} - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } diff --git a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h index 579e8ce65f..ae214a95e6 100644 --- a/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h +++ b/ports/atmel-samd/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.c b/ports/espressif/common-hal/watchdog/WatchDogTimer.c index 6410f5e61a..68437958e5 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.c +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.c @@ -26,8 +26,6 @@ #include "py/runtime.h" -#include "shared/runtime/pyexec.h" - #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/microcontroller/__init__.h" @@ -68,19 +66,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { } } -void watchdog_reset(void) { - watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; - if (self->mode == WATCHDOGMODE_RESET) { - mp_obj_t exception = pyexec_result()->exception; - if (exception != MP_OBJ_NULL && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { - return; - } - } - common_hal_watchdog_deinit(self); -} - static void wdt_config(uint32_t timeout, watchdog_watchdogmode_t mode) { // enable panic hanler in WATCHDOGMODE_RESET mode // initialize Task Watchdog Timer (TWDT) diff --git a/ports/espressif/common-hal/watchdog/WatchDogTimer.h b/ports/espressif/common-hal/watchdog/WatchDogTimer.h index 8d95bfa4cc..461d11f18c 100644 --- a/ports/espressif/common-hal/watchdog/WatchDogTimer.h +++ b/ports/espressif/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c index 872c4642db..1ac0ee1076 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c @@ -33,8 +33,6 @@ #include "py/objproperty.h" #include "py/runtime.h" -#include "shared/runtime/pyexec.h" - #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -109,19 +107,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { self->mode = WATCHDOGMODE_NONE; } -void watchdog_reset(void) { - watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; - if (self->mode == WATCHDOGMODE_RESET) { - mp_obj_t exception = pyexec_result()->exception; - if (exception != MP_OBJ_NULL && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { - return; - } - } - common_hal_watchdog_deinit(self); -} - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.h b/ports/nrf/common-hal/watchdog/WatchDogTimer.h index 1ff654c321..e298a71ba7 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.h +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_NRF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,8 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog if it's set to -// "RAISE". If set to "RESET", then the watchdog cannot be reset. -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c index 29234b46b0..61c71ccd62 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c @@ -26,8 +26,6 @@ #include "py/runtime.h" -#include "shared/runtime/pyexec.h" - #include "shared-bindings/watchdog/__init__.h" #include "shared-bindings/microcontroller/__init__.h" @@ -49,19 +47,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { self->mode = WATCHDOGMODE_NONE; } -void watchdog_reset(void) { - watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; - if (self->mode == WATCHDOGMODE_RESET) { - mp_obj_t exception = pyexec_result()->exception; - if (exception != MP_OBJ_NULL && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && - exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { - return; - } - } - common_hal_watchdog_deinit(self); -} - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h index 579e8ce65f..ae214a95e6 100644 --- a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h +++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/silabs/common-hal/watchdog/WatchDogTimer.c b/ports/silabs/common-hal/watchdog/WatchDogTimer.c index b6158e1cc6..d65c794833 100644 --- a/ports/silabs/common-hal/watchdog/WatchDogTimer.c +++ b/ports/silabs/common-hal/watchdog/WatchDogTimer.c @@ -41,10 +41,6 @@ void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { WDOG_Enable(false); } -void watchdog_reset(void) { - common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj); -} - mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) { return self->timeout; } diff --git a/ports/silabs/common-hal/watchdog/WatchDogTimer.h b/ports/silabs/common-hal/watchdog/WatchDogTimer.h index d1538bd491..9aad655e73 100644 --- a/ports/silabs/common-hal/watchdog/WatchDogTimer.h +++ b/ports/silabs/common-hal/watchdog/WatchDogTimer.h @@ -28,6 +28,9 @@ #define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H #include "py/obj.h" + +#include "shared-module/watchdog/__init__.h" + #include "shared-bindings/watchdog/WatchDogMode.h" #include "shared-bindings/watchdog/WatchDogTimer.h" @@ -37,7 +40,4 @@ struct _watchdog_watchdogtimer_obj_t { watchdog_watchdogmode_t mode; }; -// This needs to be called in order to disable the watchdog -void watchdog_reset(void); - #endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H diff --git a/ports/silabs/supervisor/port.c b/ports/silabs/supervisor/port.c index 8247c813a7..fba90882df 100644 --- a/ports/silabs/supervisor/port.c +++ b/ports/silabs/supervisor/port.c @@ -192,6 +192,10 @@ void reset_port(void) { #if CIRCUITPY_RTC rtc_reset(); #endif + + #if CIRCUITPY_WATCHDOG + watchdog_reset(); + #endif } void reset_to_bootloader(void) { diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index c819d46db8..3974e27df4 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -666,6 +666,7 @@ SRC_SHARED_MODULE_ALL = \ usb/core/__init__.c \ usb/core/Device.c \ ustack/__init__.c \ + watchdog/__init__.c \ zlib/__init__.c \ vectorio/Circle.c \ vectorio/Polygon.c \ diff --git a/shared-bindings/watchdog/WatchDogMode.c b/shared-bindings/watchdog/WatchDogMode.c index 343702e4b1..944ab451fa 100644 --- a/shared-bindings/watchdog/WatchDogMode.c +++ b/shared-bindings/watchdog/WatchDogMode.c @@ -28,16 +28,12 @@ #include "shared-bindings/watchdog/WatchDogMode.h" -MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, NONE, WATCHDOGMODE_NONE); MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RAISE, WATCHDOGMODE_RAISE); MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RESET, WATCHDOGMODE_RESET); //| class WatchDogMode: //| """Run state of the watchdog timer.""" //| -//| NONE: WatchDogMode -//| """The `WatchDogTimer` is disabled.""" -//| //| RAISE: WatchDogMode //| """Raise an exception when the `WatchDogTimer` expires.""" //| @@ -45,7 +41,6 @@ MAKE_ENUM_VALUE(watchdog_watchdogmode_type, watchdogmode, RESET, WATCHDOGMODE_RE //| """Reset the system when the `WatchDogTimer` expires.""" //| MAKE_ENUM_MAP(watchdog_watchdogmode) { - MAKE_ENUM_MAP_ENTRY(watchdogmode, NONE), MAKE_ENUM_MAP_ENTRY(watchdogmode, RAISE), MAKE_ENUM_MAP_ENTRY(watchdogmode, RESET), }; diff --git a/shared-bindings/watchdog/WatchDogTimer.c b/shared-bindings/watchdog/WatchDogTimer.c index cc91a09ef2..49cfdaecb4 100644 --- a/shared-bindings/watchdog/WatchDogTimer.c +++ b/shared-bindings/watchdog/WatchDogTimer.c @@ -71,8 +71,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_feed_obj, watchdog_watch //| //| :raises RuntimeError: if the watchdog timer cannot be disabled on this platform. //| -//| .. note:: This is deprecated in ``8.1.0`` and will be removed in ``9.0.0``. -//| Set watchdog `mode` to `WatchDogMode.NONE` instead. +//| .. note:: This is deprecated in ``9.0.0`` and will be removed in ``10.0.0``. +//| Set watchdog `mode` to `None` instead. //| //| """ //| ... @@ -107,16 +107,17 @@ MP_PROPERTY_GETSET(watchdog_watchdogtimer_timeout_obj, (mp_obj_t)&watchdog_watchdogtimer_get_timeout_obj, (mp_obj_t)&watchdog_watchdogtimer_set_timeout_obj); -//| mode: WatchDogMode -//| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode`. +//| mode: Optional[WatchDogMode] +//| """The current operating mode of the WatchDogTimer `watchdog.WatchDogMode` or `None` when +//| the timer is disabled. //| //| Setting a `WatchDogMode` activates the WatchDog:: //| -//| from microcontroller import watchdog as w +//| from microcontroller import watchdog //| from watchdog import WatchDogMode //| -//| w.timeout = 5 -//| w.mode = WatchDogMode.RESET +//| watchdog.timeout = 5 +//| watchdog.mode = WatchDogMode.RESET //| //| //| Once set, the `WatchDogTimer` will perform the specified action if the timer expires.""" @@ -129,7 +130,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_get_mode_obj, watchdog_watchdog STATIC mp_obj_t watchdog_watchdogtimer_obj_set_mode(mp_obj_t self_in, mp_obj_t obj) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in); - common_hal_watchdog_set_mode(self, cp_enum_value(&watchdog_watchdogmode_type, obj, MP_QSTR_mode)); + watchdog_watchdogmode_t mode = (obj == mp_const_none) ? WATCHDOGMODE_NONE : cp_enum_value(&watchdog_watchdogmode_type, obj, MP_QSTR_mode); + common_hal_watchdog_set_mode(self, mode); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(watchdog_watchdogtimer_set_mode_obj, watchdog_watchdogtimer_obj_set_mode); diff --git a/shared-bindings/watchdog/WatchDogTimer.h b/shared-bindings/watchdog/WatchDogTimer.h index 48044748a9..a566b267d6 100644 --- a/shared-bindings/watchdog/WatchDogTimer.h +++ b/shared-bindings/watchdog/WatchDogTimer.h @@ -27,14 +27,14 @@ #ifndef MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGTIMER_H #define MICROPY_INCLUDED_SHARED_BINDINGS_WATCHDOG_WATCHDOGTIMER_H -#include +#include "py/obj.h" #include "shared-bindings/watchdog/WatchDogMode.h" typedef struct _watchdog_watchdogtimer_obj_t watchdog_watchdogtimer_obj_t; extern void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self); -extern void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t); +extern void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t mode); extern watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_t *self); extern void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t timeout); diff --git a/shared-module/watchdog/__init__.c b/shared-module/watchdog/__init__.c new file mode 100644 index 0000000000..b348647c06 --- /dev/null +++ b/shared-module/watchdog/__init__.c @@ -0,0 +1,47 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 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 "py/runtime.h" + +#include "shared/runtime/pyexec.h" + +#include "shared-module/watchdog/__init__.h" + +#include "shared-bindings/watchdog/WatchDogTimer.h" +#include "shared-bindings/microcontroller/__init__.h" + +void watchdog_reset(void) { + watchdog_watchdogtimer_obj_t *self = &common_hal_mcu_watchdogtimer_obj; + if (self->mode == WATCHDOGMODE_RESET) { + mp_obj_t exception = pyexec_result()->exception; + if (exception != MP_OBJ_NULL && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) && + exception != MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) { + return; + } + } + common_hal_watchdog_deinit(self); +} diff --git a/shared-module/watchdog/__init__.h b/shared-module/watchdog/__init__.h new file mode 100644 index 0000000000..219ccfc7b4 --- /dev/null +++ b/shared-module/watchdog/__init__.h @@ -0,0 +1,32 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2023 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. + */ + +#ifndef MICROPY_INCLUDED_SHARED_MODULE_WATCHDOG___INIT___H +#define MICROPY_INCLUDED_SHARED_MODULE_WATCHDOG___INIT___H + +extern void watchdog_reset(void); + +#endif // MICROPY_INCLUDED_SHARED_MODULE_WATCHDOG___INIT___H From 409d1a83b629c3302388859289c4ba01daff7f4c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 25 Sep 2023 09:45:35 -0500 Subject: [PATCH 249/291] 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 250/291] 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 251/291] 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 252/291] 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 253/291] 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 254/291] 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 255/291] 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 256/291] 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 257/291] 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 258/291] 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 259/291] 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 260/291] 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 54322578d2277bdd9116103835b645505daabfec Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Tue, 26 Sep 2023 16:44:19 -0700 Subject: [PATCH 261/291] RP2040: fix 8-bit WAV "audio buffer too small" bug Also subtly fixed 8- to 16-bit scaling math --- ports/raspberrypi/audio_dma.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index b5bd8c069c..ad5aebbef1 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -64,20 +64,23 @@ STATIC size_t audio_dma_convert_samples(audio_dma_t *dma, uint8_t *input, uint32 if (dma->sample_resolution <= 8 && dma->output_resolution > 8) { // reading bytes, writing 16-bit words, so output buffer will be bigger. - output_length_used = output_length * 2; - if (output_length_used > output_length) { - mp_raise_RuntimeError(translate("Internal audio buffer too small")); - } + output_length_used *= 2; - size_t shift = dma->output_resolution - dma->sample_resolution; + // Correct "rail-to-rail" scaling of arbitrary-depth input to output + // requires more operations than this, but at least the vital 8- to + // 16-bit cases are correctly scaled now. Prior code was only + // considering 8-to-16 anyway, but had a slight DC offset in the + // result, so this is no worse off WRT supported resolutions. + uint16_t mul = ((1 << dma->output_resolution) - 1) / ((1 << dma->sample_resolution) - 1); + uint16_t offset = (1 << dma->output_resolution) / 2; for (uint32_t i = 0; i < input_length; i += dma->sample_spacing) { if (dma->signed_to_unsigned) { - ((uint16_t *)output)[out_i] = ((uint16_t)((int8_t *)input)[i] + 0x80) << shift; + ((uint16_t *)output)[out_i] = (uint16_t)((((int8_t *)input)[i] + 0x80) * mul); } else if (dma->unsigned_to_signed) { - ((int16_t *)output)[out_i] = ((int16_t)((uint8_t *)input)[i] - 0x80) << shift; + ((int16_t *)output)[out_i] = (int16_t)(((uint8_t *)input)[i] * mul - offset); } else { - ((uint16_t *)output)[out_i] = ((uint16_t)((uint8_t *)input)[i]) << shift; + ((uint16_t *)output)[out_i] = (uint16_t)(((uint8_t *)input)[i] * mul); } out_i += 1; } From fdab0f7212f3fd3a55c0ffe538ec231a62086f19 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 27 Sep 2023 18:13:54 +0200 Subject: [PATCH 262/291] 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 263/291] 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 264/291] 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 265/291] 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) { From a9fce6c495f37829997f09ee3d4847144782b494 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 27 Sep 2023 18:12:41 -0500 Subject: [PATCH 266/291] qualia: fixes for revision C * neopixel removed, could not share function with DBLTAP * external SPI bus definition is settled --- .../boards/adafruit_qualia_s3_rgb666/mpconfigboard.h | 10 ++++++++-- .../espressif/boards/adafruit_qualia_s3_rgb666/pins.c | 7 ++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h index 04527bb0a1..d262bb4373 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h @@ -32,9 +32,15 @@ #define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) -#define MICROPY_HW_NEOPIXEL (&pin_GPIO4) // also DBLTAP +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO5) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO6) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) -#define DOUBLE_TAP_PIN (&pin_GPIO4) // also NEOPIXEL +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) + +#define DOUBLE_TAP_PIN (&pin_GPIO4) // a 1024x768 16BPP framebuffer + some breathing room #define DEFAULT_RESERVED_PSRAM (1024 * 1024 * 2) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c index a8920961e0..758b08640a 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/pins.c @@ -76,7 +76,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, @@ -84,6 +83,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_MISO), MP_ROM_PTR(DEFAULT_SPI_BUS_MISO) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(DEFAULT_SPI_BUS_MOSI) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(DEFAULT_SPI_BUS_SCK) }, + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO15) }, + // 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) }, @@ -96,5 +100,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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 c261ac6318aa7c9063efe5aa216d758711b41abb Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 27 Sep 2023 21:33:19 -0500 Subject: [PATCH 267/291] shared_bindings_matrix: Explicitly fetch SRC_SUPERVISOR for ci_set_matrix --- docs/shared_bindings_matrix.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py index e89b47c871..2dad572995 100644 --- a/docs/shared_bindings_matrix.py +++ b/docs/shared_bindings_matrix.py @@ -170,9 +170,11 @@ def get_settings_from_makefile(port_dir, board_name): This means that the effect of all Makefile directives is taken into account, without having to re-encode the logic that sets them in this script, something that has proved error-prone + + This list must explicitly include any setting queried by tools/ci_set_matrix.py. """ contents = subprocess.run( - ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS"], + ["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS", "print-SRC_SUPERVISOR"], encoding="utf-8", errors="replace", stdout=subprocess.PIPE, From e40abda1bc42e8154b0818c8a747664e775ac407 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 27 Sep 2023 21:34:24 -0500 Subject: [PATCH 268/291] ci_set_matrix: Don't use .get(), it hides errors Variables that are explicitly fetched always have a value, even if it is the empty value. However, using .get() hid the error that shared_bindings_matrix wasn't fetching SRC_SUPERVISOR. --- tools/ci_set_matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index e5ac80c912..41d0a035bc 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -189,14 +189,14 @@ def set_boards(build_all: bool): # Check frozen files to see if they are in each board if file.startswith("frozen"): - if file in settings.get("FROZEN_MPY_DIRS", ""): + if file in settings["FROZEN_MPY_DIRS"]: boards_to_build.add(board) continue # Check supervisor files # This is useful for limiting workflow changes to the relevant boards if file.startswith("supervisor"): - if file in settings.get("SRC_SUPERVISOR", ""): + if file in settings["SRC_SUPERVISOR"]: boards_to_build.add(board) continue From 8b84edfddeccc27d1eab546d8b9c92aa86a2abc3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 27 Sep 2023 21:35:00 -0500 Subject: [PATCH 269/291] ci_set_matrix: no need to expand the value of CIRCUITPY_WEB_WORKFLOW This is now done by the way shared_bindings_matrix.py invokes make. --- tools/ci_set_matrix.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index 41d0a035bc..15a6cb3ab8 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -203,9 +203,6 @@ def set_boards(build_all: bool): if file.startswith("supervisor/shared/web_workflow/static/"): web_workflow = settings["CIRCUITPY_WEB_WORKFLOW"] - while web_workflow.startswith("$("): - web_workflow = settings[web_workflow[2:-1]] - if web_workflow != "0": boards_to_build.add(board) continue From 7258f7b4a048f83efbba32137fd6c49ef5a6b3d2 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Thu, 28 Sep 2023 14:47:39 +0300 Subject: [PATCH 270/291] Revert "Remove a space" This reverts commit ed4c510d8f0baa219a2cb4c153d6b233b37a7458. --- supervisor/shared/web_workflow/web_workflow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index ce94fb4609..937e3acb4c 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -280,6 +280,7 @@ bool supervisor_start_web_workflow(bool reload) { #if CIRCUITPY_CYW43 common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj); #endif + return false; } From 8c3715667571af896f723bfe8e63ce6906679592 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Thu, 28 Sep 2023 14:47:43 +0300 Subject: [PATCH 271/291] Revert "stop_station when no wifi-reconnect" This reverts commit 7588abad321ecb609096b1361688fb68e78d8492. --- supervisor/shared/web_workflow/web_workflow.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/supervisor/shared/web_workflow/web_workflow.c b/supervisor/shared/web_workflow/web_workflow.c index 937e3acb4c..ecf83b8bcb 100644 --- a/supervisor/shared/web_workflow/web_workflow.c +++ b/supervisor/shared/web_workflow/web_workflow.c @@ -266,9 +266,6 @@ bool supervisor_start_web_workflow(bool reload) { os_getenv_err_t result = common_hal_os_getenv_str("CIRCUITPY_WIFI_SSID", ssid, sizeof(ssid)); if (result != GETENV_OK) { - #if CIRCUITPY_CYW43 - common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj); - #endif return false; } @@ -277,10 +274,6 @@ bool supervisor_start_web_workflow(bool reload) { // if password is unspecified, assume an open network password[0] = '\0'; } else if (result != GETENV_OK) { - #if CIRCUITPY_CYW43 - common_hal_wifi_radio_stop_station(&common_hal_wifi_radio_obj); - #endif - return false; } From c3cf7c089491f697e669899b003b061fade826cc Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Thu, 28 Sep 2023 17:53:40 +0300 Subject: [PATCH 272/291] wifi_reset --- ports/raspberrypi/common-hal/wifi/Radio.c | 7 ++++++- ports/raspberrypi/common-hal/wifi/__init__.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 1508b764a2..ffccd4faf8 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -75,8 +75,13 @@ bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self) { } void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled) { - self->enabled = enabled; // TODO: Actually enable and disable the WiFi module at this point. + if (self->enabled && !enabled) { + common_hal_wifi_radio_stop_station(self); + common_hal_wifi_radio_stop_ap(self); + } + self->enabled = enabled; + } mp_obj_t common_hal_wifi_radio_get_hostname(wifi_radio_obj_t *self) { diff --git a/ports/raspberrypi/common-hal/wifi/__init__.c b/ports/raspberrypi/common-hal/wifi/__init__.c index 91a45e8d92..63f09fc774 100644 --- a/ports/raspberrypi/common-hal/wifi/__init__.c +++ b/ports/raspberrypi/common-hal/wifi/__init__.c @@ -71,7 +71,7 @@ void common_hal_wifi_init(bool user_initiated) { void wifi_user_reset(void) { if (wifi_user_initiated) { - // wifi_reset(); + wifi_reset(); wifi_user_initiated = false; } } @@ -83,7 +83,7 @@ void wifi_reset(void) { // the cyw43 wifi chip is not reset due to https://github.com/raspberrypi/pico-sdk/issues/980 common_hal_wifi_monitor_deinit(MP_STATE_VM(wifi_monitor_singleton)); common_hal_wifi_radio_obj.current_scan = NULL; - // common_hal_wifi_radio_set_enabled(radio, false); + common_hal_wifi_radio_set_enabled(&common_hal_wifi_radio_obj, false); supervisor_workflow_request_background(); } From 10aeb237894c928330342d28c73d82ba125d50a9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 28 Sep 2023 17:13:22 -0500 Subject: [PATCH 273/291] remove console pins, that was wrong --- .../boards/adafruit_qualia_s3_rgb666/mpconfigboard.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h index d262bb4373..bb7e0ead9b 100644 --- a/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qualia_s3_rgb666/mpconfigboard.h @@ -36,10 +36,6 @@ #define DEFAULT_SPI_BUS_MISO (&pin_GPIO6) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO7) -// UART pins attached to the USB-serial converter chip -#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO43) -#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO44) - #define DOUBLE_TAP_PIN (&pin_GPIO4) // a 1024x768 16BPP framebuffer + some breathing room From 2fe0fa5b5cf077085435ab7d324afc5986be45d0 Mon Sep 17 00:00:00 2001 From: Phillip Burgess Date: Fri, 29 Sep 2023 14:25:54 -0700 Subject: [PATCH 274/291] Add output_length_used check as requested --- ports/raspberrypi/audio_dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/raspberrypi/audio_dma.c b/ports/raspberrypi/audio_dma.c index ad5aebbef1..940a383cbe 100644 --- a/ports/raspberrypi/audio_dma.c +++ b/ports/raspberrypi/audio_dma.c @@ -65,6 +65,9 @@ STATIC size_t audio_dma_convert_samples(audio_dma_t *dma, uint8_t *input, uint32 // reading bytes, writing 16-bit words, so output buffer will be bigger. output_length_used *= 2; + if (output_length_used > output_length) { + mp_raise_RuntimeError(translate("Internal audio buffer too small")); + } // Correct "rail-to-rail" scaling of arbitrary-depth input to output // requires more operations than this, but at least the vital 8- to From debcbb24a50abce7015685d386d0e507aaa47e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Smitka?= Date: Fri, 29 Sep 2023 08:20:56 +0000 Subject: [PATCH 275/291] Translated using Weblate (Czech) Currently translated at 23.6% (236 of 997 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/cs/ --- locale/cs.po | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/locale/cs.po b/locale/cs.po index 5f4c7f1df1..a99a15a02f 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,15 +6,15 @@ 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-05-21 00:49+0000\n" -"Last-Translator: Scott Shawcroft \n" +"PO-Revision-Date: 2023-10-01 08:00+0000\n" +"Last-Translator: Vladimír Smitka \n" "Language-Team: LANGUAGE \n" "Language: cs\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==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.18-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -38,18 +38,25 @@ msgid "" "Please file an issue with your program at github.com/adafruit/circuitpython/" "issues." msgstr "" +"\n" +"Prosím, založte issue s vaším programem na github.com/adafruit/circuitpython/" +"issues." #: supervisor/shared/safe_mode.c msgid "" "\n" "Press reset to exit safe mode.\n" msgstr "" +"\n" +"Stiskněte reset pro ukončení nouzového režimu.\n" #: supervisor/shared/safe_mode.c msgid "" "\n" "You are in safe mode because:\n" msgstr "" +"\n" +"Jste v bezpečnostním režimu z důvodu:\n" #: py/obj.c msgid " File \"%q\"" @@ -79,7 +86,7 @@ msgstr "%%c vyžaduje int nebo char" #: main.c #, c-format msgid "%02X" -msgstr "" +msgstr "%02X" #: shared-module/os/getenv.c #, c-format @@ -130,7 +137,7 @@ msgstr "%q: selhání %d" #: py/argcheck.c msgid "%q in %q must be of type %q, not %q" -msgstr "" +msgstr "%q v %q musí být typu %q, ne %q" #: ports/espressif/common-hal/espulp/ULP.c #: ports/mimxrt10xx/common-hal/audiobusio/__init__.c @@ -157,11 +164,11 @@ msgstr "Inicializace %q selhala" #: ports/espressif/bindings/espnow/Peer.c shared-bindings/dualbank/__init__.c msgid "%q is %q" -msgstr "" +msgstr "%q je %q" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "%q is read-only for this board" -msgstr "" +msgstr "%q je pouze u této desky pouze pro čtení" #: py/argcheck.c shared-bindings/usb_hid/Device.c msgid "%q length must be %d" @@ -205,30 +212,31 @@ msgid "%q must be >= %d" msgstr "%q musí být >= %d" #: shared-bindings/analogbufio/BufferedIn.c +#, fuzzy msgid "%q must be a bytearray or array of type 'H' or 'B'" -msgstr "" +msgstr "%q musí být bytearray nebo pole typu 'H' nebo 'B'" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" -msgstr "" +msgstr "%q musí být bytearray nebo pole typu 'h', 'H', 'b', nebo 'B'" #: ports/espressif/common-hal/analogbufio/BufferedIn.c msgid "%q must be array of type 'H'" -msgstr "" +msgstr "%q musí být pole typu 'H V" #: shared-module/synthio/__init__.c msgid "%q must be array of type 'h'" -msgstr "" +msgstr "%q musí být pole typu '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 musí být typu %q nebo %q, ne %q" #: py/argcheck.c py/objstrunicode.c shared-module/synthio/__init__.c msgid "%q must be of type %q, not %q" -msgstr "" +msgstr "%q musí být typu %q, ne %q" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" @@ -249,7 +257,7 @@ msgstr "%q je mimo rozsah" #: py/objrange.c py/objslice.c shared-bindings/random/__init__.c msgid "%q step cannot be zero" -msgstr "" +msgstr "%q krok nemůže být nula" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -261,11 +269,11 @@ msgstr "%q, %q, a %q musí mít všechny shodnou délku" #: py/objint.c shared-bindings/storage/__init__.c msgid "%q=%q" -msgstr "" +msgstr "%q=%q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts in more bits than pin count" -msgstr "" +msgstr "%q[%u] posouvá o více bitů než je počet pinů" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" @@ -273,7 +281,7 @@ msgstr "" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" -msgstr "" +msgstr "%q[%u] používá extra pin" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] waits on input outside of count" From fd4a61233e9fbbfb988416e55163171fbf11595a Mon Sep 17 00:00:00 2001 From: Sumitra Sharma Date: Mon, 2 Oct 2023 21:05:21 +0530 Subject: [PATCH 276/291] Update documentation for rotaryio.IncrementalEncoder Update the documentation in circuitpython/shared-bindings/rotaryio/IncrementalEncoder.c to explicitly state that rotaryio.IncrementalEncoder assumes the encoder's pins are connected to ground and sets pull-ups on the pins accordingly. Closes #5847 Signed-off-by: Sumitra Sharma --- shared-bindings/rotaryio/IncrementalEncoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared-bindings/rotaryio/IncrementalEncoder.c b/shared-bindings/rotaryio/IncrementalEncoder.c index 24df2b2d15..d2031432e6 100644 --- a/shared-bindings/rotaryio/IncrementalEncoder.c +++ b/shared-bindings/rotaryio/IncrementalEncoder.c @@ -35,7 +35,9 @@ #include "shared-bindings/util.h" //| class IncrementalEncoder: -//| """IncrementalEncoder determines the relative rotational position based on two series of pulses.""" +//| """IncrementalEncoder determines the relative rotational position based on two series of pulses. +//| It assumes that the encoder's common pin(s) are connected to ground,and enables pull-ups on +//| pin_a and pin_b.""" //| //| def __init__( //| self, pin_a: microcontroller.Pin, pin_b: microcontroller.Pin, divisor: int = 4 From b55d64e1bb62288cb3468d5b3370ef429e82d0ef Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 2 Oct 2023 21:17:43 +0000 Subject: [PATCH 277/291] 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 | 30 ++++-------------------- locale/cs.po | 30 ++++-------------------- locale/de_DE.po | 49 +++++++++++++++++----------------------- locale/el.po | 30 ++++-------------------- locale/en_GB.po | 45 ++++++++++++++++-------------------- locale/es.po | 49 +++++++++++++++++----------------------- locale/fil.po | 30 ++++-------------------- locale/fr.po | 49 +++++++++++++++++----------------------- locale/hi.po | 30 ++++-------------------- locale/it_IT.po | 30 ++++-------------------- locale/ja.po | 36 ++++++++--------------------- locale/ko.po | 30 ++++-------------------- locale/nl.po | 46 +++++++++++++++---------------------- locale/pl.po | 33 ++++++--------------------- locale/pt_BR.po | 49 +++++++++++++++++----------------------- locale/ru.po | 49 +++++++++++++++++----------------------- locale/sv.po | 48 +++++++++++++++++---------------------- locale/tr.po | 33 ++++++--------------------- locale/zh_Latn_pinyin.po | 47 ++++++++++++++++---------------------- 19 files changed, 235 insertions(+), 508 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 73369c3774..2a218084b9 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -199,6 +199,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "%q harus <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q harus >= %d" @@ -1174,10 +1178,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1824,11 +1824,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Pull tidak digunakan saat arah output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2334,20 +2329,10 @@ msgstr "Tegangan baca habis waktu" msgid "WARNING: Your code filename has two extensions\n" msgstr "PERINGATAN: Nama file kode anda mempunyai dua ekstensi\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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4105,10 +4090,7 @@ msgstr "sintaksis error pada JSON" msgid "syntax error in uctypes descriptor" msgstr "sintaksis error pada pendeskripsi uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4310,10 +4292,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index a99a15a02f..fcc6b84450 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -207,6 +207,10 @@ msgstr "%q musí být 1, pokud %q je True" msgid "%q must be <= %d" msgstr "%q musí být <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q musí být >= %d" @@ -1182,10 +1186,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1823,11 +1823,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2329,20 +2324,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4099,10 +4084,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4304,10 +4286,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index aa17cf6313..d94b51ff92 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -205,6 +205,10 @@ msgstr "%q muss 1 sein, wenn %q wahr ist" msgid "%q must be <= %d" msgstr "%q muss <= %d sein" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q muss >= %d sein" @@ -1195,10 +1199,6 @@ msgstr "" "Anfänglicher Pin-Zustand steht im Widerspruch mit dem anfänglichen out-" "Zustand des Pins" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1846,11 +1846,6 @@ msgstr "Programm zu lang" msgid "Pull not used when direction is output." msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "RAISE-Modus ist nicht implementiert" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL ist auf diesem Chip nicht verfügbar" @@ -2364,24 +2359,12 @@ msgid "WARNING: Your code filename has two extensions\n" msgstr "" "WARNUNG: Der Dateiname deines Programms hat zwei Dateityperweiterungen\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 kann nicht deinitialisiert werden, wenn der Modus auf RESET " "gesetzt ist" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer läuft aktuell nicht" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode kann nicht geändert werden, nachdem er auf WatchDogMode." -"RESET gesetzt wurde" - #: py/builtinhelp.c #, c-format msgid "" @@ -4171,10 +4154,7 @@ msgstr "Syntaxfehler in JSON" msgid "syntax error in uctypes descriptor" msgstr "Syntaxfehler in uctypes Deskriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "Das Zeitlimit hat den maximal zulässigen Wert überschritten" @@ -4378,10 +4358,6 @@ msgstr "Wert muss in %d Byte(s) passen" msgid "value out of range of target" msgstr "Wert außerhalb des Zielbereiches" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog nicht initialisiert" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "Breite muss größer als 0 sein" @@ -4453,6 +4429,23 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "RAISE-Modus ist nicht implementiert" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer läuft aktuell nicht" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode kann nicht geändert werden, nachdem er auf " +#~ "WatchDogMode.RESET gesetzt wurde" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog nicht initialisiert" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 wird vom WiFi benutzt" diff --git a/locale/el.po b/locale/el.po index 086718f45b..b362f61284 100644 --- a/locale/el.po +++ b/locale/el.po @@ -208,6 +208,10 @@ msgstr "%q πρέπει να είναι 1 όταν %q είναι True" msgid "%q must be <= %d" msgstr "%q πρέπει να είναι <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q πρέπει να είναι >= %d" @@ -1188,10 +1192,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1828,11 +1828,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2334,20 +2329,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4104,10 +4089,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4309,10 +4291,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 8c8ad14d5a..ef6b7b52f9 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -209,6 +209,10 @@ msgstr "%q must be 1 when %q is True" msgid "%q must be <= %d" msgstr "%q must be <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q must be >= %d" @@ -1183,10 +1187,6 @@ msgstr "Initial set pin direction conflicts with initial out pin direction" msgid "Initial set pin state conflicts with initial out pin state" msgstr "Initial set pin state conflicts with initial out pin state" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Initialisation failed due to lack of memory" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1829,11 +1829,6 @@ msgstr "Program too long" msgid "Pull not used when direction is output." msgstr "Pull not used when direction is output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "RAISE mode is not implemented" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL not available on this chip" @@ -2339,20 +2334,10 @@ msgstr "Voltage read timed out" msgid "WARNING: Your code filename has two extensions\n" msgstr "WARNING: Your code filename has two extensions\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 cannot be deinitialised once mode is set to RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer is not currently running" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4119,10 +4104,7 @@ msgstr "syntax error in JSON" msgid "syntax error in uctypes descriptor" msgstr "syntax error in uctypes descriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "timeout duration exceeded the maximum supported value" @@ -4324,10 +4306,6 @@ msgstr "value must fit in %d byte(s)" msgid "value out of range of target" msgstr "value out of range of target" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "WatchDog not initialised" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "width must be greater than zero" @@ -4399,6 +4377,21 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "Initialisation failed due to lack of memory" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "RAISE mode is not implemented" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer is not currently running" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "WatchDog not initialised" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 is being used by WiFi" diff --git a/locale/es.po b/locale/es.po index c1b8b53df1..c36dfbe627 100644 --- a/locale/es.po +++ b/locale/es.po @@ -211,6 +211,10 @@ msgstr "%q debe ser 1 cuando %q es True" msgid "%q must be <= %d" msgstr "%q debe ser <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q debe ser >= %d" @@ -1205,10 +1209,6 @@ msgstr "" "El estado inicial del pin de configuración esta en conflicto con el estado " "inicial de salida del pin" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Inicializacion fallida por falta de memoria" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1860,11 +1860,6 @@ msgstr "El programa es demasiado grande" msgid "Pull not used when direction is output." msgstr "Pull no se usa cuando la dirección es output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "El modo RAISE no esta implementado" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL no esta disponible para este chip" @@ -2375,23 +2370,11 @@ msgstr "Tiempo de espera agotado para lectura de voltaje" msgid "WARNING: Your code filename has two extensions\n" msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\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 no se puede desinicializar luego de definirse en modo RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer no se está ejecutando en este momento" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode no se puede modificar luego de configurar WatchDogMode." -"RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4167,10 +4150,7 @@ msgstr "error de sintaxis en JSON" msgid "syntax error in uctypes descriptor" msgstr "error de sintaxis en el descriptor uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" "la duración de tiempo de espera ha excedido la capacidad máxima del valor" @@ -4373,10 +4353,6 @@ msgstr "el valor debe caber en %d byte(s)" msgid "value out of range of target" msgstr "valor fuera de alcance al blanco" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog no inicializado" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "el ancho debe ser mayor que cero" @@ -4448,6 +4424,23 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "Inicializacion fallida por falta de memoria" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "El modo RAISE no esta implementado" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer no se está ejecutando en este momento" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode no se puede modificar luego de configurar WatchDogMode." +#~ "RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog no inicializado" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 está siendo usado por WiFi" diff --git a/locale/fil.po b/locale/fil.po index 7fcc48e35c..73cc68180b 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -197,6 +197,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1174,10 +1178,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1816,11 +1816,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Pull hindi ginagamit kapag ang direksyon ay output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2324,20 +2319,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4112,10 +4097,7 @@ msgstr "sintaks error sa JSON" msgid "syntax error in uctypes descriptor" msgstr "may pagkakamali sa sintaks sa uctypes descriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4317,10 +4299,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index b8b53001cf..56bbcb466e 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -208,6 +208,10 @@ msgstr "%q doit être 1 quand %q est True" msgid "%q must be <= %d" msgstr "%q doit être <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q doit être >= %d" @@ -1209,10 +1213,6 @@ msgid "Initial set pin state conflicts with initial out pin state" msgstr "" "État initial de \"set pin\" est en conflit avec l'état initial de \"out pin\"" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Échec d'initialisation par manque de mémoire" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1867,11 +1867,6 @@ msgstr "Programme trop long" msgid "Pull not used when direction is output." msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "Mode RAISE n'est pas implémenté" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL n'est pas disponible sur cette puce" @@ -2383,24 +2378,12 @@ msgstr "La lecture de la tension a expiré" msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENTION : le nom de fichier de votre code a deux extensions\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 ne peut pas être dés-initialisé une fois que le mode est réglé " "sur RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer n'est pas en cours d'exécution" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode ne peut pas être changé une fois réglé à WatchDogMode." -"RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4189,10 +4172,7 @@ msgstr "erreur de syntaxe JSON" msgid "syntax error in uctypes descriptor" msgstr "erreur de syntaxe dans le descripteur d'uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "le délai d'expiration a dépassé la valeur maximale prise en charge" @@ -4394,10 +4374,6 @@ msgstr "la valeur doit tenir dans %d octet(s)" msgid "value out of range of target" msgstr "valeur hors de porté de la cible" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "chien de garde (watchdog) non initialisé" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "width doit être plus que zero" @@ -4469,6 +4445,23 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "Échec d'initialisation par manque de mémoire" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "Mode RAISE n'est pas implémenté" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer n'est pas en cours d'exécution" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode ne peut pas être changé une fois réglé à WatchDogMode." +#~ "RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "chien de garde (watchdog) non initialisé" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 est utilisé pars le Wifi" diff --git a/locale/hi.po b/locale/hi.po index 3a08024011..2551d5b725 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -196,6 +196,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1164,10 +1168,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1802,11 +1802,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2308,20 +2303,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4078,10 +4063,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4283,10 +4265,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index e8fb475d1a..f1cffe5e49 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -200,6 +200,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1176,10 +1180,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1823,11 +1823,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2331,20 +2326,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4122,10 +4107,7 @@ msgstr "errore di sintassi nel JSON" msgid "syntax error in uctypes descriptor" msgstr "errore di sintassi nel descrittore uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4327,10 +4309,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index 01a9ed389d..07e65422a6 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -203,6 +203,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1175,10 +1179,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1816,11 +1816,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "方向がoutputのときpullは使われません" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2323,20 +2318,10 @@ msgstr "電圧読み取りがタイムアウト" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -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 msgid "" @@ -4098,10 +4083,7 @@ msgstr "JSONに構文エラーがあります" msgid "syntax error in uctypes descriptor" msgstr "uctypedディスクリプタの構文エラー" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "タイムアウト長は対応する最大値を超えています" @@ -4303,10 +4285,6 @@ msgstr "値は%dバイトに収まらなければなりません" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4378,6 +4356,12 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimerは現在動作していません" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "WatchDogTimer.modeはいったんWatchDogMode.RESETに設定すると変更不可" + #~ msgid "queue overflow" #~ msgstr "キューがオーバーフローしました" diff --git a/locale/ko.po b/locale/ko.po index a07596e9df..28e233fcf0 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -197,6 +197,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1167,10 +1171,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1805,11 +1805,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2312,20 +2307,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4082,10 +4067,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4287,10 +4269,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 7372014908..84e4a981da 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -196,6 +196,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1170,10 +1174,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1821,11 +1821,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Pull niet gebruikt wanneer de richting output is." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2329,24 +2324,12 @@ msgstr "Voltage lees time-out" msgid "WARNING: Your code filename has two extensions\n" msgstr "WAARSCHUWING: De bestandsnaam van de code heeft twee extensies\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 kan niet worden gedeïnitialiseerd zodra de modus in ingesteld " "op RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer is momenteel niet actief" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode kan niet worden gewijzigd zodra de modus is ingesteld op " -"WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4110,10 +4093,7 @@ msgstr "syntaxisfout in JSON" msgid "syntax error in uctypes descriptor" msgstr "syntaxisfout in uctypes aanduiding" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "time-outduur is groter dan de ondersteunde maximale waarde" @@ -4315,10 +4295,6 @@ msgstr "waarde moet in %d byte(s) passen" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog niet geïnitialiseerd" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "breedte moet groter dan nul zijn" @@ -4390,6 +4366,20 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer is momenteel niet actief" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode kan niet worden gewijzigd zodra de modus is ingesteld " +#~ "op WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog niet geïnitialiseerd" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 wordt gebruikt door WiFi" diff --git a/locale/pl.po b/locale/pl.po index d1879d98b7..230e11033e 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -198,6 +198,10 @@ msgstr "" msgid "%q must be <= %d" msgstr "" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "" @@ -1170,10 +1174,6 @@ msgstr "" msgid "Initial set pin state conflicts with initial out pin state" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1808,11 +1808,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "Podciągnięcie nieużywane w trybie wyjścia." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2314,20 +2309,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "UWAGA: Nazwa pliku ma dwa rozszerzenia\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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4085,10 +4070,7 @@ msgstr "błąd składni w JSON" msgid "syntax error in uctypes descriptor" msgstr "błąd składni w deskryptorze uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4290,10 +4272,6 @@ msgstr "wartość musi mieścić się w %d bajtach" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "szerokość musi być większa niż zero" @@ -4365,6 +4343,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Inicjalizacja nie powiodła się z powodu braku pamięci" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 jest używany przez WiFi" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index bb2cbfe806..8bc30d7a1e 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -209,6 +209,10 @@ msgstr "%q deve ser 1 quando %q for verdadeiro" msgid "%q must be <= %d" msgstr "%q deve ser <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "o %q deve ser >= %d" @@ -1202,10 +1206,6 @@ msgstr "" "A definição do estado inicial do pino está em conflito com estado do inicial " "do pino" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "A inicialização falhou devido à falta de memória" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1860,11 +1860,6 @@ msgstr "Programa muito longo" msgid "Pull not used when direction is output." msgstr "O Pull não foi usado quando a direção for gerada." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "O modo RAISE não foi implementado" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL não está disponível neste chip" @@ -2376,24 +2371,12 @@ msgstr "O tempo limite de leitura da tensão expirou" msgid "WARNING: Your code filename has two extensions\n" msgstr "AVISO: Seu arquivo de código tem duas extensões\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 "" "O WatchDogTimer não pode ser não-inicializado uma vez que o modo é definido " "como RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "O WatchDogTimer não está em execução" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"O WatchDogTimer.mode não pode ser alterado uma vez definido para " -"WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4177,10 +4160,7 @@ msgstr "erro de sintaxe no JSON" msgid "syntax error in uctypes descriptor" msgstr "houve um erro de sintaxe no descritor uctypes" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "a duração do tempo limite excedeu o valor máximo suportado" @@ -4382,10 +4362,6 @@ msgstr "o valor deve caber em %d byte(s)" msgid "value out of range of target" msgstr "valor fora do alcance do alvo" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "o watchdog não foi inicializado" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "a largura deve ser maior que zero" @@ -4457,6 +4433,23 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "A inicialização falhou devido à falta de memória" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "O modo RAISE não foi implementado" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "O WatchDogTimer não está em execução" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "O WatchDogTimer.mode não pode ser alterado uma vez definido para " +#~ "WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "o watchdog não foi inicializado" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "O ADC2 está sendo usado pelo WiFi" diff --git a/locale/ru.po b/locale/ru.po index 8c5846b8ae..2ccbb57ec4 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -211,6 +211,10 @@ msgstr "%q должен быть равен 1, если %q имеет значе msgid "%q must be <= %d" msgstr "%q должно быть <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q должно быть >= %d" @@ -1211,10 +1215,6 @@ msgstr "" "Исходное установленное состояние контакта конфликтует с исходным состоянием " "выхода" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Инициализация не удалась из-за нехватки памяти" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1865,11 +1865,6 @@ msgstr "Слишком длинная программа" msgid "Pull not used when direction is output." msgstr "Тяга не используется, когда выводится направление." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "Режим RAISE не реализован" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL недоступен на этом чипе" @@ -2379,24 +2374,12 @@ msgstr "Истекло время ожидания считывания напр msgid "WARNING: Your code filename has two extensions\n" 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 "" "Сторожевой таймер не может быть деинициализирован, если установлен режим " "RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "Таймер Watch Dog в настоящее время не работает" - -#: 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 msgid "" @@ -4183,10 +4166,7 @@ msgstr "синтаксис ошибка в JSON" msgid "syntax error in uctypes descriptor" msgstr "Синтаксическая ошибка в дескрипторе UCTYPES" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" "Продолжительность таймаута превысила максимальное поддерживаемое значение" @@ -4390,10 +4370,6 @@ msgstr "Значение должно совпадать с байтами %d" msgid "value out of range of target" msgstr "Величина выходящая за пределы диапазона цели" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "Сторожевой таймер не инициализирован" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "ширина должна быть больше нуля" @@ -4465,6 +4441,23 @@ msgstr "zi должно быть типа float" msgid "zi must be of shape (n_section, 2)" msgstr "zi должен иметь форму (n_section, 2)" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Инициализация не удалась из-за нехватки памяти" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "Режим RAISE не реализован" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "Таймер Watch Dog в настоящее время не работает" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode не может быть изменен после установки значения " +#~ "WatchDogMode.RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "Сторожевой таймер не инициализирован" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 используется WiFi" diff --git a/locale/sv.po b/locale/sv.po index 11bd679480..c634bb2c55 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -208,6 +208,10 @@ msgstr "%q måste vara 1 när %q är sann" msgid "%q must be <= %d" msgstr "%q måste vara <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q måste vara >= %d" @@ -1189,10 +1193,6 @@ msgstr "" "Initial inställning av pinntillstånd är i konflikt med initialt " "utpinntillstånd" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Initieringen misslyckades på grund av minnesbrist" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1840,11 +1840,6 @@ msgstr "Programmet är för långt" msgid "Pull not used when direction is output." msgstr "Pull används inte när riktningen är output." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "RAISE-läge är inte implementerat" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL är inte tillgängligt på detta chip" @@ -2350,21 +2345,10 @@ msgstr "Avläsning av spänning tog för lång tid" msgid "WARNING: Your code filename has two extensions\n" msgstr "VARNING: Ditt filnamn för kod har två tillägg\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 kan inte avinitialiseras när läget är inställt på RESET" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer körs för närvarande inte" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"WatchDogTimer.mode kan inte ändras när den är inställd på WatchDogMode.RESET" - #: py/builtinhelp.c #, c-format msgid "" @@ -4136,10 +4120,7 @@ msgstr "syntaxfel i JSON" msgid "syntax error in uctypes descriptor" msgstr "syntaxfel i uctypes deskriptor" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "timeout-längd överskred det maximala värde som stöds" @@ -4341,10 +4322,6 @@ msgstr "värdet måste passa i %d byte(s)" msgid "value out of range of target" msgstr "värde utanför målintervall" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "watchdog är inte initierad" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "width måste vara större än noll" @@ -4416,6 +4393,23 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "Initieringen misslyckades på grund av minnesbrist" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "RAISE-läge är inte implementerat" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer körs för närvarande inte" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "WatchDogTimer.mode kan inte ändras när den är inställd på WatchDogMode." +#~ "RESET" + +#~ msgid "watchdog not initialized" +#~ msgstr "watchdog är inte initierad" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 används av WiFi" diff --git a/locale/tr.po b/locale/tr.po index 069b0bba3e..eb715370e8 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -204,6 +204,10 @@ msgstr "%q 1 olmalı, %q True olduğu zaman" msgid "%q must be <= %d" msgstr "%q <= %d olmalıdır" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q >= %d olmalıdır" @@ -1180,10 +1184,6 @@ msgstr "İlk pin yönü, ilk çıkış pin yönüyle çakışıyor" msgid "Initial set pin state conflicts with initial out pin state" msgstr "İlk pinin durumu, ilk çıkış pininin durumu ile çakışıyor" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "Bellek yetersizliği nedeniyle başlatma başarısız oldu" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1822,11 +1822,6 @@ msgstr "" msgid "Pull not used when direction is output." msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "" @@ -2328,20 +2323,10 @@ msgstr "" msgid "WARNING: Your code filename has two extensions\n" msgstr "" -#: 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 "" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" - #: py/builtinhelp.c #, c-format msgid "" @@ -4098,10 +4083,7 @@ msgstr "" msgid "syntax error in uctypes descriptor" msgstr "" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "" @@ -4303,10 +4285,6 @@ msgstr "" msgid "value out of range of target" msgstr "" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "" @@ -4378,6 +4356,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Initialization failed due to lack of memory" +#~ msgstr "Bellek yetersizliği nedeniyle başlatma başarısız oldu" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2, WiFi tarafından kullanılmaktadır" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 558fa37016..27499137aa 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -210,6 +210,10 @@ msgstr "sāng %q wèi True shí, %q bìxū wèi 1" msgid "%q must be <= %d" msgstr "%q bìxū <= %d" +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "%q must be <= %u" +msgstr "" + #: py/argcheck.c msgid "%q must be >= %d" msgstr "%q bìxū >= %d" @@ -1194,10 +1198,6 @@ msgstr "" "chū shǐ shè zhì yǐn jiǎo zhuàng tài yǔ chū shǐ chū yǐn jiǎo zhuàng tài chōng " "tū" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "Initialization failed due to lack of memory" -msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài" - #: shared-bindings/bitops/__init__.c #, c-format msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" @@ -1843,11 +1843,6 @@ msgstr "chéng xù tài cháng" msgid "Pull not used when direction is output." msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng." -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c -msgid "RAISE mode is not implemented" -msgstr "wèi shí xiàn tí shēng mó shì" - #: ports/raspberrypi/common-hal/countio/Counter.c msgid "RISE_AND_FALL not available on this chip" msgstr "RISE_AND_FALL zài cǐ xīn piàn shàng bù kě yòng" @@ -2353,21 +2348,10 @@ msgstr "Diànyā dòu qǔ chāoshí" msgid "WARNING: Your code filename has two extensions\n" msgstr "Jǐnggào: Nǐ de dàimǎ wénjiàn míng yǒu liǎng gè kuòzhǎn míng\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 "Yīdàn jiāng móshì shèzhì wèi RESET, jiù wúfǎ chūshǐhuà WatchDog Timer" -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer is not currently running" -msgstr "WatchDogTimer dāngqián wèi yùnxíng" - -#: shared-bindings/watchdog/WatchDogTimer.c -msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" -msgstr "" -"Yīdàn shèzhì wèi WatchDogMode.RESET, zé bùnéng gēnggǎi WatchDogTimer.Mode" - #: py/builtinhelp.c #, c-format msgid "" @@ -4141,10 +4125,7 @@ msgstr "JSON yǔfǎ cuòwù" msgid "syntax error in uctypes descriptor" msgstr "uctypes miáoshù fú zhōng de yǔfǎ cuòwù" -#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c #: ports/nrf/common-hal/watchdog/WatchDogTimer.c -#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c msgid "timeout duration exceeded the maximum supported value" msgstr "chāoshí shíjiān chāoguò zuìdà zhīchí zhí" @@ -4346,10 +4327,6 @@ msgstr "Zhí bìxū fúhé %d zì jié" msgid "value out of range of target" msgstr "zhí fàn wéi wài de mù biāo" -#: ports/espressif/common-hal/watchdog/WatchDogTimer.c -msgid "watchdog not initialized" -msgstr "wèi chū shǐ huà jiān shì qì" - #: shared-bindings/is31fl3741/FrameBuffer.c msgid "width must be greater than zero" msgstr "kuāndù bìxū dàyú líng" @@ -4421,6 +4398,22 @@ 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 "Initialization failed due to lack of memory" +#~ msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài" + +#~ msgid "RAISE mode is not implemented" +#~ msgstr "wèi shí xiàn tí shēng mó shì" + +#~ msgid "WatchDogTimer is not currently running" +#~ msgstr "WatchDogTimer dāngqián wèi yùnxíng" + +#~ msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +#~ msgstr "" +#~ "Yīdàn shèzhì wèi WatchDogMode.RESET, zé bùnéng gēnggǎi WatchDogTimer.Mode" + +#~ msgid "watchdog not initialized" +#~ msgstr "wèi chū shǐ huà jiān shì qì" + #~ msgid "ADC2 is being used by WiFi" #~ msgstr "ADC2 zhèngzài bèi WiFi shǐ yòng" From 8183d8ef508d813187d8d3cf8b341e65d7b13103 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 2 Oct 2023 14:28:59 -0700 Subject: [PATCH 278/291] Remove `displayio.*.show()` Use `displayio.*.root_group =`. --- shared-bindings/displayio/Display.c | 28 ------------------- shared-bindings/displayio/Display.h | 3 -- shared-bindings/displayio/EPaperDisplay.c | 26 ----------------- shared-bindings/displayio/EPaperDisplay.h | 2 -- shared-bindings/displayio/OnDiskBitmap.c | 2 +- .../framebufferio/FramebufferDisplay.c | 22 --------------- .../framebufferio/FramebufferDisplay.h | 3 -- shared-module/displayio/Display.c | 7 ----- shared-module/displayio/EPaperDisplay.c | 14 ++++------ shared-module/displayio/EPaperDisplay.h | 1 + shared-module/displayio/__init__.c | 2 +- .../framebufferio/FramebufferDisplay.c | 11 ++------ 12 files changed, 11 insertions(+), 110 deletions(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 5576e2cbfc..5d3c29b8aa 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -239,33 +239,6 @@ static displayio_display_obj_t *native_display(mp_obj_t display_obj) { return MP_OBJ_TO_PTR(native_display); } -//| def show(self, group: Group) -> None: -//| """ -//| .. note:: `show()` is deprecated and will be removed in CircuitPython 9.0.0. -//| Use ``.root_group = group`` instead. -//| -//| Switches to displaying the given group of layers. When group is None, the default -//| CircuitPython terminal will be shown. -//| -//| :param Group group: The group to show. -//| -//| """ -//| ... -STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - displayio_display_obj_t *self = native_display(self_in); - displayio_group_t *group = NULL; - if (group_in != mp_const_none) { - group = MP_OBJ_TO_PTR(native_group(group_in)); - } - - bool ok = common_hal_displayio_display_show(self, group); - if (!ok) { - mp_raise_ValueError(translate("Group already used")); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show); - //| def refresh( //| self, //| *, @@ -512,7 +485,6 @@ STATIC mp_obj_t displayio_display_obj_fill_row(size_t n_args, const mp_obj_t *po MP_DEFINE_CONST_FUN_OBJ_KW(displayio_display_fill_row_obj, 1, displayio_display_obj_fill_row); STATIC const mp_rom_map_elem_t displayio_display_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_display_show_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&displayio_display_refresh_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_row), MP_ROM_PTR(&displayio_display_fill_row_obj) }, diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h index 35f23ae40f..50fb7c4bfd 100644 --- a/shared-bindings/displayio/Display.h +++ b/shared-bindings/displayio/Display.h @@ -46,9 +46,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, bool single_byte_bounds, bool data_as_commands, bool auto_refresh, uint16_t native_frames_per_second, bool backlight_on_high, bool SH1107_addressing, uint16_t backlight_pwm_frequency); -bool common_hal_displayio_display_show(displayio_display_obj_t *self, - displayio_group_t *root_group); - bool common_hal_displayio_display_refresh(displayio_display_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame); bool common_hal_displayio_display_get_auto_refresh(displayio_display_obj_t *self); diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index cca8c919cc..afda693c7e 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -245,31 +245,6 @@ static displayio_epaperdisplay_obj_t *native_display(mp_obj_t display_obj) { return MP_OBJ_TO_PTR(native_display); } -//| def show(self, group: Group) -> None: -//| """ -//| .. note:: `show()` is deprecated and will be removed in CircuitPython 9.0.0. -//| Use ``.root_group = group`` instead. -//| -//| Switches to displaying the given group of layers. When group is None, the default -//| CircuitPython terminal will be shown. -//| -//| :param Group group: The group to show.""" -//| ... -STATIC mp_obj_t displayio_epaperdisplay_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - displayio_epaperdisplay_obj_t *self = native_display(self_in); - displayio_group_t *group = NULL; - if (group_in != mp_const_none) { - group = MP_OBJ_TO_PTR(native_group(group_in)); - } - - bool ok = common_hal_displayio_epaperdisplay_show(self, group); - if (!ok) { - mp_raise_ValueError(translate("Group already used")); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_show_obj, displayio_epaperdisplay_obj_show); - //| def update_refresh_mode( //| self, start_sequence: ReadableBuffer, seconds_per_frame: float = 180 //| ) -> None: @@ -415,7 +390,6 @@ MP_PROPERTY_GETSET(displayio_epaperdisplay_root_group_obj, (mp_obj_t)&displayio_epaperdisplay_set_root_group_obj); STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&displayio_epaperdisplay_show_obj) }, { MP_ROM_QSTR(MP_QSTR_update_refresh_mode), MP_ROM_PTR(&displayio_epaperdisplay_update_refresh_mode_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&displayio_epaperdisplay_refresh_obj) }, diff --git a/shared-bindings/displayio/EPaperDisplay.h b/shared-bindings/displayio/EPaperDisplay.h index bdaad61300..ba0b6d0695 100644 --- a/shared-bindings/displayio/EPaperDisplay.h +++ b/shared-bindings/displayio/EPaperDisplay.h @@ -52,8 +52,6 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t bool common_hal_displayio_epaperdisplay_refresh(displayio_epaperdisplay_obj_t *self); -bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group); - mp_obj_t common_hal_displayio_epaperdisplay_get_root_group(displayio_epaperdisplay_obj_t *self); bool common_hal_displayio_epaperdisplay_set_root_group(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group); diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c index d0dcba2339..99cf3c4576 100644 --- a/shared-bindings/displayio/OnDiskBitmap.c +++ b/shared-bindings/displayio/OnDiskBitmap.c @@ -50,7 +50,7 @@ //| //| board.DISPLAY.brightness = 0 //| splash = displayio.Group() -//| board.DISPLAY.show(splash) +//| board.DISPLAY.root_group = splash //| //| odb = displayio.OnDiskBitmap('/sample.bmp') //| face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader) diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index d57081e16f..45eedcaa95 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -99,27 +99,6 @@ static framebufferio_framebufferdisplay_obj_t *native_display(mp_obj_t display_o return MP_OBJ_TO_PTR(native_display); } -//| def show(self, group: displayio.Group) -> None: -//| """Switches to displaying the given group of layers. When group is None, the default -//| CircuitPython terminal will be shown. -//| -//| :param Group group: The group to show.""" -//| ... -STATIC mp_obj_t framebufferio_framebufferdisplay_obj_show(mp_obj_t self_in, mp_obj_t group_in) { - framebufferio_framebufferdisplay_obj_t *self = native_display(self_in); - displayio_group_t *group = NULL; - if (group_in != mp_const_none) { - group = MP_OBJ_TO_PTR(native_group(group_in)); - } - - bool ok = common_hal_framebufferio_framebufferdisplay_show(self, group); - if (!ok) { - mp_raise_ValueError(translate("Group already used")); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_2(framebufferio_framebufferdisplay_show_obj, framebufferio_framebufferdisplay_obj_show); - //| def refresh( //| self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1 //| ) -> bool: @@ -354,7 +333,6 @@ MP_PROPERTY_GETSET(framebufferio_framebufferdisplay_root_group_obj, (mp_obj_t)&framebufferio_framebufferdisplay_set_root_group_obj); STATIC const mp_rom_map_elem_t framebufferio_framebufferdisplay_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_show), MP_ROM_PTR(&framebufferio_framebufferdisplay_show_obj) }, { MP_ROM_QSTR(MP_QSTR_refresh), MP_ROM_PTR(&framebufferio_framebufferdisplay_refresh_obj) }, { MP_ROM_QSTR(MP_QSTR_fill_row), MP_ROM_PTR(&framebufferio_framebufferdisplay_fill_row_obj) }, diff --git a/shared-bindings/framebufferio/FramebufferDisplay.h b/shared-bindings/framebufferio/FramebufferDisplay.h index 6526e25afb..96d39e6aef 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.h +++ b/shared-bindings/framebufferio/FramebufferDisplay.h @@ -42,9 +42,6 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu uint16_t rotation, bool auto_refresh); -bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t *self, - displayio_group_t *root_group); - bool common_hal_framebufferio_framebufferdisplay_refresh(framebufferio_framebufferdisplay_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame); bool common_hal_framebufferio_framebufferdisplay_get_auto_refresh(framebufferio_framebufferdisplay_obj_t *self); diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 093604214d..5d9cc2357c 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -140,13 +140,6 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self, common_hal_displayio_display_set_auto_refresh(self, auto_refresh); } -bool common_hal_displayio_display_show(displayio_display_obj_t *self, displayio_group_t *root_group) { - if (root_group == NULL) { - root_group = &circuitpython_splash; - } - return displayio_display_core_set_root_group(&self->core, root_group); -} - uint16_t common_hal_displayio_display_get_width(displayio_display_obj_t *self) { return displayio_display_core_get_width(&self->core); } diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c index e79c692766..4db1b7cb5c 100644 --- a/shared-module/displayio/EPaperDisplay.c +++ b/shared-module/displayio/EPaperDisplay.c @@ -116,14 +116,7 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t // Set the group after initialization otherwise we may send pixels while we delay in // initialization. - common_hal_displayio_epaperdisplay_show(self, &circuitpython_splash); -} - -bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group) { - if (root_group == NULL) { - root_group = &circuitpython_splash; - } - return displayio_display_core_set_root_group(&self->core, root_group); + common_hal_displayio_epaperdisplay_set_root_group(self, &circuitpython_splash); } bool common_hal_displayio_epaperdisplay_set_root_group(displayio_epaperdisplay_obj_t *self, displayio_group_t *root_group) { @@ -503,6 +496,11 @@ void release_epaperdisplay(displayio_epaperdisplay_obj_t *self) { } } +void displayio_epaperdisplay_reset(displayio_epaperdisplay_obj_t *self) { + displayio_display_core_set_root_group(&self->core, &circuitpython_splash); + self->core.full_refresh = true; +} + void displayio_epaperdisplay_collect_ptrs(displayio_epaperdisplay_obj_t *self) { displayio_display_core_collect_ptrs(&self->core); gc_collect_ptr((void *)self->start_sequence); diff --git a/shared-module/displayio/EPaperDisplay.h b/shared-module/displayio/EPaperDisplay.h index 13cf84dbd3..d527ed2f50 100644 --- a/shared-module/displayio/EPaperDisplay.h +++ b/shared-module/displayio/EPaperDisplay.h @@ -62,6 +62,7 @@ typedef struct { void displayio_epaperdisplay_change_refresh_mode_parameters(displayio_epaperdisplay_obj_t *self, mp_buffer_info_t *start_sequence, float seconds_per_frame); void displayio_epaperdisplay_background(displayio_epaperdisplay_obj_t *self); +void displayio_epaperdisplay_reset(displayio_epaperdisplay_obj_t *self); void release_epaperdisplay(displayio_epaperdisplay_obj_t *self); size_t maybe_refresh_epaperdisplay(void); diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index a62b0a8bb5..c81dcb18c1 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -302,7 +302,7 @@ void reset_displays(void) { reset_display(&displays[i].display); } else if (display_type == &displayio_epaperdisplay_type) { displayio_epaperdisplay_obj_t *display = &displays[i].epaper_display; - common_hal_displayio_epaperdisplay_show(display, NULL); + displayio_epaperdisplay_reset(display); #if CIRCUITPY_FRAMEBUFFERIO } else if (display_type == &framebufferio_framebufferdisplay_type) { framebufferio_framebufferdisplay_reset(&displays[i].framebuffer_display); diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 737cef5ad0..ec59efef4a 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -100,17 +100,10 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu // Set the group after initialization otherwise we may send pixels while we delay in // initialization. - common_hal_framebufferio_framebufferdisplay_show(self, &circuitpython_splash); + displayio_display_core_set_root_group(&self->core, &circuitpython_splash); common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, auto_refresh); } -bool common_hal_framebufferio_framebufferdisplay_show(framebufferio_framebufferdisplay_obj_t *self, displayio_group_t *root_group) { - if (root_group == NULL) { - root_group = &circuitpython_splash; - } - return displayio_display_core_set_root_group(&self->core, root_group); -} - uint16_t common_hal_framebufferio_framebufferdisplay_get_width(framebufferio_framebufferdisplay_obj_t *self) { return displayio_display_core_get_width(&self->core); } @@ -360,7 +353,7 @@ void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj const mp_obj_type_t *fb_type = mp_obj_get_type(self->framebuffer); if (fb_type != NULL && fb_type != &mp_type_NoneType) { common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); - common_hal_framebufferio_framebufferdisplay_show(self, NULL); + displayio_display_core_set_root_group(&self->core, &circuitpython_splash); self->core.full_refresh = true; } else { release_framebufferdisplay(self); From 7938c6cfd22a831c7208762d57769febef1ff2b5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 2 Oct 2023 14:36:19 -0700 Subject: [PATCH 279/291] Remove one I2CPeripheral leftover --- docs/redirects.txt | 6 ++++-- shared-bindings/i2ctarget/__init__.c | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/redirects.txt b/docs/redirects.txt index 47ec20d577..1016d0bd70 100644 --- a/docs/redirects.txt +++ b/docs/redirects.txt @@ -84,8 +84,10 @@ shared-bindings/frequencyio/__init__.rst shared-bindings/frequencyio/ shared-bindings/gnss/__init__.rst shared-bindings/gnss/ shared-bindings/i2cperipheral/__init__.rst shared-bindings/i2cperipheral/ shared-bindings/i2csecondary/__init__.rst shared-bindings/i2csecondary/ -shared-bindings/i2cslave/I2CSlave.rst shared-bindings/i2cperipheral/#i2cperipheral.I2CPeripheral -shared-bindings/i2cslave/I2CSlaveRequest.rst shared-bindings/i2cperipheral/#i2cperipheral.I2CPeripheralRequest +shared-bindings/i2cslave/I2CSlave.rst shared-bindings/i2cperipheral/#i2ctarget.Target +shared-bindings/i2cslave/I2CSlaveRequest.rst shared-bindings/i2cperipheral/#i2ctarget.I2CTargetRequest +shared-bindings/i2cperipheral/I2CPeripheral.rst shared-bindings/i2ctarget/#i2ctarget.I2CTarget +shared-bindings/i2cperipheral/I2CPeripheralRequest.rst shared-bindings/i2ctarget/#i2ctarget.I2CTargetRequest shared-bindings/math/__init__.rst shared-bindings/math/ shared-bindings/microcontroller/Pin.rst shared-bindings/microcontroller/#microcontroller.Pin shared-bindings/microcontroller/Processor.rst shared-bindings/microcontroller/#microcontroller.Processor diff --git a/shared-bindings/i2ctarget/__init__.c b/shared-bindings/i2ctarget/__init__.c index f9a358eef4..65d224b933 100644 --- a/shared-bindings/i2ctarget/__init__.c +++ b/shared-bindings/i2ctarget/__init__.c @@ -30,7 +30,6 @@ #include "py/runtime.h" #include "shared-bindings/microcontroller/Pin.h" -// #include "shared-bindings/i2ctarget/__init__.h" #include "shared-bindings/i2ctarget/I2CTarget.h" #include "py/runtime.h" @@ -95,8 +94,6 @@ STATIC const mp_rom_map_elem_t i2ctarget_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_i2ctarget) }, { MP_ROM_QSTR(MP_QSTR_I2CTarget), MP_ROM_PTR(&i2ctarget_i2c_target_type) }, - // TODO: Remove for CircuitPython 9.0.0 - { MP_ROM_QSTR(MP_QSTR_I2CPeripheral), MP_ROM_PTR(&i2ctarget_i2c_target_type) }, }; STATIC MP_DEFINE_CONST_DICT(i2ctarget_module_globals, i2ctarget_module_globals_table); From 005e71c1e788000affbd676cf31ef267e52ff111 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Mon, 2 Oct 2023 21:21:10 +0000 Subject: [PATCH 280/291] Translated using Weblate (Swedish) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index c634bb2c55..c4d00bd3d6 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-10 08:50+0000\n" +"PO-Revision-Date: 2023-10-03 15:21+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,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.1-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -210,7 +210,7 @@ msgstr "%q måste vara <= %d" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "%q must be <= %u" -msgstr "" +msgstr "%q måste vara <= %u" #: py/argcheck.c msgid "%q must be >= %d" From 85fbd64b57f17b47dd1b7bbd8b22f198074b6530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Smitka?= Date: Tue, 3 Oct 2023 06:41:08 +0000 Subject: [PATCH 281/291] Translated using Weblate (Czech) Currently translated at 25.1% (250 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/cs/ --- locale/cs.po | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/locale/cs.po b/locale/cs.po index fcc6b84450..74dd9ad140 100644 --- a/locale/cs.po +++ b/locale/cs.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-10-01 08:00+0000\n" +"PO-Revision-Date: 2023-10-03 15:21+0000\n" "Last-Translator: Vladimír Smitka \n" "Language-Team: LANGUAGE \n" "Language: cs\n" @@ -22,7 +22,7 @@ msgid "" "Code done running.\n" msgstr "" "\n" -"Program byl dokončen.\n" +"Běh programu byl dokončen.\n" #: main.c msgid "" @@ -209,7 +209,7 @@ msgstr "%q musí být <= %d" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "%q must be <= %u" -msgstr "" +msgstr "%q musí být <= %u" #: py/argcheck.c msgid "%q must be >= %d" @@ -277,11 +277,11 @@ msgstr "%q=%q" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts in more bits than pin count" -msgstr "%q[%u] posouvá o více bitů než je počet pinů" +msgstr "%q[%u] posouvá dovnitř o více bitů než je počet pinů" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] shifts out more bits than pin count" -msgstr "" +msgstr "%q[%u] posouvá ven o více bitů než je počet pinů" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "%q[%u] uses extra pin" @@ -465,7 +465,7 @@ msgstr "Kanál hardwarového přerušení je již používán" #: ports/raspberrypi/common-hal/wifi/Radio.c msgid "AP could not be started" -msgstr "" +msgstr "AP nemohl být spuštěn" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -476,7 +476,7 @@ msgstr "Adresa musí být %d bajtů dlouhá" #: ports/nrf/common-hal/memorymap/AddressRange.c #: ports/raspberrypi/common-hal/memorymap/AddressRange.c msgid "Address range not allowed" -msgstr "" +msgstr "Adresní rozsah není povolen" #: shared-bindings/memorymap/AddressRange.c msgid "Address range wraps around" @@ -521,7 +521,7 @@ msgstr "Všechny kanály jsou používány" #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All dma channels in use" -msgstr "" +msgstr "Všechny DMA kanály jsou používány" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "All event channels in use" @@ -531,7 +531,7 @@ msgstr "Všechny kanály událostí jsou již používány" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/usb_host/Port.c msgid "All state machines in use" -msgstr "" +msgstr "Všechny stavové automaty jsou používány" #: ports/atmel-samd/audio_dma.c msgid "All sync event channels in use" @@ -658,8 +658,9 @@ msgid "Bitmap size and bits per value must match" msgstr "Velikost bitmapy a počet bitů na hodnotu se musí shodovat" #: supervisor/shared/safe_mode.c +#, fuzzy msgid "Boot device must be first (interface #0)." -msgstr "" +msgstr "Bootovací zařízení musí být první (rozhraní #0)." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Both RX and TX required for flow control" @@ -710,7 +711,7 @@ msgstr "Buffer je příliš krátký o %d bajtů" #: shared-bindings/framebufferio/FramebufferDisplay.c #: shared-bindings/struct/__init__.c shared-module/struct/__init__.c msgid "Buffer too small" -msgstr "" +msgstr "Buffer příliš malý" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" @@ -738,7 +739,7 @@ msgstr "Disk CIRCUITPY nelze nalézt nebo vytvořit." #: ports/espressif/common-hal/espidf/__init__.c msgid "CRC or checksum was invalid" -msgstr "" +msgstr "CRC nebo kontrolní součet byl neplatný" #: py/objtype.c msgid "Call super().__init__() before accessing native object." @@ -816,7 +817,7 @@ msgstr "" #: ports/espressif/common-hal/socketpool/Socket.c msgid "Cannot set socket options" -msgstr "" +msgstr "Nelze nastavit možnosti socketu" #: shared-bindings/digitalio/DigitalInOut.c msgid "Cannot set value when direction is input." @@ -837,11 +838,11 @@ msgstr "Nelze měnit frekvenci časovače, který je již používán" #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge, only level" -msgstr "" +msgstr "Nelze probudit hranou na pinu, pouze úrovní" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." -msgstr "" +msgstr "Nelze probudit hranou na pinu. Pouze úrovní." #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" @@ -876,7 +877,7 @@ msgstr "" #: ports/espressif/common-hal/neopixel_write/__init__.c msgid "Could not retrieve clock" -msgstr "" +msgstr "Nelze načíst hodiny" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" @@ -950,7 +951,7 @@ msgstr "Otočení displeje musí být po 90 stupních" #: main.c msgid "Done" -msgstr "" +msgstr "Hotovo" #: shared-bindings/digitalio/DigitalInOut.c msgid "Drive mode not used when direction is input." @@ -958,7 +959,7 @@ msgstr "" #: py/obj.c msgid "During handling of the above exception, another exception occurred:" -msgstr "" +msgstr "Při zpracování uvedené výjimky nastala další výjimka:" #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" From 3d30d4dc256f674f31a44be83a8e54c59a513080 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Wed, 4 Oct 2023 02:51:55 +0000 Subject: [PATCH 282/291] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 8bc30d7a1e..644de87ae4 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-10 08:50+0000\n" +"PO-Revision-Date: 2023-10-05 03:10+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,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.1-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -211,7 +211,7 @@ msgstr "%q deve ser <= %d" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "%q must be <= %u" -msgstr "" +msgstr "%q deve ser <= %u" #: py/argcheck.c msgid "%q must be >= %d" From b7db6ad2658cacbe780f3acb003bdfe227ab63ba Mon Sep 17 00:00:00 2001 From: Andi Chandler Date: Tue, 3 Oct 2023 23:09:49 +0000 Subject: [PATCH 283/291] Translated using Weblate (English (United Kingdom)) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/en_GB/ --- locale/en_GB.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/en_GB.po b/locale/en_GB.po index ef6b7b52f9..a73c431037 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-09-10 08:50+0000\n" +"PO-Revision-Date: 2023-10-05 03:10+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.1-dev\n" +"X-Generator: Weblate 5.1-dev\n" #: main.c msgid "" @@ -211,7 +211,7 @@ msgstr "%q must be <= %d" #: ports/espressif/common-hal/watchdog/WatchDogTimer.c msgid "%q must be <= %u" -msgstr "" +msgstr "%q must be <= %u" #: py/argcheck.c msgid "%q must be >= %d" From bf3d84195fc74d2834bd87f31d3681ce2a50edf6 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 29 Sep 2023 14:51:13 -0700 Subject: [PATCH 284/291] Fix decompressing using qstrs after running the VM The qstr state still pointed to qstr pools in the released MP heap. --- main.c | 4 ++++ py/qstr.c | 6 +++++- py/qstr.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 2607217e1b..3d4d665beb 100644 --- a/main.c +++ b/main.c @@ -219,6 +219,10 @@ STATIC void stop_mp(void) { usb_background(); #endif + // Set the qstr pool back to the const pools. The heap allocated ones will + // be overwritten. + qstr_reset(); + gc_deinit(); } diff --git a/py/qstr.c b/py/qstr.c index 5ff8b3bd54..6b7aead5c8 100644 --- a/py/qstr.c +++ b/py/qstr.c @@ -122,9 +122,13 @@ extern const qstr_pool_t MICROPY_QSTR_EXTRA_POOL; #define CONST_POOL mp_qstr_const_pool #endif -void qstr_init(void) { +void qstr_reset(void) { MP_STATE_VM(last_pool) = (qstr_pool_t *)&CONST_POOL; // we won't modify the const_pool since it has no allocated room left MP_STATE_VM(qstr_last_chunk) = NULL; +} + +void qstr_init(void) { + qstr_reset(); #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL mp_thread_mutex_init(&MP_STATE_VM(qstr_mutex)); diff --git a/py/qstr.h b/py/qstr.h index c6c9768d05..24e0e756a3 100644 --- a/py/qstr.h +++ b/py/qstr.h @@ -78,6 +78,7 @@ typedef struct _qstr_pool_t { #define QSTR_TOTAL() (MP_STATE_VM(last_pool)->total_prev_len + MP_STATE_VM(last_pool)->len) +void qstr_reset(void); void qstr_init(void); mp_uint_t qstr_compute_hash(const byte *data, size_t len); From 4d2bc35d40a83e2c46cb77f96cfa08541f153821 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 29 Sep 2023 14:52:35 -0700 Subject: [PATCH 285/291] Re-enable rgbmatrix on IDF 5.1 --- lib/protomatter | 2 +- .../mpconfigboard.mk | 2 +- ports/espressif/mpconfigport.mk | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/protomatter b/lib/protomatter index c9c1189e9d..1faaec39b3 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit c9c1189e9d6200bb09bf4a87d84be9459cae481b +Subproject commit 1faaec39b3d1d6e0b935d48aa2185ef4f414e7e4 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 e45e4bc707..d89c365b68 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_feather_esp32s3_4mbflash_2mbpsram/mpconfigboard.mk @@ -7,7 +7,7 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_SIZE = 4MB CIRCUITPY_ESP_FLASH_MODE = qio -CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_FREQ = 80m CIRCUITPY_ESP_PSRAM_SIZE = 2MB CIRCUITPY_ESP_PSRAM_MODE = qio diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index cc2ddf9f07..84ac4f3e34 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -39,8 +39,7 @@ CIRCUITPY_NVM ?= 1 # 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 +CIRCUITPY_RGBMATRIX ?= 1 CIRCUITPY_ROTARYIO ?= 1 CIRCUITPY_SYNTHIO_MAX_CHANNELS ?= 12 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 From 807edd4c6669028eb0be5b2acbae7bd27ee88241 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 29 Sep 2023 14:53:13 -0700 Subject: [PATCH 286/291] Improve framebufferdisplay.refresh() Now the defaults make it easy to refresh when you want. It matches the displayio.Display().refresh() behavior. --- .../framebufferio/FramebufferDisplay.c | 36 +++++++++++++------ .../framebufferio/FramebufferDisplay.c | 2 +- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index 45eedcaa95..1aff2df73f 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -100,29 +100,38 @@ static framebufferio_framebufferdisplay_obj_t *native_display(mp_obj_t display_o } //| def refresh( -//| self, *, target_frames_per_second: int = 60, minimum_frames_per_second: int = 1 +//| self, +//| *, +//| target_frames_per_second: Optional[int] = None, +//| minimum_frames_per_second: int = 0 //| ) -> bool: -//| """When auto refresh is off, waits for the target frame rate and then refreshes the display, -//| returning True. If the call has taken too long since the last refresh call for the given -//| target frame rate, then the refresh returns False immediately without updating the screen to +//| """When auto_refresh is off, and :py:attr:`target_frames_per_second` is not `None` this waits +//| for the target frame rate and then refreshes the display, +//| returning `True`. If the call has taken too long since the last refresh call for the given +//| target frame rate, then the refresh returns `False` immediately without updating the screen to //| hopefully help getting caught up. //| //| If the time since the last successful refresh is below the minimum frame rate, then an -//| exception will be raised. Set minimum_frames_per_second to 0 to disable. +//| exception will be raised. The default :py:attr:`minimum_frames_per_second` of 0 disables this behavior. //| -//| When auto refresh is on, updates the display immediately. (The display will also update +//| When auto_refresh is off, and :py:attr:`target_frames_per_second` is `None` this +//| will update the display immediately. +//| +//| When auto_refresh is on, updates the display immediately. (The display will also update //| without calls to this.) //| -//| :param int target_frames_per_second: How many times a second `refresh` should be called and the screen updated. +//| :param Optional[int] target_frames_per_second: The target frame rate that :py:func:`refresh` should try to +//| achieve. Set to `None` for immediate refresh. //| :param int minimum_frames_per_second: The minimum number of times the screen should be updated per second. //| """ //| ... STATIC mp_obj_t framebufferio_framebufferdisplay_obj_refresh(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { enum { ARG_target_frames_per_second, ARG_minimum_frames_per_second }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_target_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 60} }, - { MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} }, + { MP_QSTR_target_frames_per_second, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} }, + { MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); @@ -132,7 +141,14 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_refresh(size_t n_args, cons if (minimum_frames_per_second > 0) { maximum_ms_per_real_frame = 1000 / minimum_frames_per_second; } - return mp_obj_new_bool(common_hal_framebufferio_framebufferdisplay_refresh(self, 1000 / args[ARG_target_frames_per_second].u_int, maximum_ms_per_real_frame)); + + uint32_t target_ms_per_frame; + if (args[ARG_target_frames_per_second].u_obj == mp_const_none) { + target_ms_per_frame = 0xffffffff; + } else { + target_ms_per_frame = 1000 / mp_obj_get_int(args[ARG_target_frames_per_second].u_obj); + } + return mp_obj_new_bool(common_hal_framebufferio_framebufferdisplay_refresh(self, target_ms_per_frame, maximum_ms_per_real_frame)); } MP_DEFINE_CONST_FUN_OBJ_KW(framebufferio_framebufferdisplay_refresh_obj, 1, framebufferio_framebufferdisplay_obj_refresh); diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index ec59efef4a..417422afd0 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -283,7 +283,7 @@ uint16_t common_hal_framebufferio_framebufferdisplay_get_rotation(framebufferio_ bool common_hal_framebufferio_framebufferdisplay_refresh(framebufferio_framebufferdisplay_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame) { - if (!self->auto_refresh && !self->first_manual_refresh) { + if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != 0xffffffff)) { uint64_t current_time = supervisor_ticks_ms64(); uint32_t current_ms_since_real_refresh = current_time - self->core.last_refresh; // Test to see if the real frame time is below our minimum. From 923a5b28ca576ab4a483de52c413a9cd16f4171f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Mon, 2 Oct 2023 13:44:28 -0700 Subject: [PATCH 287/291] Add NO_FPS_LIMIT instead of magic numbers --- shared-bindings/displayio/Display.c | 4 ++-- shared-bindings/displayio/Display.h | 1 + shared-bindings/framebufferio/FramebufferDisplay.c | 4 ++-- shared-bindings/framebufferio/FramebufferDisplay.h | 1 + shared-module/displayio/Display.c | 2 +- shared-module/framebufferio/FramebufferDisplay.c | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index 5d3c29b8aa..6b73ad2b6f 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -276,7 +276,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); displayio_display_obj_t *self = native_display(pos_args[0]); - uint32_t maximum_ms_per_real_frame = 0xffffffff; + uint32_t maximum_ms_per_real_frame = NO_FPS_LIMIT; mp_int_t minimum_frames_per_second = args[ARG_minimum_frames_per_second].u_int; if (minimum_frames_per_second > 0) { maximum_ms_per_real_frame = 1000 / minimum_frames_per_second; @@ -284,7 +284,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos uint32_t target_ms_per_frame; if (args[ARG_target_frames_per_second].u_obj == mp_const_none) { - target_ms_per_frame = 0xffffffff; + target_ms_per_frame = NO_FPS_LIMIT; } else { target_ms_per_frame = 1000 / mp_obj_get_int(args[ARG_target_frames_per_second].u_obj); } diff --git a/shared-bindings/displayio/Display.h b/shared-bindings/displayio/Display.h index 50fb7c4bfd..af813866ed 100644 --- a/shared-bindings/displayio/Display.h +++ b/shared-bindings/displayio/Display.h @@ -35,6 +35,7 @@ extern const mp_obj_type_t displayio_display_type; #define NO_BRIGHTNESS_COMMAND 0x100 +#define NO_FPS_LIMIT 0xffffffff void common_hal_displayio_display_construct(displayio_display_obj_t *self, mp_obj_t bus, uint16_t width, uint16_t height, diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index 1aff2df73f..955761c273 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -136,7 +136,7 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_refresh(size_t n_args, cons mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); framebufferio_framebufferdisplay_obj_t *self = native_display(pos_args[0]); - uint32_t maximum_ms_per_real_frame = 0xffffffff; + uint32_t maximum_ms_per_real_frame = NO_FPS_LIMIT; mp_int_t minimum_frames_per_second = args[ARG_minimum_frames_per_second].u_int; if (minimum_frames_per_second > 0) { maximum_ms_per_real_frame = 1000 / minimum_frames_per_second; @@ -144,7 +144,7 @@ STATIC mp_obj_t framebufferio_framebufferdisplay_obj_refresh(size_t n_args, cons uint32_t target_ms_per_frame; if (args[ARG_target_frames_per_second].u_obj == mp_const_none) { - target_ms_per_frame = 0xffffffff; + target_ms_per_frame = NO_FPS_LIMIT; } else { target_ms_per_frame = 1000 / mp_obj_get_int(args[ARG_target_frames_per_second].u_obj); } diff --git a/shared-bindings/framebufferio/FramebufferDisplay.h b/shared-bindings/framebufferio/FramebufferDisplay.h index 96d39e6aef..87f57b0aaa 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.h +++ b/shared-bindings/framebufferio/FramebufferDisplay.h @@ -36,6 +36,7 @@ extern const mp_obj_type_t framebufferio_framebufferdisplay_type; #define NO_BRIGHTNESS_COMMAND 0x100 +#define NO_FPS_LIMIT 0xffffffff void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t *self, mp_obj_t framebuffer, diff --git a/shared-module/displayio/Display.c b/shared-module/displayio/Display.c index 5d9cc2357c..94f29d2c93 100644 --- a/shared-module/displayio/Display.c +++ b/shared-module/displayio/Display.c @@ -354,7 +354,7 @@ uint16_t common_hal_displayio_display_get_rotation(displayio_display_obj_t *self bool common_hal_displayio_display_refresh(displayio_display_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame) { - if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != 0xffffffff)) { + if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != NO_FPS_LIMIT)) { uint64_t current_time = supervisor_ticks_ms64(); uint32_t current_ms_since_real_refresh = current_time - self->core.last_refresh; // Test to see if the real frame time is below our minimum. diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 417422afd0..df70010a0f 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -283,7 +283,7 @@ uint16_t common_hal_framebufferio_framebufferdisplay_get_rotation(framebufferio_ bool common_hal_framebufferio_framebufferdisplay_refresh(framebufferio_framebufferdisplay_obj_t *self, uint32_t target_ms_per_frame, uint32_t maximum_ms_per_real_frame) { - if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != 0xffffffff)) { + if (!self->auto_refresh && !self->first_manual_refresh && (target_ms_per_frame != NO_FPS_LIMIT)) { uint64_t current_time = supervisor_ticks_ms64(); uint32_t current_ms_since_real_refresh = current_time - self->core.last_refresh; // Test to see if the real frame time is below our minimum. From 376cb87a2515f731486d4f1499eb01c8856cd807 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 3 Oct 2023 10:55:55 -0700 Subject: [PATCH 288/291] Update protomatter to fix non-S3 and C6 --- lib/protomatter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protomatter b/lib/protomatter index 1faaec39b3..98a2da6da4 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit 1faaec39b3d1d6e0b935d48aa2185ef4f414e7e4 +Subproject commit 98a2da6da4bdbfee8f3ab2334871e8c360dccae3 From 22bcb85dd5334e8513c5c51e97a0bad631a78fd7 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 6 Oct 2023 09:54:55 -0700 Subject: [PATCH 289/291] Update esp-protocols The commit was amended for PR review into espressif's repo. Next time I'll make a branch to PR to them from. --- ports/espressif/esp-protocols | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/esp-protocols b/ports/espressif/esp-protocols index 457f8335bb..ea54eef0d0 160000 --- a/ports/espressif/esp-protocols +++ b/ports/espressif/esp-protocols @@ -1 +1 @@ -Subproject commit 457f8335bb876b8af80a65b096e5381f49f29878 +Subproject commit ea54eef0d0fe59bd53a49c916f87065518b957eb From 15c5e8c80646adb8a90a183322f31f042a3ead2f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 6 Oct 2023 15:55:43 -0700 Subject: [PATCH 290/291] Fix pin adc unit check IDF5 made 0 valid. Use the NO_ADC macro instead --- ports/espressif/common-hal/analogio/AnalogIn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index ea322690f7..f3950e7f19 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -63,7 +63,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 == NO_ADC_CHANNEL) { + if (pin->adc_index == NO_ADC || pin->adc_channel == NO_ADC_CHANNEL) { raise_ValueError_invalid_pin(); } common_hal_mcu_pin_claim(pin); From 448b8cb271ebc7bce2dd25f3f3b4887af8968884 Mon Sep 17 00:00:00 2001 From: Tirtharaj Sinha Date: Sun, 8 Oct 2023 12:53:43 +0530 Subject: [PATCH 291/291] removing gpio (19,20) and adding gpio(33,34) and spi pins --- .../waveshare_esp32_s3_pico/mpconfigboard.h | 4 ++++ .../boards/waveshare_esp32_s3_pico/pins.c | 16 ++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h index 4a12ffacf4..070f091442 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/mpconfigboard.h @@ -36,3 +36,7 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO18) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO17) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) diff --git a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c index fd74d517ea..a1de1382aa 100644 --- a/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c +++ b/ports/espressif/boards/waveshare_esp32_s3_pico/pins.c @@ -22,9 +22,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, { 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) }, @@ -34,15 +34,23 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + // NEOPIXEL { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, + // UART { 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) }, + // I2C { 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_UART), MP_ROM_PTR(&board_uart_obj) }, + + // SPI + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);