diff --git a/tsi_app/m85/CMakeLists.txt b/tsi_app/m85/CMakeLists.txt new file mode 100644 index 00000000000000..e3a4fe1c954ffa --- /dev/null +++ b/tsi_app/m85/CMakeLists.txt @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(m85) + +target_sources(app PRIVATE src/main.c) diff --git a/tsi_app/m85/README.rst b/tsi_app/m85/README.rst new file mode 100644 index 00000000000000..f69631421fa040 --- /dev/null +++ b/tsi_app/m85/README.rst @@ -0,0 +1,30 @@ +.. _m85: + +TSI Banner +########### + +Overview +******** + +This is the core TSI M85 Zephyr platform application startup code. It prints TSI Banner to the console, enables logging functionality so that developers can log messages to console at different levels of severity such as Info, Warning, Error & Debug. It also enables the shell functionality. + +Building and Running +******************** + +This application can be built as follows: + +.. zephyr-app-commands:: + :zephyr-app: tsi_m85 + :host-os: unix + :board: tsi/skyp/m85 + :goals: run + :compact: + + +Output +============= + +.. code-block:: console +***** !! WELCOME TO TSAVORITE SCALABLE INTELLIGENCE !! ***** +[00:00:00.010,000] tsi_m85: Test Platform: tsi/skyp/m85 +[00:00:00.020,000] tsi_m85: Testing on FPGA; Multi module init TBD diff --git a/tsi_app/m85/overlay_deferred.conf b/tsi_app/m85/overlay_deferred.conf new file mode 100644 index 00000000000000..b3c4a878eef7e2 --- /dev/null +++ b/tsi_app/m85/overlay_deferred.conf @@ -0,0 +1,9 @@ +CONFIG_LOG_MODE_IMMEDIATE=n +CONFIG_LOG_MODE_DEFERRED=y +CONFIG_LOG_BUFFER_SIZE=1024 +CONFIG_LOG_PROCESS_THREAD=y +CONFIG_LOG_PROCESS_THREAD_SLEEP_MS=100 +CONFIG_LOG_PROCESS_TRIGGER_THRESHOLD=2 +CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=4096 +CONFIG_LOG_BLOCK_IN_THREAD=y +CONFIG_LOG_BACKEND_UART=y diff --git a/tsi_app/m85/overlay_immediate.conf b/tsi_app/m85/overlay_immediate.conf new file mode 100644 index 00000000000000..e386bfcd2ccc1f --- /dev/null +++ b/tsi_app/m85/overlay_immediate.conf @@ -0,0 +1 @@ +CONFIG_LOG_BACKEND_UART=y diff --git a/tsi_app/m85/prj.conf b/tsi_app/m85/prj.conf new file mode 100644 index 00000000000000..a4f24cd3c70aa0 --- /dev/null +++ b/tsi_app/m85/prj.conf @@ -0,0 +1,19 @@ +CONFIG_LOG=y +CONFIG_CONSOLE=y +CONFIG_LOG_PRINTK=y +CONFIG_UART_CONSOLE=y +CONFIG_BOOT_BANNER=n +CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN=n +CONFIG_SHELL_BACKEND_SERIAL_RX_POLL_PERIOD=1 +CONFIG_SHELL=n +CONFIG_LOG_BACKEND_UART=y +CONFIG_LOG_DEFAULT_LEVEL=4 + +# Use immediate mode so all messages are being +# printed. Under deferred mode, there may be +# dropped messages as there are quite a number of +# messages to be printed. +CONFIG_LOG_MODE_IMMEDIATE=y + +# Need bigger stack for immediate mode +CONFIG_MAIN_STACK_SIZE=4096 diff --git a/tsi_app/m85/src/main.c b/tsi_app/m85/src/main.c new file mode 100644 index 00000000000000..a6c819eeb47727 --- /dev/null +++ b/tsi_app/m85/src/main.c @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012-2014 Wind River Systems, Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include +#include +#include +#include +#include +#include + +#define PRINT_TSI_BOOT_BANNER() printk("***** !! WELCOME TO TSAVORITE SCALABLE INTELLIGENCE !! *****\n") +#define LOG_MODULE_NAME tsi_m85_ +LOG_MODULE_REGISTER(LOG_MODULE_NAME); + +int main(void) +{ + + /* TSI banner */ + PRINT_TSI_BOOT_BANNER(); + LOG_INF("Test Platform: %s",CONFIG_BOARD_TARGET); + + LOG_WRN("Testing on FPGA; Multi module init TBD"); + LOG_DBG("Debugging - tsi_app module"); + + return 0; +} diff --git a/tsi_app/m85/tsi_m85.yaml b/tsi_app/m85/tsi_m85.yaml new file mode 100644 index 00000000000000..000cbed8c0fbc4 --- /dev/null +++ b/tsi_app/m85/tsi_m85.yaml @@ -0,0 +1,17 @@ +sample: + description: TSI Core platform application on M85 + name: tsi_m85 +common: + tags: introduction + integration_platforms: + - ek_tsi_skyp + harness: console + harness_config: + type: one_line + regex: + -***** !! WELCOME TO TSAVORITE SCALABLE INTELLIGENCE !! ***** + - [00:00:00.010,000] tsi_m85: Test Platform: ek_tsi/skyp/m85 + - [00:00:00.020,000] tsi_m85: Testing on FPGA; Multi module init TBD +tests: + sample.m85: + tags: apps