File tree Expand file tree Collapse file tree 5 files changed +77
-0
lines changed
samples/boards/stm32/hello_world_xip Expand file tree Collapse file tree 5 files changed +77
-0
lines changed Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: Apache-2.0
2+
3+ cmake_minimum_required (VERSION 3.20.0)
4+
5+ find_package (Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE} )
6+ project (hello_world_xip)
7+
8+ target_sources (app PRIVATE src/main.c)
Original file line number Diff line number Diff line change 1+ .. _hello_world_xip :
2+
3+ Hello World in XiP
4+ ##################
5+
6+ Overview
7+ ********
8+
9+ A simple sample that can be used with any :ref: `supported board <boards >`
10+ which has an external NOR octo- or quad- flash and
11+ prints "Hello World from external flash" to the console.
12+
13+
14+ Building and Running
15+ ********************
16+
17+ This application can be built with
18+ west build -p always -b b_u585i_iot02a samples/boards/stm32/hello_world_xip/ --sysbuild -- -DSB_CONFIG_BOOTLOADER_MCUBOOT=y
19+
20+ and executed on b_u585i_iot02a as follows:
21+
22+ .. zephyr-app-commands ::
23+ :zephyr-app: samples/boards/stm32/hello_world_xip
24+ :host-os: unix
25+ :board: b_u585i_iot02a
26+ :goals: run
27+ :compact:
28+
29+ To build for another board, change "b_u585i_iot02a" above to that board's name.
30+
31+ Sample Output
32+ =============
33+
34+ .. code-block :: console
35+
36+ Hello World! from external flash b_u585i_iot02a
37+
38+
39+ Exit QEMU by pressing :kbd: `CTRL + A ` :kbd: `x `.
Original file line number Diff line number Diff line change 1+ #CONFIG_XIP=y
Original file line number Diff line number Diff line change 1+ sample :
2+ description : Hello World sample, the simplest Zephyr from external flash
3+ application
4+ name : hello world
5+ common :
6+ tags : introduction
7+ integration_platforms :
8+ - native_posix
9+ harness : console
10+ harness_config :
11+ type : one_line
12+ regex :
13+ - " Hello World! (.*)"
14+ tests :
15+ sample.basic.helloworld :
16+ tags : introduction
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2012-2014 Wind River Systems, Inc.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ #include <zephyr/kernel.h>
8+
9+ int main (void )
10+ {
11+ printk ("Hello World! from external flash %s\n" , CONFIG_BOARD );
12+ return 0 ;
13+ }
You can’t perform that action at this time.
0 commit comments