Skip to content

Commit 929cf2c

Browse files
authored
Add ATMegaZero ESP32-S2 microcontroller (espressif#5569)
## Summary Adds support for the new ATMegaZero ESP32-S2 board. Adds the relevant section to `boards.txt` and adds the folder for the `atmegazero-esp32s2` with the proper `pins_arduino.h` to the `variants` folder. ## Impact Allows users to compile code properly for the ATMegaZero ESP32-S2 without having to use a similar board and manually entering pin numbers. ## Links [ATMegaZero ESP32-S2](https://atmegazero.com/#/atmegazero_esp32s2_overview) Thanks!
1 parent 8785335 commit 929cf2c

File tree

5 files changed

+218
-0
lines changed

5 files changed

+218
-0
lines changed

Diff for: boards.txt

+148
Original file line numberDiff line numberDiff line change
@@ -9206,6 +9206,154 @@ esp32-trueverit-iot-driver-mkii.menu.DebugLevel.verbose.build.code_debug=5
92069206

92079207
##############################################################
92089208

9209+
atmegazero_esp32s2.name=ATMegaZero ESP32-S2
9210+
atmegazero_esp32s2.vid.0=0x239A
9211+
atmegazero_esp32s2.pid.0=0x800A
9212+
9213+
atmegazero_esp32s2.upload.tool=esptool_py
9214+
atmegazero_esp32s2.upload.maximum_size=1310720
9215+
atmegazero_esp32s2.upload.maximum_data_size=327680
9216+
atmegazero_esp32s2.upload.flags=
9217+
atmegazero_esp32s2.upload.extra_flags=0x2d0000 "{runtime.platform.path}/variants/{build.variant}/tinyuf2.bin"
9218+
atmegazero_esp32s2.upload.use_1200bps_touch=true
9219+
atmegazero_esp32s2.upload.wait_for_upload_port=true
9220+
9221+
atmegazero_esp32s2.serial.disableDTR=false
9222+
atmegazero_esp32s2.serial.disableRTS=false
9223+
9224+
atmegazero_esp32s2.build.tarch=xtensa
9225+
atmegazero_esp32s2.build.bootloader_addr=0x1000
9226+
atmegazero_esp32s2.build.target=esp32s2
9227+
atmegazero_esp32s2.build.mcu=esp32s2
9228+
atmegazero_esp32s2.build.core=esp32
9229+
atmegazero_esp32s2.build.variant=atmegazero_esp32s2
9230+
atmegazero_esp32s2.build.board=atmegazero_esp32s2
9231+
9232+
atmegazero_esp32s2.build.serial=0
9233+
atmegazero_esp32s2.build.f_cpu=240000000L
9234+
atmegazero_esp32s2.build.flash_size=4MB
9235+
atmegazero_esp32s2.build.flash_freq=80m
9236+
atmegazero_esp32s2.build.flash_mode=qio
9237+
atmegazero_esp32s2.build.boot=qio
9238+
atmegazero_esp32s2.build.partitions=default
9239+
atmegazero_esp32s2.build.defines=
9240+
9241+
atmegazero_esp32s2.menu.SerialMode.cdc=USB CDC
9242+
atmegazero_esp32s2.menu.SerialMode.cdc.build.serial=1
9243+
atmegazero_esp32s2.menu.SerialMode.default=UART0
9244+
atmegazero_esp32s2.menu.SerialMode.default.build.serial=0
9245+
9246+
atmegazero_esp32s2.menu.PSRAM.disabled=Disabled
9247+
atmegazero_esp32s2.menu.PSRAM.disabled.build.defines=
9248+
atmegazero_esp32s2.menu.PSRAM.enabled=Enabled
9249+
atmegazero_esp32s2.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
9250+
9251+
atmegazero_esp32s2.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
9252+
atmegazero_esp32s2.menu.PartitionScheme.default.build.partitions=default
9253+
atmegazero_esp32s2.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
9254+
atmegazero_esp32s2.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
9255+
atmegazero_esp32s2.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
9256+
atmegazero_esp32s2.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
9257+
atmegazero_esp32s2.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
9258+
atmegazero_esp32s2.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
9259+
atmegazero_esp32s2.menu.PartitionScheme.minimal.build.partitions=minimal
9260+
atmegazero_esp32s2.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
9261+
atmegazero_esp32s2.menu.PartitionScheme.no_ota.build.partitions=no_ota
9262+
atmegazero_esp32s2.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
9263+
atmegazero_esp32s2.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
9264+
atmegazero_esp32s2.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
9265+
atmegazero_esp32s2.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
9266+
atmegazero_esp32s2.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
9267+
atmegazero_esp32s2.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
9268+
atmegazero_esp32s2.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
9269+
atmegazero_esp32s2.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
9270+
atmegazero_esp32s2.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
9271+
atmegazero_esp32s2.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
9272+
atmegazero_esp32s2.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
9273+
atmegazero_esp32s2.menu.PartitionScheme.huge_app.build.partitions=huge_app
9274+
atmegazero_esp32s2.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
9275+
atmegazero_esp32s2.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
9276+
atmegazero_esp32s2.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
9277+
atmegazero_esp32s2.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
9278+
atmegazero_esp32s2.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
9279+
atmegazero_esp32s2.menu.PartitionScheme.fatflash.build.partitions=ffat
9280+
atmegazero_esp32s2.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
9281+
atmegazero_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
9282+
atmegazero_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
9283+
atmegazero_esp32s2.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
9284+
9285+
atmegazero_esp32s2.menu.CPUFreq.240=240MHz (WiFi)
9286+
atmegazero_esp32s2.menu.CPUFreq.240.build.f_cpu=240000000L
9287+
atmegazero_esp32s2.menu.CPUFreq.160=160MHz (WiFi)
9288+
atmegazero_esp32s2.menu.CPUFreq.160.build.f_cpu=160000000L
9289+
atmegazero_esp32s2.menu.CPUFreq.80=80MHz (WiFi)
9290+
atmegazero_esp32s2.menu.CPUFreq.80.build.f_cpu=80000000L
9291+
atmegazero_esp32s2.menu.CPUFreq.40=40MHz
9292+
atmegazero_esp32s2.menu.CPUFreq.40.build.f_cpu=40000000L
9293+
atmegazero_esp32s2.menu.CPUFreq.20=20MHz
9294+
atmegazero_esp32s2.menu.CPUFreq.20.build.f_cpu=20000000L
9295+
atmegazero_esp32s2.menu.CPUFreq.10=10MHz
9296+
atmegazero_esp32s2.menu.CPUFreq.10.build.f_cpu=10000000L
9297+
9298+
atmegazero_esp32s2.menu.FlashMode.qio=QIO
9299+
atmegazero_esp32s2.menu.FlashMode.qio.build.flash_mode=dio
9300+
atmegazero_esp32s2.menu.FlashMode.qio.build.boot=qio
9301+
atmegazero_esp32s2.menu.FlashMode.dio=DIO
9302+
atmegazero_esp32s2.menu.FlashMode.dio.build.flash_mode=dio
9303+
atmegazero_esp32s2.menu.FlashMode.dio.build.boot=dio
9304+
atmegazero_esp32s2.menu.FlashMode.qout=QOUT
9305+
atmegazero_esp32s2.menu.FlashMode.qout.build.flash_mode=dout
9306+
atmegazero_esp32s2.menu.FlashMode.qout.build.boot=qout
9307+
atmegazero_esp32s2.menu.FlashMode.dout=DOUT
9308+
atmegazero_esp32s2.menu.FlashMode.dout.build.flash_mode=dout
9309+
atmegazero_esp32s2.menu.FlashMode.dout.build.boot=dout
9310+
9311+
atmegazero_esp32s2.menu.FlashFreq.80=80MHz
9312+
atmegazero_esp32s2.menu.FlashFreq.80.build.flash_freq=80m
9313+
atmegazero_esp32s2.menu.FlashFreq.40=40MHz
9314+
atmegazero_esp32s2.menu.FlashFreq.40.build.flash_freq=40m
9315+
9316+
atmegazero_esp32s2.menu.FlashSize.4M=4MB (32Mb)
9317+
atmegazero_esp32s2.menu.FlashSize.4M.build.flash_size=4MB
9318+
atmegazero_esp32s2.menu.FlashSize.8M=8MB (64Mb)
9319+
atmegazero_esp32s2.menu.FlashSize.8M.build.flash_size=8MB
9320+
atmegazero_esp32s2.menu.FlashSize.8M.build.partitions=default_8MB
9321+
atmegazero_esp32s2.menu.FlashSize.2M=2MB (16Mb)
9322+
atmegazero_esp32s2.menu.FlashSize.2M.build.flash_size=2MB
9323+
atmegazero_esp32s2.menu.FlashSize.2M.build.partitions=minimal
9324+
atmegazero_esp32s2.menu.FlashSize.16M=16MB (128Mb)
9325+
atmegazero_esp32s2.menu.FlashSize.16M.build.flash_size=16MB
9326+
9327+
atmegazero_esp32s2.menu.UploadSpeed.921600=921600
9328+
atmegazero_esp32s2.menu.UploadSpeed.921600.upload.speed=921600
9329+
atmegazero_esp32s2.menu.UploadSpeed.115200=115200
9330+
atmegazero_esp32s2.menu.UploadSpeed.115200.upload.speed=115200
9331+
atmegazero_esp32s2.menu.UploadSpeed.256000.windows=256000
9332+
atmegazero_esp32s2.menu.UploadSpeed.256000.upload.speed=256000
9333+
atmegazero_esp32s2.menu.UploadSpeed.230400.windows.upload.speed=256000
9334+
atmegazero_esp32s2.menu.UploadSpeed.230400=230400
9335+
atmegazero_esp32s2.menu.UploadSpeed.230400.upload.speed=230400
9336+
atmegazero_esp32s2.menu.UploadSpeed.460800.linux=460800
9337+
atmegazero_esp32s2.menu.UploadSpeed.460800.macosx=460800
9338+
atmegazero_esp32s2.menu.UploadSpeed.460800.upload.speed=460800
9339+
atmegazero_esp32s2.menu.UploadSpeed.512000.windows=512000
9340+
atmegazero_esp32s2.menu.UploadSpeed.512000.upload.speed=512000
9341+
9342+
atmegazero_esp32s2.menu.DebugLevel.none=None
9343+
atmegazero_esp32s2.menu.DebugLevel.none.build.code_debug=0
9344+
atmegazero_esp32s2.menu.DebugLevel.error=Error
9345+
atmegazero_esp32s2.menu.DebugLevel.error.build.code_debug=1
9346+
atmegazero_esp32s2.menu.DebugLevel.warn=Warn
9347+
atmegazero_esp32s2.menu.DebugLevel.warn.build.code_debug=2
9348+
atmegazero_esp32s2.menu.DebugLevel.info=Info
9349+
atmegazero_esp32s2.menu.DebugLevel.info.build.code_debug=3
9350+
atmegazero_esp32s2.menu.DebugLevel.debug=Debug
9351+
atmegazero_esp32s2.menu.DebugLevel.debug.build.code_debug=4
9352+
atmegazero_esp32s2.menu.DebugLevel.verbose=Verbose
9353+
atmegazero_esp32s2.menu.DebugLevel.verbose.build.code_debug=5
9354+
9355+
##############################################################
9356+
92099357
deneyapmini.name=Deneyap Mini
92109358

92119359
deneyapmini.vid.0=0x303a

Diff for: variants/atmegazero_esp32s2/bootloader.bin

21.9 KB
Binary file not shown.

Diff for: variants/atmegazero_esp32s2/partitions.csv

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ESP-IDF Partition Table
2+
# Name, Type, SubType, Offset, Size, Flags
3+
# bootloader.bin,, 0x1000, 32K
4+
# partition table, 0x8000, 4K
5+
6+
nvs, data, nvs, 0x9000, 20K,
7+
otadata, data, ota, 0xe000, 8K,
8+
ota_0, 0, ota_0, 0x10000, 1408K,
9+
ota_1, 0, ota_1, 0x170000, 1408K,
10+
uf2, app, factory,0x2d0000, 256K,
11+
ffat, data, fat, 0x310000, 960K,

Diff for: variants/atmegazero_esp32s2/pins_arduino.h

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
6+
#define USB_VID 0x239A
7+
#define USB_PID 0x800A
8+
#define USB_MANUFACTURER "ATMegaZero"
9+
#define USB_PRODUCT "ATMZ-ESP32S2"
10+
#define USB_SERIAL ""
11+
12+
#define EXTERNAL_NUM_INTERRUPTS 46
13+
#define NUM_DIGITAL_PINS 48
14+
#define NUM_ANALOG_INPUTS 20
15+
16+
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1)
17+
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
18+
#define digitalPinHasPWM(p) (p < 46)
19+
20+
static const uint8_t NEOPIXEL = 40;
21+
static const uint8_t PD5 = 0;
22+
23+
static const uint8_t TX = 43;
24+
static const uint8_t RX = 44;
25+
26+
static const uint8_t SDA = 8;
27+
static const uint8_t SCL = 9;
28+
29+
static const uint8_t SS = 38;
30+
static const uint8_t MOSI = 35;
31+
static const uint8_t MISO = 37;
32+
static const uint8_t SCK = 36;
33+
34+
static const uint8_t A0 = 17;
35+
static const uint8_t A1 = 18;
36+
static const uint8_t A2 = 13;
37+
static const uint8_t A3 = 12;
38+
static const uint8_t A4 = 6;
39+
static const uint8_t A5 = 3;
40+
41+
static const uint8_t T1 = 1;
42+
static const uint8_t T2 = 2;
43+
static const uint8_t T3 = 3;
44+
static const uint8_t T4 = 4;
45+
static const uint8_t T5 = 5;
46+
static const uint8_t T6 = 6;
47+
static const uint8_t T7 = 7;
48+
static const uint8_t T8 = 8;
49+
static const uint8_t T9 = 9;
50+
static const uint8_t T10 = 10;
51+
static const uint8_t T11 = 11;
52+
static const uint8_t T12 = 12;
53+
static const uint8_t T13 = 13;
54+
static const uint8_t T14 = 14;
55+
56+
static const uint8_t DAC1 = 17;
57+
static const uint8_t DAC2 = 18;
58+
59+
#endif /* Pins_Arduino_h */

Diff for: variants/atmegazero_esp32s2/tinyuf2.bin

126 KB
Binary file not shown.

0 commit comments

Comments
 (0)