From 35f7b2a9829bd0bfe2125f6fbfee1f2b4559ed5b Mon Sep 17 00:00:00 2001 From: Tsutomu Muroya Date: Sun, 2 Jul 2023 17:27:28 +0900 Subject: [PATCH 24/24] benchmark: Add uart support Signed-off-by: Tsutomu Muroya --- .../cortex-a/armv8/spider/benchmark/benchmark.c | 14 ++++++++++++++ .../cortex-a/armv8/spider/benchmark/benchmark.oil | 2 ++ 2 files changed, 16 insertions(+) diff --git a/examples/cortex-a/armv8/spider/benchmark/benchmark.c b/examples/cortex-a/armv8/spider/benchmark/benchmark.c index 15c3e2b2..91345c68 100644 --- a/examples/cortex-a/armv8/spider/benchmark/benchmark.c +++ b/examples/cortex-a/armv8/spider/benchmark/benchmark.c @@ -1,4 +1,5 @@ #include "tpl_os.h" +#include "serial.h" #define APP_Task_benchmark_START_SEC_CODE #include "tpl_memmap.h" @@ -46,6 +47,17 @@ void _lseek(){} extern void dhrystone_main(void); extern void coremark_main(void); +void print(uint8* data) +{ + int i = 0; + size_t len = strlen(data); + for (i=0; i< len; i++) + { + Serial_Tx(*data); + data++; + } +} + void float_to_char(uint8 input_array[], float input) { uint8 i, n; uint8 ascii_offset = 0x20; // 0x30 = '0' / 0x20 = ' ' @@ -107,12 +119,14 @@ void ms_sleep(int ms) FUNC(int, OS_APPL_CODE) main(void) { + Serial_Init(); StartOS(OSDEFAULTAPPMODE); return 0; } TASK(benchmark) { + ms_sleep(3000); dhrystone_main(); ms_sleep(10000); diff --git a/examples/cortex-a/armv8/spider/benchmark/benchmark.oil b/examples/cortex-a/armv8/spider/benchmark/benchmark.oil index c0c04360..a3effff2 100644 --- a/examples/cortex-a/armv8/spider/benchmark/benchmark.oil +++ b/examples/cortex-a/armv8/spider/benchmark/benchmark.oil @@ -31,6 +31,7 @@ CPU benchmark { APP_NAME = "benchmark_exe.elf"; // CFLAGS = "-O0"; // for debug CFLAGS = "-O3"; + CFLAGS = "-DHSCIF_1843200BPS"; LDFLAGS = "-Map=benchmark.map"; COMPILER = "arm-none-eabi-gcc"; CPPCOMPILER = "arm-none-eabi-g++"; @@ -43,6 +44,7 @@ CPU benchmark { CFLAGS="-DTIME=TIME"; // CFLAGS="-DCOREMARK_DEBUG"; // for Debug CFLAGS="-I./coremark -I./coremark/barebones -DITERATIONS=30000"; + LIBRARY = serial; }; SYSTEM_CALL = TRUE; MEMMAP = TRUE { -- 2.25.1