Skip to content

Commit 38e4240

Browse files
committed
snippets: Add snippet to use XIAO serial pins for the console
Make it easy to force any XIAO-shaped controller to use the D6/D7 UART pins for the console. Especially useful for the upcoming XIAO Debugger that easily forwards XIAO serial over USB. Signed-off-by: Peter Johanson <peter@peterjohanson.com>
1 parent a8c8f7f commit 38e4240

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _snippet-xiao-serial-console:
2+
3+
XIAO UART/Serial Console Snippet (xiao-serial-console)
4+
######################################################
5+
6+
Overview
7+
********
8+
9+
This snippet enables console output over the standard XIAO UART pins, setting ``zephyr,console`` to
10+
``&xiao_serial``.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name: xiao-serial-console
2+
append:
3+
EXTRA_CONF_FILE: xiao-serial-console.conf
4+
EXTRA_DTC_OVERLAY_FILE: xiao-serial-console.overlay
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_CONSOLE=y
2+
CONFIG_UART_CONSOLE=y
3+
CONFIG_SERIAL=y
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Pete Johanson <peter@peterjohanson.com>
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&xiao_serial {
7+
status = "okay";
8+
};
9+
10+
/ {
11+
chosen {
12+
zephyr,console = &xiao_serial;
13+
zephyr,shell-uart = &xiao_serial;
14+
};
15+
};

0 commit comments

Comments
 (0)