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

samples: benchmark: coremark: add FLPR support for nRF54L15 DK #20462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kapi-no
Copy link
Contributor

@kapi-no kapi-no commented Feb 18, 2025

Added the FLPR core support for the nRF54L15 DK board target in the CoreMark sample.

Ref: NCSDK-30327

@kapi-no kapi-no requested review from a team as code owners February 18, 2025 14:13
@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Feb 18, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Feb 18, 2025

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: 5f1b98b0502e55a4730978dff1195d1feeabdd69

more details

sdk-nrf:

PR head: 5f1b98b0502e55a4730978dff1195d1feeabdd69
merge base: cbeb54f710176f373585e10aafc8bf8c64582031
target head (main): 2ad79c602d973ecfd471103e14d5f7e3e2a993a2
Diff

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 (8)
doc
│  ├── nrf
│  │  ├── releases_and_maturity
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
samples
│  ├── benchmarks
│  │  ├── coremark
│  │  │  ├── Kconfig
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── README.rst
│  │  │  ├── boards
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp.overlay
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuflpr.conf
│  │  │  │  │ nrf54l15dk_nrf54l15_cpuflpr.overlay
│  │  │  │ sysbuild.cmake

Outputs:

Toolchain

Version: aedb4c0245
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:aedb4c0245_bece0367df

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 41
  • ✅ Integration tests
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_cloud
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

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

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link.

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

Comment on lines 11 to 14
!(SOC_NRF54H20_CPUPPR)
config APP_BUTTON_AND_LED_UNSUPPORTED
bool
default y if SOC_NRF54H20_CPUPPR
default y if SOC_NRF54L05_CPUFLPR
default y if SOC_NRF54L10_CPUFLPR
default y if SOC_NRF54L15_CPUFLPR
Copy link
Contributor

Choose a reason for hiding this comment

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

consider: please add help why it is not supported if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment for the nRF54H20 DK as it seems that one button on the nRF54L15 DK is assigned to a different GPIO port. Thanks to that, I managed to have a different button assigned for the App core (Button 0) and a different button assigned for the FLPR core (Button 3).

@kapi-no kapi-no force-pushed the coremark_flpr_support_nrf54l branch from b31f082 to 136595e Compare February 20, 2025 12:37
Copy link

github-actions bot commented Feb 20, 2025

After documentation is built, you will find the preview for this PR here.

Preview links for modified nRF Connect SDK documents:

https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/fem/fem_nrf21540_gpio.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/fem/fem_nrf21540_gpio_spi.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/fem/fem_nrf2220.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/fem/fem_simple_gpio.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_gs.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_keys.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/app_dev/device_guides/wifi_coex.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/libraries/networking/downloader.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/protocols/bt/bt_mesh/dfu_over_bt_mesh.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/protocols/lte/index.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/protocols/matter/index.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/2.4.99-cs3_to_2.6.99-cs2/migration_guide_2.4.99-cs3_to_2.6.99-cs2_application.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/2.4.99-cs3_to_2.6.99-cs2/migration_guide_2.4.99-cs3_to_2.6.99-cs2_environment.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_1.x_to_2.x.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.4.99-cs3_to_2.6.99-cs2.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.5.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.6.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.7.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.8.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.9.0-nRF54H20-1-rc2.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_2.9.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_3.0.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs1.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_nRF54H20_cs_to_2_7_99-cs2.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_guide_spm_to_tf-m.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_hwmv2.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/migration_sysbuild.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/nRF54H20_migration_2.7/migration_guide_2.4.99-cs3_to_2.7_application.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/nRF54H20_migration_2.7/migration_guide_2.6.99-cs2_to_2.7_application.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/nRF54H20_migration_2.7/migration_guide_2.6.99-cs2_to_2_7_environment.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration/nRF54H20_migration_2.7/transition_guide_2.4.99-cs3_to_2.7_environment.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/migration_guides.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/release_notes.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/releases_and_maturity/releases/release-notes-changelog.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/samples/matter.html
doc/nrf/samples/matter.rst
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/samples/benchmarks/coremark/README.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/samples/bluetooth/fast_pair/locator_tag/README.html
https://ncsdoc.z6.web.core.windows.net/PR-20462/nrf/samples/cellular/nrf_cloud_multi_service/README.html

@kapi-no kapi-no force-pushed the coremark_flpr_support_nrf54l branch 5 times, most recently from f057a5e to f373765 Compare February 20, 2025 13:14
@@ -6,6 +6,11 @@

source "share/sysbuild/Kconfig"

config APP_CPUFLPR_RUN
bool "Run the CoreMark benchmark on the FLPR core"
depends on SUPPORT_FLPRCORE && !SOC_NRF54H20_CPUAPP && !SOC_NRF54L05_CPUAPP && !SOC_NRF54L10_CPUAPP
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that SB_CONFIG_SUPPORT_FLPRCORE should not be enabled for L05 and L10 (as FLPR is currently unsupported for these SoCs in our SDK). We overlooked that during our previous review.

Copy link
Contributor

Choose a reason for hiding this comment

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

Consider explicitly mentioning in Kconfig help that CoreMark does not support FLPR for nRF54H20 SoC yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -171,8 +193,22 @@ CONFIG_APP_MODE_FLASH_AND_RUN - Start CoreMark sample automatically after flashi
Otherwise, it will wait for the button press.

.. note::
The :kconfig:option:`CONFIG_APP_MODE_FLASH_AND_RUN` Kconfig option is always enabled for the PPR core.
This core does not use buttons.
The :kconfig:option:`CONFIG_APP_MODE_FLASH_AND_RUN` Kconfig option is always enabled for the PPR and FLPR cores on the ``nrf54h20dk/nrf54h20/cpuapp`` board target.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we already mention FLPR on nRF54H? It seems not yet supported by the sample

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right. Let's modify this in a subsequent PR

bool "Run CoreMark benchmark on start up" if \
!(SOC_NRF54H20_CPUPPR)
config APP_BUTTON_AND_LED_UNSUPPORTED
bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get the default relying on button and led DT aliases? Maybe e.g. $(dt_alias_enabled,<node alias>) could be used here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would also call it APP_BUTTON_AND_LED_SUPPORTED (to avoid double negation later)

.. group-tab:: nRF52 and nRF53 DKs
.. group-tab:: nRF52 DKs

Button 1:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we could avoid duplicating information from the introduction sentence)? E.g.:

   .. group-tab:: nRF52 DKs

      Application core: ``Button 1`` and ``LED 1``

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would need to get some feedback from our technical writers as your suggestion changes the template for documenting UI interface

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peknis? Any thoughts regarding @MarekPieta suggestion?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why not, as the essential is said already in the introduction. However, have the button and LED in bold.

status = "reserved";
};

/* Reserve button and LED related resources for the FLPR core. */
Copy link
Contributor

Choose a reason for hiding this comment

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

LED3 uses GPIO1 port which is actually not reserved here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would remove the reservation syntax. We should just be careful to avoid using the same HW peripherals from two different cores.

#include "app_aliases_common.overlay"

/* The following configuration is required to run the CPUFLPR core.
* It is imported from the nordic-flpr snippet.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we simply use the snippet from Zephyr and avoid copying file content here?
Ref: https://docs.zephyrproject.org/latest/build/snippets/using.html#application-required-snippets

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It would need a significant refactor also for the STM and the PPR snippet. Please create a task and we can improve this in the future. However, we would have a big if else block to cover each snippet variant for each board target

I am also trying to remove code duplications (1000lines+) using the Fast PAir Advertising Manager - it would be great to go back and help me remove this duplication is much more costly to maintain.

};

/* Reserve button and LED related resources for the FLPR core. */
&gpio0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you seen the dtc warnings during build?

CMake Warning at /home/mapi/ncs/zephyr/cmake/modules/dts.cmake:428 (message):
  dtc raised one or more warnings:

/home/mapi/ncs/nrf/samples/benchmarks/coremark/build/coremark/zephyr/zephyr.dts:760.19-767.5:
  Warning (simple_bus_reg): /soc/reserved-memory: missing or empty reg/ranges
  property

Call Stack (most recent call first):
  /home/mapi/ncs/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  /home/mapi/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/mapi/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:8 (find_package)
  Warning (simple_bus_reg): /soc/memory@2002f000: simple-bus unit address
  format error, expected "20028000"

Call Stack (most recent call first):
  /home/mapi/ncs/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
  /home/mapi/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/mapi/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
  CMakeLists.txt:8 (find_package)

May be worth to check what causes them

Copy link
Contributor

Choose a reason for hiding this comment

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

For some reason, building the sample locally fails for me (using Zephyr SDK 0.16.5). I will update my Zephyr SDK to 0.17.0 and recheck.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have the same DTS warnings. They are caused by the nordic-flpr snippet configuration

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we report them to the maintainers?

Copy link
Contributor Author

@kapi-no kapi-no Feb 21, 2025

Choose a reason for hiding this comment

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

The CPUFLPR warning is actually caused by the following misaligned configuration between the following DTS files:

https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/common/nordic/nrf54l15.dtsi#L17 (cpuflpr_sram: memory@2002f000)
https://github.com/zephyrproject-rtos/zephyr/blob/main/boards/nordic/nrf54l15dk/nrf54l15dk_nrf54l15_cpuflpr.dts#L24
(reg = <0x20028000 DT_SIZE_K(96)>;)

.. _SB_CONFIG_APP_CPUFLPR_RUN:

SB_CONFIG_APP_CPUFLPR_RUN - Enable execution for the FLPR core
Enable the benchmark execution also for the board targets with the FLPR core HW (for example, nRF54L15 and nRF54H20 SoCs).
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
Enable the benchmark execution also for the board targets with the FLPR core HW (for example, nRF54L15 and nRF54H20 SoCs).
Enable the benchmark execution also for the FLPR core for targets with the nRF54L15 SoC.

Copy link
Contributor

Choose a reason for hiding this comment

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

Current wording it misleading

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this option does not cover only the nRF54L15, it will also be used to enable execution for nRF54H20 DK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

rephrased the whole paragraph


This option is not supported for the following board targets that include an SoC with the FLPR core:

* ``nrf54h20dk/nrf54h20/cpuapp``
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider mentioning that nRF54H20 FLPR is not yet integrated in the sample, while L05 and L10 do not support FLPR at the SDK level

Copy link
Contributor Author

Choose a reason for hiding this comment

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

discussed offline, decided to not explain what is causing the lack of support for the listed board targets.

Added the FLPR core support for the nRF54L15 DK board target in the
CoreMark sample.

Ref: NCSDK-30327

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
@kapi-no kapi-no force-pushed the coremark_flpr_support_nrf54l branch from f373765 to 5f1b98b Compare February 21, 2025 16:38
@kapi-no kapi-no requested a review from MarekPieta February 21, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants