|  | 
|  | 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 | +The application is built and linked and downloaded in the external flash | 
|  | 13 | +while the mcuboot is built and downloaded for the internal flash | 
|  | 14 | +There is an overlay to set the partition in the external flash | 
|  | 15 | + | 
|  | 16 | +.. code-block:: console | 
|  | 17 | +
 | 
|  | 18 | +    chosen { | 
|  | 19 | +        zephyr,flash = &mx25uw25645; | 
|  | 20 | +        zephyr,code-partition = &slot0_partition; | 
|  | 21 | +    }; | 
|  | 22 | +
 | 
|  | 23 | +
 | 
|  | 24 | +Building and Running | 
|  | 25 | +******************** | 
|  | 26 | + | 
|  | 27 | +This application can be built with  | 
|  | 28 | +west build -p always -b nucleo_h7s3l8 samples/boards/stm32/hello_world_xip/ --sysbuild -- -DSB_CONFIG_BOOTLOADER_MCUBOOT=y | 
|  | 29 | +Download the build/mcuboot/zephyr/zephyr.bin at internal flash adress 0x08000000 | 
|  | 30 | +Download the build/hello_world_xip/zephyr/zephyr.signed.bin at internal flash adress 0x70000000 (chosen zephyr,code-partition) | 
|  | 31 | +and executed on nucleo_h7s3l8 as follows: | 
|  | 32 | + | 
|  | 33 | +.. zephyr-app-commands:: | 
|  | 34 | +   :zephyr-app: samples/boards/stm32/hello_world_xip | 
|  | 35 | +   :host-os: unix | 
|  | 36 | +   :board: nucleo_h7s3l8 | 
|  | 37 | +   :goals: run | 
|  | 38 | +   :compact: | 
|  | 39 | + | 
|  | 40 | +To build for another board, change "nucleo_h7s3l8" above to that board's name. | 
|  | 41 | + | 
|  | 42 | +Sample Output | 
|  | 43 | +============= | 
|  | 44 | + | 
|  | 45 | +.. code-block:: console | 
|  | 46 | +
 | 
|  | 47 | +    Hello World! from external flash b_u585i_iot02a | 
|  | 48 | +    *** Booting MCUboot v2.1.0-rc1-275-g6d34ca2cfe4d *** | 
|  | 49 | +    *** Using Zephyr OS build v4.1.0-1733-ge706fceff985 *** | 
|  | 50 | +    I: Starting bootloader                                                                                                                          | 
|  | 51 | +    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3                                                                       | 
|  | 52 | +    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3                                                                     | 
|  | 53 | +    I: Boot source: none                                                                                                                            | 
|  | 54 | +    I: Image index: 0, Swap type: none                                                                                                              | 
|  | 55 | +    I: Bootloader chainload address offset: 0x0                                                                                                     | 
|  | 56 | +    I: Image version: v0.0.0                                                                                                                        | 
|  | 57 | +    I: Jumping to the first image slot                                                                                                              | 
|  | 58 | +    *** Booting Zephyr OS build v4.1.0-1733-ge706fceff985 ***                                                                                       | 
|  | 59 | +    Hello World! from external flash  nucleo_h7s3l8   | 
|  | 60 | +
 | 
|  | 61 | +Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`. | 
0 commit comments