From 440e2de9bedb722987288c8945f3f836f8e23817 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Mon, 20 Jul 2020 12:35:10 +1000 Subject: [PATCH 1/6] Added UM FeatherS2 and UM ProS2 boards to boards.txt Updated the name of TinyPICO to UM TinyPICO in boards.txt --- boards.txt | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 289 insertions(+), 1 deletion(-) diff --git a/boards.txt b/boards.txt index 0b48f9faef4..77b8b9b5520 100644 --- a/boards.txt +++ b/boards.txt @@ -470,7 +470,7 @@ pico32.menu.DebugLevel.verbose=Verbose pico32.menu.DebugLevel.verbose.build.code_debug=5 ############################################################## -tinypico.name=TinyPICO +tinypico.name=UM TinyPICO tinypico.upload.tool=esptool_py tinypico.upload.maximum_size=1310720 @@ -547,6 +547,294 @@ tinypico.menu.DebugLevel.debug.build.code_debug=4 tinypico.menu.DebugLevel.verbose=Verbose tinypico.menu.DebugLevel.verbose.build.code_debug=5 +############################################################## +feathers2.name=UM FeatherS2 + +feathers2.upload.tool=esptool_py +feathers2.upload.maximum_size=1310720 +feathers2.upload.maximum_data_size=327680 +feathers2.upload.flags= + +feathers2.serial.disableDTR=true +feathers2.serial.disableRTS=true + +feathers2.build.mcu=esp32s2 +feathers2.build.core=esp32 +feathers2.build.variant=esp32s2 +feathers2.build.board=FEATHERS2 + +feathers2.build.f_cpu=240000000L +feathers2.build.flash_size=16MB +feathers2.build.flash_freq=80m +feathers2.build.flash_mode=qio +feathers2.build.boot=qio +feathers2.build.partitions=fatflash +feathers2.build.defines= + +feathers2.menu.PSRAM.enabled=Enabled +feathers2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +feathers2.menu.PSRAM.disabled=Disabled +feathers2.menu.PSRAM.disabled.build.defines= + +feathers2.menu.UploadMode.cdc=USB CDC +feathers2.menu.UploadMode.cdc.upload.flags=--no-stub +feathers2.menu.UploadMode.cdc.upload.tool=esptool_py +feathers2.menu.UploadMode.cdc.serial.disableDTR=false +feathers2.menu.UploadMode.cdc.serial.disableRTS=false +feathers2.menu.UploadMode.default=Default Uart - External +feathers2.menu.UploadMode.default.upload.flags= +feathers2.menu.UploadMode.default.upload.tool=esptool_py +feathers2.menu.UploadMode.default.serial.disableDTR=true +feathers2.menu.UploadMode.default.serial.disableRTS=true + +feathers2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) +feathers2.menu.PartitionScheme.fatflash.build.partitions=ffat +feathers2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +feathers2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS) +feathers2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +feathers2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +feathers2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +feathers2.menu.PartitionScheme.default.build.partitions=default +feathers2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +feathers2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +feathers2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) +feathers2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +feathers2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +feathers2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +feathers2.menu.PartitionScheme.minimal.build.partitions=minimal +feathers2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +feathers2.menu.PartitionScheme.no_ota.build.partitions=no_ota +feathers2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +feathers2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +feathers2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +feathers2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +feathers2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +feathers2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +feathers2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +feathers2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +feathers2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +feathers2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +feathers2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +feathers2.menu.PartitionScheme.huge_app.build.partitions=huge_app +feathers2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +feathers2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +feathers2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +feathers2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +feathers2.menu.CPUFreq.240=240MHz (WiFi) +feathers2.menu.CPUFreq.240.build.f_cpu=240000000L +feathers2.menu.CPUFreq.160=160MHz (WiFi) +feathers2.menu.CPUFreq.160.build.f_cpu=160000000L +feathers2.menu.CPUFreq.80=80MHz (WiFi) +feathers2.menu.CPUFreq.80.build.f_cpu=80000000L +feathers2.menu.CPUFreq.40=40MHz +feathers2.menu.CPUFreq.40.build.f_cpu=40000000L +feathers2.menu.CPUFreq.20=20MHz +feathers2.menu.CPUFreq.20.build.f_cpu=20000000L +feathers2.menu.CPUFreq.10=10MHz +feathers2.menu.CPUFreq.10.build.f_cpu=10000000L + +feathers2.menu.FlashMode.qio=QIO +feathers2.menu.FlashMode.qio.build.flash_mode=dio +feathers2.menu.FlashMode.qio.build.boot=qio +feathers2.menu.FlashMode.dio=DIO +feathers2.menu.FlashMode.dio.build.flash_mode=dio +feathers2.menu.FlashMode.dio.build.boot=dio +feathers2.menu.FlashMode.qout=QOUT +feathers2.menu.FlashMode.qout.build.flash_mode=dout +feathers2.menu.FlashMode.qout.build.boot=qout +feathers2.menu.FlashMode.dout=DOUT +feathers2.menu.FlashMode.dout.build.flash_mode=dout +feathers2.menu.FlashMode.dout.build.boot=dout + +feathers2.menu.FlashFreq.80=80MHz +feathers2.menu.FlashFreq.80.build.flash_freq=80m +feathers2.menu.FlashFreq.40=40MHz +feathers2.menu.FlashFreq.40.build.flash_freq=40m + +feathers2.menu.FlashSize.16M=16MB (128Mb) +feathers2.menu.FlashSize.16M.build.flash_size=16MB +feathers2.menu.FlashSize.4M=4MB (32Mb) +feathers2.menu.FlashSize.4M.build.flash_size=4MB +feathers2.menu.FlashSize.8M=8MB (64Mb) +feathers2.menu.FlashSize.8M.build.flash_size=8MB +feathers2.menu.FlashSize.8M.build.partitions=default_8MB +feathers2.menu.FlashSize.2M=2MB (16Mb) +feathers2.menu.FlashSize.2M.build.flash_size=2MB +feathers2.menu.FlashSize.2M.build.partitions=minimal + +feathers2.menu.UploadSpeed.921600=921600 +feathers2.menu.UploadSpeed.921600.upload.speed=921600 +feathers2.menu.UploadSpeed.115200=115200 +feathers2.menu.UploadSpeed.115200.upload.speed=115200 +feathers2.menu.UploadSpeed.256000.windows=256000 +feathers2.menu.UploadSpeed.256000.upload.speed=256000 +feathers2.menu.UploadSpeed.230400.windows.upload.speed=256000 +feathers2.menu.UploadSpeed.230400=230400 +feathers2.menu.UploadSpeed.230400.upload.speed=230400 +feathers2.menu.UploadSpeed.460800.linux=460800 +feathers2.menu.UploadSpeed.460800.macosx=460800 +feathers2.menu.UploadSpeed.460800.upload.speed=460800 +feathers2.menu.UploadSpeed.512000.windows=512000 +feathers2.menu.UploadSpeed.512000.upload.speed=512000 + +feathers2.menu.DebugLevel.none=None +feathers2.menu.DebugLevel.none.build.code_debug=0 +feathers2.menu.DebugLevel.error=Error +feathers2.menu.DebugLevel.error.build.code_debug=1 +feathers2.menu.DebugLevel.warn=Warn +feathers2.menu.DebugLevel.warn.build.code_debug=2 +feathers2.menu.DebugLevel.info=Info +feathers2.menu.DebugLevel.info.build.code_debug=3 +feathers2.menu.DebugLevel.debug=Debug +feathers2.menu.DebugLevel.debug.build.code_debug=4 +feathers2.menu.DebugLevel.verbose=Verbose +feathers2.menu.DebugLevel.verbose.build.code_debug=5 + +############################################################## +pros2.name=UM ProS2 + +pros2.upload.tool=esptool_py +pros2.upload.maximum_size=1310720 +pros2.upload.maximum_data_size=327680 +pros2.upload.flags= + +pros2.serial.disableDTR=true +pros2.serial.disableRTS=true + +pros2.build.mcu=esp32s2 +pros2.build.core=esp32 +pros2.build.variant=esp32s2 +pros2.build.board=PROS2 + +pros2.build.f_cpu=240000000L +pros2.build.flash_size=16MB +pros2.build.flash_freq=80m +pros2.build.flash_mode=qio +pros2.build.boot=qio +pros2.build.partitions=fatflash +pros2.build.defines= + +pros2.menu.PSRAM.enabled=Enabled +pros2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM +pros2.menu.PSRAM.disabled=Disabled +pros2.menu.PSRAM.disabled.build.defines= + +pros2.menu.UploadMode.cdc=USB CDC +pros2.menu.UploadMode.cdc.upload.flags=--no-stub +pros2.menu.UploadMode.cdc.upload.tool=esptool_py +pros2.menu.UploadMode.cdc.serial.disableDTR=false +pros2.menu.UploadMode.cdc.serial.disableRTS=false +pros2.menu.UploadMode.default=Default Uart - External +pros2.menu.UploadMode.default.upload.flags= +pros2.menu.UploadMode.default.upload.tool=esptool_py +pros2.menu.UploadMode.default.serial.disableDTR=true +pros2.menu.UploadMode.default.serial.disableRTS=true + +pros2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT) +pros2.menu.PartitionScheme.fatflash.build.partitions=ffat +pros2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152 +pros2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS) +pros2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB +pros2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728 +pros2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) +pros2.menu.PartitionScheme.default.build.partitions=default +pros2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS) +pros2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat +pros2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT) +pros2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB +pros2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336 +pros2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS) +pros2.menu.PartitionScheme.minimal.build.partitions=minimal +pros2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS) +pros2.menu.PartitionScheme.no_ota.build.partitions=no_ota +pros2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152 +pros2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS) +pros2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g +pros2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576 +pros2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS) +pros2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat +pros2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152 +pros2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS) +pros2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat +pros2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576 +pros2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS) +pros2.menu.PartitionScheme.huge_app.build.partitions=huge_app +pros2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728 +pros2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS) +pros2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs +pros2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080 + +pros2.menu.CPUFreq.240=240MHz (WiFi) +pros2.menu.CPUFreq.240.build.f_cpu=240000000L +pros2.menu.CPUFreq.160=160MHz (WiFi) +pros2.menu.CPUFreq.160.build.f_cpu=160000000L +pros2.menu.CPUFreq.80=80MHz (WiFi) +pros2.menu.CPUFreq.80.build.f_cpu=80000000L +pros2.menu.CPUFreq.40=40MHz +pros2.menu.CPUFreq.40.build.f_cpu=40000000L +pros2.menu.CPUFreq.20=20MHz +pros2.menu.CPUFreq.20.build.f_cpu=20000000L +pros2.menu.CPUFreq.10=10MHz +pros2.menu.CPUFreq.10.build.f_cpu=10000000L + +pros2.menu.FlashMode.qio=QIO +pros2.menu.FlashMode.qio.build.flash_mode=dio +pros2.menu.FlashMode.qio.build.boot=qio +pros2.menu.FlashMode.dio=DIO +pros2.menu.FlashMode.dio.build.flash_mode=dio +pros2.menu.FlashMode.dio.build.boot=dio +pros2.menu.FlashMode.qout=QOUT +pros2.menu.FlashMode.qout.build.flash_mode=dout +pros2.menu.FlashMode.qout.build.boot=qout +pros2.menu.FlashMode.dout=DOUT +pros2.menu.FlashMode.dout.build.flash_mode=dout +pros2.menu.FlashMode.dout.build.boot=dout + +pros2.menu.FlashFreq.80=80MHz +pros2.menu.FlashFreq.80.build.flash_freq=80m +pros2.menu.FlashFreq.40=40MHz +pros2.menu.FlashFreq.40.build.flash_freq=40m + +pros2.menu.FlashSize.16M=16MB (128Mb) +pros2.menu.FlashSize.16M.build.flash_size=16MB +pros2.menu.FlashSize.4M=4MB (32Mb) +pros2.menu.FlashSize.4M.build.flash_size=4MB +pros2.menu.FlashSize.8M=8MB (64Mb) +pros2.menu.FlashSize.8M.build.flash_size=8MB +pros2.menu.FlashSize.8M.build.partitions=default_8MB +pros2.menu.FlashSize.2M=2MB (16Mb) +pros2.menu.FlashSize.2M.build.flash_size=2MB +pros2.menu.FlashSize.2M.build.partitions=minimal + +pros2.menu.UploadSpeed.921600=921600 +pros2.menu.UploadSpeed.921600.upload.speed=921600 +pros2.menu.UploadSpeed.115200=115200 +pros2.menu.UploadSpeed.115200.upload.speed=115200 +pros2.menu.UploadSpeed.256000.windows=256000 +pros2.menu.UploadSpeed.256000.upload.speed=256000 +pros2.menu.UploadSpeed.230400.windows.upload.speed=256000 +pros2.menu.UploadSpeed.230400=230400 +pros2.menu.UploadSpeed.230400.upload.speed=230400 +pros2.menu.UploadSpeed.460800.linux=460800 +pros2.menu.UploadSpeed.460800.macosx=460800 +pros2.menu.UploadSpeed.460800.upload.speed=460800 +pros2.menu.UploadSpeed.512000.windows=512000 +pros2.menu.UploadSpeed.512000.upload.speed=512000 + +pros2.menu.DebugLevel.none=None +pros2.menu.DebugLevel.none.build.code_debug=0 +pros2.menu.DebugLevel.error=Error +pros2.menu.DebugLevel.error.build.code_debug=1 +pros2.menu.DebugLevel.warn=Warn +pros2.menu.DebugLevel.warn.build.code_debug=2 +pros2.menu.DebugLevel.info=Info +pros2.menu.DebugLevel.info.build.code_debug=3 +pros2.menu.DebugLevel.debug=Debug +pros2.menu.DebugLevel.debug.build.code_debug=4 +pros2.menu.DebugLevel.verbose=Verbose +pros2.menu.DebugLevel.verbose.build.code_debug=5 + ############################################################## magicbit.name=MagicBit From 67ca19919ba354dfa98fb04e06c6d1268f03574c Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Wed, 22 Jul 2020 20:48:59 +1000 Subject: [PATCH 2/6] Added VID/PID/Product names for TinyPICO, ProS2 & FeatherS2 Setup variant folders for each board --- boards.txt | 10 ++- variants/um_feathers2/pins_arduino.h | 77 +++++++++++++++++++ variants/um_pros2/pins_arduino.h | 77 +++++++++++++++++++ .../{tinypico => um_tinypico}/pins_arduino.h | 2 + 4 files changed, 163 insertions(+), 3 deletions(-) create mode 100644 variants/um_feathers2/pins_arduino.h create mode 100644 variants/um_pros2/pins_arduino.h rename variants/{tinypico => um_tinypico}/pins_arduino.h (96%) diff --git a/boards.txt b/boards.txt index 77b8b9b5520..bb763b09910 100644 --- a/boards.txt +++ b/boards.txt @@ -482,7 +482,7 @@ tinypico.serial.disableRTS=true tinypico.build.mcu=esp32 tinypico.build.core=esp32 -tinypico.build.variant=pico32 +tinypico.build.variant=um_tinypico tinypico.build.board=TINYPICO tinypico.build.f_cpu=240000000L @@ -549,6 +549,8 @@ tinypico.menu.DebugLevel.verbose.build.code_debug=5 ############################################################## feathers2.name=UM FeatherS2 +feathers2.vid.0=0x239A +feathers2.pid.0=0x80AB feathers2.upload.tool=esptool_py feathers2.upload.maximum_size=1310720 @@ -560,7 +562,7 @@ feathers2.serial.disableRTS=true feathers2.build.mcu=esp32s2 feathers2.build.core=esp32 -feathers2.build.variant=esp32s2 +feathers2.build.variant=um_feathers2 feathers2.build.board=FEATHERS2 feathers2.build.f_cpu=240000000L @@ -693,6 +695,8 @@ feathers2.menu.DebugLevel.verbose.build.code_debug=5 ############################################################## pros2.name=UM ProS2 +pros2.vid.0=0x239A +pros2.pid.0=0x80A9 pros2.upload.tool=esptool_py pros2.upload.maximum_size=1310720 @@ -704,7 +708,7 @@ pros2.serial.disableRTS=true pros2.build.mcu=esp32s2 pros2.build.core=esp32 -pros2.build.variant=esp32s2 +pros2.build.variant=um_pros2 pros2.build.board=PROS2 pros2.build.f_cpu=240000000L diff --git a/variants/um_feathers2/pins_arduino.h b/variants/um_feathers2/pins_arduino.h new file mode 100644 index 00000000000..93998f5aa9c --- /dev/null +++ b/variants/um_feathers2/pins_arduino.h @@ -0,0 +1,77 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x239A +#define USB_PID 0x80AB +#define USB_MANUFACTURER "Unexpected Maker" +#define USB_PRODUCT "FeatherS2" +#define USB_SERIAL "" + +#define EXTERNAL_NUM_INTERRUPTS 46 +#define NUM_DIGITAL_PINS 48 +#define NUM_ANALOG_INPUTS 20 + +#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(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 = 8; +static const uint8_t SCL = 9; + +static const uint8_t SS = 34; +static const uint8_t MOSI = 35; +static const uint8_t MISO = 37; +static const uint8_t SDO = 35; +static const uint8_t SDI = 37; +static const uint8_t SCK = 36; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +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 A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +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; + +static const uint8_t DAC1 = 17; +static const uint8_t DAC2 = 18; + +static const uint8_t LDO_2_POWER = 21; + +static const uint8_t APA_DATA = 40; +static const uint8_t APA_CLK = 45; + +#endif /* Pins_Arduino_h */ diff --git a/variants/um_pros2/pins_arduino.h b/variants/um_pros2/pins_arduino.h new file mode 100644 index 00000000000..a793a6b3768 --- /dev/null +++ b/variants/um_pros2/pins_arduino.h @@ -0,0 +1,77 @@ +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +#define USB_VID 0x239A +#define USB_PID 0x80A9 +#define USB_MANUFACTURER "Unexpected Maker" +#define USB_PRODUCT "ProS2" +#define USB_SERIAL "" + +#define EXTERNAL_NUM_INTERRUPTS 46 +#define NUM_DIGITAL_PINS 48 +#define NUM_ANALOG_INPUTS 20 + +#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(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 = 8; +static const uint8_t SCL = 9; + +static const uint8_t SS = 34; +static const uint8_t MOSI = 35; +static const uint8_t MISO = 37; +static const uint8_t SDO = 35; +static const uint8_t SDI = 37; +static const uint8_t SCK = 36; + +static const uint8_t A0 = 1; +static const uint8_t A1 = 2; +static const uint8_t A2 = 3; +static const uint8_t A3 = 4; +static const uint8_t A4 = 5; +static const uint8_t A5 = 6; +static const uint8_t A6 = 7; +static const uint8_t A7 = 8; +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 A14 = 15; +static const uint8_t A15 = 16; +static const uint8_t A16 = 17; +static const uint8_t A17 = 18; +static const uint8_t A18 = 19; +static const uint8_t A19 = 20; + +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; + +static const uint8_t DAC1 = 17; +static const uint8_t DAC2 = 18; + +static const uint8_t LDO_2_POWER = 21; + +static const uint8_t APA_DATA = 40; +static const uint8_t APA_CLK = 45; + +#endif /* Pins_Arduino_h */ diff --git a/variants/tinypico/pins_arduino.h b/variants/um_tinypico/pins_arduino.h similarity index 96% rename from variants/tinypico/pins_arduino.h rename to variants/um_tinypico/pins_arduino.h index 617cd9bf92c..01287cb6c60 100644 --- a/variants/tinypico/pins_arduino.h +++ b/variants/um_tinypico/pins_arduino.h @@ -20,6 +20,8 @@ static const uint8_t SCL = 22; static const uint8_t SS = 5; static const uint8_t MOSI = 23; static const uint8_t MISO = 19; +static const uint8_t SDO = 23; +static const uint8_t SDI = 19; static const uint8_t SCK = 18; static const uint8_t A0 = 36; From 9f6a73da3d087d3c1951a624d744a0ab4a9d783e Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 23 Jul 2020 07:18:01 +1000 Subject: [PATCH 3/6] Removed unneeded stuff from FeatherS2 & ProS2 menu options --- boards.txt | 45 +++------------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/boards.txt b/boards.txt index bb763b09910..f13dcc6c89b 100644 --- a/boards.txt +++ b/boards.txt @@ -568,7 +568,7 @@ feathers2.build.board=FEATHERS2 feathers2.build.f_cpu=240000000L feathers2.build.flash_size=16MB feathers2.build.flash_freq=80m -feathers2.build.flash_mode=qio +feathers2.build.flash_mode=dio feathers2.build.boot=qio feathers2.build.partitions=fatflash feathers2.build.defines= @@ -636,24 +636,6 @@ feathers2.menu.CPUFreq.20.build.f_cpu=20000000L feathers2.menu.CPUFreq.10=10MHz feathers2.menu.CPUFreq.10.build.f_cpu=10000000L -feathers2.menu.FlashMode.qio=QIO -feathers2.menu.FlashMode.qio.build.flash_mode=dio -feathers2.menu.FlashMode.qio.build.boot=qio -feathers2.menu.FlashMode.dio=DIO -feathers2.menu.FlashMode.dio.build.flash_mode=dio -feathers2.menu.FlashMode.dio.build.boot=dio -feathers2.menu.FlashMode.qout=QOUT -feathers2.menu.FlashMode.qout.build.flash_mode=dout -feathers2.menu.FlashMode.qout.build.boot=qout -feathers2.menu.FlashMode.dout=DOUT -feathers2.menu.FlashMode.dout.build.flash_mode=dout -feathers2.menu.FlashMode.dout.build.boot=dout - -feathers2.menu.FlashFreq.80=80MHz -feathers2.menu.FlashFreq.80.build.flash_freq=80m -feathers2.menu.FlashFreq.40=40MHz -feathers2.menu.FlashFreq.40.build.flash_freq=40m - feathers2.menu.FlashSize.16M=16MB (128Mb) feathers2.menu.FlashSize.16M.build.flash_size=16MB feathers2.menu.FlashSize.4M=4MB (32Mb) @@ -677,8 +659,6 @@ feathers2.menu.UploadSpeed.230400.upload.speed=230400 feathers2.menu.UploadSpeed.460800.linux=460800 feathers2.menu.UploadSpeed.460800.macosx=460800 feathers2.menu.UploadSpeed.460800.upload.speed=460800 -feathers2.menu.UploadSpeed.512000.windows=512000 -feathers2.menu.UploadSpeed.512000.upload.speed=512000 feathers2.menu.DebugLevel.none=None feathers2.menu.DebugLevel.none.build.code_debug=0 @@ -714,7 +694,7 @@ pros2.build.board=PROS2 pros2.build.f_cpu=240000000L pros2.build.flash_size=16MB pros2.build.flash_freq=80m -pros2.build.flash_mode=qio +pros2.build.flash_mode=dio pros2.build.boot=qio pros2.build.partitions=fatflash pros2.build.defines= @@ -782,24 +762,6 @@ pros2.menu.CPUFreq.20.build.f_cpu=20000000L pros2.menu.CPUFreq.10=10MHz pros2.menu.CPUFreq.10.build.f_cpu=10000000L -pros2.menu.FlashMode.qio=QIO -pros2.menu.FlashMode.qio.build.flash_mode=dio -pros2.menu.FlashMode.qio.build.boot=qio -pros2.menu.FlashMode.dio=DIO -pros2.menu.FlashMode.dio.build.flash_mode=dio -pros2.menu.FlashMode.dio.build.boot=dio -pros2.menu.FlashMode.qout=QOUT -pros2.menu.FlashMode.qout.build.flash_mode=dout -pros2.menu.FlashMode.qout.build.boot=qout -pros2.menu.FlashMode.dout=DOUT -pros2.menu.FlashMode.dout.build.flash_mode=dout -pros2.menu.FlashMode.dout.build.boot=dout - -pros2.menu.FlashFreq.80=80MHz -pros2.menu.FlashFreq.80.build.flash_freq=80m -pros2.menu.FlashFreq.40=40MHz -pros2.menu.FlashFreq.40.build.flash_freq=40m - pros2.menu.FlashSize.16M=16MB (128Mb) pros2.menu.FlashSize.16M.build.flash_size=16MB pros2.menu.FlashSize.4M=4MB (32Mb) @@ -823,8 +785,7 @@ pros2.menu.UploadSpeed.230400.upload.speed=230400 pros2.menu.UploadSpeed.460800.linux=460800 pros2.menu.UploadSpeed.460800.macosx=460800 pros2.menu.UploadSpeed.460800.upload.speed=460800 -pros2.menu.UploadSpeed.512000.windows=512000 -pros2.menu.UploadSpeed.512000.upload.speed=512000 + pros2.menu.DebugLevel.none=None pros2.menu.DebugLevel.none.build.code_debug=0 From e83ed6a1e2564d0a560a3d25b13f6306ea0af306 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 23 Jul 2020 08:11:58 +1000 Subject: [PATCH 4/6] Added Serial CDC output default for FeatherS2 and ProS2 --- boards.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/boards.txt b/boards.txt index f13dcc6c89b..422cf720808 100644 --- a/boards.txt +++ b/boards.txt @@ -573,6 +573,11 @@ feathers2.build.boot=qio feathers2.build.partitions=fatflash feathers2.build.defines= +feathers2.menu.SerialMode.cdc=USB CDC +feathers2.menu.SerialMode.cdc.build.serial=1 +feathers2.menu.SerialMode.default=UART0 +feathers2.menu.SerialMode.default.build.serial=0 + feathers2.menu.PSRAM.enabled=Enabled feathers2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM feathers2.menu.PSRAM.disabled=Disabled @@ -699,6 +704,11 @@ pros2.build.boot=qio pros2.build.partitions=fatflash pros2.build.defines= +pros2.menu.SerialMode.cdc=USB CDC +pros2.menu.SerialMode.cdc.build.serial=1 +pros2.menu.SerialMode.default=UART0 +pros2.menu.SerialMode.default.build.serial=0 + pros2.menu.PSRAM.enabled=Enabled pros2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM pros2.menu.PSRAM.disabled=Disabled From 9ef54e747acf7dcf80565e77981dc83f6da84452 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 23 Jul 2020 07:18:01 +1000 Subject: [PATCH 5/6] Removed unneeded stuff from FeatherS2 & ProS2 menu options --- boards.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/boards.txt b/boards.txt index 422cf720808..28c8557de67 100644 --- a/boards.txt +++ b/boards.txt @@ -1,6 +1,5 @@ menu.UploadSpeed=Upload Speed menu.UploadMode=Upload Mode -menu.SerialMode=Serial Connected To menu.CPUFreq=CPU Frequency menu.FlashFreq=Flash Frequency menu.FlashMode=Flash Mode @@ -40,11 +39,6 @@ esp32s2.build.boot=qio esp32s2.build.partitions=default esp32s2.build.defines= -esp32s2.menu.SerialMode.default=UART0 -esp32s2.menu.SerialMode.default.build.serial=0 -esp32s2.menu.SerialMode.cdc=USB CDC -esp32s2.menu.SerialMode.cdc.build.serial=1 - esp32s2.menu.UploadMode.default=Default Uart esp32s2.menu.UploadMode.default.upload.flags= esp32s2.menu.UploadMode.default.upload.tool=esptool_py From 9a4243a17d24b61d9b3e91699990c8d03db824d7 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Thu, 23 Jul 2020 09:07:35 +1000 Subject: [PATCH 6/6] Rebase from upstream and fixed Serial Output settings for FeatherS2 and ProS2 --- boards.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/boards.txt b/boards.txt index 28c8557de67..db51f8ac79f 100644 --- a/boards.txt +++ b/boards.txt @@ -1,5 +1,6 @@ menu.UploadSpeed=Upload Speed menu.UploadMode=Upload Mode +menu.SerialMode=Serial Connected To menu.CPUFreq=CPU Frequency menu.FlashFreq=Flash Frequency menu.FlashMode=Flash Mode @@ -39,6 +40,11 @@ esp32s2.build.boot=qio esp32s2.build.partitions=default esp32s2.build.defines= +esp32s2.menu.SerialMode.default=UART0 +esp32s2.menu.SerialMode.default.build.serial=0 +esp32s2.menu.SerialMode.cdc=USB CDC +esp32s2.menu.SerialMode.cdc.build.serial=1 + esp32s2.menu.UploadMode.default=Default Uart esp32s2.menu.UploadMode.default.upload.flags= esp32s2.menu.UploadMode.default.upload.tool=esptool_py @@ -559,6 +565,7 @@ feathers2.build.core=esp32 feathers2.build.variant=um_feathers2 feathers2.build.board=FEATHERS2 +feathers2.build.serial=1 feathers2.build.f_cpu=240000000L feathers2.build.flash_size=16MB feathers2.build.flash_freq=80m @@ -690,6 +697,7 @@ pros2.build.core=esp32 pros2.build.variant=um_pros2 pros2.build.board=PROS2 +pros2.build.serial=1 pros2.build.f_cpu=240000000L pros2.build.flash_size=16MB pros2.build.flash_freq=80m