Skip to content

Commit

Permalink
Tsi shell (#9)
Browse files Browse the repository at this point in the history
* FIR-442: M85 Banner and Logging

* FIR-442: M85 Banner and Logging

* @Fir-445: M85 -TSI shell

* @fir 445 - TSI -shell; corrected trailing whitespaces

* FIR 445 TSI-shell; README.rst -trailing space corrected

* FIR445 - TSI-shell; main.c trailing space correction

* FIR 445 TSI-shell - minor updates

---------

Co-authored-by: M.Mankal-TSI <mmankali@wssim0.tsavoritesi.net>
  • Loading branch information
mmankal and M.Mankal-TSI authored Dec 30, 2024
1 parent b3d4555 commit 76b7bb2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion subsys/shell/backends/Kconfig.backends
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ config SHELL_BACKEND_SERIAL_INIT_PRIORITY

config SHELL_PROMPT_UART
string "Displayed prompt name"
default "uart:~$ "
default "TSI:~$ "
help
Displayed prompt name for UART backend. If prompt is set, the shell will
send two newlines during initialization.
Expand Down
17 changes: 10 additions & 7 deletions tsi_core/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Building and Running
This application can be built as follows:
.. zephyr-app-commands::
:zephyr-app:
:host-os: unix
:board: ek_tsi_skyp/m85
:host-os:unix
:board:tsi/skyp/m85
:goals: run
:compact:

Expand All @@ -26,10 +26,10 @@ Sample Output
Tsavorite Scalable Intelligence

|||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||||||||||||||||||
|||||| |||||
|||||| |||||
|||||| |||||
||||||||||||||||| ||||| |||||
||||||||||||||||| ||||| |||||
||||||||||||||||| ||||| |||||
|||||| |||||
|||||| |||||| ||||| ||||||
Expand All @@ -41,6 +41,9 @@ Sample Output
||||| |||||
||| |||
|
[00:00:00.012,000] <inf> m85: Test Platform: tsi/skyp/m85
[00:00:00.013,000] <wrn> m85: Testing on FPGA
[00:00:00.012 000] <inf> m85: Test Platform: tsi/skyp/m85
[00:00:00.013 000] <wrn> m85: Testing on FPGA
TSI Logging enabled and printk is functional
TSI:~$
TSI:~$

3 changes: 2 additions & 1 deletion tsi_core/prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ CONFIG_LOG=y
CONFIG_CONSOLE=y
CONFIG_LOG_PRINTK=y
CONFIG_UART_CONSOLE=y
CONFIG_SHELL=n
CONFIG_SHELL=y
CONFIG_BOOT_BANNER=y
CONFIG_SHELL_BACKEND_SERIAL_INTERRUPT_DRIVEN=n
CONFIG_SHELL_BACKEND_SERIAL_RX_POLL_PERIOD=1

CONFIG_LOG_BACKEND_UART=y
#

# Use immediate mode so all messages are being
# printed. Under deferred mode, there may be
Expand Down
12 changes: 8 additions & 4 deletions tsi_core/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
sample:
description: TSI Core platform - M85
name: m85
description: TSI Core platform - M85
name: m85
common:
tags: introduction
integration_platforms:
- ek_tsi_skyp
- tsi/skyp/m85
harness: console
harness_config:
type: one_line
regex:
- "Welcome to TSI!"
- "Tsavorite Scalable Intelligence"
- [00:00:00.016 000] <inf> m85: Test Platform: tsi/skyp/m85
- [00:00:00.018 000] <wrn> m85: Testing on FPGA
- TSI Logging enabled and printk is functional
- TSI Shell
tests:
sample.m85:
tags: introduction
23 changes: 10 additions & 13 deletions tsi_core/src/main.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*
* Copyright (c) 2024-2025 TSI
* Copyright (c) 2024-2025 TSI
*
*/


#include <stddef.h>
#include <stdio.h>
#include <zephyr/kernel.h>
Expand All @@ -13,23 +12,21 @@
#include <zephyr/logging/log_output.h>

#define DATA_MAX_DLEN 8
#define LOG_MODULE_NAME m85
#define LOG_MODULE_NAME m85
LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#define PRINT_TSI_BOOT_BANNER() printk(" Tsavorite Scalable Intelligence \n")

int main(void)
{

/* TSI banner */
PRINT_TSI_BOOT_BANNER();
printf("\n");
printf(" |||||||||||||||||||||||||||||||||||||\n");;
printf(" ||||||||||||||||||||||||||||||||||||| \n");
printf(" |||||||||||||||||||||||||||||||||||||\n");
printf(" |||||||||||||||||||||||||||||||||||||\n");
printf(" |||||| |||||\n");
printf(" |||||| |||||\n");
printf(" |||||| ||||| \n");
printf(" ||||||||||||||||| ||||| ||||| \n");
printf(" ||||||||||||||||| ||||| |||||\n");
printf(" |||||| |||||\n");
printf(" |||||| |||||\n");
printf(" |||||| |||||| ||||| ||||||\n");
printf(" |||||||| |||||| ||||| ||||||||\n");
printf(" |||||||||||||| ||||||||||||||\n");
Expand All @@ -39,10 +36,10 @@ int main(void)
printf(" ||||| |||||\n");
printf(" ||| |||\n");
printf(" |\n");

LOG_INF("Test Platform: %s",CONFIG_BOARD_TARGET);
LOG_WRN("Testing on FPGA");
printk("TSI Logging enabled and printk is functional\n");
LOG_INF("Test Platform: %s", CONFIG_BOARD_TARGET);
LOG_WRN("Testing on FPGA");
printk("TSI Logging enabled & printk is functional\n");

return 0;
}

0 comments on commit 76b7bb2

Please sign in to comment.