From a706461ea9469a74ee8b92074424f049c794a404 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 28 Oct 2024 09:11:47 +0100 Subject: [PATCH] snippets: add serial-console Add a new snippet to enable serial console. Even though most Zephyr boards enable this by default, the same is not true for many real boards, where enabling UART can increase power consumption. Having this snippet may become handy on such scenarios. We could also consider cleaning up upstream boards by just enabling this snippet by default. Signed-off-by: Gerard Marull-Paretas --- snippets/serial-console/README.rst | 9 +++++++++ snippets/serial-console/serial-console.conf | 3 +++ snippets/serial-console/snippet.yml | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 snippets/serial-console/README.rst create mode 100644 snippets/serial-console/serial-console.conf create mode 100644 snippets/serial-console/snippet.yml diff --git a/snippets/serial-console/README.rst b/snippets/serial-console/README.rst new file mode 100644 index 00000000000..0978aa0892a --- /dev/null +++ b/snippets/serial-console/README.rst @@ -0,0 +1,9 @@ +.. _snippet-uart-console: + +UART Console Snippet (uart-console) +################################### + +Overview +******** + +This snippet enables console output the chosen UART in ``zephyr,console``. diff --git a/snippets/serial-console/serial-console.conf b/snippets/serial-console/serial-console.conf new file mode 100644 index 00000000000..076ca5b7b16 --- /dev/null +++ b/snippets/serial-console/serial-console.conf @@ -0,0 +1,3 @@ +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y +CONFIG_SERIAL=y diff --git a/snippets/serial-console/snippet.yml b/snippets/serial-console/snippet.yml new file mode 100644 index 00000000000..c6e2c70c260 --- /dev/null +++ b/snippets/serial-console/snippet.yml @@ -0,0 +1,3 @@ +name: serial-console +append: + EXTRA_CONF_FILE: serial-console.conf