-
Notifications
You must be signed in to change notification settings - Fork 8.1k
boards: riscv: Add support for WeAct Studio ESP32-C3-Mini #97670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kartben
merged 1 commit into
zephyrproject-rtos:main
from
heronet:add-weact-esp32c3-mini-board
Oct 20, 2025
+302
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2025 Siratul Islam | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config HEAP_MEM_POOL_ADD_SIZE_BOARD | ||
int | ||
default 4096 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd. | ||
# Copyright (c) 2025 Siratul Islam | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
choice BOOTLOADER | ||
default BOOTLOADER_MCUBOOT | ||
endchoice | ||
|
||
choice BOOT_SIGNATURE_TYPE | ||
default BOOT_SIGNATURE_TYPE_NONE | ||
endchoice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ESP32-C6-Mini board configuration | ||
|
||
# Copyright (c) 2025 Siratul Islam | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_WEACT_ESP32C3_MINI | ||
select SOC_ESP32C3_FH4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(NOT "${OPENOCD}" MATCHES "^${ESPRESSIF_TOOLCHAIN_PATH}/.*") | ||
set(OPENOCD OPENOCD-NOTFOUND) | ||
endif() | ||
find_program(OPENOCD openocd PATHS ${ESPRESSIF_TOOLCHAIN_PATH}/openocd-esp32/bin NO_DEFAULT_PATH) | ||
|
||
include(${ZEPHYR_BASE}/boards/common/esp32.board.cmake) | ||
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
board: | ||
name: weact_esp32c3_mini | ||
full_name: ESP32-C3-Mini | ||
vendor: weact | ||
socs: | ||
- name: esp32c3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
.. zephyr:board:: weact_esp32c3_mini | ||
Overview | ||
******** | ||
|
||
WeAct Studio ESP32-C3-Mini is a compact development board based on ESP32-C3FH4, | ||
featuring integrated Wi-Fi and Bluetooth® Low Energy connectivity. | ||
For more information, check `WeAct Studio ESP32-C3 Core Board`_. | ||
|
||
Hardware | ||
******** | ||
|
||
ESP32-C3 is a single-core Wi-Fi and Bluetooth 5 (LE) microcontroller SoC, | ||
based on the open-source RISC-V architecture. | ||
|
||
The features include the following: | ||
|
||
- 32-bit core RISC-V microcontroller with a maximum clock speed of 160 MHz | ||
- 400 KB of internal RAM | ||
- 4 MB of internal flash (FH4 variant) | ||
- 802.11b/g/n/e/i | ||
- A Bluetooth LE subsystem that supports features of Bluetooth 5 and Bluetooth Mesh | ||
- Various peripherals: | ||
|
||
- 12-bit ADC with up to 6 channels | ||
- TWAI compatible with CAN bus 2.0 | ||
- Temperature sensor | ||
- 3x SPI | ||
- 1x I2S | ||
- 1x I2C | ||
- 2x UART | ||
- LED PWM with up to 6 channels | ||
|
||
- Cryptographic hardware acceleration (RNG, ECC, RSA, SHA-2, AES) | ||
- USB Serial/JTAG for flashing and debugging | ||
- On-board blue LED (GPIO8) | ||
- Boot button (GPIO9) | ||
|
||
For more information, check the datasheet at `ESP32-C3 Datasheet`_ or the technical reference | ||
manual at `ESP32-C3 Technical Reference Manual`_. | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
System Requirements | ||
******************* | ||
|
||
Espressif HAL requires WiFi and Bluetooth binary blobs in order work. Run the command | ||
below to retrieve those files. | ||
|
||
.. code-block:: console | ||
west blobs fetch hal_espressif | ||
.. note:: | ||
|
||
It is recommended running the command above after :file:`west update`. | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
.. zephyr:board-supported-runners:: | ||
.. include:: ../../../espressif/common/building-flashing.rst | ||
:start-after: espressif-building-flashing | ||
|
||
Debugging | ||
========= | ||
|
||
.. include:: ../../../espressif/common/openocd-debugging.rst | ||
:start-after: espressif-openocd-debugging | ||
|
||
References | ||
********** | ||
|
||
.. target-notes:: | ||
|
||
.. _`WeAct Studio ESP32-C3 Core Board`: https://github.com/WeActStudio/WeActStudio.ESP32C3CoreBoard | ||
.. _`ESP32-C3 Datasheet`: https://www.espressif.com/sites/default/files/documentation/esp32-c3_datasheet_en.pdf | ||
.. _`ESP32-C3 Technical Reference Manual`: https://espressif.com/sites/default/files/documentation/esp32-c3_technical_reference_manual_en.pdf | ||
.. _`OpenOCD ESP32`: https://github.com/espressif/openocd-esp32/releases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
set ESP_RTOS none | ||
|
||
# ESP32C3 has built-in JTAG interface over USB port in pins GPIO18/GPIO19 (D-/D+). | ||
# Uncomment the line below to enable USB debugging. | ||
source [find interface/esp_usb_jtag.cfg] | ||
|
||
# Otherwise, use external JTAG programmer as ESP-Prog | ||
# source [find interface/ftdi/esp32_devkitj_v1.cfg] | ||
|
||
source [find target/esp32c3.cfg] | ||
adapter speed 5000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2025 Siratul Islam | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h> | ||
#include <dt-bindings/pinctrl/esp32c3-pinctrl.h> | ||
#include <zephyr/dt-bindings/pinctrl/esp32c3-gpio-sigmap.h> | ||
|
||
&pinctrl { | ||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <UART0_TX_GPIO21>; | ||
output-high; | ||
}; | ||
|
||
group2 { | ||
pinmux = <UART0_RX_GPIO20>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
i2c0_default: i2c0_default { | ||
group1 { | ||
pinmux = <I2C0_SDA_GPIO0>, | ||
<I2C0_SCL_GPIO1>; | ||
bias-pull-up; | ||
drive-open-drain; | ||
output-high; | ||
}; | ||
}; | ||
|
||
spim2_default: spim2_default { | ||
group1 { | ||
pinmux = <SPIM2_MISO_GPIO3>, | ||
<SPIM2_SCLK_GPIO5>, | ||
<SPIM2_CSEL_GPIO6>; | ||
}; | ||
|
||
group2 { | ||
pinmux = <SPIM2_MOSI_GPIO4>; | ||
output-low; | ||
}; | ||
}; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
* Copyright (c) 2025 Siratul Islam | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <espressif/esp32c3/esp32c3_fx4.dtsi> | ||
#include "weact_esp32c3_mini-pinctrl.dtsi" | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
#include <espressif/partitions_0x0_default.dtsi> | ||
|
||
/ { | ||
model = "WeAct Studio ESP32-C3-Mini"; | ||
compatible = "weact,esp32c3-mini"; | ||
|
||
chosen { | ||
zephyr,sram = &sram1; | ||
zephyr,console = &usb_serial; | ||
zephyr,shell-uart = &usb_serial; | ||
zephyr,flash = &flash0; | ||
zephyr,code-partition = &slot0_partition; | ||
zephyr,bt-hci = &esp32_bt_hci; | ||
}; | ||
|
||
aliases { | ||
sw0 = &button0; | ||
led0 = &blue_led; | ||
i2c-0 = &i2c0; | ||
watchdog0 = &wdt0; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
blue_led: blue_led { | ||
gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; | ||
label = "User LED"; | ||
}; | ||
}; | ||
|
||
gpio_keys { | ||
compatible = "gpio-keys"; | ||
|
||
button0: button_0 { | ||
label = "BOOT Button"; | ||
gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
zephyr,code = <INPUT_KEY_0>; | ||
}; | ||
}; | ||
}; | ||
|
||
&uart0 { | ||
status = "okay"; | ||
current-speed = <115200>; | ||
pinctrl-0 = <&uart0_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&usb_serial { | ||
status = "okay"; | ||
}; | ||
|
||
&i2c0 { | ||
status = "okay"; | ||
clock-frequency = <I2C_BITRATE_STANDARD>; | ||
pinctrl-0 = <&i2c0_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&trng0 { | ||
status = "okay"; | ||
}; | ||
|
||
&spi2 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
pinctrl-0 = <&spim2_default>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&gpio0 { | ||
status = "okay"; | ||
}; | ||
|
||
&wdt0 { | ||
status = "okay"; | ||
}; | ||
|
||
&esp32_bt_hci { | ||
status = "okay"; | ||
}; | ||
|
||
&wifi { | ||
status = "okay"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
identifier: weact_esp32c3_mini | ||
name: WeAct Studio ESP32-C3-Mini | ||
type: mcu | ||
arch: riscv | ||
toolchain: | ||
- zephyr | ||
supported: | ||
- adc | ||
- gpio | ||
- i2c | ||
- i2s | ||
- watchdog | ||
- uart | ||
- dma | ||
- pwm | ||
- spi | ||
- counter | ||
- entropy | ||
vendor: weact |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_CONSOLE=y | ||
CONFIG_SERIAL=y | ||
CONFIG_UART_CONSOLE=y | ||
CONFIG_GPIO=y |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.