samples: zephyr: use unified application
Replace the hello1 and hello2 applications with hello-world. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This commit is contained in:
parent
7135410196
commit
b9f5a68dac
|
@ -100,18 +100,18 @@ clean_boot: check
|
|||
|
||||
# Build and sign "hello1".
|
||||
hello1: check
|
||||
$(MAKE) -C hello1 BOARD=$(BOARD) -j$(nproc)
|
||||
$(MAKE) -C hello-world FROM_WHO="hello1" O=outdir/hello1/$(BOARD) BOARD=$(BOARD) -j$(nproc)
|
||||
$(IMGTOOL) sign \
|
||||
--key $(SIGNING_KEY) \
|
||||
--header-size $(BOOT_HEADER_LEN) \
|
||||
--align $(FLASH_ALIGNMENT) \
|
||||
--version 1.2 \
|
||||
--included-header \
|
||||
hello1/outdir/$(BOARD)/zephyr.bin \
|
||||
hello-world/outdir/hello1/$(BOARD)/zephyr.bin \
|
||||
signed-hello1.bin
|
||||
|
||||
clean_hello1: check
|
||||
rm -rf hello1/outdir/$(BOARD)
|
||||
rm -rf hello-world/outdir/hello1/$(BOARD)
|
||||
|
||||
# Build and sign "hello2".
|
||||
# This is the same signing command as above, except that it adds the
|
||||
|
@ -119,7 +119,7 @@ clean_hello1: check
|
|||
# this image is intended to be an upgrade. It should be flashed into
|
||||
# slot1 instead of slot0.
|
||||
hello2: check
|
||||
$(MAKE) -C hello2 BOARD=$(BOARD) -j$(nproc)
|
||||
$(MAKE) -C hello-world FROM_WHO="hello2" O=outdir/hello2/$(BOARD) BOARD=$(BOARD) -j$(nproc)
|
||||
$(IMGTOOL) sign \
|
||||
--key $(SIGNING_KEY) \
|
||||
--header-size $(BOOT_HEADER_LEN) \
|
||||
|
@ -127,11 +127,11 @@ hello2: check
|
|||
--version 1.2 \
|
||||
--included-header \
|
||||
--pad 0x60000 \
|
||||
hello2/outdir/$(BOARD)/zephyr.bin \
|
||||
hello-world/outdir/hello2/$(BOARD)/zephyr.bin \
|
||||
signed-hello2.bin
|
||||
|
||||
clean_hello2: check
|
||||
rm -rf hello2/outdir/$(BOARD)
|
||||
rm -rf hello-world/outdir/hello2/$(BOARD)
|
||||
|
||||
flash_boot:
|
||||
$(PYOCD_FLASHTOOL) -ce -a 0 mcuboot.bin
|
||||
|
|
|
@ -8,6 +8,3 @@ useful.
|
|||
|
||||
Please see the comments in the Makefile in this directory for more
|
||||
details on how to build and test this application.
|
||||
|
||||
The hello applications were taken directly from the Zephyr source
|
||||
tree.
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
BOARD ?= qemu_x86
|
||||
CONF_FILE = prj.conf
|
||||
|
||||
include ${ZEPHYR_BASE}/Makefile.test
|
|
@ -1,38 +0,0 @@
|
|||
.. _hello_world:
|
||||
|
||||
Hello World
|
||||
###########
|
||||
|
||||
Overview
|
||||
********
|
||||
A simple Hello World example that can be used with any supported board and
|
||||
prints 'Hello World' to the console. This application can be built into modes:
|
||||
|
||||
* single thread
|
||||
* multi threading
|
||||
|
||||
Building and Running
|
||||
********************
|
||||
|
||||
This project outputs 'Hello World' to the console. It can be built and executed
|
||||
on QEMU as follows:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cd samples/hello_world
|
||||
$ make run
|
||||
|
||||
|
||||
To build the single thread version, use the supplied configuration file for
|
||||
single thread: :file:`prj_single.conf`:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ make CONF_FILE=prj_single.conf run
|
||||
|
||||
Sample Output
|
||||
=============
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! x86
|
|
@ -1,9 +0,0 @@
|
|||
/* DTS overlay file.
|
||||
* vim: ft=dts
|
||||
*/
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
# Enable the console
|
||||
CONFIG_CONSOLE_SHELL=y
|
||||
CONFIG_KERNEL_SHELL=y
|
||||
|
||||
# Use the bootloader.
|
||||
CONFIG_BOOT_HEADER=y
|
||||
CONFIG_TEXT_SECTION_OFFSET=0x200
|
|
@ -1,15 +0,0 @@
|
|||
sample:
|
||||
name: hello world
|
||||
description: Hello World sample, the simplest Zephyr application
|
||||
platforms: all
|
||||
tests:
|
||||
- test:
|
||||
build_only: true
|
||||
tags: samples tests
|
||||
min_ram: 16
|
||||
- singlethread:
|
||||
build_only: true
|
||||
extra_args: CONF_FILE=prj_single.conf
|
||||
filter: not CONFIG_BLUETOOTH and not CONFIG_GPIO_SCH
|
||||
tags: samples tests
|
||||
min_ram: 16
|
|
@ -1 +0,0 @@
|
|||
obj-y = main.o
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2014 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <misc/printk.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printk("Hello World number 1! %s\n", CONFIG_ARCH);
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
BOARD ?= qemu_x86
|
||||
CONF_FILE = prj.conf
|
||||
|
||||
include ${ZEPHYR_BASE}/Makefile.test
|
|
@ -1,38 +0,0 @@
|
|||
.. _hello_world:
|
||||
|
||||
Hello World
|
||||
###########
|
||||
|
||||
Overview
|
||||
********
|
||||
A simple Hello World example that can be used with any supported board and
|
||||
prints 'Hello World' to the console. This application can be built into modes:
|
||||
|
||||
* single thread
|
||||
* multi threading
|
||||
|
||||
Building and Running
|
||||
********************
|
||||
|
||||
This project outputs 'Hello World' to the console. It can be built and executed
|
||||
on QEMU as follows:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ cd samples/hello_world
|
||||
$ make run
|
||||
|
||||
|
||||
To build the single thread version, use the supplied configuration file for
|
||||
single thread: :file:`prj_single.conf`:
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
$ make CONF_FILE=prj_single.conf run
|
||||
|
||||
Sample Output
|
||||
=============
|
||||
|
||||
.. code-block:: console
|
||||
|
||||
Hello World! x86
|
|
@ -1,9 +0,0 @@
|
|||
/* DTS overlay file.
|
||||
* vim: ft=dts
|
||||
*/
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zephyr,code-partition = &slot0_partition;
|
||||
};
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
# Enable the console
|
||||
CONFIG_CONSOLE_SHELL=y
|
||||
CONFIG_KERNEL_SHELL=y
|
||||
|
||||
# Use the bootloader.
|
||||
CONFIG_BOOT_HEADER=y
|
||||
CONFIG_TEXT_SECTION_OFFSET=0x200
|
|
@ -1,15 +0,0 @@
|
|||
sample:
|
||||
name: hello world
|
||||
description: Hello World sample, the simplest Zephyr application
|
||||
platforms: all
|
||||
tests:
|
||||
- test:
|
||||
build_only: true
|
||||
tags: samples tests
|
||||
min_ram: 16
|
||||
- singlethread:
|
||||
build_only: true
|
||||
extra_args: CONF_FILE=prj_single.conf
|
||||
filter: not CONFIG_BLUETOOTH and not CONFIG_GPIO_SCH
|
||||
tags: samples tests
|
||||
min_ram: 16
|
|
@ -1 +0,0 @@
|
|||
obj-y = main.o
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2014 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr.h>
|
||||
#include <misc/printk.h>
|
||||
|
||||
void main(void)
|
||||
{
|
||||
printk("Upgraded hello! %s\n", CONFIG_ARCH);
|
||||
}
|
Loading…
Reference in New Issue