-
Couldn't load subscription status.
- Fork 1.4k
samples: benchmarks: coremark: migrate to STM logging on nrf54h20dk #17479
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
75889f2
samples: benchmarks: coremark: log end of test in the flash & run mode
kapi-no 12acf9a
samples: benchmarks: coremark: add a new line for visibility
kapi-no 4d3bb9d
samples: benchmarks: coremark: optimize stack for multi thread config
kapi-no dd330ee
samples: benchmarks: coremark: migrate to STM logging on nrf54h20dk
kapi-no 51c6389
samples: benchmarks: coremark: unify format in different logging modes
kapi-no 8aabb18
samples: benchmarks: coremark: enable logs from the fault handler
kapi-no File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,44 @@ For the button assignment, see the :ref:`coremark_user_interface` section. | |
| When the benchmark has completed, you can press the same button to restart it. | ||
| If you want to run the sample upon startup, enable the :ref:`CONFIG_APP_MODE_FLASH_AND_RUN <CONFIG_APP_MODE_FLASH_AND_RUN>` Kconfig option. | ||
|
|
||
| Logging | ||
| ======= | ||
|
|
||
| The logging mode depends on the chosen board target. | ||
| The sample supports two distinct modes that are described in the following subsections. | ||
|
|
||
| Standard logging | ||
| ---------------- | ||
|
|
||
| This logging mode is used by most board targets. | ||
| Each core running the CoreMark benchmark has an independent UART instance that is used for logging. | ||
|
|
||
| To see all logging information for the multi-core board targets, you must open a terminal for each active core. | ||
|
|
||
| The sample configuration sets up the following board targets for standard logging: | ||
|
|
||
| * ``nrf52840dk/nrf52840`` | ||
| * ``nrf52833dk/nrf52833`` | ||
| * ``nrf52dk/nrf52832`` | ||
| * ``nrf5340dk/nrf5340/cpuapp`` | ||
| * ``nrf54l15dk/nrf54l15/cpuapp`` | ||
|
|
||
| Multi-domain logging | ||
| -------------------- | ||
|
|
||
| This logging mode is used by multi-core board targets that support logging using the ARM Coresight STM. | ||
| Each core running the CoreMark benchmark writes its logging information to its own set of STM Extended Stimulus Port (STMESP). | ||
| One core in the system is designated to collect all logs and to send them to the chosen UART instance. | ||
| The sample supports multi-domain logging in the standalone mode. | ||
| See :ref:`zephyr:logging_cs_stm` for more details. | ||
|
|
||
| To see all logging information in this logging mode, it is enough to open one terminal. | ||
| When the core used for sending the logs to UART is running the CoreMark benchmark, the logging activity is blocked until the benchmark has completed. | ||
|
|
||
| The sample configuration sets up the following board targets for multi-domain logging: | ||
|
|
||
| * ``nrf54h20dk/nrf54h20/cpuapp`` | ||
|
|
||
| .. _coremark_user_interface: | ||
|
|
||
| User interface | ||
|
|
@@ -146,13 +184,6 @@ SB_CONFIG_APP_CPUPPR_RUN - Enable execution for the PPR core | |
|
|
||
| .. note:: | ||
| PPR code is run from RAM. | ||
| You must use the ``nordic-ppr`` snippet for the application core to be able to boot the PPR core. | ||
| Use the build argument ``coremark_SNIPPET=nordic-ppr``. | ||
| To build the sample with the execution for the PPR core enabled, run the following command: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| west build -b nrf54h20dk/nrf54h20/cpuapp -- -DSB_CONFIG_APP_CPUNET_RUN=n -DSB_CONFIG_APP_CPUPPR_RUN=y -Dcoremark_SNIPPET=nordic-ppr | ||
|
|
||
| Building and running | ||
| ******************** | ||
|
|
@@ -176,6 +207,11 @@ Testing | |
| After programming the sample to your development kit, complete the following steps to test it: | ||
|
|
||
| 1. |connect_terminal| | ||
|
|
||
| .. note:: | ||
| To see all logging information for the multi-core board targets and the standard logging mode, you must open a terminal for each active core. | ||
| The ``nrf5340dk/nrf5340/cpuapp`` is an example of such board target. | ||
|
|
||
| #. Reset your development kit. | ||
| #. To start the test, press the button assigned to the respective core. | ||
| For button assignment, refer to the :ref:`coremark_user_interface` section. | ||
|
|
@@ -190,29 +226,116 @@ After programming the sample to your development kit, complete the following ste | |
| #. Wait for the console output for all tested cores. | ||
| The results will be similar to the following example: | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| *** Booting nRF Connect SDK v2.7.0-b6081ebcf502 *** | ||
| *** Using Zephyr OS v3.6.99-100befc70c74 *** | ||
| I: CoreMark sample for nrf52840dk/nrf52840 | ||
| I: Press Push button switch 0 to start the test ... | ||
| I: Push button switch 0 pressed! | ||
| I: CoreMark started! CPU FREQ: 64000000 Hz, threads: 1, data size: 2000; iterations: 2000 | ||
|
|
||
| 2K performance run parameters for coremark. | ||
| CoreMark Size : 666 | ||
| Total ticks : 400968 | ||
| Total time (secs): 12.236000 | ||
| Iterations/Sec : 163.452109 | ||
| Iterations : 2000 | ||
| Compiler version : GCC12.2.0 | ||
| Compiler flags : -O3 + see compiler flags added by Zephyr | ||
| Memory location : STACK | ||
| seedcrc : 0xe9f5 | ||
| [0]crclist : 0xe714 | ||
| [0]crcmatrix : 0x1fd7 | ||
| [0]crcstate : 0x8e3a | ||
| [0]crcfinal : 0x4983 | ||
| Correct operation validated. See README.md for run and reporting rules. | ||
| CoreMark 1.0 : 163.452109 / GCC12.2.0 -O3 + see compiler flags added by Zephyr / STACK | ||
| I: CoreMark finished! Push Push button switch 0 to restart ... | ||
| .. tabs:: | ||
|
|
||
| .. group-tab:: Standard logging | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| *** Booting nRF Connect SDK v2.8.99-bd4a30a3a758 *** | ||
| *** Using Zephyr OS v3.7.99-02718211f9a9 *** | ||
| [00:00:00.261,383] <inf> app: Standard logging mode | ||
|
|
||
| [00:00:00.266,967] <inf> app: CoreMark sample for nrf52840dk/nrf52840 | ||
| [00:00:00.274,139] <inf> app: Press Push button switch 0 to start the test ... | ||
|
|
||
| [00:00:01.267,608] <inf> app: Push button switch 0 pressed! | ||
| [00:00:01.273,864] <inf> app: CoreMark started! CPU FREQ: 64000000 Hz, threads: 1, data size: 2000; iterations: 2000 | ||
|
|
||
| 2K performance run parameters for coremark. | ||
| CoreMark Size : 666 | ||
| Total ticks : 401215 | ||
| Total time (secs): 12.244000 | ||
| Iterations/Sec : 163.345312 | ||
| Iterations : 2000 | ||
| Compiler version : GCC12.2.0 | ||
| Compiler flags : -O3 + see compiler flags added by Zephyr | ||
| Memory location : STACK | ||
| seedcrc : 0xe9f5 | ||
| [0]crclist : 0xe714 | ||
| [0]crcmatrix : 0x1fd7 | ||
| [0]crcstate : 0x8e3a | ||
| [0]crcfinal : 0x4983 | ||
| Correct operation validated. See README.md for run and reporting rules. | ||
| CoreMark 1.0 : 163.345312 / GCC12.2.0 -O3 + see compiler flags added by Zephyr / STACK | ||
| [00:00:13.597,778] <inf> app: CoreMark finished! Press Push button switch 0 to restart ... | ||
|
|
||
| .. group-tab:: Multi-domain logging | ||
|
|
||
| .. code-block:: console | ||
|
|
||
| *** Booting nRF Connect SDK v2.8.99-f9add8e14565 *** | ||
| *** Using Zephyr OS v3.7.99-02718211f9a9 *** | ||
| [00:00:00.208,166] <inf> app/app: Multi-domain logging mode | ||
| [00:00:00.208,168] <inf> app/app: This core is used to output logs from all cores to terminal over UART | ||
|
|
||
| [00:00:00.208,441] <inf> ppr/app: CoreMark sample for [email protected]/nrf54h20/cpuppr | ||
| [00:00:00.208,496] <inf> ppr/app: CoreMark started! CPU FREQ: 16000000 Hz, threads: 1, data size: 2000; iterations: 500 | ||
|
|
||
| [00:00:01.186,256] <inf> rad/app: CoreMark sample for [email protected]/nrf54h20/cpurad | ||
| [00:00:01.186,305] <inf> rad/app: Press Push button 1 to start the test ... | ||
|
|
||
| [00:00:01.285,614] <inf> app/app: CoreMark sample for [email protected]/nrf54h20/cpuapp | ||
| [00:00:01.285,654] <inf> app/app: Press Push button 0 to start the test ... | ||
|
|
||
| [00:00:04.984,744] <inf> app/app: Push button 0 pressed! | ||
| [00:00:04.984,753] <inf> app/app: CoreMark started! CPU FREQ: 320000000 Hz, threads: 1, data size: 2000; iterations: 10000 | ||
|
|
||
| [00:00:04.984,755] <inf> app/app: Logging is blocked for all cores until this core finishes the CoreMark benchmark | ||
|
|
||
| [00:00:05.714,470] <inf> rad/app: Push button 1 pressed! | ||
| [00:00:05.714,486] <inf> rad/app: CoreMark started! CPU FREQ: 256000000 Hz, threads: 1, data size: 2000; iterations: 10000 | ||
|
|
||
| 2K performance run parameters for coremark. | ||
| CoreMark Size : 666 | ||
| Total ticks : 13471150 | ||
| Total time (secs): 13.471000 | ||
| Iterations/Sec : 37.116769 | ||
| Iterations : 500 | ||
| Compiler version : GCC12.2.0 | ||
| Compiler flags : -O3 + see compiler flags added by Zephyr | ||
| Memory location : STACK | ||
| seedcrc : 0xe9f5 | ||
| [0]crclist : 0xe714 | ||
| [0]crcmatrix : 0x1fd7 | ||
| [0]crcstate : 0x8e3a | ||
| [0]crcfinal : 0xa14c | ||
| Correct operation validated. See README.md for run and reporting rules. | ||
| CoreMark 1.0 : 37.116769 / GCC12.2.0 -O3 + see compiler flags added by Zephyr / STACK | ||
| [00:00:13.595,072] <inf> ppr/app: CoreMark finished! Press the reset button to restart... | ||
|
|
||
| 2K performance run parameters for coremark. | ||
| CoreMark Size : 666 | ||
| Total ticks : 11436744 | ||
| Total time (secs): 11.436000 | ||
| Iterations/Sec : 874.431619 | ||
| Iterations : 10000 | ||
| Compiler version : GCC12.2.0 | ||
| Compiler flags : -O3 + see compiler flags added by Zephyr | ||
| Memory location : STACK | ||
| seedcrc : 0xe9f5 | ||
| [0]crclist : 0xe714 | ||
| [0]crcmatrix : 0x1fd7 | ||
| [0]crcstate : 0x8e3a | ||
| [0]crcfinal : 0x988c | ||
| Correct operation validated. See README.md for run and reporting rules. | ||
| CoreMark 1.0 : 874.431619 / GCC12.2.0 -O3 + see compiler flags added by Zephyr / STACK | ||
| [00:00:16.446,916] <inf> app/app: CoreMark finished! Press Push button 0 to restart ... | ||
|
|
||
| 2K performance run parameters for coremark. | ||
| CoreMark Size : 666 | ||
| Total ticks : 14290211 | ||
| Total time (secs): 14.290000 | ||
| Iterations/Sec : 699.790063 | ||
| Iterations : 10000 | ||
| Compiler version : GCC12.2.0 | ||
| Compiler flags : -O3 + see compiler flags added by Zephyr | ||
| Memory location : STACK | ||
| seedcrc : 0xe9f5 | ||
| [0]crclist : 0xe714 | ||
| [0]crcmatrix : 0x1fd7 | ||
| [0]crcstate : 0x8e3a | ||
| [0]crcfinal : 0x988c | ||
| Correct operation validated. See README.md for run and reporting rules. | ||
| CoreMark 1.0 : 699.790063 / GCC12.2.0 -O3 + see compiler flags added by Zephyr / STACK | ||
| [00:00:19.911,390] <inf> rad/app: CoreMark finished! Press Push button 1 to restart ... | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # | ||
| # Copyright (c) 2024 Nordic Semiconductor ASA | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
|
||
| CONFIG_LOG_MODE_IMMEDIATE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # | ||
| # Copyright (c) 2024 Nordic Semiconductor ASA | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
|
||
| CONFIG_LOG_MODE_IMMEDIATE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # | ||
| # Copyright (c) 2024 Nordic Semiconductor ASA | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
|
||
| CONFIG_LOG_MODE_IMMEDIATE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpunet.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # | ||
| # Copyright (c) 2024 Nordic Semiconductor ASA | ||
| # | ||
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
|
||
| CONFIG_LOG_MODE_IMMEDIATE=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,3 +4,5 @@ | |
| # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
|
|
||
| CONFIG_COREMARK_ITERATIONS=4000 | ||
|
|
||
| CONFIG_LOG_MODE_IMMEDIATE=y | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.