Skip to content

soc: renesas: ra: don't emit option settings when chain-loaded by MCUboot - #114429

Merged
fabiobaltieri merged 1 commit into
zephyrproject-rtos:mainfrom
jeremydick:renesas-ra-mcuboot
Jul 28, 2026
Merged

soc: renesas: ra: don't emit option settings when chain-loaded by MCUboot#114429
fabiobaltieri merged 1 commit into
zephyrproject-rtos:mainfrom
jeremydick:renesas-ra-mcuboot

Conversation

@jeremydick

@jeremydick jeremydick commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Emit the option settings sections only when the image is a standalone app or MCUboot. Don't emit the option settings when the image is an app being chain-loaded by MCUboot.

This avoids populating addresses outside of the code-partition area in the app image, allowing app images to be signed correctly.

Enabling MCUboot for renesas ra-series is also dependent on:
#109125
mcu-tools/mcuboot#2797

…boot

Emit the option settings sections only when the image is a standalone
app or MCUboot. Don't emit the option settings when the image is an
app being chain-loaded by MCUboot.

This avoids populating addresses outside of the code-partition area
in the app image.

Signed-off-by: Jeremy Dick <jdick@pivotint.com>
@sonarqubecloud

Copy link
Copy Markdown

@URNHere

URNHere commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

LGTM.

If we manage to merge mcu-tools/mcuboot#2797 while the zephyr flash driver gets updated in #109125 , you can also make mcuboot work by using the manual defines for the sectors:

CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n
CONFIG_BOOT_MAX_IMG_SECTORS=<no of sectors>

It Is a workaround, but It worked in my case.

I think this one Is needed in any case:
CONFIG_BOOT_SERIAL_UNALIGNED_BUFFER_SIZE=128.

@nordicjm
nordicjm removed their request for review July 27, 2026 08:15
@fabiobaltieri
fabiobaltieri merged commit fbd79da into zephyrproject-rtos:main Jul 28, 2026
24 of 26 checks passed
#include <zephyr/devicetree.h>

/* Emit option setting sections only when standalone app OR MCUboot itself */
#if !defined(CONFIG_BOOTLOADER_MCUBOOT) || defined(CONFIG_MCUBOOT)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no endif, causing ci problems in main

#include <zephyr/devicetree.h>

/* Emit option setting sections only when standalone app OR MCUboot itself */
#if !defined(CONFIG_BOOTLOADER_MCUBOOT) || defined(CONFIG_MCUBOOT)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs platform: Renesas RA Renesas Electronics Corporation, RA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants