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

nrf54l15dk: patches needed for run MUBoot based dfu #17334

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

nvlsianpu
Copy link
Contributor

This introduce changes missung in nRF54l15DK support,
mainly follow what have been done for the PDK.

These patches are needed for run MUBoot based dfu.

@github-actions github-actions bot added manifest changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Sep 16, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 16, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
mcuboot nrfconnect/sdk-mcuboot@e66169a nrfconnect/sdk-mcuboot@f30dce1 (main) nrfconnect/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch from 0de9932 to 87d60b6 Compare September 16, 2024 13:32
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Sep 16, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 15

Inputs:

Sources:

more details

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (0)

Outputs:

Toolchain

Version:
Build docker image:

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain
  • ◻️ Build twister
  • ◻️ Integration tests

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

@LuDuda LuDuda left a comment

Choose a reason for hiding this comment

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

Thank you 🚀

@@ -28,14 +28,14 @@ config PM_PARTITION_SIZE_TFM
default 0xFE00 if TFM_PROFILE_TYPE_MINIMAL && TFM_CMAKE_BUILD_TYPE_DEBUG && \
BOOTLOADER_MCUBOOT
default 0x10000 if TFM_PROFILE_TYPE_MINIMAL && TFM_CMAKE_BUILD_TYPE_DEBUG
default 0x6800 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT && SOC_NRF54L15_ENGA_CPUAPP
default 0x6800 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT && (SOC_NRF54L15_ENGA_CPUAPP || SOC_NRF54L15_ENGA_CPUAPP)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean:

Suggested change
default 0x6800 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT && (SOC_NRF54L15_ENGA_CPUAPP || SOC_NRF54L15_ENGA_CPUAPP)
default 0x6800 if TFM_PROFILE_TYPE_MINIMAL && BOOTLOADER_MCUBOOT && (SOC_NRF54L15_ENGA_CPUAPP || SOC_NRF54L15_CPUAPP)

Same below?

@@ -3,7 +3,7 @@
# In nRF54L15 we place the TF-M non-secure storage partitions after the
# TF-M non-secure application to avoid splitting the secure/non-secure
# partitions more than necessary.
#ifdef CONFIG_SOC_NRF54L15_ENGA_CPUAPP
#ifdef (CONFIG_SOC_NRF54L15_ENGA_CPUAPP || CONFIG_SOC_NRF54L15_CPUAPP)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#ifdef (CONFIG_SOC_NRF54L15_ENGA_CPUAPP || CONFIG_SOC_NRF54L15_CPUAPP)
#if defined(CONFIG_SOC_NRF54L15_ENGA_CPUAPP) || defined(CONFIG_SOC_NRF54L15_CPUAPP)

Copy link
Contributor

Choose a reason for hiding this comment

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

And the same below.

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch 2 times, most recently from 22d13f5 to 9bd0569 Compare September 17, 2024 11:22
@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch from 9bd0569 to e3fac52 Compare September 17, 2024 14:26
@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch from e3fac52 to 9b20dc0 Compare September 17, 2024 15:32
@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch from 9b20dc0 to 8d9cb62 Compare September 18, 2024 08:08
@kapi-no
Copy link
Contributor

kapi-no commented Sep 18, 2024

I think that the MCUboot configuration misses one entry to disable FPROTECT

CONFIG_FPROTECT=n

When building the Bluetooth Peripheral LBS sample with the following command:

west build -b nrf54l15dk/nrf54l15/cpuapp -- -DS
B_CONFIG_BOOTLOADER_MCUBOOT=y -DCONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

I get the following output:

*** Booting MCUboot v2.1.0-dev-a41abbcbba5f ***
*** Using nRF Connect SDK v2.7.99-9b20dc0ee39b ***
*** Using Zephyr OS v3.6.99-9824af7b5a01 ***
I: Starting bootloader
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: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot
E: Protect mcuboot flash failed, cancel startup.

@kapi-no kapi-no self-requested a review September 18, 2024 09:20
@kapi-no
Copy link
Contributor

kapi-no commented Sep 18, 2024

The last update fixed the issue with FPROTECT. The happy path for the swap mode works as expected:

*** Booting MCUboot v2.1.0-dev-5eba7ab4cbfc ***
*** Using nRF Connect SDK v2.7.99-8d9cb62c36df ***
*** Using Zephyr OS v3.6.99-25e278581141 ***
I: Starting bootloader
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: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot
*** Booting My Application v2.7.99-8d9cb62c36df ***
*** Using nRF Connect SDK v2.7.99-8d9cb62c36df ***
*** Using Zephyr OS v3.6.99-25e278581141 ***
Starting Bluetooth Peripheral LBS example
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fa0
I: data wra: 0, 30
I: SoftDevice Controller build revision: 
I: 6c 48 af c9 da 87 c6 b7 |lH......
I: 89 37 8d 4c 36 5f bd 63 |.7.L6_.c
I: b9 bf 7e c2             |..~.    
I: HW Platform: Nordic Semiconductor (0x0002)
I: HW Variant: nRF54Lx (0x0005)
I: Firmware: Standard Bluetooth controller (0x00) Version 108.44872 Build 3330792137
I: No ID address. App must call settings_load()
Bluetooth initialized
I: Identity: C0:22:B6:54:D0:2D (random)
I: HCI: version 5.4 (0x0d) revision 0x3245, manufacturer 0x0059
I: LMP: version 5.4 (0x0d) subver 0x3245
Advertising successfully started
Connected
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: Image index: 0, Swap type: test
*** Booting MCUboot v2.1.0-dev-5eba7ab4cbfc ***
*** Using nRF Connect SDK v2.7.99-8d9cb62c36df ***
*** Using Zephyr OS v3.6.99-25e278581141 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=good, swap_type=0x2, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: test
I: Starting swap using move algorithm.
I: Bootloader chainload address offset: 0xc000
I: Jumping to the first image slot
*** Booting My Application v4.7.99-8d9cb62c36df ***
*** Using nRF Connect SDK v2.7.99-8d9cb62c36df ***
*** Using Zephyr OS v3.6.99-25e278581141 ***
Starting Bluetooth Peripheral LBS example
I: 2 Sectors of 4096 bytes
I: alloc wra: 0, fd0
I: data wra: 0, 0
I: SoftDevice Controller build revision: 
I: 6c 48 af c9 da 87 c6 b7 |lH......
I: 89 37 8d 4c 36 5f bd 63 |.7.L6_.c
I: b9 bf 7e c2             |..~.    
I: HW Platform: Nordic Semiconductor (0x0002)
I: HW Variant: nRF54Lx (0x0005)
I: Firmware: Standard Bluetooth controller (0x00) Version 108.44872 Build 3330792137
I: No ID address. App must call settings_load()
Bluetooth initialized
I: Identity: C0:22:B6:54:D0:2D (random)
I: HCI: version 5.4 (0x0d) revision 0x3245, manufacturer 0x0059
I: LMP: version 5.4 (0x0d) subver 0x3245
Advertising successfully started

@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented Sep 18, 2024

test-fw-nrfconnect-proprietary_esb - passed after re-run
test-fw-nrfconnect-nrf-iot_nrf_provisioning - failure irrelevant
test-fw-nrfconnect-ble_mesh - failure irrelevant (unstable)
test-low-leve - failure irrelevant

The rest CIs are green

@nordicjm
Copy link
Contributor

test-fw-nrfconnect-proprietary_esb - passed after re-run test-fw-nrfconnect-nrf-iot_nrf_provisioning - failure irrelevant test-fw-nrfconnect-ble_mesh - failure irrelevant (unstable) test-low-leve - failure irrelevant

The rest CIs are green

When re-running CI, go to the PR ci job itself (not individual jobs) then click build, the skip passed checkbox should be ticked, click run, it will only rerun failed CI but will update the status here and allow merging

A few placement changes had been done for nRF54l15pdk, but
were not copied for the DK.
This commit add them for the board.

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch from 8d9cb62 to 005c5f4 Compare September 19, 2024 09:01
@kapi-no
Copy link
Contributor

kapi-no commented Sep 19, 2024

@nvlsianpu, did you forget to bump the revision of sdk-zephyr in west manifest? It points still to the merged Zephyr PR?

@nvlsianpu
Copy link
Contributor Author

@kapi-no will fix in a moment - did locally, forgot to push...

To version with fixes to nrf54l15dk board, which are
needed for running MCUboot and BLE DFU.

Signed-off-by: Andrzej Puzdrowski <[email protected]>
@nvlsianpu nvlsianpu force-pushed the nrf54l15dk_fix_ble_dfu branch from 005c5f4 to 28d2fa5 Compare September 19, 2024 10:11
@NordicBuilder NordicBuilder removed the DNM label Sep 19, 2024
@carlescufi carlescufi merged commit dac867a into nrfconnect:main Sep 19, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. manifest manifest-mcuboot manifest-zephyr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants