From 06421055d3dbe7cea6edaff3d1d32c60fa48ddd6 Mon Sep 17 00:00:00 2001 From: Cullen Jennings Date: Sat, 18 Mar 2023 19:46:44 -0600 Subject: [PATCH] added ESP32S3 Hacktar EV2 board --- boards.txt | 92 ++++++++++++++++++++++++++ variants/esp32s3hactar2/pins_arduino.h | 64 ++++++++++++++++++ 2 files changed, 156 insertions(+) create mode 100644 variants/esp32s3hactar2/pins_arduino.h diff --git a/boards.txt b/boards.txt index a2f8f8ed867..2a34a07df51 100644 --- a/boards.txt +++ b/boards.txt @@ -1259,6 +1259,98 @@ esp32s3box.menu.EraseFlash.all.upload.erase_cmd=-e ############################################################## +esp32s3hactar2.name=ESP32-S3-Hactar-EV2 +esp32s3hactar2.vid.0=0x303a +esp32s3hactar2.pid.0=0x1001 + +esp32s3hactar2.bootloader.tool=esptool_py +esp32s3hactar2.bootloader.tool.default=esptool_py + +esp32s3hactar2.upload.tool=esptool_py +esp32s3hactar2.upload.tool.default=esptool_py +esp32s3hactar2.upload.tool.network=esp_ota + +esp32s3hactar2.upload.maximum_size=1310720 +esp32s3hactar2.upload.maximum_data_size=327680 +esp32s3hactar2.upload.speed=460800 +esp32s3hactar2.upload.flags= +esp32s3hactar2.upload.extra_flags= +esp32s3hactar2.upload.use_1200bps_touch=false +esp32s3hactar2.upload.wait_for_upload_port=false + +esp32s3hactar2.serial.disableDTR=false +esp32s3hactar2.serial.disableRTS=false + +esp32s3hactar2.build.tarch=xtensa +esp32s3hactar2.build.bootloader_addr=0x0 +esp32s3hactar2.build.target=esp32s3 +esp32s3hactar2.build.mcu=esp32s3 +esp32s3hactar2.build.core=esp32 +esp32s3hactar2.build.variant=esp32s3hactar2 +esp32s3hactar2.build.board=ESP32_S3_HACTAR_EV2 + +esp32s3hactar2.build.usb_mode=0 +esp32s3hactar2.build.cdc_on_boot=1 +esp32s3hactar2.build.msc_on_boot=0 +esp32s3hactar2.build.dfu_on_boot=0 +esp32s3hactar2.build.f_cpu=240000000L +esp32s3hactar2.build.flash_size=8MB +esp32s3hactar2.build.flash_freq=80m +esp32s3hactar2.build.flash_mode=dio +esp32s3hactar2.build.boot=qio +esp32s3hactar2.build.partitions=default +esp32s3hactar2.build.memory_type=qio_opi +esp32s3hactar2.build.loop_core=-DARDUINO_RUNNING_CORE=1 +esp32s3hactar2.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1 +esp32s3hactar2.build.defines=-DBOARD_HAS_PSRAM +esp32s3hactar2.build.psram_type=qspi +esp32s3hactar2.build.memory_type={build.boot}_{build.psram_type} + + + +esp32s3hactar2.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS) +esp32s3hactar2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +esp32s3hactar2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +esp32s3hactar2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +esp32s3hactar2.menu.PartitionScheme.no_ota.build.partitions=no_ota +esp32s3hactar2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +esp32s3hactar2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +esp32s3hactar2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +esp32s3hactar2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +esp32s3hactar2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +esp32s3hactar2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +esp32s3hactar2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +esp32s3hactar2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +esp32s3hactar2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +esp32s3hactar2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +esp32s3hactar2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +esp32s3hactar2.menu.PartitionScheme.huge_app.build.partitions=huge_app +esp32s3hactar2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +esp32s3hactar2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +esp32s3hactar2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +esp32s3hactar2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + + +esp32s3hactar2.menu.DebugLevel.none=None +esp32s3hactar2.menu.DebugLevel.none.build.code_debug=0 +esp32s3hactar2.menu.DebugLevel.error=Error +esp32s3hactar2.menu.DebugLevel.error.build.code_debug=1 +esp32s3hactar2.menu.DebugLevel.warn=Warn +esp32s3hactar2.menu.DebugLevel.warn.build.code_debug=2 +esp32s3hactar2.menu.DebugLevel.info=Info +esp32s3hactar2.menu.DebugLevel.info.build.code_debug=3 +esp32s3hactar2.menu.DebugLevel.debug=Debug +esp32s3hactar2.menu.DebugLevel.debug.build.code_debug=4 +esp32s3hactar2.menu.DebugLevel.verbose=Verbose +esp32s3hactar2.menu.DebugLevel.verbose.build.code_debug=5 + +esp32s3hactar2.menu.EraseFlash.none=Disabled +esp32s3hactar2.menu.EraseFlash.none.upload.erase_cmd= +esp32s3hactar2.menu.EraseFlash.all=Enabled +esp32s3hactar2.menu.EraseFlash.all.upload.erase_cmd=-e + +############################################################## + esp32s3usbotg.name=ESP32-S3-USB-OTG esp32s3usbotg.vid.0=0x303a esp32s3usbotg.pid.0=0x1001 diff --git a/variants/esp32s3hactar2/pins_arduino.h b/variants/esp32s3hactar2/pins_arduino.h new file mode 100644 index 00000000000..cd6a86cbd6b --- /dev/null +++ b/variants/esp32s3hactar2/pins_arduino.h @@ -0,0 +1,64 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include "soc/soc_caps.h" + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +#define EXTERNAL_NUM_INTERRUPTS 46 +#define NUM_DIGITAL_PINS 48 +#define NUM_ANALOG_INPUTS 20 + +static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT+6; +#define BUILTIN_LED LED_BUILTIN // backward compatibility +#define LED_BUILTIN LED_BUILTIN +#define RGB_BUILTIN LED_BUILTIN +#define RGB_BRIGHTNESS 64 + +#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1) +#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) +#define digitalPinHasPWM(p) (p < 46) + +static const uint8_t TX = 43; +static const uint8_t RX = 44; + +static const uint8_t SDA = 41; +static const uint8_t SCL = 40; + +static const uint8_t SS = 35; +static const uint8_t MOSI = 34; +static const uint8_t MISO = 33; +static const uint8_t SCK = 32; + +static const uint8_t A8 = 9; +static const uint8_t A9 = 10; +static const uint8_t A10 = 11; +static const uint8_t A11 = 12; +static const uint8_t A12 = 13; +static const uint8_t A13 = 14; + +static const uint8_t T1 = 1; +static const uint8_t T2 = 2; +static const uint8_t T3 = 3; +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 T11 = 11; +static const uint8_t T12 = 12; +static const uint8_t T13 = 13; +static const uint8_t T14 = 14; + +// Wire1 for ES7210 MIC ADC, ES8311 I2S DAC, ICM-42607-P IMU and TT21100 Touch Panel +#define I2C_SDA 24 +#define I2C_SCL 25 + + + + +#endif /* Pins_Arduino_h */