diff --git a/boards.txt b/boards.txt index 9ea62663437acba02bf9d28017f0b8f44d842864..aa9037d19086e5b69378322c4929aa758892d5ad 100644 --- a/boards.txt +++ b/boards.txt @@ -17530,6 +17530,8 @@ AirM2M_CORE_ESP32C3.vid.0=0x303a AirM2M_CORE_ESP32C3.pid.0=0x1001 AirM2M_CORE_ESP32C3.upload.tool=esptool_py +AirM2M_CORE_ESP32C3.upload.tool.default=esptool_py +AirM2M_CORE_ESP32C3.upload.tool.network=esp_ota AirM2M_CORE_ESP32C3.upload.maximum_size=1310720 AirM2M_CORE_ESP32C3.upload.maximum_data_size=327680 AirM2M_CORE_ESP32C3.upload.flags= @@ -17624,6 +17626,11 @@ AirM2M_CORE_ESP32C3.menu.DebugLevel.debug.build.code_debug=4 AirM2M_CORE_ESP32C3.menu.DebugLevel.verbose=Verbose AirM2M_CORE_ESP32C3.menu.DebugLevel.verbose.build.code_debug=5 +AirM2M_CORE_ESP32C3.menu.EraseFlash.none=Disabled +AirM2M_CORE_ESP32C3.menu.EraseFlash.none.upload.erase_cmd= +AirM2M_CORE_ESP32C3.menu.EraseFlash.all=Enabled +AirM2M_CORE_ESP32C3.menu.EraseFlash.all.upload.erase_cmd=-e + ############################################################# @@ -17976,7 +17983,7 @@ aw2eth.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## -department_of_alchemy_minimain_esp32s2.name=Deparment of Alchemy MiniMain ESP32-S2 +department_of_alchemy_minimain_esp32s2.name=Department of Alchemy MiniMain ESP32-S2 department_of_alchemy_minimain_esp32s2.vid.0=0x303A department_of_alchemy_minimain_esp32s2.pid.0=0x80FF @@ -19015,3 +19022,178 @@ unphone9.menu.EraseFlash.all=Enabled unphone9.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################### +# Cytron Maker Feather AIoT S3 + +cytron_maker_feather_aiot_s3.name=Cytron Maker Feather AIoT S3 +cytron_maker_feather_aiot_s3.vid.0=0x303a +cytron_maker_feather_aiot_s3.pid.0=0x80f8 + +cytron_maker_feather_aiot_s3.bootloader.tool=esptool_py +cytron_maker_feather_aiot_s3.bootloader.tool.default=esptool_py + +cytron_maker_feather_aiot_s3.upload.tool=esptool_py +cytron_maker_feather_aiot_s3.upload.tool.default=esptool_py +cytron_maker_feather_aiot_s3.upload.tool.network=esp_ota + +cytron_maker_feather_aiot_s3.upload.maximum_size=1310720 +cytron_maker_feather_aiot_s3.upload.maximum_data_size=327680 +cytron_maker_feather_aiot_s3.upload.flags= +cytron_maker_feather_aiot_s3.upload.extra_flags= +cytron_maker_feather_aiot_s3.upload.use_1200bps_touch=true +cytron_maker_feather_aiot_s3.upload.wait_for_upload_port=true + +cytron_maker_feather_aiot_s3.serial.disableDTR=false +cytron_maker_feather_aiot_s3.serial.disableRTS=false + +cytron_maker_feather_aiot_s3.build.tarch=xtensa +cytron_maker_feather_aiot_s3.build.bootloader_addr=0x0 +cytron_maker_feather_aiot_s3.build.target=esp32s3 +cytron_maker_feather_aiot_s3.build.mcu=esp32s3 +cytron_maker_feather_aiot_s3.build.core=esp32 +cytron_maker_feather_aiot_s3.build.variant=cytron_maker_feather_aiot_s3 +cytron_maker_feather_aiot_s3.build.board=CYTRON_MAKER_FEATHER_AIOT_S3 + +cytron_maker_feather_aiot_s3.build.usb_mode=0 +cytron_maker_feather_aiot_s3.build.cdc_on_boot=1 +cytron_maker_feather_aiot_s3.build.msc_on_boot=0 +cytron_maker_feather_aiot_s3.build.dfu_on_boot=0 +cytron_maker_feather_aiot_s3.build.f_cpu=240000000L +cytron_maker_feather_aiot_s3.build.flash_size=8MB +cytron_maker_feather_aiot_s3.build.flash_freq=80m +cytron_maker_feather_aiot_s3.build.flash_mode=dio +cytron_maker_feather_aiot_s3.build.boot=qio +cytron_maker_feather_aiot_s3.build.partitions=default +cytron_maker_feather_aiot_s3.build.defines= +cytron_maker_feather_aiot_s3.build.loop_core= +cytron_maker_feather_aiot_s3.build.event_core= +cytron_maker_feather_aiot_s3.build.flash_type=qio +cytron_maker_feather_aiot_s3.build.psram_type=opi +cytron_maker_feather_aiot_s3.build.memory_type={build.flash_type}_{build.psram_type} + +cytron_maker_feather_aiot_s3.menu.LoopCore.1=Core 1 +cytron_maker_feather_aiot_s3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1 +cytron_maker_feather_aiot_s3.menu.LoopCore.0=Core 0 +cytron_maker_feather_aiot_s3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0 + +cytron_maker_feather_aiot_s3.menu.EventsCore.1=Core 1 +cytron_maker_feather_aiot_s3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +cytron_maker_feather_aiot_s3.menu.EventsCore.0=Core 0 +cytron_maker_feather_aiot_s3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0 + +cytron_maker_feather_aiot_s3.menu.USBMode.default=USB-OTG (TinyUSB) +cytron_maker_feather_aiot_s3.menu.USBMode.default.build.usb_mode=0 +cytron_maker_feather_aiot_s3.menu.USBMode.hwcdc=Hardware CDC and JTAG +cytron_maker_feather_aiot_s3.menu.USBMode.hwcdc.build.usb_mode=1 + +cytron_maker_feather_aiot_s3.menu.CDCOnBoot.cdc=Enabled +cytron_maker_feather_aiot_s3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1 +cytron_maker_feather_aiot_s3.menu.CDCOnBoot.default=Disabled +cytron_maker_feather_aiot_s3.menu.CDCOnBoot.default.build.cdc_on_boot=0 + +cytron_maker_feather_aiot_s3.menu.MSCOnBoot.default=Disabled +cytron_maker_feather_aiot_s3.menu.MSCOnBoot.default.build.msc_on_boot=0 +cytron_maker_feather_aiot_s3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode) +cytron_maker_feather_aiot_s3.menu.MSCOnBoot.msc.build.msc_on_boot=1 + +cytron_maker_feather_aiot_s3.menu.DFUOnBoot.default=Disabled +cytron_maker_feather_aiot_s3.menu.DFUOnBoot.default.build.dfu_on_boot=0 +cytron_maker_feather_aiot_s3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode) +cytron_maker_feather_aiot_s3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1 + +cytron_maker_feather_aiot_s3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB) +cytron_maker_feather_aiot_s3.menu.UploadMode.cdc.upload.use_1200bps_touch=true +cytron_maker_feather_aiot_s3.menu.UploadMode.cdc.upload.wait_for_upload_port=true +cytron_maker_feather_aiot_s3.menu.UploadMode.default=UART0 / Hardware CDC +cytron_maker_feather_aiot_s3.menu.UploadMode.default.upload.use_1200bps_touch=false +cytron_maker_feather_aiot_s3.menu.UploadMode.default.upload.wait_for_upload_port=false + +cytron_maker_feather_aiot_s3.menu.PSRAM.opi=OPI PSRAM +cytron_maker_feather_aiot_s3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM +cytron_maker_feather_aiot_s3.menu.PSRAM.opi.build.psram_type=opi +cytron_maker_feather_aiot_s3.menu.PSRAM.enabled=QSPI PSRAM +cytron_maker_feather_aiot_s3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +cytron_maker_feather_aiot_s3.menu.PSRAM.enabled.build.psram_type=qspi +cytron_maker_feather_aiot_s3.menu.PSRAM.disabled=Disabled +cytron_maker_feather_aiot_s3.menu.PSRAM.disabled.build.defines= +cytron_maker_feather_aiot_s3.menu.PSRAM.disabled.build.psram_type=qspi + +cytron_maker_feather_aiot_s3.menu.PartitionScheme.tinyuf2=TinyUF2 8MB (2MB APP/3.7MB FFAT) +cytron_maker_feather_aiot_s3.menu.PartitionScheme.tinyuf2.build.custom_bootloader=bootloader-tinyuf2 +cytron_maker_feather_aiot_s3.menu.PartitionScheme.tinyuf2.build.custom_partitions=partitions-8MB-tinyuf2 +cytron_maker_feather_aiot_s3.menu.PartitionScheme.tinyuf2.upload.maximum_size=2097152 +cytron_maker_feather_aiot_s3.menu.PartitionScheme.tinyuf2.upload.extra_flags=0x410000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin" +cytron_maker_feather_aiot_s3.menu.PartitionScheme.default_8MB=Default (3MB APP/1.5MB SPIFFS) +cytron_maker_feather_aiot_s3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +cytron_maker_feather_aiot_s3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 + +cytron_maker_feather_aiot_s3.menu.CPUFreq.240=240MHz (WiFi) +cytron_maker_feather_aiot_s3.menu.CPUFreq.240.build.f_cpu=240000000L +cytron_maker_feather_aiot_s3.menu.CPUFreq.160=160MHz (WiFi) +cytron_maker_feather_aiot_s3.menu.CPUFreq.160.build.f_cpu=160000000L +cytron_maker_feather_aiot_s3.menu.CPUFreq.80=80MHz (WiFi) +cytron_maker_feather_aiot_s3.menu.CPUFreq.80.build.f_cpu=80000000L +cytron_maker_feather_aiot_s3.menu.CPUFreq.40=40MHz +cytron_maker_feather_aiot_s3.menu.CPUFreq.40.build.f_cpu=40000000L +cytron_maker_feather_aiot_s3.menu.CPUFreq.20=20MHz +cytron_maker_feather_aiot_s3.menu.CPUFreq.20.build.f_cpu=20000000L +cytron_maker_feather_aiot_s3.menu.CPUFreq.10=10MHz +cytron_maker_feather_aiot_s3.menu.CPUFreq.10.build.f_cpu=10000000L + +cytron_maker_feather_aiot_s3.menu.FlashMode.qio=QIO 80MHz +cytron_maker_feather_aiot_s3.menu.FlashMode.qio.build.flash_mode=dio +cytron_maker_feather_aiot_s3.menu.FlashMode.qio.build.boot=qio +cytron_maker_feather_aiot_s3.menu.FlashMode.qio.build.boot_freq=80m +cytron_maker_feather_aiot_s3.menu.FlashMode.qio.build.flash_freq=80m +cytron_maker_feather_aiot_s3.menu.FlashMode.qio120=QIO 120MHz +cytron_maker_feather_aiot_s3.menu.FlashMode.qio120.build.flash_mode=dio +cytron_maker_feather_aiot_s3.menu.FlashMode.qio120.build.boot=qio +cytron_maker_feather_aiot_s3.menu.FlashMode.qio120.build.boot_freq=120m +cytron_maker_feather_aiot_s3.menu.FlashMode.qio120.build.flash_freq=80m +cytron_maker_feather_aiot_s3.menu.FlashMode.dio=DIO 80MHz +cytron_maker_feather_aiot_s3.menu.FlashMode.dio.build.flash_mode=dio +cytron_maker_feather_aiot_s3.menu.FlashMode.dio.build.boot=dio +cytron_maker_feather_aiot_s3.menu.FlashMode.dio.build.boot_freq=80m +cytron_maker_feather_aiot_s3.menu.FlashMode.dio.build.flash_freq=80m +cytron_maker_feather_aiot_s3.menu.FlashMode.opi=OPI 80MHz +cytron_maker_feather_aiot_s3.menu.FlashMode.opi.build.flash_mode=dout +cytron_maker_feather_aiot_s3.menu.FlashMode.opi.build.boot=opi +cytron_maker_feather_aiot_s3.menu.FlashMode.opi.build.boot_freq=80m +cytron_maker_feather_aiot_s3.menu.FlashMode.opi.build.flash_freq=80m + +cytron_maker_feather_aiot_s3.menu.FlashSize.8M=8MB (64Mb) +cytron_maker_feather_aiot_s3.menu.FlashSize.8M.build.flash_size=8MB + +cytron_maker_feather_aiot_s3.menu.UploadSpeed.921600=921600 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.921600.upload.speed=921600 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.115200=115200 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.115200.upload.speed=115200 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.256000.windows=256000 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.256000.upload.speed=256000 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.230400.windows.upload.speed=256000 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.230400=230400 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.230400.upload.speed=230400 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.460800.linux=460800 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.460800.macosx=460800 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.460800.upload.speed=460800 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.512000.windows=512000 +cytron_maker_feather_aiot_s3.menu.UploadSpeed.512000.upload.speed=512000 + +cytron_maker_feather_aiot_s3.menu.DebugLevel.none=None +cytron_maker_feather_aiot_s3.menu.DebugLevel.none.build.code_debug=0 +cytron_maker_feather_aiot_s3.menu.DebugLevel.error=Error +cytron_maker_feather_aiot_s3.menu.DebugLevel.error.build.code_debug=1 +cytron_maker_feather_aiot_s3.menu.DebugLevel.warn=Warn +cytron_maker_feather_aiot_s3.menu.DebugLevel.warn.build.code_debug=2 +cytron_maker_feather_aiot_s3.menu.DebugLevel.info=Info +cytron_maker_feather_aiot_s3.menu.DebugLevel.info.build.code_debug=3 +cytron_maker_feather_aiot_s3.menu.DebugLevel.debug=Debug +cytron_maker_feather_aiot_s3.menu.DebugLevel.debug.build.code_debug=4 +cytron_maker_feather_aiot_s3.menu.DebugLevel.verbose=Verbose +cytron_maker_feather_aiot_s3.menu.DebugLevel.verbose.build.code_debug=5 + +cytron_maker_feather_aiot_s3.menu.EraseFlash.none=Disabled +cytron_maker_feather_aiot_s3.menu.EraseFlash.none.upload.erase_cmd= +cytron_maker_feather_aiot_s3.menu.EraseFlash.all=Enabled +cytron_maker_feather_aiot_s3.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## diff --git a/variants/cytron_maker_feather_aiot_s3/bootloader-tinyuf2.bin b/variants/cytron_maker_feather_aiot_s3/bootloader-tinyuf2.bin new file mode 100644 index 0000000000000000000000000000000000000000..6e7ea8a275e661e99f43fc0587adc9752d2048ad Binary files /dev/null and b/variants/cytron_maker_feather_aiot_s3/bootloader-tinyuf2.bin differ diff --git a/variants/cytron_maker_feather_aiot_s3/partitions-8MB-tinyuf2.csv b/variants/cytron_maker_feather_aiot_s3/partitions-8MB-tinyuf2.csv new file mode 100644 index 0000000000000000000000000000000000000000..4026378b6fbfa7c6c4f1663ff1cd61ac9d6f0820 --- /dev/null +++ b/variants/cytron_maker_feather_aiot_s3/partitions-8MB-tinyuf2.csv @@ -0,0 +1,10 @@ +# ESP-IDF Partition Table +# Name, Type, SubType, Offset, Size, Flags +# bootloader.bin,, 0x1000, 32K +# partition table,, 0x8000, 4K +nvs, data, nvs, 0x9000, 20K, +otadata, data, ota, 0xe000, 8K, +ota_0, 0, ota_0, 0x10000, 2048K, +ota_1, 0, ota_1, 0x210000, 2048K, +uf2, app, factory,0x410000, 256K, +ffat, data, fat, 0x450000, 3776K, diff --git a/variants/cytron_maker_feather_aiot_s3/pins_arduino.h b/variants/cytron_maker_feather_aiot_s3/pins_arduino.h new file mode 100644 index 0000000000000000000000000000000000000000..bd3e9c278c9f8786dc40f14d5c51c406d996d8b3 --- /dev/null +++ b/variants/cytron_maker_feather_aiot_s3/pins_arduino.h @@ -0,0 +1,81 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303A +#define USB_PID 0x80F8 +#define USB_MANUFACTURER "Cytron" +#define USB_PRODUCT "Maker Feather AIoT S3" +#define USB_SERIAL "" + +#define EXTERNAL_NUM_INTERRUPTS 46 +#define NUM_DIGITAL_PINS 20 +#define NUM_ANALOG_INPUTS 12 + +#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1) +#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) +#define digitalPinHasPWM(p) (p < 46) + + + +static const uint8_t LED_BUILTIN = 2; // Status LED. +static const uint8_t RGB_BUILTIN = SOC_GPIO_PIN_COUNT + 46; // RGB LED. + +#define BUILTIN_LED LED_BUILTIN // Backward compatibility +#define LED_BUILTIN LED_BUILTIN +#define LED LED_BUILTIN +#define RGB_BUILTIN RGB_BUILTIN +#define RGB RGB_BUILTIN +#define NEOPIXEL RGB_BUILTIN +#define RGB_BRIGHTNESS 65 + + + +#define VP_EN 11 // V Peripheral Enable. +#define BUZZER 12 // Piezo Buzzer. +#define BOOT 0 // Boot Button. +#define BUTTON 3 // User Button. + +#define VIN 13 // Vin Sense. +#define VBATT 13 +#define VOLTAGE_MONITOR 13 + + +static const uint8_t TX = 15; +static const uint8_t RX = 16; + +static const uint8_t SDA = 42; +static const uint8_t SCL = 41; + +static const uint8_t SS = 7; +static const uint8_t MOSI = 8; +static const uint8_t SCK = 17; +static const uint8_t MISO = 18; + +static const uint8_t A0 = 10; +static const uint8_t A1 = 9; +static const uint8_t A2 = 6; +static const uint8_t A3 = 5; +static const uint8_t A4 = 4; +static const uint8_t A5 = 7; + +static const uint8_t A6 = 17; +static const uint8_t A7 = 8; +static const uint8_t A8 = 18; +static const uint8_t A9 = 16; +static const uint8_t A10 = 15; +static const uint8_t A11 = 14; +static const uint8_t A12 = 13; + +static const uint8_t T4 = 4; +static const uint8_t T5 = 5; +static const uint8_t T6 = 6; +static const uint8_t T7 = 7; +static const uint8_t T8 = 8; +static const uint8_t T9 = 9; +static const uint8_t T10 = 10; +static const uint8_t T14 = 14; + +#endif /* Pins_Arduino_h */ diff --git a/variants/cytron_maker_feather_aiot_s3/tinyuf2.bin b/variants/cytron_maker_feather_aiot_s3/tinyuf2.bin new file mode 100644 index 0000000000000000000000000000000000000000..a43bff014da0cee9c537c444d9380977b78ae117 Binary files /dev/null and b/variants/cytron_maker_feather_aiot_s3/tinyuf2.bin differ diff --git a/variants/cytron_maker_feather_aiot_s3/variant.cpp b/variants/cytron_maker_feather_aiot_s3/variant.cpp new file mode 100644 index 0000000000000000000000000000000000000000..d90883480b38ba9b476d184fb8fc4c40aa2236e1 --- /dev/null +++ b/variants/cytron_maker_feather_aiot_s3/variant.cpp @@ -0,0 +1,38 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Wai Weng for Cytron Technologies + * + * 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 "esp32-hal-gpio.h" +#include "pins_arduino.h" + +extern "C" { + +// Initialize variant/board, called before setup() +void initVariant(void) +{ + // Turn on VPeripheral by default. + pinMode(VP_EN, OUTPUT); + digitalWrite(VP_EN, HIGH); +} +}