Skip to content

Commit 00e3873

Browse files
Add preliminary external config sample
This sample source code is an empty file (no symbol for main()). All functionality is eabled through the configuration settings. The system should successfully build this sample with the following command: './zephyr/scripts/twister --testsuite-root mcuboot/samples/zephyr_external_config' Incremental verification: 1. (Pass) west build -p always -b nrf52840dk_nrf52840 mcuboot/boot/zephyr 2. (Pass) ./zephyr/scripts/twister --testsuite-root zephyr/tests/subsys/dfu 3. (Pass) ./zephyr/scripts/twister --testsuite-root zephyr/samples/subsys/mgmt/mcumgr/smp_svr/ 4. (Pass) ./zephyr/scripts/twister --testsuite-root mcuboot/boot/zephyr 5. (FAIL) ./zephyr/scripts/twister --testsuite-root mcuboot/samples/zephyr_external_config This new sample is expected to fail while we evolve the minimum implementation to support it. Currently the build failure message is: ''' error: MCUBOOT (defined at Kconfig.zephyr:682) is assigned in a configuration file, but is not directly user-configurable (has no prompt). It gets its value indirectly from other symbols. See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_MCUBOOT and/or look up MCUBOOT in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too. ''' Signed-off-by: Gregory Shue <[email protected]>
1 parent e82b370 commit 00e3873

File tree

6 files changed

+97
-0
lines changed

6 files changed

+97
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2022 Legrand North America, LLC.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.20.0)
5+
6+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
7+
project(mcuboot_exernal_config)
8+
9+
target_sources(app PRIVATE empty.c)
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.. _mcuboot_external_config:
2+
3+
MCUBoot External Config
4+
#######################
5+
6+
Overview
7+
********
8+
9+
A simple sample illustrating how to configure an MCUBoot image build
10+
from a different module.
11+
12+
Building and Running
13+
********************
14+
15+
This application can be built and executed on QEMU as follows:
16+
17+
.. code-block:: console
18+
19+
west build -b nrf52840dk_nrf52840 \
20+
bootloader/mcuboot/samples/zephyr_external_config
21+
22+
23+
Sample Output
24+
=============
25+
26+
None.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* This file is intentionally empty */
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2022 Legrand North America, LLC.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_MCUBOOT=y
5+
6+
CONFIG_LOG=y
7+
CONFIG_LOG_MODE_MINIMAL=y
8+
CONFIG_LOG_DEFAULT_LEVEL=0
9+
CONFIG_CBPRINTF_NANO=y
10+
11+
CONFIG_FLASH=y
12+
CONFIG_DEBUG=y
13+
CONFIG_PM=n
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2022 Legrand North America, LLC.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
sample:
5+
description: MCUBoot external config
6+
name: MCUBoot external config
7+
common:
8+
tags: bootloader_mcuboot
9+
platform_allow: nrf52840dk_nrf52840 frdm_k64f disco_l475_iot1
10+
integration_platforms:
11+
- nrf52840dk_nrf52840
12+
- frdm_k64f
13+
- disco_l475_iot1
14+
tests:
15+
mcuboot.sample.mcuboot_external_config:
16+
tags: bootloader_mcuboot

west.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2022 Legrand North America, LLC.
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# The west manifest file for Zephyr ecosystem development.
6+
#
7+
# Usage:
8+
# west init -m https://github.com/mcu-tools/mcuboot
9+
# west update
10+
11+
manifest:
12+
version: "0.12"
13+
14+
remotes:
15+
- name: zephyrproject
16+
url-base: https://github.com/zephyrproject-rtos
17+
- name: mcu-tools
18+
url-base: https://github.com/mcu-tools
19+
20+
defaults:
21+
remote: mcu-tools
22+
23+
projects:
24+
- name: zephyr
25+
revision: main
26+
remote: zephyrproject
27+
import:
28+
name-blocklist:
29+
- mcuboot
30+
31+
self:
32+
path: mcuboot

0 commit comments

Comments
 (0)