Merge pull request #8424 from tannewt/update-idf5.1

Update to ESP-IDF 5.1 and add C6 and H2 support
This commit is contained in:
Scott Shawcroft 2023-09-22 16:35:27 -07:00 committed by GitHub
commit 1c0155c99b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
114 changed files with 1445 additions and 368 deletions

3
.gitmodules vendored
View File

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

View File

@ -27,11 +27,23 @@ 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 ifeq ($(IDF_TARGET),esp32h2)
IDF_TARGET_ARCH = riscv
CROSS_COMPILE = riscv32-esp-elf-
else
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,23 +64,35 @@ 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/dac/include \
-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 \
-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 \
@ -85,6 +109,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 +120,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 \
@ -153,12 +180,13 @@ 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)
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
@ -173,7 +201,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 \
@ -189,6 +216,20 @@ 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),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 \
@ -203,7 +244,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
@ -243,12 +284,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)
@ -408,21 +453,42 @@ 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_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_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_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
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
@ -450,11 +516,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)

View File

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

View File

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

View File

@ -36,5 +36,3 @@
// For entering safe mode
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9)
#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1)

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -43,5 +43,3 @@
// For entering safe mode
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9)
#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1)

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

@ -4,20 +4,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
#

View File

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

View File

@ -8,3 +8,7 @@ CIRCUITPY_ESP_FLASH_FREQ = 80m
CIRCUITPY_ESP_FLASH_SIZE = 2MB
CIRCUITPY_DUALBANK = 0
CIRCUITPY_ESP_USB_SERIAL_JTAG = 0
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,3 +7,7 @@ IDF_TARGET = esp32c3
CIRCUITPY_ESP_FLASH_MODE=qio
CIRCUITPY_ESP_FLASH_FREQ=80m
CIRCUITPY_ESP_FLASH_SIZE=4MB
CIRCUITPY_ESP_USB_SERIAL_JTAG = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

@ -40,5 +40,3 @@
// For entering safe mode
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9)
#define CIRCUITPY_ESP_USB_SERIAL_JTAG (1)

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,10 @@
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
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,8 @@
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

View File

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

View File

@ -1,41 +1,28 @@
CONFIG_ESP32S3_SPIRAM_SUPPORT=y
#
# SPI RAM config
# Espressif IoT Development Framework Configuration
#
# CONFIG_SPIRAM_MODE_QUAD is not set
CONFIG_SPIRAM_MODE_OCT=y
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

View File

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

View File

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

View File

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

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

@ -7,5 +7,9 @@ CIRCUITPY_ESP_FLASH_MODE=qio
CIRCUITPY_ESP_FLASH_FREQ=80m
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

View File

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

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

@ -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 = 1
CIRCUITPY_BLEIO = 0

View File

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

View File

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

View File

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

View File

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

View File

@ -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 SOC_ADC_PERIPH_NUM == 1
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;

View File

@ -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 = 0;
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;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -39,40 +39,30 @@
#include "hal/twai_ll.h"
// There is no logic that dictates TWAI vs TWAI0
#if defined(CONFIG_IDF_TARGET_ESP32H2) || defined(CONFIG_IDF_TARGET_ESP32C6)
#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;
}

View File

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

View File

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

View File

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

View File

@ -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;
@ -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,51 @@ 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_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-
@ -254,10 +303,12 @@ void preserve_pin_number(gpio_num_t pin_number) {
_preserved_pin_mask |= PIN_BIT(pin_number);
}
if (_preserved_pin_mask) {
#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.
gpio_deep_sleep_hold_en();
#endif
}
}
@ -301,7 +352,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 defined(SOC_GPIO_SUPPORT_HOLD_SINGLE_IO_IN_DSLP) && !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];

View File

@ -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) {
@ -90,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
@ -105,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

View File

@ -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_ESP32H2)
#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
#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)
#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
#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
#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);
#endif
#endif
break;
default:
break;

View File

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

@ -1 +1 @@
Subproject commit 75035312ed9427557acfee1cd32af2b8e1f13f72
Subproject commit 8f3f2cc8cfb2e4371870b0c5a974d40468114a9e

@ -1 +1 @@
Subproject commit 6f0c9319c5b09ce12ef81e6428d3b6f23a9487e5
Subproject commit fb07ab7f0007549d38081cfc6d83348780526a28

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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
#
@ -35,6 +41,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_STATIC_TX_BUFFER=y
# CONFIG_ESP_WIFI_NVS_ENABLED is not set
# end of Wi-Fi
#
# LWIP
#
@ -118,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

Some files were not shown because too many files have changed in this diff Show More