board: arm: google_kukui: Add a sample for kukui
It is useful to use kukui with a shell to test out its features., Add a sample for this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
82de647e31
commit
7f251a7d08
|
@ -0,0 +1,9 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.13.1)
|
||||
|
||||
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
|
||||
project(google_kukui)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
|
@ -0,0 +1,33 @@
|
|||
.. _google_kukui:
|
||||
|
||||
Kukui general features
|
||||
######################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
This provides access to :ref:`Kukui <google_kukui_board>` through a serial shell
|
||||
so you can try out the supported features, including I2C, GPIO and flash access.
|
||||
|
||||
Building
|
||||
********
|
||||
|
||||
The sample can be built as follows:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/boards/google_kukui
|
||||
:board: google_kukui
|
||||
:goals: build
|
||||
:compact:
|
||||
|
||||
Sample Output
|
||||
=============
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Welcome to Google Kukui
|
||||
|
||||
uart:~$ (press tab)
|
||||
clear flash gpio help history i2c resize shell
|
||||
uart:~$ i2c read I2C_2 36
|
||||
00000000: 82 00 00 ff 80 7f 00 ff 00 00 c1 0a c8 5b 0c 62 |........ .....[.b|
|
|
@ -0,0 +1,6 @@
|
|||
# Enable all useful shell commands (i.e. those with driver support)
|
||||
CONFIG_SHELL=y
|
||||
CONFIG_SHELL_BACKENDS=y
|
||||
CONFIG_SHELL_BACKEND_SERIAL=y
|
||||
CONFIG_GPIO_SHELL=y
|
||||
CONFIG_I2C_SHELL=y
|
|
@ -0,0 +1,6 @@
|
|||
sample:
|
||||
name: Kukui general features
|
||||
tests:
|
||||
sample.board.google_kukui:
|
||||
platform_whitelist: google_kukui
|
||||
tags: ec
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright 2020 Google LLC
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <sys/printk.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printk("Welcome to Google Kukui\n");
|
||||
}
|
Loading…
Reference in New Issue