Commit d11997db authored by Krzysztof Chruściński's avatar Krzysztof Chruściński Committed by Fabio Baltieri
Browse files

samples: boards: nordic: coresight_stm: Add flpr and ppr support



Add flpr and ppr core to the sample.

Since there are only 2 UARTs available on DK, local UART configuration
is using only cpuapp and cpurad.

Signed-off-by: default avatarKrzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
parent c61e92a7
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@

source "share/sysbuild/Kconfig"

config RAD_CORE_BOARD
string
	default "nrf54h20dk/nrf54h20/cpurad" if $(BOARD) = "nrf54h20dk"
config APP_CPUPPR_RUN
	bool "Use PPR"

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

&cpuppr_vpr {
	status = "okay";
};

&cpuppr_ram3x_region {
	status = "okay";
};

&cpuflpr_vpr {
	status = "okay";
};
+5 −0
Original line number Diff line number Diff line
CONFIG_LOG=y
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_BOOT_BANNER=n
CONFIG_PRINTK=n
+6 −0
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ tests:
    build_only: true
    required_snippets:
      - nordic-log-stm-dict
    extra_args:
      - SB_CONFIG_APP_CPUPPR_RUN=y
      - SB_CONFIG_APP_CPUFLPR_RUN=y
  sample.boards.nrf.coresight_stm:
    platform_allow:
      - nrf54h20dk/nrf54h20/cpuapp
@@ -26,6 +29,9 @@ tests:
        - "Timing for log message with 2 arguments:"
        - "Timing for log message with 3 arguments:"
        - "Timing for log_message with string:"
    extra_args:
      - SB_CONFIG_APP_CPUPPR_RUN=y
      - SB_CONFIG_APP_CPUFLPR_RUN=y
    required_snippets:
      - nordic-log-stm
  sample.boards.nrf.coresight_stm.local_uart:
+3 −2
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@
 */

#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/logging/log.h>

#ifdef CONFIG_LOG_FRONTEND_STMESP
@@ -37,6 +36,8 @@ static void get_core_name(void)
		core_name = "rad";
	} else if (strstr(CONFIG_BOARD_TARGET, "cpuppr")) {
		core_name = "ppr";
	} else if (strstr(CONFIG_BOARD_TARGET, "cpuflpr")) {
		core_name = "flpr";
	}
}

@@ -49,7 +50,7 @@ static void timing_report(uint32_t t, uint32_t rpt, const char *str)
{
	uint32_t ns = t_to_ns(t, rpt, CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC);

	printk("%s: Timing for %s: %d.%dus\n", core_name, str, ns / 1000, (ns % 1000) / 10);
	LOG_RAW("%s: Timing for %s: %d.%dus\n", core_name, str, ns / 1000, (ns % 1000) / 10);
}

int main(void)
Loading