Skip to content

Commit c6f84d0

Browse files
LucasTamborkartben
authored andcommitted
boards: espressif: esp32c6: Add LP Core board support
Add ULP Coprocessor board support for C6. This requires a change in the board qualifier depending on the build target. Update esp32c6 overlay and configuration files to the proper name. Signed-off-by: Lucas Tamborrino <[email protected]>
1 parent 0b9e4e0 commit c6f84d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+170
-33
lines changed

boards/deprecated.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ set(arduino_uno_r4_minima_DEPRECATED
2222
set(arduino_uno_r4_wifi_DEPRECATED
2323
arduino_uno_r4@wifi
2424
)
25+
set(esp32c6_devkitc_DEPRECATED
26+
esp32c6_devkitc/esp32c6/hpcore
27+
)
2528
set(qemu_xtensa_DEPRECATED
2629
qemu_xtensa/dc233c
2730
)

boards/espressif/esp32c6_devkitc/Kconfig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33

44
config HEAP_MEM_POOL_ADD_SIZE_BOARD
55
int
6-
default 4096
6+
default 4096 if BOARD_ESP32C6_DEVKITC_ESP32C6_HPCORE
7+
default 256 if BOARD_ESP32C6_DEVKITC_ESP32C6_LPCORE

boards/espressif/esp32c6_devkitc/Kconfig.esp32c6_devkitc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55

66
config BOARD_ESP32C6_DEVKITC
77
select SOC_ESP32_C6_WROOM_1U_N8
8+
select SOC_ESP32C6_HPCORE if BOARD_ESP32C6_DEVKITC_ESP32C6_HPCORE
9+
select SOC_ESP32C6_LPCORE if BOARD_ESP32C6_DEVKITC_ESP32C6_LPCORE

boards/espressif/esp32c6_devkitc/doc/index.rst

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ To build the sample application using sysbuild use the command:
147147
.. zephyr-app-commands::
148148
:tool: west
149149
:zephyr-app: samples/hello_world
150-
:board: esp32c6_devkitc
150+
:board: esp32c6_devkitc/esp32c6/hpcore
151151
:goals: build
152152
:west-args: --sysbuild
153153
:compact:
@@ -196,7 +196,7 @@ Build and flash applications as usual (see :ref:`build_an_application` and
196196

197197
.. zephyr-app-commands::
198198
:zephyr-app: samples/hello_world
199-
:board: esp32c6_devkitc
199+
:board: esp32c6_devkitc/esp32c6/hpcore
200200
:goals: build
201201

202202
The usual ``flash`` target will work with the ``esp32c6_devkitc`` board
@@ -205,7 +205,7 @@ application.
205205

206206
.. zephyr-app-commands::
207207
:zephyr-app: samples/hello_world
208-
:board: esp32c6_devkitc
208+
:board: esp32c6_devkitc/esp32c6/hpcore
209209
:goals: flash
210210

211211
Open the serial monitor using the following command:
@@ -220,7 +220,7 @@ message in the monitor:
220220
.. code-block:: console
221221
222222
***** Booting Zephyr OS vx.x.x-xxx-gxxxxxxxxxxxx *****
223-
Hello World! esp32c6_devkitc
223+
Hello World! esp32c6_devkitc/esp32c6/hpcore
224224
225225
Debugging
226226
*********
@@ -237,17 +237,40 @@ Here is an example for building the :zephyr:code-sample:`hello_world` applicatio
237237

238238
.. zephyr-app-commands::
239239
:zephyr-app: samples/hello_world
240-
:board: esp32c6_devkitc
240+
:board: esp32c6_devkitc/esp32c6/hpcore
241241
:goals: build flash
242242
:gen-args: -DOPENOCD=<path/to/bin/openocd> -DOPENOCD_DEFAULT_PATH=<path/to/openocd/share/openocd/scripts>
243243

244244
You can debug an application in the usual way. Here is an example for the :zephyr:code-sample:`hello_world` application.
245245

246246
.. zephyr-app-commands::
247247
:zephyr-app: samples/hello_world
248-
:board: esp32c6_devkitc
248+
:board: esp32c6_devkitc/esp32c6/hpcore
249249
:goals: debug
250250

251+
Low-Power CPU (LP CORE)
252+
***********************
253+
254+
The ESP32-C6 SoC has two RISC-V cores: the High-Performance Core (HP CORE) and the Low-Power Core (LP CORE).
255+
The LP Core features ultra low power consumption, an interrupt controller, a debug module and a system bus
256+
interface for memory and peripheral access.
257+
258+
The LP Core is in sleep mode by default. It has two application scenarios:
259+
260+
- Power insensitive scenario: When the High-Performance CPU (HP Core) is active, the LP Core can assist the HP CPU with some speed and efficiency-insensitive controls and computations.
261+
- Power sensitive scenario: When the HP CPU is in the power-down state to save power, the LP Core can be woken up to handle some external wake-up events.
262+
263+
For more information, check the datasheet at `ESP32-C6 Datasheet`_ or the technical reference
264+
manual at `ESP32-C6 Technical Reference Manual`_.
265+
266+
The LP Core support is fully integrated with :ref:`sysbuild`. The user can enable the LP Core by adding
267+
the following configuration to the project:
268+
269+
.. code:: cfg
270+
271+
CONFIG_ULP_COPROC_ENABLED=y
272+
273+
See :zephyr:code-sample-category:`lp-core` folder as code reference.
251274

252275
References
253276
**********

boards/espressif/esp32c6_devkitc/esp32c6_devkitc.dts renamed to boards/espressif/esp32c6_devkitc/esp32c6_devkitc_hpcore.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <espressif/partitions_0x0_default.dtsi>
1313

1414
/ {
15-
model = "esp32c6_devkitc";
15+
model = "esp32c6_devkitc HP Core";
1616
compatible = "espressif,esp32c6";
1717

1818
chosen {

boards/espressif/esp32c6_devkitc/esp32c6_devkitc.yaml renamed to boards/espressif/esp32c6_devkitc/esp32c6_devkitc_hpcore.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
identifier: esp32c6_devkitc
2-
name: ESP32-C6
1+
identifier: esp32c6_devkitc/esp32c6/hpcore
2+
name: ESP32-C6-DevKitC HP Core
33
vendor: espressif
44
type: mcu
55
arch: riscv
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/dts-v1/;
7+
8+
#include <espressif/esp32c6/esp32c6_lpcore_wroom_n4.dtsi>
9+
#include <espressif/partitions_0x0_default.dtsi>
10+
11+
/ {
12+
model = "Espressif ESP32C6-DevkitC LPCORE";
13+
compatible = "espressif,esp32c6";
14+
15+
chosen {
16+
zephyr,sram = &sramlp;
17+
zephyr,code-partition = &slot0_lpcore_partition;
18+
};
19+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
identifier: esp32c6_devkitc/esp32c6/lpcore
2+
name: ESP32-C6-DevKitC LP Core
3+
type: mcu
4+
arch: riscv
5+
toolchain:
6+
- zephyr
7+
supported:
8+
- cpu
9+
testing:
10+
only_tags:
11+
- introduction
12+
ignore_tags:
13+
- kernel
14+
- posix
15+
- chre
16+
vendor: espressif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Memory protection
5+
CONFIG_THREAD_STACK_INFO=n
6+
CONFIG_THREAD_CUSTOM_DATA=n
7+
8+
# Boot
9+
CONFIG_BOOT_BANNER=n
10+
11+
# Console
12+
CONFIG_PRINTK=n
13+
14+
# Build
15+
CONFIG_SIZE_OPTIMIZATIONS=y

0 commit comments

Comments
 (0)