Skip to content

BL2: Add mcuboot patch to prevent build warning on FIH_PANIC #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

etienne-lms
Copy link
Contributor

Embedding mcubootutil fih_panic_loop() implementation in TF-M generates a build warning message like the below due to that function missing a noreturn attribute:

.../arm-none-eabi/include/assert.h: In function '__assert_func':
.../trusted-firmware-m/platform/ext/common/tfm_assert.c:22:1: warning: 'noreturn' function does return
   22 | }
      | ^

I've created P-R mcu-tools/mcuboot#2371 to address the issue. Until it is merged, I propose to apply the related patch in Zephyr TF-M repository.

Until the PR mcu-tools/mcuboot#2371 is merged,
apply the added patch to prevent build warning on FIH_PANIC.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
@nashif
Copy link
Member

nashif commented Jul 12, 2025

why are you submitting raw patches instead of fixing the code directly?

@etienne-lms
Copy link
Contributor Author

etienne-lms commented Jul 14, 2025

I'm fine closing this P-R if #144's commit "boot_hal: workaround compiler warning" is the preferred way.
(edited: ref fixed, s/14/144/)

@etienne-lms
Copy link
Contributor Author

why are you submitting raw patches instead of fixing the code directly?

I took example on patches for other lib/ext/ libs: submitting a P-R to the mainline repo (mcu-tools/mcuboot#2371) and adding a patch file in Zephyr TF-M repo but I understand it's maybe not the preferred way to go.

@etienne-lms
Copy link
Contributor Author

I'm closing this P-R since #144 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants