Skip to content
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

mcuboot: nordic development kits fail to compile #73301

Closed
JordanYates opened this issue May 26, 2024 · 6 comments · Fixed by mcu-tools/mcuboot#2000 or #75634
Closed

mcuboot: nordic development kits fail to compile #73301

JordanYates opened this issue May 26, 2024 · 6 comments · Fixed by mcu-tools/mcuboot#2000 or #75634
Assignees
Labels
area: MCUBoot bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug

Comments

@JordanYates
Copy link
Collaborator

Describe the bug

The following Nordic development kits fail to compile the upstream mcuboot application.

  • nrf9161dk@0.7.0/nrf9161
  • thingy52/nrf52832
  • thingy53/nrf5340/cpuapp

Enabling multithreading by removing the following line lets them all compile:
https://github.com/zephyrproject-rtos/mcuboot/blob/d4394c2f9b76e0a7b758441cea3a8ceb896f66c8/boot/zephyr/Kconfig#L751

To Reproduce

west build -b nrf9161dk@0.7.0/nrf9161 bootloader/mcuboot/boot/zephyr/ -p
west build -b thingy52/nrf52832 bootloader/mcuboot/boot/zephyr/ -p
west build -b thingy53/nrf5340/cpuapp bootloader/mcuboot/boot/zephyr/ -p

Expected behavior

Development kits should successfully compile the standard Zephyr bootloader

Environment (please complete the following information):

@JordanYates JordanYates added bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx area: MCUBoot labels May 26, 2024
@aescolar aescolar added the priority: medium Medium impact/importance bug label May 28, 2024
@carlescufi carlescufi assigned carlescufi and unassigned nordicjm Jun 4, 2024
@nashif
Copy link
Member

nashif commented Jun 4, 2024

why is this a zephyr bug? Please report at nordic NCS.

@nashif nashif closed this as completed Jun 4, 2024
@JordanYates
Copy link
Collaborator Author

why is this a zephyr bug? Please report at nordic NCS.

Why is this a NCS bug? It's a Zephyr bug because these are Zephyr supported platforms failing to compile the Zephyr bootloader.

@nordicjm
Copy link
Collaborator

Fix: mcu-tools/mcuboot#1984

@JordanYates
Copy link
Collaborator Author

I am now discovering the situation is worse for me with the fix than it was without it :)
Before I could simply set mcuboot_CONFIG_MULTITHREADING=y in my sysbuild config and everything would be fine.
Now I have no board agnostic way to enable the external flash drivers in MCUboot...

@nordicjm
Copy link
Collaborator

I am now discovering the situation is worse for me with the fix than it was without it :) Before I could simply set mcuboot_CONFIG_MULTITHREADING=y in my sysbuild config and everything would be fine. Now I have no board agnostic way to enable the external flash drivers in MCUboot...

it needs to be done on a board by board basis, if you want to do that then I would suggest using sysbuild with your application and having a sysbuild/mcuboot folder with your MCUboot files, you can then create a boards folder there and have your overlays for each board, or alternatively setting mcuboot_APPLICATION_CONFIG_DIR to a common place if you need it across multiple repos/applications.

Example: https://github.com/nrfconnect/sdk-nrf/tree/main/applications/machine_learning

@JordanYates
Copy link
Collaborator Author

That's just not a scalable solution. Copy pasting files into every application is a poor solution when better solutions exist IMO.
Happy to continue the conversation on this PR and why you think its a bad idea :)
mcu-tools/mcuboot#2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: MCUBoot bug The issue is a bug, or the PR is fixing a bug platform: nRF Nordic nRFx priority: medium Medium impact/importance bug
Projects
None yet
5 participants