Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions boards/weact/esp32c3_mini/Kconfig
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
11 changes: 11 additions & 0 deletions boards/weact/esp32c3_mini/Kconfig.sysbuild
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
7 changes: 7 additions & 0 deletions boards/weact/esp32c3_mini/Kconfig.weact_esp32c3_mini
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
9 changes: 9 additions & 0 deletions boards/weact/esp32c3_mini/board.cmake
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)
6 changes: 6 additions & 0 deletions boards/weact/esp32c3_mini/board.yml
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.
83 changes: 83 additions & 0 deletions boards/weact/esp32c3_mini/doc/index.rst
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
11 changes: 11 additions & 0 deletions boards/weact/esp32c3_mini/support/openocd.cfg
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
46 changes: 46 additions & 0 deletions boards/weact/esp32c3_mini/weact_esp32c3_mini-pinctrl.dtsi
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;
};
};
};
98 changes: 98 additions & 0 deletions boards/weact/esp32c3_mini/weact_esp32c3_mini.dts
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";
};
19 changes: 19 additions & 0 deletions boards/weact/esp32c3_mini/weact_esp32c3_mini.yaml
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
6 changes: 6 additions & 0 deletions boards/weact/esp32c3_mini/weact_esp32c3_mini_defconfig
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