Skip to content

Commit

Permalink
[nrf fromlist] tests: boards: nrf: coresight_stm: Add performance tes…
Browse files Browse the repository at this point in the history
…t for STM

Extend STM testing with verification whether STM benchmark
results are below predefined thresholds.
Set thresholds arbitrarily.

Add tests that allow code coverage calculation.

Upstream PR #: 79000

Signed-off-by: Sebastian Głąb <[email protected]>
  • Loading branch information
nordic-segl committed Dec 10, 2024
1 parent a8ca36c commit f60310a
Show file tree
Hide file tree
Showing 10 changed files with 565 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/boards/nordic/coresight_stm/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,7 @@ int main(void)
timing_report(t_tpd, rpt_tp, "tracepoint_d32");
#endif

/* Needed in coverage run to separate STM logs from printk() */
k_msleep(400);
return 0;
}
17 changes: 17 additions & 0 deletions tests/boards/nrf/coresight_stm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0
#

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})

if(NOT (CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP))
message(FATAL_ERROR "${BOARD}${BOARD_QUALIFIERS} is not supported for this sample")
endif()

project(nrf_coresight_stm)

target_sources(app PRIVATE $ENV{ZEPHYR_BASE}/samples/boards/nordic/coresight_stm/src/main.c)
11 changes: 11 additions & 0 deletions tests/boards/nrf/coresight_stm/Kconfig.sysbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright 2024 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: Apache-2.0

source "share/sysbuild/Kconfig"

config APP_CPUPPR_RUN
bool "Use PPR"

config APP_CPUFLPR_RUN
bool "Use FLPR"
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024 Nordic Semiconductor
* SPDX-License-Identifier: Apache-2.0
*/

&cpuppr_vpr {
status = "okay";
};

&cpuppr_ram3x_region {
status = "okay";
};

&cpuflpr_vpr {
status = "okay";
};
1 change: 1 addition & 0 deletions tests/boards/nrf/coresight_stm/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_LOG=y
Loading

0 comments on commit f60310a

Please sign in to comment.