mirror of
https://github.com/micropython/micropython.git
synced 2026-01-09 13:40:31 +01:00
esp32/boards: Add support for XIAO ESP32S3 boards.
Signed-off-by: Jiaxuan Weng <1391548050@qq.com>
This commit is contained in:
23
ports/esp32/boards/XIAO_ESP32S3/board.json
Normal file
23
ports/esp32/boards/XIAO_ESP32S3/board.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"deploy": [
|
||||
"../deploy_s3.md"
|
||||
],
|
||||
"docs": "",
|
||||
"features": [
|
||||
"SPIRAM",
|
||||
"USB-C",
|
||||
"WiFi",
|
||||
"BLE"
|
||||
],
|
||||
"features_non_filterable": [
|
||||
],
|
||||
"id": "xiao",
|
||||
"images": [
|
||||
"xiao_esp32s3.jpg"
|
||||
],
|
||||
"mcu": "esp32s3",
|
||||
"product": "XIAO-ESP32S3",
|
||||
"thumbnail": "",
|
||||
"url": "https://wiki.seeedstudio.com/xiao_esp32s3_getting_started/",
|
||||
"vendor": "Seeed Studio"
|
||||
}
|
||||
2
ports/esp32/boards/XIAO_ESP32S3/manifest.py
Normal file
2
ports/esp32/boards/XIAO_ESP32S3/manifest.py
Normal file
@@ -0,0 +1,2 @@
|
||||
include("$(PORT_DIR)/boards/manifest.py")
|
||||
freeze("modules")
|
||||
22
ports/esp32/boards/XIAO_ESP32S3/modules/xiao.py
Normal file
22
ports/esp32/boards/XIAO_ESP32S3/modules/xiao.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# XIAO ESP32 S3 MicroPython Helper Library
|
||||
|
||||
from micropython import const
|
||||
from machine import Pin
|
||||
|
||||
# Pin Assignments
|
||||
|
||||
# SPI
|
||||
SPI_MOSI = const(9)
|
||||
SPI_MISO = const(8)
|
||||
SPI_CLK = const(7)
|
||||
|
||||
# I2C
|
||||
I2C_SDA = const(5)
|
||||
I2C_SCL = const(6)
|
||||
|
||||
# LED
|
||||
LED = const(21)
|
||||
|
||||
# Helper methods for built in sensors
|
||||
|
||||
led = Pin(LED, Pin.OUT, value=0)
|
||||
12
ports/esp32/boards/XIAO_ESP32S3/mpconfigboard.cmake
Normal file
12
ports/esp32/boards/XIAO_ESP32S3/mpconfigboard.cmake
Normal file
@@ -0,0 +1,12 @@
|
||||
set(IDF_TARGET esp32s3)
|
||||
|
||||
set(SDKCONFIG_DEFAULTS
|
||||
boards/sdkconfig.base
|
||||
boards/sdkconfig.usb
|
||||
boards/sdkconfig.ble
|
||||
boards/sdkconfig.240mhz
|
||||
boards/sdkconfig.spiram_sx
|
||||
boards/XIAO_ESP32S3/sdkconfig.board
|
||||
)
|
||||
|
||||
set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
|
||||
12
ports/esp32/boards/XIAO_ESP32S3/mpconfigboard.h
Normal file
12
ports/esp32/boards/XIAO_ESP32S3/mpconfigboard.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#define MICROPY_HW_BOARD_NAME "XIAO-ESP32S3"
|
||||
#define MICROPY_HW_MCU_NAME "ESP32-S3-FN8"
|
||||
#define MICROPY_PY_NETWORK_HOSTNAME_DEFAULT "XIAO-ESP32S3"
|
||||
|
||||
#define MICROPY_PY_MACHINE_DAC (0)
|
||||
|
||||
#define MICROPY_HW_I2C0_SCL (6)
|
||||
#define MICROPY_HW_I2C0_SDA (5)
|
||||
|
||||
#define MICROPY_HW_SPI1_MOSI (9)
|
||||
#define MICROPY_HW_SPI1_MISO (8)
|
||||
#define MICROPY_HW_SPI1_SCK (7)
|
||||
18
ports/esp32/boards/XIAO_ESP32S3/sdkconfig.board
Normal file
18
ports/esp32/boards/XIAO_ESP32S3/sdkconfig.board
Normal file
@@ -0,0 +1,18 @@
|
||||
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
|
||||
CONFIG_ESPTOOLPY_AFTER_NORESET=y
|
||||
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions-8MiB.csv"
|
||||
|
||||
CONFIG_LWIP_LOCAL_HOSTNAME="XIAO-ESP32S3"
|
||||
|
||||
CONFIG_TINYUSB_DESC_CUSTOM_VID=0x2886
|
||||
CONFIG_TINYUSB_DESC_CUSTOM_PID=0x8056
|
||||
CONFIG_TINYUSB_DESC_BCD_DEVICE=0x0100
|
||||
CONFIG_TINYUSB_DESC_MANUFACTURER_STRING="Seeed Studio"
|
||||
CONFIG_TINYUSB_DESC_PRODUCT_STRING="XIAO ESP32S3"
|
||||
CONFIG_TINYUSB_DESC_SERIAL_STRING="XIAO ESP32S3"
|
||||
Reference in New Issue
Block a user