initial try

This commit is contained in:
Eduard Iten 2025-06-29 11:48:27 +02:00
commit 6b86f5edf4
12 changed files with 255 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
config HEAP_MEM_POOL_ADD_SIZE_BOARD
int
default 4096 if BOARD_FIREBEETLE2_ESP32C6_ESP32C6_HPCORE
default 256 if BOARD_FIREBEETLE2_ESP32C6_ESP32C6_LPCORE

View File

@ -0,0 +1,9 @@
# ESP32C6 devkitc board configuration
# Copyright (c) 2024 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
config BOARD_FIREBEETLE2_ESP32C6
select SOC_ESP32_C6_WROOM_1U_N4
select SOC_ESP32C6_HPCORE if BOARD_ESP32C6_DEVKITC_ESP32C6_HPCORE
select SOC_ESP32C6_LPCORE if BOARD_ESP32C6_DEVKITC_ESP32C6_LPCORE

View File

@ -0,0 +1,10 @@
# Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
choice BOOTLOADER
default BOOTLOADER_MCUBOOT
endchoice
choice BOOT_SIGNATURE_TYPE
default BOOT_SIGNATURE_TYPE_NONE
endchoice

View File

@ -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)

View File

@ -0,0 +1,6 @@
board:
name: firebeetle2_esp32c6
full_name: FireBeetle 2 ESP32-C6
vendor: dfrobot
socs:
- name: esp32c6

View File

@ -0,0 +1,45 @@
/*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/pinctrl/esp-pinctrl-common.h>
#include <dt-bindings/pinctrl/esp32c6-pinctrl.h>
#include <zephyr/dt-bindings/pinctrl/esp32c6-gpio-sigmap.h>
&pinctrl {
uart0_default: uart0_default {
group1 {
pinmux = <UART0_TX_GPIO16>;
output-high;
};
group2 {
pinmux = <UART0_RX_GPIO17>;
bias-pull-up;
};
};
spim2_default: spim2_default {
group1 {
pinmux = <SPIM2_MISO_GPIO2>,
<SPIM2_SCLK_GPIO6>,
<SPIM2_CSEL_GPIO10>;
};
group2 {
pinmux = <SPIM2_MOSI_GPIO7>;
output-low;
};
};
i2c0_default: i2c0_default {
group1 {
pinmux = <I2C0_SDA_GPIO6>,
<I2C0_SCL_GPIO7>;
bias-pull-up;
drive-open-drain;
output-high;
};
};
};

View File

@ -0,0 +1,76 @@
/*
* Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <espressif/esp32c6/esp32c6_wroom_n4.dtsi>
#include "firebeetle2_esp32c6_hpcore-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
#include <espressif/partitions_0x0_default_4M.dtsi>
/ {
model = "DFRobot Firebeetle2 ESP32C6 HP Core";
compatible = "espressif,esp32c6";
chosen {
zephyr,sram = &sramhp;
zephyr,console = &usb_serial;
zephyr,shell-uart = &usb_serial;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;
};
aliases {
sw0 = &user_button1;
watchdog0 = &wdt0;
};
gpio_keys {
compatible = "gpio-keys";
user_button1: button_1 {
label = "User SW1";
gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_0>;
};
};
};
&uart0 {
current-speed = <115200>;
pinctrl-0 = <&uart0_default>;
pinctrl-names = "default";
};
&trng0 {
status = "okay";
};
&i2c0 {
status = "okay";
clock-frequency = <I2C_BITRATE_FAST>;
pinctrl-0 = <&i2c0_default>;
pinctrl-names = "default";
};
&spi2 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-0 = <&spim2_default>;
pinctrl-names = "default";
};
&gpio0 {
status = "okay";
};
&wdt0 {
status = "okay";
};
&wifi {
status = "okay";
};

View File

@ -0,0 +1,22 @@
identifier: firebeetle2_esp32c6/esp32c6/hpcore
name: Firebeetle 2 ESP32C6 HP Core
vendor: dfrobot
type: mcu
arch: riscv
toolchain:
- zephyr
supported:
- adc
- gpio
- watchdog
- uart
- dma
- pwm
- spi
- counter
- entropy
- i2c
- i2s
testing:
ignore_tags:
- bluetooth

View File

@ -0,0 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
CONFIG_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_CONSOLE=y
CONFIG_GPIO=y

View File

@ -0,0 +1,26 @@
/*
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <espressif/esp32c6/esp32c6_lpcore_wroom_n4.dtsi>
#include <espressif/partitions_0x0_default_4M.dtsi>
/ {
model = "DFRobot FireBeetle2 ESP32-C6 LPCore";
compatible = "espressif,esp32c6";
chosen {
zephyr,sram = &sramlp;
zephyr,code-partition = &slot0_lpcore_partition;
zephyr,console = &lp_uart;
zephyr,shell-uart = &lp_uart;
};
};
&lp_uart {
status = "okay";
current-speed = <115200>;
};

View File

@ -0,0 +1,19 @@
identifier: firebeetle2_esp32c6/esp32c6/lpcore
name: FireBeetle2 ESP32-C6 LPCore
type: mcu
arch: riscv
toolchain:
- zephyr
supported:
- cpu
- uart
- serial
testing:
only_tags:
- introduction
ignore_tags:
- kernel
- posix
- chre
- cpp
vendor: dfrobot

View File

@ -0,0 +1,20 @@
# Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
# SPDX-License-Identifier: Apache-2.0
# Memory protection
CONFIG_THREAD_STACK_INFO=n
CONFIG_THREAD_CUSTOM_DATA=n
# Boot
CONFIG_BOOT_BANNER=n
# Console
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_PRINTK=n
CONFIG_CBPRINTF_NANO=y
# Build
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_BUSYWAIT_CPU_LOOPS_PER_USEC=4