diff --git a/samples/benchmarks/coremark/Kconfig.sysbuild b/samples/benchmarks/coremark/Kconfig.sysbuild index fd8ca4554861..fb277c0e7d89 100644 --- a/samples/benchmarks/coremark/Kconfig.sysbuild +++ b/samples/benchmarks/coremark/Kconfig.sysbuild @@ -14,12 +14,4 @@ config APP_CPUNET_RUN config APP_CPUPPR_RUN bool "Run the CoreMark benchmark on the PPR core" depends on SUPPORT_PPRCORE - depends on !BOARD_NRF54H20DK || !APP_CPUNET_RUN - help - Due to the limited number of UART ports on the nRF54H20 DK, you can run the CoreMark - benchmark only on two cores at a time; application core and either radio core or PPR - core. - - 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. You need to provide the "coremark_SNIPPET=nordic" - build argument. + default y diff --git a/samples/benchmarks/coremark/README.rst b/samples/benchmarks/coremark/README.rst index 07ffe64a6cab..0518c902cb0a 100644 --- a/samples/benchmarks/coremark/README.rst +++ b/samples/benchmarks/coremark/README.rst @@ -146,13 +146,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 ******************** diff --git a/samples/benchmarks/coremark/boards/nrf52840dk_nrf52840.conf b/samples/benchmarks/coremark/boards/nrf52840dk_nrf52840.conf new file mode 100644 index 000000000000..219658de4e83 --- /dev/null +++ b/samples/benchmarks/coremark/boards/nrf52840dk_nrf52840.conf @@ -0,0 +1,6 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + +CONFIG_LOG_MODE_MINIMAL=y diff --git a/samples/benchmarks/coremark/boards/nrf52dk_nrf52832.conf b/samples/benchmarks/coremark/boards/nrf52dk_nrf52832.conf new file mode 100644 index 000000000000..219658de4e83 --- /dev/null +++ b/samples/benchmarks/coremark/boards/nrf52dk_nrf52832.conf @@ -0,0 +1,6 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + +CONFIG_LOG_MODE_MINIMAL=y diff --git a/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpuapp.conf b/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpuapp.conf index 4e6c4aef68f7..f5a671aadd66 100644 --- a/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpuapp.conf +++ b/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -4,3 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause CONFIG_BOARD_ENABLE_CPUNET=y + +CONFIG_LOG_MODE_MINIMAL=y diff --git a/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpunet.conf b/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpunet.conf new file mode 100644 index 000000000000..219658de4e83 --- /dev/null +++ b/samples/benchmarks/coremark/boards/nrf5340dk_nrf5340_cpunet.conf @@ -0,0 +1,6 @@ +# +# Copyright (c) 2024 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + +CONFIG_LOG_MODE_MINIMAL=y diff --git a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.conf b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.conf index e171b0644802..98e1af75903a 100644 --- a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.conf +++ b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.conf @@ -4,3 +4,11 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause CONFIG_COREMARK_ITERATIONS=10000 + +# Kconfigs required for the STM standalone logging, imported from the nordic-log-stm snippet. +CONFIG_TEST_LOGGING_DEFAULTS=n +CONFIG_LOG_FRONTEND=y +CONFIG_LOG_FRONTEND_ONLY=y +CONFIG_LOG_FRONTEND_STMESP=y +CONFIG_LOG_FRONTEND_STMESP_FSC=y +CONFIG_UART_ASYNC_API=y diff --git a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.overlay b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.overlay index bb3511cfc403..a15ba6dafa2f 100644 --- a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.overlay +++ b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuapp.overlay @@ -29,3 +29,23 @@ owned-channels = <7>; status = "okay"; }; + +/* DTS nodes required to run the cpuppr target. */ +&cpuppr_vpr { + status = "okay"; +}; + +&cpuppr_ram3x_region { + status = "okay"; +}; + +/* DTS nodes required for the STM standalone logging, imported from the nordic-log-stm snippet. */ +&tbm { + status = "okay"; +}; + +&tddconf { + status = "okay"; + stmsink = "etr"; + portconfig = <0>; +}; diff --git a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.conf b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.conf index c090057e78c8..4cf2830eb7c7 100644 --- a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.conf +++ b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.conf @@ -4,3 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause CONFIG_COREMARK_ITERATIONS=500 + +# Kconfigs required for the STM standalone logging, imported from the nordic-log-stm snippet. +CONFIG_TEST_LOGGING_DEFAULTS=n +CONFIG_LOG_FRONTEND=y +CONFIG_LOG_FRONTEND_ONLY=y +CONFIG_LOG_FRONTEND_STMESP=y +CONFIG_LOG_FRONTEND_STMESP_FSC=y diff --git a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.overlay b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.overlay index 6901e9f5cefb..cabad3b9d342 100644 --- a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.overlay +++ b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpuppr.overlay @@ -4,4 +4,10 @@ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */ -/* Intentionally left empty to overwrite default app.overlay. */ +/* Disable the default UART node for the pepper core, as logs are forwarded + * with STM and the application core UART. This setting also prevents access + * issues to the same UART instance from two or more different cores. + */ +&uart135 { + status = "disabled"; +}; diff --git a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.conf b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.conf index e171b0644802..60bd64b97154 100644 --- a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.conf +++ b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.conf @@ -4,3 +4,10 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause CONFIG_COREMARK_ITERATIONS=10000 + +# Kconfigs required for the STM standalone logging, imported from the nordic-log-stm snippet. +CONFIG_TEST_LOGGING_DEFAULTS=n +CONFIG_LOG_FRONTEND=y +CONFIG_LOG_FRONTEND_ONLY=y +CONFIG_LOG_FRONTEND_STMESP=y +CONFIG_LOG_FRONTEND_STMESP_FSC=y diff --git a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.overlay b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.overlay index eeb0d38c9f0f..4b5e49657c10 100644 --- a/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.overlay +++ b/samples/benchmarks/coremark/boards/nrf54h20dk_nrf54h20_cpurad.overlay @@ -40,3 +40,11 @@ owned-channels = <6>; status = "okay"; }; + +/* Disable the default UART node for the radio core, as logs are forwarded + * with STM and the application core UART. This setting also prevents access + * issues to the same UART instance from two or more different cores. + */ +&uart135 { + status = "disabled"; +}; diff --git a/samples/benchmarks/coremark/boards/nrf54l15dk_nrf54l15_cpuapp.conf b/samples/benchmarks/coremark/boards/nrf54l15dk_nrf54l15_cpuapp.conf index 304e69ba4645..9999172fca4c 100644 --- a/samples/benchmarks/coremark/boards/nrf54l15dk_nrf54l15_cpuapp.conf +++ b/samples/benchmarks/coremark/boards/nrf54l15dk_nrf54l15_cpuapp.conf @@ -4,3 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause CONFIG_COREMARK_ITERATIONS=4000 + +CONFIG_LOG_MODE_MINIMAL=y diff --git a/samples/benchmarks/coremark/boards/nrf54l15pdk_nrf54l15_cpuapp.conf b/samples/benchmarks/coremark/boards/nrf54l15pdk_nrf54l15_cpuapp.conf index 304e69ba4645..9999172fca4c 100644 --- a/samples/benchmarks/coremark/boards/nrf54l15pdk_nrf54l15_cpuapp.conf +++ b/samples/benchmarks/coremark/boards/nrf54l15pdk_nrf54l15_cpuapp.conf @@ -4,3 +4,5 @@ # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause CONFIG_COREMARK_ITERATIONS=4000 + +CONFIG_LOG_MODE_MINIMAL=y diff --git a/samples/benchmarks/coremark/prj.conf b/samples/benchmarks/coremark/prj.conf index e4e18eef6cad..fade2c90af10 100644 --- a/samples/benchmarks/coremark/prj.conf +++ b/samples/benchmarks/coremark/prj.conf @@ -14,7 +14,6 @@ CONFIG_COMPILER_OPT="-O3" # Config results output CONFIG_LOG=y -CONFIG_LOG_MODE_MINIMAL=y CONFIG_LOG_DEFAULT_LEVEL=0 CONFIG_CBPRINTF_FP_SUPPORT=y diff --git a/samples/benchmarks/coremark/sample.yaml b/samples/benchmarks/coremark/sample.yaml index c2f99ba48b3b..d1a62184a331 100644 --- a/samples/benchmarks/coremark/sample.yaml +++ b/samples/benchmarks/coremark/sample.yaml @@ -81,15 +81,3 @@ tests: - nrf54h20dk/nrf54h20/cpuapp tags: ci_build sysbuild ci_samples_benchmarks extra_args: EXTRA_CONF_FILE="prj_multiple_threads.conf" - sample.benchmark.coremark_ppr: - sysbuild: true - build_only: true - platform_allow: - - nrf54h20dk/nrf54h20/cpuapp - integration_platforms: - - nrf54h20dk/nrf54h20/cpuapp - tags: ci_build sysbuild ci_samples_benchmarks - extra_args: - SB_CONFIG_APP_CPUNET_RUN=n - SB_CONFIG_APP_CPUPPR_RUN=y - coremark_SNIPPET=nordic-ppr diff --git a/samples/benchmarks/coremark/src/main.c b/samples/benchmarks/coremark/src/main.c index d51b5640376d..4c3e9c0614b5 100644 --- a/samples/benchmarks/coremark/src/main.c +++ b/samples/benchmarks/coremark/src/main.c @@ -50,7 +50,8 @@ static K_SEM_DEFINE(start_coremark, 0, 1); static atomic_t coremark_in_progress; /* Enforce synchronous logging as the sample doesn't flush logs. */ -BUILD_ASSERT(IS_ENABLED(CONFIG_LOG_MODE_MINIMAL) || IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE), +BUILD_ASSERT(IS_ENABLED(CONFIG_LOG_MODE_MINIMAL) || IS_ENABLED(CONFIG_LOG_MODE_IMMEDIATE) || + IS_ENABLED(CONFIG_LOG_FRONTEND_ONLY), "Logs should be processed synchronously to avoid negative impact on the " "benchamrk performance");