Unverified Commit d3427393 authored by Tinyu's avatar Tinyu Committed by GitHub

Create M5AtomS3 pins_arduino.h and M5AtomS3 Board (#7654)

* Add M5AtomS3

* M5AtomS3

* Update boards.txt
Co-authored-by: default avatarJan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
parent 778674ba
......@@ -10951,6 +10951,199 @@ m5stack-atom.menu.EraseFlash.all.upload.erase_cmd=-e
##############################################################
m5stack-atoms3.name=M5Stack-ATOMS3
m5stack-atoms3.vid.0=0x303a
m5stack-atoms3.pid.0=0x1001
m5stack-atoms3.bootloader.tool=esptool_py
m5stack-atoms3.bootloader.tool.default=esptool_py
m5stack-atoms3.upload.tool=esptool_py
m5stack-atoms3.upload.tool.default=esptool_py
m5stack-atoms3.upload.tool.network=esp_ota
m5stack-atoms3.upload.maximum_size=1310720
m5stack-atoms3.upload.maximum_data_size=327680
m5stack-atoms3.upload.flags=
m5stack-atoms3.upload.extra_flags=
m5stack-atoms3.upload.use_1200bps_touch=false
m5stack-atoms3.upload.wait_for_upload_port=false
m5stack-atoms3.serial.disableDTR=false
m5stack-atoms3.serial.disableRTS=false
m5stack-atoms3.build.tarch=xtensa
m5stack-atoms3.build.bootloader_addr=0x0
m5stack-atoms3.build.target=esp32s3
m5stack-atoms3.build.mcu=esp32s3
m5stack-atoms3.build.core=esp32
m5stack-atoms3.build.variant=m5stack_atoms3
m5stack-atoms3.build.board=M5Stack_ATOMS3
m5stack-atoms3.build.usb_mode=1
m5stack-atoms3.build.cdc_on_boot=0
m5stack-atoms3.build.msc_on_boot=0
m5stack-atoms3.build.dfu_on_boot=0
m5stack-atoms3.build.f_cpu=240000000L
m5stack-atoms3.build.flash_size=4MB
m5stack-atoms3.build.flash_freq=80m
m5stack-atoms3.build.flash_mode=dio
m5stack-atoms3.build.boot=qio
m5stack-atoms3.build.boot_freq=80m
m5stack-atoms3.build.partitions=default
m5stack-atoms3.build.defines=
m5stack-atoms3.build.loop_core=
m5stack-atoms3.build.event_core=
m5stack-atoms3.build.psram_type=qspi
m5stack-atoms3.build.memory_type={build.boot}_{build.psram_type}
## IDE 2.0 Seems to not update the value
m5stack-atoms3.menu.JTAGAdapter.default=Disabled
m5stack-atoms3.menu.JTAGAdapter.default.build.copy_jtag_files=0
m5stack-atoms3.menu.JTAGAdapter.builtin=Integrated USB JTAG
m5stack-atoms3.menu.JTAGAdapter.builtin.build.openocdscript=esp32s3-builtin.cfg
m5stack-atoms3.menu.JTAGAdapter.builtin.build.copy_jtag_files=1
m5stack-atoms3.menu.JTAGAdapter.external=FTDI Adapter
m5stack-atoms3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg
m5stack-atoms3.menu.JTAGAdapter.external.build.copy_jtag_files=1
m5stack-atoms3.menu.JTAGAdapter.bridge=ESP USB Bridge
m5stack-atoms3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg
m5stack-atoms3.menu.JTAGAdapter.bridge.build.copy_jtag_files=1
m5stack-atoms3.menu.PSRAM.disabled=Disabled
m5stack-atoms3.menu.PSRAM.disabled.build.defines=
m5stack-atoms3.menu.PSRAM.disabled.build.psram_type=qspi
m5stack-atoms3.menu.PSRAM.enabled=QSPI PSRAM
m5stack-atoms3.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
m5stack-atoms3.menu.PSRAM.enabled.build.psram_type=qspi
m5stack-atoms3.menu.PSRAM.opi=OPI PSRAM
m5stack-atoms3.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
m5stack-atoms3.menu.PSRAM.opi.build.psram_type=opi
m5stack-atoms3.menu.FlashMode.qio=QIO 80MHz
m5stack-atoms3.menu.FlashMode.qio.build.flash_mode=dio
m5stack-atoms3.menu.FlashMode.qio.build.boot=qio
m5stack-atoms3.menu.FlashMode.qio.build.boot_freq=80m
m5stack-atoms3.menu.FlashMode.qio.build.flash_freq=80m
m5stack-atoms3.menu.FlashMode.qio120=QIO 120MHz
m5stack-atoms3.menu.FlashMode.qio120.build.flash_mode=dio
m5stack-atoms3.menu.FlashMode.qio120.build.boot=qio
m5stack-atoms3.menu.FlashMode.qio120.build.boot_freq=120m
m5stack-atoms3.menu.FlashMode.qio120.build.flash_freq=80m
m5stack-atoms3.menu.FlashMode.dio=DIO 80MHz
m5stack-atoms3.menu.FlashMode.dio.build.flash_mode=dio
m5stack-atoms3.menu.FlashMode.dio.build.boot=dio
m5stack-atoms3.menu.FlashMode.dio.build.boot_freq=80m
m5stack-atoms3.menu.FlashMode.dio.build.flash_freq=80m
m5stack-atoms3.menu.FlashMode.opi=OPI 80MHz
m5stack-atoms3.menu.FlashMode.opi.build.flash_mode=dout
m5stack-atoms3.menu.FlashMode.opi.build.boot=opi
m5stack-atoms3.menu.FlashMode.opi.build.boot_freq=80m
m5stack-atoms3.menu.FlashMode.opi.build.flash_freq=80m
m5stack-atoms3.menu.FlashSize.4M=4MB (32Mb)
m5stack-atoms3.menu.FlashSize.4M.build.flash_size=4MB
m5stack-atoms3.menu.FlashSize.8M=8MB (64Mb)
m5stack-atoms3.menu.FlashSize.8M.build.flash_size=8MB
m5stack-atoms3.menu.FlashSize.8M.build.partitions=default_8MB
m5stack-atoms3.menu.FlashSize.16M=16MB (128Mb)
m5stack-atoms3.menu.FlashSize.16M.build.flash_size=16MB
#m5stack-atoms3.menu.FlashSize.32M=32MB (256Mb)
#m5stack-atoms3.menu.FlashSize.32M.build.flash_size=32MB
m5stack-atoms3.menu.LoopCore.1=Core 1
m5stack-atoms3.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
m5stack-atoms3.menu.LoopCore.0=Core 0
m5stack-atoms3.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
m5stack-atoms3.menu.EventsCore.1=Core 1
m5stack-atoms3.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
m5stack-atoms3.menu.EventsCore.0=Core 0
m5stack-atoms3.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
m5stack-atoms3.menu.USBMode.hwcdc=Hardware CDC and JTAG
m5stack-atoms3.menu.USBMode.hwcdc.build.usb_mode=1
m5stack-atoms3.menu.USBMode.default=USB-OTG (TinyUSB)
m5stack-atoms3.menu.USBMode.default.build.usb_mode=0
m5stack-atoms3.menu.CDCOnBoot.default=Disabled
m5stack-atoms3.menu.CDCOnBoot.default.build.cdc_on_boot=0
m5stack-atoms3.menu.CDCOnBoot.cdc=Enabled
m5stack-atoms3.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
m5stack-atoms3.menu.MSCOnBoot.default=Disabled
m5stack-atoms3.menu.MSCOnBoot.default.build.msc_on_boot=0
m5stack-atoms3.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
m5stack-atoms3.menu.MSCOnBoot.msc.build.msc_on_boot=1
m5stack-atoms3.menu.DFUOnBoot.default=Disabled
m5stack-atoms3.menu.DFUOnBoot.default.build.dfu_on_boot=0
m5stack-atoms3.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
m5stack-atoms3.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
m5stack-atoms3.menu.UploadMode.default=UART0 / Hardware CDC
m5stack-atoms3.menu.UploadMode.default.upload.use_1200bps_touch=false
m5stack-atoms3.menu.UploadMode.default.upload.wait_for_upload_port=false
m5stack-atoms3.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
m5stack-atoms3.menu.UploadMode.cdc.upload.use_1200bps_touch=true
m5stack-atoms3.menu.UploadMode.cdc.upload.wait_for_upload_port=true
m5stack-atoms3.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
m5stack-atoms3.menu.PartitionScheme.default.build.partitions=default
m5stack-atoms3.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
m5stack-atoms3.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
m5stack-atoms3.menu.PartitionScheme.default_8MB=8M with spiffs (3MB APP/1.5MB SPIFFS)
m5stack-atoms3.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
m5stack-atoms3.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
m5stack-atoms3.menu.CPUFreq.240=240MHz (WiFi)
m5stack-atoms3.menu.CPUFreq.240.build.f_cpu=240000000L
m5stack-atoms3.menu.CPUFreq.160=160MHz (WiFi)
m5stack-atoms3.menu.CPUFreq.160.build.f_cpu=160000000L
m5stack-atoms3.menu.CPUFreq.80=80MHz (WiFi)
m5stack-atoms3.menu.CPUFreq.80.build.f_cpu=80000000L
m5stack-atoms3.menu.CPUFreq.40=40MHz
m5stack-atoms3.menu.CPUFreq.40.build.f_cpu=40000000L
m5stack-atoms3.menu.CPUFreq.20=20MHz
m5stack-atoms3.menu.CPUFreq.20.build.f_cpu=20000000L
m5stack-atoms3.menu.CPUFreq.10=10MHz
m5stack-atoms3.menu.CPUFreq.10.build.f_cpu=10000000L
m5stack-atoms3.menu.UploadSpeed.921600=921600
m5stack-atoms3.menu.UploadSpeed.921600.upload.speed=921600
m5stack-atoms3.menu.UploadSpeed.115200=115200
m5stack-atoms3.menu.UploadSpeed.115200.upload.speed=115200
m5stack-atoms3.menu.UploadSpeed.256000.windows=256000
m5stack-atoms3.menu.UploadSpeed.256000.upload.speed=256000
m5stack-atoms3.menu.UploadSpeed.230400.windows.upload.speed=256000
m5stack-atoms3.menu.UploadSpeed.230400=230400
m5stack-atoms3.menu.UploadSpeed.230400.upload.speed=230400
m5stack-atoms3.menu.UploadSpeed.460800.linux=460800
m5stack-atoms3.menu.UploadSpeed.460800.macosx=460800
m5stack-atoms3.menu.UploadSpeed.460800.upload.speed=460800
m5stack-atoms3.menu.UploadSpeed.512000.windows=512000
m5stack-atoms3.menu.UploadSpeed.512000.upload.speed=512000
m5stack-atoms3.menu.DebugLevel.none=None
m5stack-atoms3.menu.DebugLevel.none.build.code_debug=0
m5stack-atoms3.menu.DebugLevel.error=Error
m5stack-atoms3.menu.DebugLevel.error.build.code_debug=1
m5stack-atoms3.menu.DebugLevel.warn=Warn
m5stack-atoms3.menu.DebugLevel.warn.build.code_debug=2
m5stack-atoms3.menu.DebugLevel.info=Info
m5stack-atoms3.menu.DebugLevel.info.build.code_debug=3
m5stack-atoms3.menu.DebugLevel.debug=Debug
m5stack-atoms3.menu.DebugLevel.debug.build.code_debug=4
m5stack-atoms3.menu.DebugLevel.verbose=Verbose
m5stack-atoms3.menu.DebugLevel.verbose.build.code_debug=5
m5stack-atoms3.menu.EraseFlash.none=Disabled
m5stack-atoms3.menu.EraseFlash.none.upload.erase_cmd=
m5stack-atoms3.menu.EraseFlash.all=Enabled
m5stack-atoms3.menu.EraseFlash.all.upload.erase_cmd=-e
##############################################################
m5stack-core2.name=M5Stack-Core2
m5stack-core2.bootloader.tool=esptool_py
......
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#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
// Some boards have too low voltage on this pin (board design bug)
// Use different pin with 3V and connect with 48
// and change this setup for the chosen pin (for example 38)
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48;
#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 TXD2 = 1;
static const uint8_t RXD2 = 2;
static const uint8_t SDA = 38;
static const uint8_t SCL = 39;
static const uint8_t SS = 15;
static const uint8_t MOSI = 21;
static const uint8_t MISO = -1;
static const uint8_t SCK = 17;
static const uint8_t G0 = 0;
static const uint8_t G1 = 1;
static const uint8_t G2 = 2;
static const uint8_t G3 = 3;
static const uint8_t G4 = 4;
static const uint8_t G5 = 5;
static const uint8_t G6 = 6;
static const uint8_t G7 = 7;
static const uint8_t G8 = 8;
static const uint8_t G36 = 36;
static const uint8_t G37 = 37;
static const uint8_t G38 = 38;
static const uint8_t G39 = 39;
static const uint8_t G40 = 40;
static const uint8_t G42 = 42;
static const uint8_t ADC1 = 7;
static const uint8_t ADC2 = 8;
#endif /* Pins_Arduino_h */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment