Initial commit

Initial commit.
This commit is contained in:
kntran1
2026-03-23 14:40:39 -05:00
parent e84b2b4166
commit 4e2a5258a5
872 changed files with 165227 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# Top-level CMakeLists.txt for the skeleton application.
#
# Copyright (c) 2017 Open Source Foundries Limited
# Copyright (c) 2018 Foundries.io Ltd
#
# SPDX-License-Identifier: Apache-2.0
#
# This provides a basic application structure suitable for loading by
# mcuboot, which is easy to customize on a per-board basis. It can be
# used as a starting point for new applications.
cmake_minimum_required(VERSION 3.8)
# find_package(Zephyr) in order to load application boilerplate:
# https://docs.zephyrproject.org/latest/develop/application/index.html
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(NONE)
# This string ends up getting printed in the device console
if (NOT DEFINED FROM_WHO)
set(FROM_WHO Zephyr)
endif()
target_compile_definitions(app PRIVATE "-DMCUBOOT_HELLO_WORLD_FROM=\"${FROM_WHO}\"")
target_sources(app PRIVATE src/main.c)

View File

@@ -0,0 +1,6 @@
This is a "Hello world" skeleton application which can be used as a
starting point for Zephyr application development using mcuboot.
It includes the configuration "glue" needed to make the application
loadable by mcuboot in addition to a basic Zephyr hello world
application's code.

View File

@@ -0,0 +1 @@
*-local.conf

View File

@@ -0,0 +1,2 @@
You can place per-board configuration here. See the comments in the
CMakeLists.txt for more information.

View File

@@ -0,0 +1,12 @@
# Print a banner on the UART on startup.
CONFIG_BOOT_BANNER=y
# Enable console and printk()
CONFIG_PRINTK=y
CONFIG_STDOUT_CONSOLE=y
# Enable Zephyr application to be booted by MCUboot
CONFIG_BOOTLOADER_MCUBOOT=y
# Use the default MCUBoot PEM key file (BOOT_SIGNATURE_KEY_FILE)
CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/root-rsa-2048.pem"

View File

@@ -0,0 +1,9 @@
sample:
name: Application Skeleton
description: Basic "hello world" application, but loadable by mcuboot
platforms: all
tests:
- test:
build_only: true
tags: samples tests
min_ram: 16

View File

@@ -0,0 +1 @@
obj-y = main.o

View File

@@ -0,0 +1,14 @@
/*
* Copyright (c) 2017 Linaro, Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
void main(void)
{
printk("Hello World from %s on %s!\n",
MCUBOOT_HELLO_WORLD_FROM, CONFIG_BOARD);
}