Skip to content

Commit b2d5c8e

Browse files
committed
test(zephyr/systest): add input_output
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent 3c15dce commit b2d5c8e

5 files changed

Lines changed: 106 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# @copyright Copyright (c) contributors to Project Ocre,
2+
# which has been established as Project Ocre a Series of LF Projects, LLC
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
cmake_minimum_required(VERSION 3.20.0)
7+
8+
list(APPEND ZEPHYR_EXTRA_MODULES ${CMAKE_CURRENT_LIST_DIR}/../../../..)
9+
10+
list(APPEND EXTRA_DTC_OVERLAY_FILE fstab.overlay)
11+
12+
list(APPEND OCRE_SDK_PRELOADED_IMAGES
13+
"print_args.wasm"
14+
"cat.wasm"
15+
)
16+
17+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
18+
19+
project (ocre_system_test_container)
20+
21+
add_library(Unity STATIC
22+
../../../../tests/Unity/src/unity.c
23+
)
24+
25+
target_include_directories(Unity PUBLIC
26+
../../../../tests/Unity/src
27+
)
28+
29+
target_sources(app
30+
PRIVATE
31+
../../input_output.c
32+
)
33+
34+
target_link_libraries(app
35+
PUBLIC
36+
OcreCore
37+
Unity
38+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# @copyright Copyright (c) contributors to Project Ocre,
2+
# which has been established as Project Ocre a Series of LF Projects, LLC
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=10485760
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @copyright Copyright (c) contributors to Project Ocre,
3+
* which has been established as Project Ocre a Series of LF Projects, LLC
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
&flash0 {
9+
reg = < 0x0 DT_SIZE_M(32) >;
10+
};
11+
12+
&storage_partition {
13+
reg = < 0xfc000 DT_SIZE_M(16) >;
14+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* @copyright Copyright (c) contributors to Project Ocre,
3+
* which has been established as Project Ocre a Series of LF Projects, LLC
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/ {
9+
fstab {
10+
compatible = "zephyr,fstab";
11+
lfs1: lfs1 {
12+
compatible = "zephyr,fstab,littlefs";
13+
read-size = <256>;
14+
prog-size = <256>;
15+
cache-size = <256>;
16+
lookahead-size = <256>;
17+
block-cycles = <512>;
18+
partition = <&storage_partition>;
19+
mount-point = "/lfs";
20+
automount;
21+
};
22+
};
23+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# @copyright Copyright (c) contributors to Project Ocre,
2+
# which has been established as Project Ocre a Series of LF Projects, LLC
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# Logging
7+
CONFIG_LOG=y
8+
CONFIG_LOG_MODE_MINIMAL=y
9+
10+
# Filesystem
11+
CONFIG_ZVFS_POLL_MAX=10
12+
CONFIG_ZVFS_OPEN_MAX=10
13+
14+
# Memory options
15+
CONFIG_DYNAMIC_THREAD_STACK_SIZE=8192
16+
CONFIG_MAIN_STACK_SIZE=8192
17+
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=-1
18+
19+
# pthreads
20+
CONFIG_MAX_PTHREAD_MUTEX_COUNT=8
21+
CONFIG_POSIX_THREAD_THREADS_MAX=8
22+
23+
# Ocre configuration
24+
CONFIG_OCRE=y
25+
CONFIG_OCRE_TIMER=y

0 commit comments

Comments
 (0)