Skip to content

Commit 8ac59fe

Browse files
committed
feat: Add support for the Waveshare ESP32-C3-Zero
1 parent 5789ed2 commit 8ac59fe

File tree

2 files changed

+211
-0
lines changed

2 files changed

+211
-0
lines changed

boards.txt

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54065,3 +54065,165 @@ arduino_nesso_n1.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR
5406554065
arduino_nesso_n1.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api.zczr -lzboss_stack.zczr -lzboss_port.native
5406654066

5406754067
##############################################################
54068+
54069+
waveshare_esp32_c3_zero.name=Waveshare ESP32-C3-Zero
54070+
54071+
waveshare_esp32_c3_zero.bootloader.tool=esptool_py
54072+
waveshare_esp32_c3_zero.bootloader.tool.default=esptool_py
54073+
54074+
waveshare_esp32_c3_zero.upload.tool=esptool_py
54075+
waveshare_esp32_c3_zero.upload.tool.default=esptool_py
54076+
waveshare_esp32_c3_zero.upload.tool.network=esp_ota
54077+
54078+
waveshare_esp32_c3_zero.upload.maximum_size=1310720
54079+
waveshare_esp32_c3_zero.upload.maximum_data_size=327680
54080+
waveshare_esp32_c3_zero.upload.flags=
54081+
waveshare_esp32_c3_zero.upload.extra_flags=
54082+
waveshare_esp32_c3_zero.upload.use_1200bps_touch=false
54083+
waveshare_esp32_c3_zero.upload.wait_for_upload_port=false
54084+
54085+
waveshare_esp32_c3_zero.serial.disableDTR=false
54086+
waveshare_esp32_c3_zero.serial.disableRTS=false
54087+
54088+
waveshare_esp32_c3_zero.build.tarch=riscv32
54089+
waveshare_esp32_c3_zero.build.target=esp
54090+
waveshare_esp32_c3_zero.build.mcu=esp32c3
54091+
waveshare_esp32_c3_zero.build.core=esp32
54092+
waveshare_esp32_c3_zero.build.variant=waveshare_esp32_c3_zero
54093+
waveshare_esp32_c3_zero.build.board=WAVESHARE_ESP32_C3_ZERO
54094+
waveshare_esp32_c3_zero.build.bootloader_addr=0x0
54095+
54096+
waveshare_esp32_c3_zero.build.cdc_on_boot=1
54097+
waveshare_esp32_c3_zero.build.f_cpu=160000000L
54098+
waveshare_esp32_c3_zero.build.flash_size=4MB
54099+
waveshare_esp32_c3_zero.build.flash_freq=80m
54100+
waveshare_esp32_c3_zero.build.flash_mode=qio
54101+
waveshare_esp32_c3_zero.build.boot=qio
54102+
waveshare_esp32_c3_zero.build.partitions=default
54103+
waveshare_esp32_c3_zero.build.defines=
54104+
54105+
## IDE 2.0 Seems to not update the value
54106+
waveshare_esp32_c3_zero.menu.JTAGAdapter.default=Disabled
54107+
waveshare_esp32_c3_zero.menu.JTAGAdapter.default.build.copy_jtag_files=0
54108+
waveshare_esp32_c3_zero.menu.JTAGAdapter.builtin=Integrated USB JTAG
54109+
waveshare_esp32_c3_zero.menu.JTAGAdapter.builtin.build.openocdscript=esp32c3-builtin.cfg
54110+
waveshare_esp32_c3_zero.menu.JTAGAdapter.builtin.build.copy_jtag_files=1
54111+
waveshare_esp32_c3_zero.menu.JTAGAdapter.external=FTDI Adapter
54112+
waveshare_esp32_c3_zero.menu.JTAGAdapter.external.build.openocdscript=esp32c3-ftdi.cfg
54113+
waveshare_esp32_c3_zero.menu.JTAGAdapter.external.build.copy_jtag_files=1
54114+
waveshare_esp32_c3_zero.menu.JTAGAdapter.bridge=ESP USB Bridge
54115+
waveshare_esp32_c3_zero.menu.JTAGAdapter.bridge.build.openocdscript=esp32c3-bridge.cfg
54116+
waveshare_esp32_c3_zero.menu.JTAGAdapter.bridge.build.copy_jtag_files=1
54117+
54118+
waveshare_esp32_c3_zero.menu.CDCOnBoot.default=Enabled
54119+
waveshare_esp32_c3_zero.menu.CDCOnBoot.default.build.cdc_on_boot=1
54120+
waveshare_esp32_c3_zero.menu.CDCOnBoot.cdc=Disabled
54121+
waveshare_esp32_c3_zero.menu.CDCOnBoot.cdc.build.cdc_on_boot=0
54122+
54123+
waveshare_esp32_c3_zero.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
54124+
waveshare_esp32_c3_zero.menu.PartitionScheme.default.build.partitions=default
54125+
waveshare_esp32_c3_zero.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
54126+
waveshare_esp32_c3_zero.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
54127+
waveshare_esp32_c3_zero.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
54128+
waveshare_esp32_c3_zero.menu.PartitionScheme.minimal.build.partitions=minimal
54129+
waveshare_esp32_c3_zero.menu.PartitionScheme.no_fs=No FS 4MB (2MB APP x2)
54130+
waveshare_esp32_c3_zero.menu.PartitionScheme.no_fs.build.partitions=no_fs
54131+
waveshare_esp32_c3_zero.menu.PartitionScheme.no_fs.upload.maximum_size=2031616
54132+
waveshare_esp32_c3_zero.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
54133+
waveshare_esp32_c3_zero.menu.PartitionScheme.no_ota.build.partitions=no_ota
54134+
waveshare_esp32_c3_zero.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
54135+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
54136+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
54137+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
54138+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
54139+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
54140+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
54141+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
54142+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
54143+
waveshare_esp32_c3_zero.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
54144+
waveshare_esp32_c3_zero.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
54145+
waveshare_esp32_c3_zero.menu.PartitionScheme.huge_app.build.partitions=huge_app
54146+
waveshare_esp32_c3_zero.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
54147+
waveshare_esp32_c3_zero.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/128KB SPIFFS)
54148+
waveshare_esp32_c3_zero.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
54149+
waveshare_esp32_c3_zero.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
54150+
waveshare_esp32_c3_zero.menu.PartitionScheme.rainmaker=RainMaker 4MB
54151+
waveshare_esp32_c3_zero.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
54152+
waveshare_esp32_c3_zero.menu.PartitionScheme.rainmaker.upload.maximum_size=1966080
54153+
waveshare_esp32_c3_zero.menu.PartitionScheme.rainmaker_4MB=RainMaker 4MB No OTA
54154+
waveshare_esp32_c3_zero.menu.PartitionScheme.rainmaker_4MB.build.partitions=rainmaker_4MB_no_ota
54155+
waveshare_esp32_c3_zero.menu.PartitionScheme.rainmaker_4MB.upload.maximum_size=4038656
54156+
waveshare_esp32_c3_zero.menu.PartitionScheme.zigbee_zczr=Zigbee ZCZR 4MB with spiffs
54157+
waveshare_esp32_c3_zero.menu.PartitionScheme.zigbee_zczr.build.partitions=zigbee_zczr
54158+
waveshare_esp32_c3_zero.menu.PartitionScheme.zigbee_zczr.upload.maximum_size=1310720
54159+
waveshare_esp32_c3_zero.menu.PartitionScheme.custom=Custom
54160+
waveshare_esp32_c3_zero.menu.PartitionScheme.custom.build.partitions=
54161+
waveshare_esp32_c3_zero.menu.PartitionScheme.custom.upload.maximum_size=16777216
54162+
54163+
waveshare_esp32_c3_zero.menu.CPUFreq.160=160MHz (WiFi)
54164+
waveshare_esp32_c3_zero.menu.CPUFreq.160.build.f_cpu=160000000L
54165+
waveshare_esp32_c3_zero.menu.CPUFreq.80=80MHz (WiFi)
54166+
waveshare_esp32_c3_zero.menu.CPUFreq.80.build.f_cpu=80000000L
54167+
waveshare_esp32_c3_zero.menu.CPUFreq.40=40MHz
54168+
waveshare_esp32_c3_zero.menu.CPUFreq.40.build.f_cpu=40000000L
54169+
waveshare_esp32_c3_zero.menu.CPUFreq.20=20MHz
54170+
waveshare_esp32_c3_zero.menu.CPUFreq.20.build.f_cpu=20000000L
54171+
waveshare_esp32_c3_zero.menu.CPUFreq.10=10MHz
54172+
waveshare_esp32_c3_zero.menu.CPUFreq.10.build.f_cpu=10000000L
54173+
54174+
waveshare_esp32_c3_zero.menu.FlashMode.qio=QIO
54175+
waveshare_esp32_c3_zero.menu.FlashMode.qio.build.flash_mode=dio
54176+
waveshare_esp32_c3_zero.menu.FlashMode.qio.build.boot=qio
54177+
waveshare_esp32_c3_zero.menu.FlashMode.dio=DIO
54178+
waveshare_esp32_c3_zero.menu.FlashMode.dio.build.flash_mode=dio
54179+
waveshare_esp32_c3_zero.menu.FlashMode.dio.build.boot=dio
54180+
54181+
waveshare_esp32_c3_zero.menu.FlashFreq.80=80MHz
54182+
waveshare_esp32_c3_zero.menu.FlashFreq.80.build.flash_freq=80m
54183+
waveshare_esp32_c3_zero.menu.FlashFreq.40=40MHz
54184+
waveshare_esp32_c3_zero.menu.FlashFreq.40.build.flash_freq=40m
54185+
54186+
waveshare_esp32_c3_zero.menu.FlashSize.4M=4MB (32Mb)
54187+
waveshare_esp32_c3_zero.menu.FlashSize.4M.build.flash_size=4MB
54188+
54189+
waveshare_esp32_c3_zero.menu.UploadSpeed.921600=921600
54190+
waveshare_esp32_c3_zero.menu.UploadSpeed.921600.upload.speed=921600
54191+
waveshare_esp32_c3_zero.menu.UploadSpeed.115200=115200
54192+
waveshare_esp32_c3_zero.menu.UploadSpeed.115200.upload.speed=115200
54193+
waveshare_esp32_c3_zero.menu.UploadSpeed.256000.windows=256000
54194+
waveshare_esp32_c3_zero.menu.UploadSpeed.256000.upload.speed=256000
54195+
waveshare_esp32_c3_zero.menu.UploadSpeed.230400.windows.upload.speed=256000
54196+
waveshare_esp32_c3_zero.menu.UploadSpeed.230400=230400
54197+
waveshare_esp32_c3_zero.menu.UploadSpeed.230400.upload.speed=230400
54198+
waveshare_esp32_c3_zero.menu.UploadSpeed.460800.linux=460800
54199+
waveshare_esp32_c3_zero.menu.UploadSpeed.460800.macosx=460800
54200+
waveshare_esp32_c3_zero.menu.UploadSpeed.460800.upload.speed=460800
54201+
waveshare_esp32_c3_zero.menu.UploadSpeed.512000.windows=512000
54202+
waveshare_esp32_c3_zero.menu.UploadSpeed.512000.upload.speed=512000
54203+
54204+
waveshare_esp32_c3_zero.menu.DebugLevel.none=None
54205+
waveshare_esp32_c3_zero.menu.DebugLevel.none.build.code_debug=0
54206+
waveshare_esp32_c3_zero.menu.DebugLevel.error=Error
54207+
waveshare_esp32_c3_zero.menu.DebugLevel.error.build.code_debug=1
54208+
waveshare_esp32_c3_zero.menu.DebugLevel.warn=Warn
54209+
waveshare_esp32_c3_zero.menu.DebugLevel.warn.build.code_debug=2
54210+
waveshare_esp32_c3_zero.menu.DebugLevel.info=Info
54211+
waveshare_esp32_c3_zero.menu.DebugLevel.info.build.code_debug=3
54212+
waveshare_esp32_c3_zero.menu.DebugLevel.debug=Debug
54213+
waveshare_esp32_c3_zero.menu.DebugLevel.debug.build.code_debug=4
54214+
waveshare_esp32_c3_zero.menu.DebugLevel.verbose=Verbose
54215+
waveshare_esp32_c3_zero.menu.DebugLevel.verbose.build.code_debug=5
54216+
54217+
waveshare_esp32_c3_zero.menu.EraseFlash.none=Disabled
54218+
waveshare_esp32_c3_zero.menu.EraseFlash.none.upload.erase_cmd=
54219+
waveshare_esp32_c3_zero.menu.EraseFlash.all=Enabled
54220+
waveshare_esp32_c3_zero.menu.EraseFlash.all.upload.erase_cmd=-e
54221+
54222+
waveshare_esp32_c3_zero.menu.ZigbeeMode.default=Disabled
54223+
waveshare_esp32_c3_zero.menu.ZigbeeMode.default.build.zigbee_mode=
54224+
waveshare_esp32_c3_zero.menu.ZigbeeMode.default.build.zigbee_libs=
54225+
waveshare_esp32_c3_zero.menu.ZigbeeMode.zczr=Zigbee ZCZR (coordinator/router)
54226+
waveshare_esp32_c3_zero.menu.ZigbeeMode.zczr.build.zigbee_mode=-DZIGBEE_MODE_ZCZR
54227+
waveshare_esp32_c3_zero.menu.ZigbeeMode.zczr.build.zigbee_libs=-lesp_zb_api.zczr -lzboss_stack.zczr -lzboss_port.remote
54228+
54229+
##############################################################
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
7+
#define PIN_RGB_LED 10
8+
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
9+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
10+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
11+
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
12+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
13+
#define RGB_BUILTIN LED_BUILTIN
14+
#define RGB_BRIGHTNESS 64
15+
16+
static const uint8_t TX = 21;
17+
static const uint8_t RX = 20;
18+
19+
static const uint8_t SDA = 8;
20+
static const uint8_t SCL = 9;
21+
22+
static const uint8_t SS = 7;
23+
static const uint8_t MOSI = 6;
24+
static const uint8_t MISO = 5;
25+
static const uint8_t SCK = 4;
26+
27+
static const uint8_t A0 = 0;
28+
static const uint8_t A1 = 1;
29+
static const uint8_t A2 = 2;
30+
static const uint8_t A3 = 3;
31+
static const uint8_t A4 = 4;
32+
static const uint8_t A5 = 5;
33+
34+
static const uint8_t D0 = 0;
35+
static const uint8_t D1 = 1;
36+
static const uint8_t D2 = 2;
37+
static const uint8_t D3 = 3;
38+
static const uint8_t D4 = 4;
39+
static const uint8_t D5 = 5;
40+
static const uint8_t D6 = 6;
41+
static const uint8_t D7 = 7;
42+
static const uint8_t D8 = 8;
43+
static const uint8_t D9 = 9;
44+
static const uint8_t D10 = 10;
45+
static const uint8_t D11 = 20;
46+
static const uint8_t D12 = 21;
47+
48+
49+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)