Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions boards/renesas/ek_ra8p1/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,79 @@ To flash the program to board

west flash -r jlink

MCUboot bootloader
Copy link
Contributor

@nordicjm nordicjm Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this information applies to any board and it seems like good information to have but to have it globally rather than multiple times in different boards - which also means it's easier to maintain updating once then X times in boards - thoughts @kartben ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 -- would suggest adding an rst "snippet" boards/common/doc and the .. literalinclude it wherever needed

==================

The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board.

To build the sample application using sysbuild use the command:

.. zephyr-app-commands::
:tool: west
:zephyr-app: samples/hello_world
:board: ek_ra8p1/r7ka8p1kflcac/cm85
:goals: build flash
:west-args: --sysbuild
:gen-args: -DSB_CONFIG_BOOTLOADER_MCUBOOT=y

By default, Sysbuild creates MCUboot and user application images.

Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:

.. code-block::

build/
├── hello_world
| └── zephyr
│ ├── zephyr.elf
│ ├── zephyr.hex
│ ├── zephyr.bin
│ ├── zephyr.signed.bin
│ └── zephyr.signed.hex
├── mcuboot
│ └── zephyr
│ ├── zephyr.elf
│ ├── zephyr.hex
│ └── zephyr.bin
└── domains.yaml

.. note::

With ``--sysbuild`` option, MCUboot will be rebuilt and re-flashed
every time the pristine build is used.

To only flash the user application in the subsequent builds, Use:

.. code-block:: console

$ west flash --domain hello_world

For more information about the system build please read the :ref:`sysbuild` documentation.

You should see the following message in the terminal:

.. code-block:: console

*** Booting MCUboot v2.2.0-171-g8513be710e5e ***
*** Using Zephyr OS build v4.2.0-6156-ged85ac9ffda9 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v0.0.0
I: Jumping to the first image slot
*** Booting Zephyr OS build v4.2.0-6156-ged85ac9ffda9 ***
Hello World! ek_ra8p1/r7ka8p1kflcac/cm85

References
**********
- `EK-RA8P1 Website`_
Expand Down
1 change: 1 addition & 0 deletions boards/renesas/ek_ra8p1/ek_ra8p1_r7ka8p1kflcac_cm33.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
chosen {
zephyr,sram = &sram1;
zephyr,flash = &code_mram_cm33;
zephyr,flash-controller = &mram_ctrl;
zephyr,console = &uart9;
zephyr,shell-uart = &uart9;
};
Expand Down
30 changes: 30 additions & 0 deletions boards/renesas/ek_ra8p1/ek_ra8p1_r7ka8p1kflcac_cm85.dts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &code_mram_cm85;
zephyr,flash-controller = &mram_ctrl;
zephyr,code-partition = &slot0_partition;
zephyr,console = &uart8;
zephyr,shell-uart = &uart8;
};
Expand Down Expand Up @@ -141,6 +143,34 @@
};
};

&code_mram_cm85 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x10000 DT_SIZE_K(344)>;
};

slot1_partition: partition@66000 {
label = "image-1";
reg = <0x66000 DT_SIZE_K(344)>;
};

storage_partition: partition@bc000 {
label = "storage";
reg = <0xbc000 DT_SIZE_K(16)>;
};
};
};

zephyr_lcdif: &lcdif {};

pmod_sd_shield: &sdhc0 {};
Expand Down
73 changes: 73 additions & 0 deletions boards/renesas/mck_ra8t2/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,79 @@ To flash the program to board

west flash -r jlink

MCUboot bootloader
==================

The sysbuild makes possible to build and flash all necessary images needed to
bootstrap the board.

To build the sample application using sysbuild use the command:

.. zephyr-app-commands::
:tool: west
:zephyr-app: samples/hello_world
:board: mck_ra8t2/r7ka8t2lfecac/cm85
:goals: build flash
:west-args: --sysbuild
:gen-args: -DSB_CONFIG_BOOTLOADER_MCUBOOT=y

By default, Sysbuild creates MCUboot and user application images.

Build directory structure created by sysbuild is different from traditional
Zephyr build. Output is structured by the domain subdirectories:

.. code-block::

build/
├── hello_world
| └── zephyr
│ ├── zephyr.elf
│ ├── zephyr.hex
│ ├── zephyr.bin
│ ├── zephyr.signed.bin
│ └── zephyr.signed.hex
├── mcuboot
│ └── zephyr
│ ├── zephyr.elf
│ ├── zephyr.hex
│ └── zephyr.bin
└── domains.yaml

.. note::

With ``--sysbuild`` option, MCUboot will be rebuilt and re-flashed
every time the pristine build is used.

To only flash the user application in the subsequent builds, Use:

.. code-block:: console

$ west flash --domain hello_world

For more information about the system build please read the :ref:`sysbuild` documentation.

You should see the following message in the terminal:

.. code-block:: console

*** Booting MCUboot v2.2.0-171-g8513be710e5e ***
*** Using Zephyr OS build v4.2.0-6156-ged85ac9ffda9 ***
I: Starting bootloader
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v0.0.0
I: Jumping to the first image slot
*** Booting Zephyr OS build v4.2.0-6156-ged85ac9ffda9 ***
Hello World! mck_ra8t2/r7ka8t2lfecac/cm85

References
**********
- `MCK-RA8T2 Website`_
Expand Down
30 changes: 30 additions & 0 deletions boards/renesas/mck_ra8t2/mck_ra8t2_r7ka8t2lfecac_cm85.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &code_mram_cm85;
zephyr,flash-controller = &mram_ctrl;
zephyr,code-partition = &slot0_partition;
zephyr,console = &uart9;
zephyr,shell-uart = &uart9;
};
Expand Down Expand Up @@ -102,3 +104,31 @@
status = "okay";
};
};

&code_mram_cm85 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

boot_partition: partition@0 {
label = "mcuboot";
reg = <0x0 DT_SIZE_K(64)>;
};

slot0_partition: partition@10000 {
label = "image-0";
reg = <0x10000 DT_SIZE_K(464)>;
};

slot1_partition: partition@84000 {
label = "image-1";
reg = <0x84000 DT_SIZE_K(464)>;
};

storage_partition: partition@f8000 {
label = "storage";
reg = <0xf8000 DT_SIZE_K(32)>;
};
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@48000 {
storage_partition: partition@38000 {
label = "storage";
reg = <0x48000 DT_SIZE_K(32)>;
reg = <0x38000 DT_SIZE_K(32)>;
};
};
};

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ manifest:
- hal
- name: hal_renesas
path: modules/hal/renesas
revision: f6950ff142a5a28950c97d818d5b8ec1d3c85ba5
revision: fbe4b815ab838a13d24f1d3fc963846ff18c6b0e
groups:
- hal
- name: hal_rpi_pico
Expand Down