-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing sample addition. Signed-off-by: Carles Cufi <[email protected]>
- Loading branch information
1 parent
f67ca0f
commit 47fbd31
Showing
5 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(hello_world) | ||
|
||
target_sources(app PRIVATE src/main.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. zephyr:code-sample:: hello_world | ||
:name: Hello World | ||
|
||
Print "Hello World" to the console. | ||
|
||
Hello World | ||
########### | ||
|
||
Overview | ||
******** | ||
|
||
A simple sample that can be used with any :ref:`supported board <boards>` and | ||
prints "Hello World" to the console. | ||
|
||
Building and Running | ||
******************** | ||
|
||
This application can be built and executed on QEMU as follows: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/hello_world | ||
:host-os: unix | ||
:board: qemu_x86 | ||
:goals: run | ||
:compact: | ||
|
||
To build for another board, change "qemu_x86" above to that board's name. | ||
|
||
Sample Output | ||
============= | ||
|
||
.. code-block:: console | ||
Hello World! x86 | ||
Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# nothing here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
sample: | ||
description: Hello World sample, the simplest Zephyr | ||
application | ||
name: hello world | ||
common: | ||
tags: introduction | ||
integration_platforms: | ||
- native_sim | ||
harness: console | ||
harness_config: | ||
type: one_line | ||
regex: | ||
- "Hello World! (.*)" | ||
tests: | ||
sample.basic.helloworld: | ||
tags: introduction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) 2012-2014 Wind River Systems, Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
int main(void) | ||
{ | ||
printf("Hello World! %s\n", CONFIG_BOARD_TARGET); | ||
|
||
return 0; | ||
} |