File tree Expand file tree Collapse file tree 13 files changed +99
-0
lines changed
Expand file tree Collapse file tree 13 files changed +99
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: Apache-2.0
2+ # Author: James Walmsley <james@fullfat-fs.co.uk>
3+
4+ cmake_minimum_required (VERSION 3.20.0)
5+
6+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
7+ test_sysbuild()
8+
9+ project (hello_world)
10+
11+ target_sources (app PRIVATE mfg_image/src/main.c)
12+
Original file line number Diff line number Diff line change 1+ # Example Sysbuild Project
2+
3+ The aim of this folder is to demonstrate a typical sysbuild project from the ground-up.
4+
5+ ## Build
6+
7+ ```
8+ cd my-workspace/example-application
9+ west build --sysbuild sysbuild
10+ ```
11+
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025 James Walmsley <james@fullfat-fs.co.uk>
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ cmake_minimum_required (VERSION 3.20.0)
5+ find_package (Zephyr REQUIRED HINTS $ENV{ZPEHYR_BASE} )
6+
7+ project (dfu_app)
8+ target_sources (app PRIVATE src/main.c)
9+
Original file line number Diff line number Diff line change 1+ CONFIG_BOOTLOADER_MCUBOOT=y
2+ CONFIG_MCUBOOT_SIGNATURE_KEY_FILE="bootloader/mcuboot/root-rsa-2048.pem"
3+ CONFIG_FLASH=y
4+ CONFIG_IMG_MANAGER=y
5+ CONFIG_STREAM_FLASH=y
6+ CONFIG_USB_DFU_CLASS=y
7+ CONFIG_USB_DEVICE_STACK=y
8+ CONFIG_FLASH_MAP=y
9+
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 James Walmsley
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+
6+ #include <zephyr/sys/printk.h>
7+
8+ int main (void )
9+ {
10+ printk ("Hello world from %s\n" , CONFIG_BOARD_TARGET );
11+
12+ return 0 ;
13+ }
14+
15+
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025 James Walmsley <james@fullfat-fs.co.uk>
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ cmake_minimum_required (VERSION 3.20.0)
5+ find_package (Zephyr REQUIRED HINTS $ENV{ZPEHYR_BASE} )
6+
7+ project (mfg_image)
8+ target_sources (app PRIVATE src/main.c)
9+
Original file line number Diff line number Diff line change 1+ CONFIG_BOOTLOADER_MCUBOOT=y
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2025 James Walmsley
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+
6+ #include <zephyr/sys/printk.h>
7+
8+ int main (void )
9+ {
10+ printk ("Manufacturing image on: %s\n" , CONFIG_BOARD_TARGET );
11+
12+ return 0 ;
13+ }
14+
Original file line number Diff line number Diff line change 1+ # Copyright (c) 2025 James Walmsley <james@fullfat-fs.co.uk>
2+ # SPDX-License-Identifier: Apache-2.0
3+
4+ ExternalZephyrProject_Add(
5+ APPLICATION mfg_image
6+ SOURCE_DIR ${APP_DIR} /mfg_image
7+ )
8+
9+ ExternalZephyrProject_Add(
10+ APPLICATION dfu_app
11+ SOURCE_DIR ${APP_DIR} /dfu_app
12+ )
13+
14+ add_dependencies (${DEFAULT_IMAGE} mfg_image)
15+ add_dependencies (${DEFAULT_IMAGE} dfu_app)
You can’t perform that action at this time.
0 commit comments