-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
base: main
Are you sure you want to change the base?
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 5f1b98b0502e55a4730978dff1195d1feeabdd69 more detailssdk-nrf:
Github labels
List of changed files detected by CI (8)
Outputs:ToolchainVersion: aedb4c0245 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
You can find the documentation preview for this PR at this link. Note: This comment is automatically posted by the Documentation Publish GitHub Action. |
samples/benchmarks/coremark/Kconfig
Outdated
!(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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
b31f082
to
136595e
Compare
f057a5e
to
f373765
Compare
@@ -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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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``
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. */ |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current wording it misleading
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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`` |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
f373765
to
5f1b98b
Compare
Added the FLPR core support for the nRF54L15 DK board target in the CoreMark sample.
Ref: NCSDK-30327